Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- checkInput:
- ld a, %00100000
- ld [$FF00], a
- ld a, [$FF00]
- cpl
- AND %00000001
- cp 0
- call z, moveLeft
- ld a, [$FF00]
- cpl
- AND %00000010
- cp 0
- call z, moveRight
- ld a, [$FF00]
- cpl
- AND %00000100
- cp 0
- call z, jump
- ret
- ; move ball to the right
- moveRight:
- ld a, [Ball_PosX]
- inc a
- ld [Ball_PosX], a
- ret
- ; move ball to the left
- moveLeft:
- ld a, [Ball_PosX]
- dec a
- ld [Ball_PosX], a
- ret
- ;jump with ball
- jump:
- ld a, [Ball_PosY]
- dec a
- ld [Ball_PosY], a
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement