mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 04:26:13 +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
|
out 0x3d,r30
|
||||||
ldi r30,hi8(_stack_top)
|
ldi r30,hi8(_stack_top)
|
||||||
out 0x3e,r30
|
out 0x3e,r30
|
||||||
|
|
||||||
// Initialize .data section
|
// Initialize .data section
|
||||||
ldi XL,lo8(_data)
|
ldi XL,lo8(_data)
|
||||||
ldi XH,hi8(_data)
|
ldi XH,hi8(_data)
|
||||||
@ -16,23 +16,22 @@
|
|||||||
.LCopyDataLoop:
|
.LCopyDataLoop:
|
||||||
lpm r0, Z+
|
lpm r0, Z+
|
||||||
st X+, r0
|
st X+, r0
|
||||||
|
|
||||||
cpi XL, lo8(_edata)
|
cpi XL, lo8(_edata)
|
||||||
cpc XH, YH
|
cpc XH, YH
|
||||||
brne .LCopyDataLoop
|
brne .LCopyDataLoop
|
||||||
|
|
||||||
// Zero .bss section
|
// Zero .bss section
|
||||||
ldi XL,lo8(_bss_start)
|
ldi XL,lo8(_bss_start)
|
||||||
ldi XH,hi8(_bss_start)
|
ldi XH,hi8(_bss_start)
|
||||||
ldi YH,hi8(_bss_end)
|
ldi YH,hi8(_bss_end)
|
||||||
.LZeroBssLoop:
|
.LZeroBssLoop:
|
||||||
st X+, r1
|
st X+, r1
|
||||||
|
|
||||||
cpi XL, lo8(_bss_end)
|
cpi XL, lo8(_bss_end)
|
||||||
cpc XH, YH
|
cpc XH, YH
|
||||||
brne .LZeroBssLoop
|
brne .LZeroBssLoop
|
||||||
|
|
||||||
call PASCALMAIN
|
jmp PASCALMAIN
|
||||||
call _FPC_haltproc
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user