OpenCores
URL https://opencores.org/ocsvn/forwardcom/forwardcom/trunk

Subversion Repositories forwardcom

[/] [forwardcom/] [libraries/] [startup_light.as] - Blame information for rev 128

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 113 Agner
/*********************************  startup_light.as  *************************
2
* Author:        Agner Fog
3
* date created:  2018-03-22
4
* Last modified: 2021-05-26
5
* Version:       1.11
6
* Project:       ForwardCom library libc_light.li
7
* Description:   startup: program initialization
8
* C declaration: void _entry_point(int argc, char *argv[], char *envp[])
9
*
10
* This is the default startup code for ForwardCom programs.
11
* This is a light version for small systems. It does not call global
12
* constructors and destructors, but just calls _main
13
*
14
* Copyright 2018-2021 GNU General Public License http://www.gnu.org/licenses
15
*****************************************************************************/
16
code section execute align = 4
17
 
18
extern _main: function reguse = 0xFFFFFFFF,0xFFFFFFFF
19
 
20
// execution starts here:
21
__entry_point function public reguse = 0xFFFFFFFF,0xFFFFFFFF
22
 
23
call _main                             // call main, the user program
24
 
25
sys_call(1, 0x10)                      // system call exit
26
filler                                 // make sure execution stops if the system call returns for some reason
27
 
28
__entry_point end
29
 
30
code end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.