WEGA 3.2 compatible crt0.s

This commit is contained in:
Oliver Lehmann 2008-06-07 19:36:19 +00:00
parent bea2ec492d
commit c36e308775
1 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,33 @@
crt0 module
internal
foo word
external
_environ word
__callex procedure
_exit procedure
_main procedure
global
start procedure
entry
ld r7,@r15
lda r6,%0000+2(r15)
ld r2,@r6
clr %0000-2(r2)
ld r5,r6
subl rr0,rr0
cpir r0,@r5,r1,eq
cp r5,r2
jr ult,_foo
dec r5,#2
_foo:
ld _environ,r5
call _main
ld r7,r2
call __callex
sc #1
end start
end crt0