projects
/
bootcard
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d3e8e4d
)
Revert "slight source minification"
author
John Tsiombikas
<nuclear@member.fsf.org>
Sun, 24 Jul 2022 19:27:19 +0000
(22:27 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sun, 24 Jul 2022 19:27:19 +0000
(22:27 +0300)
This reverts commit
bf75cfdfd8c219fa4e6aaf71c331abe81035cf8e
.
bootcard.asm
patch
|
blob
|
history
diff --git
a/bootcard.asm
b/bootcard.asm
index
1c4542a
..
26f3cd9
100644
(file)
--- 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/<usbstick>
; nasm -f bin -o bootcard.img bootcard.asm
; cat bootcard.img >/dev/<usbstick>
+; reboot
org 7c00h
bits 16
barh equ 4
nbars equ 11
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
nticks equ 7e00h
tmoffs equ 7e04h
@@
-16,6
+17,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
+63,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
+74,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:
@@
-127,7
+125,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
+136,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
+224,5
@@
w30: dw 30
times 510-($-$$) db 0
dw 0aa55h
times 510-($-$$) db 0
dw 0aa55h
+
+; vi:ft=nasm ts=8 sts=8 sw=8: