Moved stuff around and added a makefile also got a custom bootloader
based on the JazzOS bootloader (modified a bit)
This commit is contained in:
53
source/kernel/features/graphics.asm
Normal file
53
source/kernel/features/graphics.asm
Normal file
@@ -0,0 +1,53 @@
|
||||
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:
|
||||
; 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:
|
||||
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