Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Header.inc"
- #include "Rogue.inc"
- .org 0
- .echo "Program Start: ",$
- .echo "Size: ",ProgEnd
- ; Executable Header
- db 0 ; Size of Stack needed
- ProgStart:
- ; End Headers Start Data
- ld bc,768 ; this is a backbuffer
- call AllocateMem
- if(ALLOCATE_SUCCESS)
- jp nz,KernelPanic
- push ix
- pop de
- ldrHL(_)
- ld (hl),e
- inc hl
- ld (hl),d
- Loop:
- in a,(04h)
- bit 3, a
- jr nz,Loop
- di
- ldrHL(_)
- ld e,(hl)
- inc hl
- ld d,(hl) ;ld de,(_)
- ld hl,LCDBuffer
- push de
- push hl
- ld bc,768
- ldir
- ldrDE(++_)
- callr(GetPointer) ; loc in ix
- ld a,0 ; xpos
- ld l,48 ; ypos
- ld b,9 ; height
- ld c,3 ; width
- call LargeSpriteAND ; draw the mask
- ldrDE(+++_)
- callr(GetPointer)
- ld a,0 ; xpos
- ld l,48 ; ypos
- ld b,9 ; height
- ld c,3 ; width
- call LargeSpriteOR ; draw the Sprite
- ldrDE(++++_)
- callr(GetPointer) ; loc in ix
- ld a,34 ; xpos
- ld l,13 ; ypos
- ld b,25 ; height
- ld c,4 ; width
- call LargeSpriteAND ; draw the mask
- ldrDE(+++++_)
- callr(GetPointer)
- ld a,34 ; xpos
- ld l,13 ; ypos
- ld b,25 ; height
- ld c,4 ; width
- call LargeSpriteOR ; draw the Sprite
- rFastCopy
- call FlushKeys
- WaitLoop:
- call GetKey
- cp kUp
- callrz(callSleep)
- cp kDown
- jr z,callBoot
- ; do key testing here
- in a,(04h)
- bit 3, a
- jr z,WaitLoop
- pop de
- pop hl
- ld bc,768
- ldir
- rFastCopy
- ei
- jpr(Loop) ; return to the check
- GetPointer:
- call GetFilePointer
- inc de
- inc de
- push de
- pop ix
- ret
- callSleep:
- call Sleep
- xor a
- ret
- callBoot:
- call ClearBuffer
- rFastCopy
- jp Boot
- _ db 0,0
- _ db "usr/share/system/menu_mask.bif",0
- _ db "usr/share/system/menu.bif",0
- _ db "usr/share/system/overlay_mask.bif",0
- _ db "usr/share/system/overlay.bif",0
- ProgEnd:
- .echo "Program End: ",$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement