projects
/
bootcard
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e10d8d
)
space invaders
author
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 18 Jun 2022 11:59:15 +0000
(14:59 +0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 18 Jun 2022 11:59:15 +0000
(14:59 +0300)
bootcard.asm
patch
|
blob
|
history
diff --git
a/bootcard.asm
b/bootcard.asm
index
71e1619
..
f22c65c
100644
(file)
--- a/
bootcard.asm
+++ b/
bootcard.asm
@@
-12,7
+12,7
@@
muscur equ nticks + 4
spkstat equ muscur + 4
vol equ spkstat + 4
spkstat equ muscur + 4
vol equ spkstat + 4
-osc_freq equ 1193182
+OSC_FREQ equ 1193182
PIT_DATA0 equ 40h
PIT_CMD equ 43h
PIT_CMD_CHAN0 equ 00h
PIT_DATA0 equ 40h
PIT_CMD equ 43h
PIT_CMD_CHAN0 equ 00h
@@
-60,7
+60,7
@@
KB_CTRL equ 61h
mov word [32], timer_intr
mov word [34], 0
mov word [32], timer_intr
mov word [34], 0
- settimer 0, DIV_ROUND(osc_freq, 100)
+ settimer 0, DIV_ROUND(OSC_FREQ, 100)
mov ax, 13h
int 10h
mov ax, 13h
int 10h
@@
-97,15
+97,16
@@
textout:
.done: ret
timer_intr:
.done: ret
timer_intr:
+ pusha
mov ax, [nticks]
inc ax
mov [nticks], ax
mov ax, [nticks]
inc ax
mov [nticks], ax
- mov bx, [muscur]
+.pmus: mov bx, [muscur]
shl bx, 2
mov cx, [music + bx] ; event time
cmp cx, 0ffffh
shl bx, 2
mov cx, [music + bx] ; event time
cmp cx, 0ffffh
- jz .off
+ jz .loop
cmp ax, cx
jb .dopwm
cmp ax, cx
jb .dopwm
@@
-140,8
+141,14
@@
timer_intr:
.eoi: mov al, 20h
out 20h, al ; EOI
.eoi: mov al, 20h
out 20h, al ; EOI
+ popa
iret
iret
+.loop: neg cx
+ mov [muscur], cx
+ jmp .pmus
+
+
str1: db 'message message blah',0
str2: db 'Michael & Athina',0
str1: db 'message message blah',0
str2: db 'Michael & Athina',0