Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .module crt0
- .globl _main
- .globl l__INITIALIZER
- .globl s__INITIALIZED
- .globl s__INITIALIZER
- .area _HEADER (ABS)
- .org 23867
- Basic: .dw 0x100, EndBasic-Begin
- Begin: .dw 0x30FD,0x000E,0xB300,0x005F,0xF93A,0x30C0,0x000E,0x5300,0x005D,0xEA3A
- ;; entry point
- jp init
- .area _INITIALIZER(ABS)
- .area _GSINIT(ABS)
- gsinit::
- ld bc, #l__INITIALIZER
- ld a, b
- or a, c
- jr Z, gsinit_next
- ld de, #s__INITIALIZED
- ld hl, #s__INITIALIZER
- ldir
- gsinit_next:
- .area _GSFINAL(ABS)
- ret
- init:
- call gsinit
- ld sp, #. - 4
- call _main
- di
- 1$:
- halt
- jr 1$
- ;; Ordering of segments for the linker.
- .area _HOME
- .area _CODE
- EndBasic:
- nop
- .area _DATA
- .area _INITIALIZED
- .area _BSEG
- .area _BSS
- .area _HEAP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement