Words | Mnemonic | ZC | Description |
---|---|---|---|
0000 | NOP | .. | no operation |
020x nnnn | LD.b Rx,(nnnn) | Z. | (n) -> Rx |
030x nnnn | LD.b (nnnn),Rx | .. | Rx -> (n) |
040x nnnn | LD.w Rx,(nnnn) | Z. | (n) -> Rx |
050x nnnn | LD.w (nnnn),Rx | .. | Rx -> (n) |
060x nnnn | LD.l Rx,(nnnn) | Z. | (n) -> Rx |
070x nnnn | LD.l (nnnn),Rx | .. | Rx -> (n) |
080x nnnn | LD Rx,#imm16 | Z. | n -> Rx |
090x nnnn | AND Rx,#imm16 | Z. | Rx & n -> Rx |
0A0x nnnn | OR Rx,#imm16 | Z. | Rx | n -> Rx |
0B0x nnnn | XOR Rx,#imm16 | Z. | Rx ^ n -> Rx |
0C0x nnnn | ADD Rx,#imm16 | ZC | Rx + n -> Rx |
0D0x nnnn | SUB Rx,#imm16 | ZC | Rx - n -> Rx |
0E0x nnnn | CMP Rx,#imm16 | ZC | RX - n -> (not written back) |
0F0x nnnn | BIT Rx,#imm16 | Z. | Rx & n -> (not written back) |
1000 nnnn nnnn | RSET #n | .. | Sets the random fill parameters |
11yx nnnn 000z | CRC Rx,Ry,Rz,#n | .. | CRC's data at Rx for length Ry using Rz for the CRC, and polynomial N |
180x nnnn nnnn | LD Rx,#imm32 | Z. | n -> Rx |
190x nnnn nnnn | AND Rx,#imm32 | Z. | Rx & n -> Rx |
1A0x nnnn nnnn | OR Rx,#imm32 | Z. | Rx | n -> Rx |
1B0x nnnn nnnn | XOR Rx,#imm32 | Z. | Rx ^ n -> Rx |
1C0x nnnn nnnn | ADD Rx,#imm32 | ZC | Rx + n -> Rx |
1D0x nnnn nnnn | SUB Rx,#imm32 | ZC | Rx - n -> Rx |
1E0x nnnn nnnn | CMP Rx,#imm32 | ZC | RX - n -> (not written back) |
1F0x nnnn nnnn | BIT Rx,#imm32 | Z. | Rx & n -> (not written back) |
20yx | ASL Rx,Ry | ZC | Rx << Ry -> Rx |
21yx | LSR Rx,Ry | ZC | Rx >> Ry -> Rx |
22yx | ROL Rx,Ry | ZC | Rx >>> Ry -> Rx |
23yx | ROR Rx,Ry | ZC | RX <<< Ry -> Rx |
24nx | ASL Rx,#n+1 | ZC | Rx << n+1 |
25nx | LSR Rx,#n+1 | ZC | Rx >> n+1 |
26nx | ROL Rx,#n+1 | ZC | Rx <<< n+1 |
27nx | ROR Rx,#n+1 | ZC | Rx >>> n+1 |
28yx | LD Rx,Ry | Z. | Ry -> Rx |
29yx | AND Rx,Ry | Z. | Rx & Ry -> Rx |
2Ayx | OR Rx,Ry | Z. | Rx | Ry -> Rx |
2Byx | XOR Rx,Ry | Z. | Rx ^ Ry -> Rx |
2Cyx | ADD Rx,Ry | ZC | Rx + Ry -> Rx |
2Dyx | SUB Rx,Ry | ZC | Rx - Ry -> Rx |
2Eyx | CMP Rx,Ry | ZC | Ry - Rx -> (not written back) |
2Fyx | BIT Rx,Ry | Z. | Rx & Ry -> (not written back) |
32yx | LD.b Rx,(Ry) | Z. | (Ry) -> Rx |
33yx | LD.b (Ry),Rx | .. | Rx -> (Ry) |
34yx | LD.w Rx,(Ry) | Z. | (Ry) -> Rx |
35yx | LD.w (Ry),Rx | .. | Rx -> (Ry) |
36yx | LD.l Rx,(Ry) | Z. | (Ry) -> Rx |
37yx | LD.l (Ry),Rx | .. | Rx -> (Ry) |
38yx | MUL Rx,Ry | .. | Rx * Ry -> Rx |
39yx | TEST Rx,Ry | Z. | Tests strings at Rx, Ry returns 0 for equality (and sets Z), 1 if Ry shorter than Rx, 2 for different. |
3Ayx | PMPW Rx,Ry | .. | Rx -> PMP(Ry) Writes to PMP register |
3Byx | PMPR Rx,Ry | .. | PMP(Ry) -> Rx Reads from PMP register |
3Cyx | PMPBW Rx,Ry | .. | Rx -> PMP(Ry) (bytes, see examples below) |
3Dyx | XFILL Rx,Ry | .. | Fills Rx with Ry words. The upper byte of Ry is the fill byte |
3Eyx | DIV Rx,Ry | ZC | Rx / Ry -> Rx; Rx % Ry -> Ry. If dividing by 0 is attempted, will generate an error. Z set |
3Fyx | RFILL Rx,Ry | .. | Randomly fills PMP space. |
400x | PRINTF Rx | .. | Prints string at Rx to buffer |
410x | HEX.b Rx | .. | Prints byte of Rx to buffer in hex |
411x | HEX.w Rx | .. | Prints word of Rx to buffer in hex |
412x | HEX.l Rx | .. | Prints long of Rx to buffer in hex |
413x | DEC.b Rx | .. | Prints byte of Rx to buffer in dec |
414x | DEC.w Rx | .. | Prints word of Rx to buffer in dec |
415x | DEC.l Rx | .. | Prints long of Rx to buffer in dec |
4200 | RET | .. | fs--, (top of stack) -> PC |
4201 | RET NZ | .. | if Z = 0, RET |
4202 | RET Z | .. | if Z = 1, RET |
4203 | RET NC | .. | if C = 0, RET |
4204 | RET C | .. | if C = 1, RET |
430x | PUSH Rx | .. | Rx -> (top of stack), rs++ |
440x | POP Rx | .. | rs--, (top of stack) -> Rx |
45yx | ERR Rx, Ry | .. | Loads error register into Rx and the error PC into Ry |
4600 | EXIT 0 | .. | Exits code successfully |
4601 | EXIT 1 | .. | Exits code with an error |
4700 | CLC | .0 | 0 -> carry |
4701 | SEC | .1 | 1 -> carry |
48yx | UIVISIBLE Rx,Ry | Z. | Rx = UI element ID, Ry = status. |
49yx | GETTIME Rx,Ry | .. | Writes a 32-bit response into Ry based on the value given in Rx: |
50yx | ADJFS Rx,Ry | .. | Adjusts file size of file #Rx to value Ry |
51yx | ADJFO Rx,Ry | .. | Adjusts file offset of file #Rx to value Ry |
52yx | ADJLP Rx,Ry | .. | Adjusts file pmp address of file #Rx to value Ry |
530x | LOADF Rx | Z. | Load file Rx from json file. Rx returns length of file that was loaded |
54yx | GETEXT Rx, Ry | .. | Returns the file extension of file Rx, and stores it into memory at Ry |
55yx | GETNAME Rx, Ry | .. | Returns the file name of file Rx, and stores it into memory at Ry |
56yx | OPEN Rx,Ry | Z. | Open file Rx. Length is returned in Ry. 0 length means file does not exist or is empty. |
5700 | CLOSE | .. | Closes the open file |
580x | SEEK Rx | Z. | Seeks to position Rx in file |
59yx | READ Rx,Ry | Z. | Reads Ry bytes from the file into memory at Rx |
5Ayx | COPY Rx,Ry | Z. | Copies data from the open file to PMP. Rx = where in PMP space, Ry = size. |
5B0x | CORE Rx | .. | Select core Rx (ID) |
5Cyx | HOST Rx,Ry | .. | Performs a host command. (reset, run, etc) |
5D0x | QUERYSLOT Rx | Z. | Tests whether there is a valid file in a json slot. Z is set if the file is valid/exists, clear if it doesn't. |
6nnn | JP n | .. | n*2 -> PC |
7nnn | JP NZ,n | .. | if Z = 0, JP n |
8nnn | JP Z,n | .. | if Z = 1, JP n |
9nnn | JP NC,n | .. | if C = 0, JP n |
Annn | JP C,n | .. | if C = 1, JP n |
Bnnn | CALL n | .. | PC -> (top of stack), cs++, n*2 -> PC |
Cnnn | CALL NZ,n | .. | if Z = 0, CALL n |
Dnnn | CALL Z,n | .. | if Z = 1, CALL n |
Ennn | CALL NC,n | .. | if C = 0, CALL n |
Fnnn | CALL C,n | .. | if C = 1, CALL n |