Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ld de,vram+x+y*320
- Boucle:
- push de
- call _getkey
- pop de
- di ; Disable OS interrupts
- ld hl,0F50200h
- ld (hl),h ; Set Single Scan mode
- xor a,a
- scan_wait:
- cp a,(hl) ; Wait for Idle mode
- jr nz,scan_wait
- ; Read data registers here as needed
- ld l,$1E
- bit 0,(hl) ;down
- call routinedown
- bit 1,(hl) ;left
- call routineleft
- bit 2,(hl) ;right
- call routineright
- bit 3,(hl) ;up
- call routineup
- jr Boucle
- ret
- routineright:
- inc de
- ld hl,sprite
- ld a,8
- spriteb:
- ld bc,x
- ldir
- ld bc,320-x
- ex de,hl
- add hl,bc
- ex de,hl
- dec a
- jr nz,Spriteb
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement