Last change
on this file since 444 was
444,
checked in by satin@…, 6 years ago
|
add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc
|
File size:
343 bytes
|
Rev | Line | |
---|
[444] | 1 | .globl start |
---|
| 2 | start: |
---|
| 3 | sub.w #0x8,sp |
---|
| 4 | mov.w 0x8[sp],[sp] |
---|
| 5 | movea.w 0xc[sp],r0 |
---|
| 6 | mov.w r0,0x4[sp] |
---|
| 7 | tloop: test.w [r0+] |
---|
| 8 | jne tloop |
---|
| 9 | cmp.w r0,[0x4[sp]] |
---|
| 10 | jge l1 |
---|
| 11 | sub.w #0x4,r0 |
---|
| 12 | l1: mov.w r0,0x8[sp] |
---|
| 13 | mov.w r0,_environ |
---|
| 14 | |
---|
| 15 | |
---|
| 16 | call _main,[sp] |
---|
| 17 | add.w #0xc,sp |
---|
| 18 | push r0 |
---|
| 19 | call _exit,[sp] |
---|
| 20 | add.w #0x4,sp |
---|
| 21 | chlvl #0,#1 |
---|
| 22 | |
---|
| 23 | .data |
---|
| 24 | |
---|
| 25 | .globl _environ |
---|
| 26 | _environ: |
---|
| 27 | .word 0 |
---|
| 28 | |
---|
Note: See
TracBrowser
for help on using the repository browser.