From: John Tsiombikas Date: Sun, 24 Jul 2022 19:27:19 +0000 (+0300) Subject: Revert "slight source minification" X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootcard;a=commitdiff_plain;h=881ab41488a9737b7de8f78d336e4ba8eaf3a1be Revert "slight source minification" This reverts commit bf75cfdfd8c219fa4e6aaf71c331abe81035cf8e. --- diff --git a/bootcard.asm b/bootcard.asm index 1c4542a..26f3cd9 100644 --- a/bootcard.asm +++ b/bootcard.asm @@ -1,13 +1,14 @@ -; boot me! +; ---- boot me! ---- ; nasm -f bin -o bootcard.img bootcard.asm ; cat bootcard.img >/dev/ +; reboot org 7c00h bits 16 barh equ 4 nbars equ 11 -barstart equ 152 +barstart equ 200 - (nbars+1) * barh nticks equ 7e00h tmoffs equ 7e04h @@ -16,6 +17,12 @@ frame equ 7e0ch fval equ 7e10h cmap equ 7e14h +%macro setcur 2 + mov dx, %1 | (%2 << 8) + xor bx, bx + mov ah, 2 + int 10h +%endmacro %macro spkon 0 in al, 61h or al, 3 @@ -56,6 +63,7 @@ start: xor ax, ax push 0a000h pop es + mov al, 16 mov di, barstart * 320 mov bx, nbars @@ -66,20 +74,10 @@ start: xor ax, ax dec bx jnz .drawbars - mov dx, 100ch - xor bx, bx - mov ah, 2 - int 10h + setcur 12, 16 mov si, str1 -.txout: mov al, [si] - and al, al - jz .txdone - mov ah, 0eh - mov bx, 82 - int 10h - inc si - jmp .txout -.txdone: + call textout + sti mainloop: @@ -127,7 +125,7 @@ drawbg: dec cx jnz .mnt - ; upd pal + ; upd colormap mov dx, 3c8h mov al, 16 out dx, al @@ -138,6 +136,18 @@ drawbg: jmp mainloop +textout: + mov al, [si] + and al, al + jz .done + mov ah, 0eh + mov bx, 82 + int 10h + inc si + jmp textout +.done: ret + + tintr: pusha mov ax, [nticks] @@ -214,3 +224,5 @@ w30: dw 30 times 510-($-$$) db 0 dw 0aa55h + +; vi:ft=nasm ts=8 sts=8 sw=8: