Advertisement
Eeems

Untitled

Jul 3rd, 2011
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "Header.inc"
  2. #include "Rogue.inc"
  3. .org 0
  4. .echo "Program Start: ",$
  5. .echo "Size: ",ProgEnd
  6. ; Executable Header
  7.     db 0            ; Size of Stack needed
  8. ProgStart:
  9. ; End Headers Start Data
  10.     ld bc,768   ; this is a backbuffer
  11.     call AllocateMem
  12.     if(ALLOCATE_SUCCESS)
  13.         jp nz,KernelPanic
  14.     push ix
  15.     pop de
  16.     ldrHL(_)
  17.     ld (hl),e
  18.     inc hl
  19.     ld (hl),d
  20. Loop:
  21.         in a,(04h)
  22.         bit 3, a
  23.             jr nz,Loop
  24.     di
  25.     ldrHL(_)
  26.     ld e,(hl)
  27.     inc hl
  28.     ld d,(hl)   ;ld de,(_)
  29.     ld hl,LCDBuffer
  30.     push de
  31.     push hl
  32.         ld bc,768
  33.         ldir
  34.  
  35.         ldrDE(++_)
  36.         callr(GetPointer)   ; loc in ix
  37.         ld a,0  ; xpos
  38.         ld l,48 ; ypos
  39.         ld b,9  ; height
  40.         ld c,3  ; width
  41.         call LargeSpriteAND ; draw the mask
  42.        
  43.         ldrDE(+++_)
  44.         callr(GetPointer)
  45.         ld a,0  ; xpos
  46.         ld l,48 ; ypos
  47.         ld b,9  ; height
  48.         ld c,3  ; width
  49.         call LargeSpriteOR  ; draw the Sprite
  50.        
  51.         ldrDE(++++_)
  52.         callr(GetPointer)   ; loc in ix
  53.         ld a,34 ; xpos
  54.         ld l,13 ; ypos
  55.         ld b,25 ; height
  56.         ld c,4  ; width
  57.         call LargeSpriteAND ; draw the mask
  58.         ldrDE(+++++_)
  59.         callr(GetPointer)
  60.         ld a,34 ; xpos
  61.         ld l,13 ; ypos
  62.         ld b,25 ; height
  63.         ld c,4  ; width
  64.         call LargeSpriteOR  ; draw the Sprite
  65.  
  66.         rFastCopy
  67.         call FlushKeys
  68. WaitLoop:
  69.             call GetKey
  70.             cp kUp
  71.                 callrz(callSleep)
  72.             cp kDown
  73.                 jr z,callBoot
  74.             ; do key testing here
  75.             in a,(04h)
  76.             bit 3, a
  77.                 jr z,WaitLoop
  78.     pop de
  79.     pop hl
  80.     ld bc,768
  81.     ldir
  82.     rFastCopy
  83.     ei
  84.     jpr(Loop)   ; return to the check
  85. GetPointer:
  86.     call GetFilePointer
  87.     inc de
  88.     inc de
  89.     push de
  90.     pop ix
  91.     ret
  92. callSleep:
  93.     call Sleep
  94.     xor a
  95.     ret
  96. callBoot:
  97.     call ClearBuffer
  98.     rFastCopy
  99.     jp Boot
  100. _   db 0,0
  101. _   db "usr/share/system/menu_mask.bif",0
  102. _   db "usr/share/system/menu.bif",0
  103. _   db "usr/share/system/overlay_mask.bif",0
  104. _   db "usr/share/system/overlay.bif",0
  105. ProgEnd:
  106. .echo "Program End: ",$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement