-; boot me!
+; ---- boot me! ----
; nasm -f bin -o bootcard.img bootcard.asm
; cat bootcard.img >/dev/<usbstick>
+; 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
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
push 0a000h
pop es
+
mov al, 16
mov di, barstart * 320
mov bx, nbars
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:
dec cx
jnz .mnt
- ; upd pal
+ ; upd colormap
mov dx, 3c8h
mov al, 16
out dx, al
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]
times 510-($-$$) db 0
dw 0aa55h
+
+; vi:ft=nasm ts=8 sts=8 sw=8: