URL
https://opencores.org/ocsvn/forwardcom/forwardcom/trunk
Subversion Repositories forwardcom
[/] [forwardcom/] [examples/] [hello.as] - Rev 158
Go to most recent revision | Compare with Previous | Blame | View Log
/**************************** hello.as *************************************** Author: Agner Fog* date created: 2018-02-23* last modified: 2021-08-04* Version: 1.11* Project: ForwardCom example, assembly code* Description: Hello world example** Copyright 2018-2021 GNU General Public License http://www.gnu.org/licenses*****************************************************************************/extern _puts: function // library function: write string to stdoutconst section read ip // read-only data sectionhello: int8 "\nHello ForwardCom world!", 0 // char string with terminating zeroconst endcode section execute // executable code section_main function public // program start// breakpoint // uncomment this if you want to wait for user to press runint64 r0 = address([hello]) // calculate address of stringcall _puts // call puts. parameter is in r0int r0 = 0 // program return valuereturn // return from main_main endcode end
Go to most recent revision | Compare with Previous | Blame | View Log
