diff --git a/main.asm b/main.asm index f744b78..8892bc0 100644 --- a/main.asm +++ b/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 diff --git a/main.bin b/main.bin index 7962c32..6bfd5a0 100644 Binary files a/main.bin and b/main.bin differ