rectangles work

This commit is contained in:
2025-06-11 15:50:22 +01:00
parent be7943320d
commit 4d71868ac6
17 changed files with 321 additions and 48 deletions

View File

@@ -0,0 +1,48 @@
os_set_graphics_mode:
pusha
mov ah, 00h
mov al, 13h
int 10h
popa
ret
; --------------------------------------
; x_end
; y_end
; x_start
; y_start
; colour
os_draw_graphical_rectangle:
pusha
; Tell BIOS we're changing 'da pixels!
mov ah, 0Ch
mov al, 1100b
mov cx, [x_start]
mov dx, [y_start]
jmp .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
.finish:
popa
Iret