projects
/
bootcard
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
58fe680
)
rnd
author
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 25 Jun 2022 21:01:40 +0000
(
00:01
+0300)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sat, 25 Jun 2022 21:01:40 +0000
(
00:01
+0300)
bootcard.asm
patch
|
blob
|
history
diff --git
a/bootcard.asm
b/bootcard.asm
index
1288c4a
..
4a2f3e4
100644
(file)
--- a/
bootcard.asm
+++ b/
bootcard.asm
@@
-9,6
+9,7
@@
nticks equ 7e00h
tmoffs equ 7e04h
musptr equ 7e08h
nticks equ 7e00h
tmoffs equ 7e04h
musptr equ 7e08h
+ppos equ 7e0ch
%macro setcur 2
mov dx, %1 | (%2 << 8)
%macro setcur 2
mov dx, %1 | (%2 << 8)
@@
-42,7
+43,7
@@
start: xor ax, ax
mov sp, 7c00h
mov di, nticks
mov sp, 7c00h
mov di, nticks
- mov cx, 6
+ mov cx, 8
rep stosw
mov word [32], tintr
rep stosw
mov word [32], tintr
@@
-75,6
+76,8
@@
mainloop:
call drawbg
call drawbg
+ call psys
+
jmp mainloop
drawbg:
jmp mainloop
drawbg:
@@
-115,6
+118,28
@@
drawbg:
ret
ret
+psys: cmp word [ppos + 2], 0
+ ja .skipspawn
+
+ call rnd
+ add ax, 128
+ mov [ppos + 2], ax
+ call rnd
+ add ax, 32
+ mov [ppos], ax
+.skipspawn:
+ dec word [ppos + 2]
+ mov ax, [ppos + 2]
+ shr ax, 2
+ imul bx, ax, 320
+ add bx, [ppos]
+ mov byte [es:bx], 0eh
+
+rnd: in al, 40h
+ mov ah, al
+ in al, 40h
+ shr ax, 8
+ ret
textout:
mov al, [si]
textout:
mov al, [si]