commit b2182ff
zzo38
·
2026-03-03 23:08:49 +0000 UTC
parent c3def5d
More changes to prg/elemental.tal which make the compiled file shorter.
1 files changed,
+22,
-18
+22,
-18
1@@ -117,7 +117,7 @@
2 LIT2 0c -Score LDZ LTH ?/brk
3 DUPk #80 EQU ?/r #40 EQU ?/l
4 DUPk #20 EQU ?/d #10 EQU ?/u
5- DUP #02 EQU ?/b #01 EQU ?/a
6+ DUPk #02 EQU ?/b EQUk EQU ?/a
7 &sh showcursor &brk BRK
8
9 &r
10@@ -243,7 +243,7 @@
11 STHrk #04 ADD topcard STHrk #04 SUB topcard
12 ORA2 ORA #0f EOR [?
13 LIT2 03 -Mani STZ
14- STHrk .Height ADD LDZk DUP #01 SUB ROT STZ ( spare height )
15+ STHrk .Height ADD LDZk DUP EQUk SUB ROT STZ ( spare height )
16 LITr 0a MULr STH ADDr LITr -Tableau-1 ADDr LDZr STH STZr
17 sound fd 48 4c 43 48 00
18 ]@
19@@ -255,7 +255,7 @@
20 @movepile 01 000a 0000 00 &s 00 0000 00 &d 00
21
22 @topcard ( position -- card )
23- DUP #10 LTH [? INCk EQU JMP2r ]@
24+ DUP #10 LTH [? DUP EOR JMP2r ]@
25 DUP .Height ADD LDZ DUP [? NIP JMP2r ]@
26 .Tableau-1 ADD SWP #0a MUL ADD LDZ JMP2r
27
28@@ -267,8 +267,8 @@
29 @cursorat ( addr -- )
30 LDZ2
31 @cursorxy ( x y -- )
32- #03 MUL INC #0005 SFT2 #2a DEO2
33- #03 MUL INC INC #0005 SFT2 #28 DEO2
34+ #03 MUL INC mul8 #2a DEO2
35+ #03 MUL INC INC mul8 #28 DEO2
36 JMP2r
37
38 @random ( -- number )
39@@ -281,36 +281,40 @@
40 JMP2r
41
42 @showc ( char -- )
43- #0005 SFT2 ;Font ADD2 #2c DEO2
44+ mul8 ;Font ADD2 #2c DEO2
45 #012f DEO
46 JMP2r
47
48 @showixy ( x y -- )
49- #0005 SFT2 #2a DEO2
50- #0005 SFT2 #28 DEO2
51+ mul8 #2a DEO2
52+ mul8 #28 DEO2
53 @showi ( -- )
54 [@
55 LDArk STHr INC2r DUP [? POP JMP2r ]@
56- #0005 SFT2 ;Font ADD2 #2c DEO2
57+ mul8 ;Font ADD2 #2c DEO2
58 #012f DEO
59 ]!
60
61 @revealcard ( addr -- )
62 LDZk #7f AND SWPk STZ NIP
63 @showcard ( card -- )
64- #0005 SFT2 ;Cards ADD2 #2c DEO2
65- #012f DEO #112f DEO
66- #2b DEIk STHk #08 ADD SWP DEO
67- #212f DEO #312f DEO
68- LITr 2b DEOr #29 DEIk #10 ADD SWP DEO
69+ mul8 ;Cards ADD2 #2c DEO2
70+ halfshow 01
71+ DEIk STHk #08 ADD SWP DEO
72+ halfshow 21
73+ STH DEOr #29 DEIk #10 ADD SWP DEO
74 JMP2r
75
76 @showoverlay ( picture* -- )
77 #2c DEO2
78- #c52f DEO #d52f DEO
79- #2b DEIk #08 ADD SWP DEO
80- #e52f DEO #f52f DEO
81- JMP2r
82+ halfshow c5
83+ DEIk #08 ADD SWP DEO
84+ halfshow e5
85+ POP JMP2r
86+
87+@halfshow #2b LDArk LITr 2f DEOrk LIT2r 1000 ADD2r DEOr INC2r JMP2r
88+
89+@mul8 ( in -- out* ) #0005 SFT2 JMP2r
90
91 @sound ( -- )
92 #ee3e DEO