X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=bootcard.asm;h=dddf846518ef6891bd5d87725c3bd6e5325975cd;hb=refs%2Fheads%2Fmaster;hp=1c4542ac91e9381f4e8fa8b84c69d34b02b3553b;hpb=d3e8e4d68a200a1ca8da25da58d4d4c96488602c;p=bootcard diff --git a/bootcard.asm b/bootcard.asm index 1c4542a..dddf846 100644 --- a/bootcard.asm +++ b/bootcard.asm @@ -1,4 +1,4 @@ -; boot me! +; ---- boot me! ---- ; nasm -f bin -o bootcard.img bootcard.asm ; cat bootcard.img >/dev/ @@ -7,7 +7,7 @@ barh equ 4 nbars equ 11 -barstart equ 152 +barstart equ 200 - (nbars+1) * barh nticks equ 7e00h tmoffs equ 7e04h @@ -16,6 +16,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 +62,7 @@ start: xor ax, ax push 0a000h pop es + mov al, 16 mov di, barstart * 320 mov bx, nbars @@ -66,20 +73,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: @@ -97,7 +94,7 @@ drawbg: .fillgrad: mov ax, bx mov ah, al - mov cx, 2400 ; 15 lines + mov cx, 2400 ; 15 lines rep stosw inc bx cmp bx, 208 @@ -127,7 +124,7 @@ drawbg: dec cx jnz .mnt - ; upd pal + ; upd colormap mov dx, 3c8h mov al, 16 out dx, al @@ -138,6 +135,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 +223,4 @@ w30: dw 30 times 510-($-$$) db 0 dw 0aa55h +; vi:ft=nasm ts=8 sts=8 sw=8: