Pong
I forgot to commit for a while and I haven't done much, but got the very basics of the game pong working. Signed-off-by: deadvey <deadvey@deadvey.com>
This commit is contained in:
@@ -16,8 +16,6 @@ os_set_graphics_mode:
|
||||
; y_start
|
||||
; colour
|
||||
os_draw_graphical_rectangle:
|
||||
pusha
|
||||
|
||||
; Tell BIOS we're changing 'da pixels!
|
||||
mov ah, 0Ch
|
||||
|
||||
@@ -28,21 +26,28 @@ os_draw_graphical_rectangle:
|
||||
|
||||
jmp .x_loop
|
||||
|
||||
.x_loop:
|
||||
int 10h
|
||||
cmp cx, [x_end]
|
||||
je .next_row
|
||||
inc cx
|
||||
call .x_loop
|
||||
.x_loop:
|
||||
int 10h
|
||||
cmp cx, [x_end]
|
||||
je .next_row
|
||||
inc cx
|
||||
call .x_loop
|
||||
|
||||
.next_row:
|
||||
mov cx, [x_start]
|
||||
cmp dx, [y_end]
|
||||
je .finish
|
||||
inc dx ; Increase Row
|
||||
call .x_loop
|
||||
.next_row:
|
||||
mov cx, [x_start]
|
||||
cmp dx, [y_end]
|
||||
je .finish
|
||||
inc dx ; Increase Row
|
||||
call .x_loop
|
||||
|
||||
.finish:
|
||||
popa
|
||||
Iret
|
||||
.finish:
|
||||
ret
|
||||
|
||||
|
||||
section .data
|
||||
x_start dw 0
|
||||
y_start dw 0
|
||||
x_end dw 0
|
||||
y_end dw 0
|
||||
colour db 1111b
|
||||
|
||||
|
Reference in New Issue
Block a user