| ... | ... |
@@ -22,17 +22,11 @@ To build the Uxn emulator, you must have [SDL2](https://wiki.libsdl.org/). |
| 22 | 22 |
Read more in the [Uxambly Guide](https://wiki.xxiivv.com/site/uxambly.html). |
| 23 | 23 |
|
| 24 | 24 |
``` |
| 25 |
-( Dev/Console ) |
|
| 26 |
- |
|
| 27 | 25 |
%RTN { JMP2r }
|
| 28 | 26 |
|
| 29 |
-( devices ) |
|
| 30 |
- |
|
| 31 |
-|0110 @Console [ &pad $8 &char $1 ] |
|
| 32 |
- |
|
| 33 | 27 |
( program ) |
| 34 | 28 |
|
| 35 |
-|0200 |
|
| 29 |
+|0100 |
|
| 36 | 30 |
|
| 37 | 31 |
;hello-word ;print JSR2 |
| 38 | 32 |
|
| ... | ... |
@@ -50,6 +44,9 @@ RTN |
| 50 | 44 |
|
| 51 | 45 |
@hello-word [ 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 ] |
| 52 | 46 |
|
| 47 |
+( devices ) |
|
| 48 |
+ |
|
| 49 |
+|ff10 @Console [ &pad $8 &char $1 ] |
|
| 53 | 50 |
``` |
| 54 | 51 |
|
| 55 | 52 |
## TODOs |
| ... | ... |
@@ -22,9 +22,6 @@ contexts: |
| 22 | 22 |
scope: variable.control |
| 23 | 23 |
pop: true |
| 24 | 24 |
# constants |
| 25 |
- - match: '\:(\S+)\s?' |
|
| 26 |
- scope: string.control |
|
| 27 |
- pop: true |
|
| 28 | 25 |
# structs |
| 29 | 26 |
|
| 30 | 27 |
# Special |
| ... | ... |
@@ -49,6 +46,9 @@ contexts: |
| 49 | 46 |
- match: '\;(\S+)\s?' # absolute |
| 50 | 47 |
scope: keyword.control |
| 51 | 48 |
pop: true |
| 49 |
+ - match: '\:(\S+)\s?' # raw |
|
| 50 |
+ scope: keyword.control |
|
| 51 |
+ pop: true |
|
| 52 | 52 |
|
| 53 | 53 |
- match: '\[\s?' |
| 54 | 54 |
scope: comment |
| ... | ... |
@@ -21,7 +21,7 @@ Uint8 pop8(Stack *s) { if (s->ptr == 0) { s->error = 1; return 0; } return s->d
|
| 21 | 21 |
Uint8 peek8(Stack *s, Uint8 a) { if (s->ptr < a + 1) s->error = 1; return s->dat[s->ptr - a - 1]; }
|
| 22 | 22 |
void mempoke8(Uxn *u, Uint16 a, Uint8 b) { u->ram.dat[a] = b; }
|
| 23 | 23 |
Uint8 mempeek8(Uxn *u, Uint16 a) { return u->ram.dat[a]; }
|
| 24 |
-void devpoke8(Uxn *u, Uint8 a, Uint8 b) { Device *dev = &u->dev[a >> 4]; dev->dat[a & 0xf] = dev->poke(u, dev->dat, a & 0x0f, b); }
|
|
| 24 |
+void devpoke8(Uxn *u, Uint8 a, Uint8 b) { Device *dev = &u->dev[a >> 4]; dev->dat[a & 0xf] = b; dev->poke(u, dev->dat, a & 0x0f, b); }
|
|
| 25 | 25 |
Uint8 devpeek8(Uxn *u, Uint8 a) { return u->dev[a >> 4].dat[a & 0xf]; }
|
| 26 | 26 |
void push16(Stack *s, Uint16 a) { push8(s, a >> 8); push8(s, a); }
|
| 27 | 27 |
Uint16 pop16(Stack *s) { return pop8(s) + (pop8(s) << 8); }
|