Beautiful... ain't she?
This commit is contained in:
parent
6fcf973a18
commit
086bdfca2c
27
main.asm
27
main.asm
|
@ -4,6 +4,19 @@
|
|||
|
||||
section KERNEL follows=BOOTSECTOR vstart=1000h
|
||||
|
||||
%macro mod 2
|
||||
push ax
|
||||
push cx
|
||||
|
||||
mov cx, %2
|
||||
xor dx, dx
|
||||
mov ax, %1
|
||||
div cx
|
||||
|
||||
pop cx
|
||||
pop ax
|
||||
%endmacro
|
||||
|
||||
main:
|
||||
mov ax, 0x0013
|
||||
int 0x10
|
||||
|
@ -15,18 +28,16 @@ main:
|
|||
mov di, 0
|
||||
|
||||
mov bx, 0
|
||||
.c:
|
||||
add bl, 1
|
||||
.r:
|
||||
add bx, 1
|
||||
.f:
|
||||
mov byte [es:di], bl
|
||||
add di, 1
|
||||
cmp di, 0xFFFF
|
||||
mod di, 320
|
||||
cmp dx, 0
|
||||
jnz .f
|
||||
push bx
|
||||
mov bx, 100
|
||||
call sleep
|
||||
pop bx
|
||||
jmp .c
|
||||
cmp bx, 200
|
||||
jnz .r
|
||||
|
||||
pop es
|
||||
|
||||
|
|
Loading…
Reference in a new issue