projects
/
bootcard
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
readme
[bootcard]
/
bootcard.asm
diff --git
a/bootcard.asm
b/bootcard.asm
index
1c4542a
..
dddf846
100644
(file)
--- 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/<usbstick>
; nasm -f bin -o bootcard.img bootcard.asm
; cat bootcard.img >/dev/<usbstick>
@@
-7,7
+7,7
@@
barh equ 4
nbars equ 11
barh equ 4
nbars equ 11
-barstart equ 152
+barstart equ 200 - (nbars+1) * barh
nticks equ 7e00h
tmoffs equ 7e04h
nticks equ 7e00h
tmoffs equ 7e04h
@@
-16,6
+16,12
@@
frame equ 7e0ch
fval equ 7e10h
cmap equ 7e14h
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
%macro spkon 0
in al, 61h
or al, 3
@@
-56,6
+62,7
@@
start: xor ax, ax
push 0a000h
pop es
push 0a000h
pop es
+
mov al, 16
mov di, barstart * 320
mov bx, nbars
mov al, 16
mov di, barstart * 320
mov bx, nbars
@@
-66,20
+73,10
@@
start: xor ax, ax
dec bx
jnz .drawbars
dec bx
jnz .drawbars
- mov dx, 100ch
- xor bx, bx
- mov ah, 2
- int 10h
+ setcur 12, 16
mov si, str1
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:
sti
mainloop:
@@
-97,7
+94,7
@@
drawbg:
.fillgrad:
mov ax, bx
mov ah, al
.fillgrad:
mov ax, bx
mov ah, al
- mov cx, 2400 ; 15 lines
+ mov cx, 2400 ; 15 lines
rep stosw
inc bx
cmp bx, 208
rep stosw
inc bx
cmp bx, 208
@@
-127,7
+124,7
@@
drawbg:
dec cx
jnz .mnt
dec cx
jnz .mnt
- ; upd pal
+ ; upd colormap
mov dx, 3c8h
mov al, 16
out dx, al
mov dx, 3c8h
mov al, 16
out dx, al
@@
-138,6
+135,18
@@
drawbg:
jmp mainloop
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]
tintr:
pusha
mov ax, [nticks]
@@
-214,3
+223,4
@@
w30: dw 30
times 510-($-$$) db 0
dw 0aa55h
times 510-($-$$) db 0
dw 0aa55h
+; vi:ft=nasm ts=8 sts=8 sw=8: