Merged sandwich
This commit is contained in:
parent
751d198606
commit
a4e54062b8
11
README.md
11
README.md
|
@ -22,17 +22,11 @@ To build the Uxn emulator, you must have [SDL2](https://wiki.libsdl.org/).
|
|||
Read more in the [Uxambly Guide](https://wiki.xxiivv.com/site/uxambly.html).
|
||||
|
||||
```
|
||||
( Dev/Console )
|
||||
|
||||
%RTN { JMP2r }
|
||||
|
||||
( devices )
|
||||
|
||||
|0110 @Console [ &pad $8 &char $1 ]
|
||||
|
||||
( program )
|
||||
|
||||
|0200
|
||||
|0100
|
||||
|
||||
;hello-word ;print JSR2
|
||||
|
||||
|
@ -50,6 +44,9 @@ RTN
|
|||
|
||||
@hello-word [ 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 ]
|
||||
|
||||
( devices )
|
||||
|
||||
|ff10 @Console [ &pad $8 &char $1 ]
|
||||
```
|
||||
|
||||
## TODOs
|
||||
|
|
2
build.sh
2
build.sh
|
@ -32,7 +32,7 @@ else
|
|||
fi
|
||||
|
||||
echo "Assembling.."
|
||||
./bin/assembler projects/examples/dev.console.usm bin/boot.rom
|
||||
./bin/assembler projects/examples/dev.controller.buttons.usm bin/boot.rom
|
||||
|
||||
echo "Running.."
|
||||
if [ "${2}" = '--cli' ];
|
||||
|
|
|
@ -22,9 +22,6 @@ contexts:
|
|||
scope: variable.control
|
||||
pop: true
|
||||
# constants
|
||||
- match: '\:(\S+)\s?'
|
||||
scope: string.control
|
||||
pop: true
|
||||
# structs
|
||||
|
||||
# Special
|
||||
|
@ -49,6 +46,9 @@ contexts:
|
|||
- match: '\;(\S+)\s?' # absolute
|
||||
scope: keyword.control
|
||||
pop: true
|
||||
- match: '\:(\S+)\s?' # raw
|
||||
scope: keyword.control
|
||||
pop: true
|
||||
|
||||
- match: '\[\s?'
|
||||
scope: comment
|
||||
|
|
|
@ -25,4 +25,3 @@ RTN
|
|||
( devices )
|
||||
|
||||
|ff10 @Console [ &pad $8 &char $1 ]
|
||||
|
||||
|
|
|
@ -84,4 +84,3 @@ BRK
|
|||
|ff10 @Console [ &pad $8 &char $1 &byte $1 &short $2 &string $2 ]
|
||||
|ff20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &color $1 ]
|
||||
|ff40 @Controller [ &vector $2 &button $1 &key $1 ]
|
||||
|
||||
|
|
|
@ -185,6 +185,7 @@ Uint8
|
|||
system_poke(Uxn *u, Uint8 *m, Uint8 b0, Uint8 b1)
|
||||
{
|
||||
getcolors(&ppu, &m[0x8]);
|
||||
printf("%02x%02x %02x%02x %02x%02x\n", m[0x8], m[0x9], m[0xa], m[0xb], m[0xc], m[0xd]);
|
||||
reqdraw = 1;
|
||||
(void)u;
|
||||
(void)b0;
|
||||
|
|
|
@ -21,7 +21,7 @@ Uint8 pop8(Stack *s) { if (s->ptr == 0) { s->error = 1; return 0; } return s->d
|
|||
Uint8 peek8(Stack *s, Uint8 a) { if (s->ptr < a + 1) s->error = 1; return s->dat[s->ptr - a - 1]; }
|
||||
void mempoke8(Uxn *u, Uint16 a, Uint8 b) { u->ram.dat[a] = b; }
|
||||
Uint8 mempeek8(Uxn *u, Uint16 a) { return u->ram.dat[a]; }
|
||||
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); }
|
||||
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); }
|
||||
Uint8 devpeek8(Uxn *u, Uint8 a) { return u->dev[a >> 4].dat[a & 0xf]; }
|
||||
void push16(Stack *s, Uint16 a) { push8(s, a >> 8); push8(s, a); }
|
||||
Uint16 pop16(Stack *s) { return pop8(s) + (pop8(s) << 8); }
|
||||
|
|
Loading…
Reference in New Issue