Disk reading partly done
This commit is contained in:
@@ -48,24 +48,24 @@ game_pong:
|
||||
mov dx, [p1_y]
|
||||
sub dx, 5
|
||||
mov [p1_y], dx
|
||||
jmp .detect_input
|
||||
ret
|
||||
.p1_down:
|
||||
mov dx, [p1_y]
|
||||
add dx, 5
|
||||
mov [p1_y], dx
|
||||
jmp .detect_input
|
||||
ret
|
||||
|
||||
; Player 2 movements
|
||||
.p2_up:
|
||||
mov dx, [p2_y]
|
||||
sub dx, 5
|
||||
mov [p2_y], dx
|
||||
jmp .detect_input
|
||||
ret
|
||||
.p2_down:
|
||||
mov dx, [p2_y]
|
||||
add dx, 5
|
||||
mov [p2_y], dx
|
||||
jmp .detect_input
|
||||
ret
|
||||
|
||||
; Ball bouncing
|
||||
; This should move the ball along one frame
|
||||
@@ -97,17 +97,17 @@ game_pong:
|
||||
|
||||
; Player 1
|
||||
cmp al, 77h ; Pressed 'w' (player 1 up)
|
||||
je .p1_up
|
||||
call .p1_up
|
||||
cmp al, 73h ; Pressed 's' (player 1 down)
|
||||
je .p1_down
|
||||
call .p1_down
|
||||
|
||||
; Player 2
|
||||
cmp al, 5bh ; Pressed '[' (player 2 up)
|
||||
je .p2_up
|
||||
call .p2_up
|
||||
cmp al, 27h ; Pressed ''' (player 2 down)
|
||||
je .p2_down
|
||||
call .p2_down
|
||||
|
||||
call .bounce_ball
|
||||
;call .bounce_ball
|
||||
call .draw_screen
|
||||
|
||||
jmp .detect_input
|
||||
|
||||
Reference in New Issue
Block a user