... | ... |
@@ -107,7 +107,7 @@ RTN |
107 | 107 |
( save-x ) OVR #03 MOD TOS #0008 MUL2 .anchor/x LDZ2 ADD2 .Screen/x DEO2 |
108 | 108 |
( save-y ) OVR #03 DIV TOS #0008 MUL2 .anchor/y LDZ2 ADD2 .Screen/y DEO2 |
109 | 109 |
( get digit* ) OVR STHkr #02 MUL TOS ;digits ADD2 LDA2 |
110 |
- ( get bit ) ROT #0e SWP SUB TOS SFT2 #0001 AND2 |
|
110 |
+ ( get bit ) ROT #0e SWP SUB SFT2 #0001 AND2 |
|
111 | 111 |
( set tile ) #0008 MUL2 ;tiles ADD2 |
112 | 112 |
( set style ) .style LDZ #10 MUL TOS ADD2 |
113 | 113 |
.Screen/addr DEO2 |
... | ... |
@@ -43,10 +43,10 @@ RTN |
43 | 43 |
@print-hexadecimal ( short -- ) |
44 | 44 |
LIT '0 .Console/char DEO |
45 | 45 |
LIT 'x .Console/char DEO |
46 |
- DUP2 #000c SFT2 ,&digit JSR |
|
47 |
- DUP2 #0008 SFT2 ,&digit JSR |
|
48 |
- DUP2 #0004 SFT2 ,&digit JSR |
|
49 |
- ,&digit JSR |
|
46 |
+ DUP2 #0c SFT2 ,&digit JSR |
|
47 |
+ DUP2 #08 SFT2 ,&digit JSR |
|
48 |
+ DUP2 #04 SFT2 ,&digit JSR |
|
49 |
+ ,&digit JSR |
|
50 | 50 |
RTN |
51 | 51 |
|
52 | 52 |
&digit |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
|
3 | 3 |
%RTN { JMP2r } |
4 | 4 |
%MOD { DUP2 DIV MUL SUB } |
5 |
-%ABS2 { DUP2 #000f SFT2 EQU #04 JCN #ffff MUL2 } |
|
5 |
+%ABS2 { DUP2 #0f SFT2 EQU #04 JCN #ffff MUL2 } |
|
6 | 6 |
%SCALEX { #0002 DIV2 .Screen/width DEI2 #0002 DIV2 ADD2 #0040 SUB2 } |
7 | 7 |
%SCALEY { #0002 DIV2 .Screen/height DEI2 #0002 DIV2 ADD2 #0040 SUB2 } |
8 | 8 |
%12HOURS { DUP #0c GTH #0c MUL SUB } |
... | ... |
@@ -11,7 +11,7 @@ |
11 | 11 |
|
12 | 12 |
|0100 ( -> ) |
13 | 13 |
#90ff .System/r DEO2 #9000 .System/g DEO2 #900f .System/b DEO2 |
14 |
- #08e0 .Screen/width DEI2 #0001 SFT2 SUB2 .scroll/x STZ2 |
|
14 |
+ #08e0 .Screen/width DEI2 #01 SFT2 SUB2 .scroll/x STZ2 |
|
15 | 15 |
#09b0 .scroll/y STZ2 |
16 | 16 |
;frame .Screen/vector DEO2 |
17 | 17 |
#30 .scroll/wait STZ |
... | ... |
@@ -98,7 +98,7 @@ void op_div16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->s |
98 | 98 |
void op_and16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b & a); } |
99 | 99 |
void op_ora16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b | a); } |
100 | 100 |
void op_eor16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b ^ a); } |
101 |
-void op_sft16(Uxn *u) { Uint16 a = pop16(u->src), b = pop16(u->src); push16(u->src, b >> (a & 0x000f) << ((a & 0x00f0) >> 4)); } |
|
101 |
+void op_sft16(Uxn *u) { Uint8 a = pop8(u->src); Uint16 b = pop16(u->src); push16(u->src, b >> (a & 0x0f) << ((a & 0xf0) >> 4)); } |
|
102 | 102 |
|
103 | 103 |
void (*ops[])(Uxn *u) = { |
104 | 104 |
op_brk, op_lit, op_nop, op_pop, op_dup, op_swp, op_ovr, op_rot, |