From 086bdfca2cecaf8e673ae152148276bbae652273 Mon Sep 17 00:00:00 2001 From: maelstrom Date: Thu, 25 Jul 2024 18:53:07 +0300 Subject: [PATCH] Beautiful... ain't she? --- main.asm | 27 +++++++++++++++++++-------- main.bin | Bin 801 -> 810 bytes 2 files changed, 19 insertions(+), 8 deletions(-) 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 7962c3223f141022e17173749f1bbd7e0ca5167e..6bfd5a093a4036ee547c8e1c68e3628e83f3d0ad 100644 GIT binary patch delta 45 zcmV+|0Mh@V2C4?I5CS2C!vQ9U9fQXKP*J%+0Ws2v`1kQyScCcib?AZn$N+WUlPCiD DpzaiS delta 36 ucmV+<0Nekn2B8M95CRy0!vQ9U9fQXKga7|^^;5fK0O;2MTkGhPF#`D!S`d{0