mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-17 13:39:36 +02:00
* PASCALMAIN does not return, so we can jmp to it
git-svn-id: trunk@30770 -
This commit is contained in:
parent
ca9ef3d209
commit
bbcc66ad15
@ -6,7 +6,7 @@
|
||||
out 0x3d,r30
|
||||
ldi r30,hi8(_stack_top)
|
||||
out 0x3e,r30
|
||||
|
||||
|
||||
// Initialize .data section
|
||||
ldi XL,lo8(_data)
|
||||
ldi XH,hi8(_data)
|
||||
@ -16,23 +16,22 @@
|
||||
.LCopyDataLoop:
|
||||
lpm r0, Z+
|
||||
st X+, r0
|
||||
|
||||
|
||||
cpi XL, lo8(_edata)
|
||||
cpc XH, YH
|
||||
brne .LCopyDataLoop
|
||||
|
||||
|
||||
// Zero .bss section
|
||||
ldi XL,lo8(_bss_start)
|
||||
ldi XH,hi8(_bss_start)
|
||||
ldi YH,hi8(_bss_end)
|
||||
.LZeroBssLoop:
|
||||
st X+, r1
|
||||
|
||||
|
||||
cpi XL, lo8(_bss_end)
|
||||
cpc XH, YH
|
||||
brne .LZeroBssLoop
|
||||
|
||||
call PASCALMAIN
|
||||
call _FPC_haltproc
|
||||
jmp PASCALMAIN
|
||||
.text
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user