it glowwwwwssss.
This commit is contained in:
parent
b42a2bda0c
commit
6fcf973a18
0
gfx_util.asm
Normal file
0
gfx_util.asm
Normal file
32
main.asm
32
main.asm
|
@ -5,20 +5,36 @@
|
|||
section KERNEL follows=BOOTSECTOR vstart=1000h
|
||||
|
||||
main:
|
||||
mov bx, 156
|
||||
call print_sint
|
||||
mov ax, 0x0013
|
||||
int 0x10
|
||||
|
||||
;mov ax, -20
|
||||
;mov dx, 0x0003
|
||||
;mov cx, 10
|
||||
;idiv cx
|
||||
;mov bx, ax
|
||||
;call print_uint
|
||||
push es
|
||||
push 0xa000
|
||||
pop es
|
||||
|
||||
mov di, 0
|
||||
|
||||
mov bx, 0
|
||||
.c:
|
||||
add bl, 1
|
||||
.f:
|
||||
mov byte [es:di], bl
|
||||
add di, 1
|
||||
cmp di, 0xFFFF
|
||||
jnz .f
|
||||
push bx
|
||||
mov bx, 100
|
||||
call sleep
|
||||
pop bx
|
||||
jmp .c
|
||||
|
||||
pop es
|
||||
|
||||
jmp $ ; Halt
|
||||
|
||||
; Libs
|
||||
%include "print_util.asm"
|
||||
%include "time_util.asm"
|
||||
|
||||
; Data
|
||||
HELLO_WORLD:
|
||||
|
|
16
time_util.asm
Normal file
16
time_util.asm
Normal file
|
@ -0,0 +1,16 @@
|
|||
sleep:
|
||||
pusha
|
||||
|
||||
mov ax, bx
|
||||
mov bx, 1000
|
||||
mul bx
|
||||
|
||||
mov cx, dx
|
||||
mov dx, ax
|
||||
|
||||
mov ah, 0x86
|
||||
mov al, 0
|
||||
int 0x15
|
||||
|
||||
popa
|
||||
ret
|
Loading…
Reference in a new issue