-
Notifications
You must be signed in to change notification settings - Fork 0
Toon Syntax Reference
Cabintech edited this page Nov 21, 2024
·
45 revisions
| Statement Syntax | Examples | Comments | |
|---|---|---|---|
| Register to Register Copy Statements | |||
<target> = <source>
|
R2 = MR102R0 = SWITCH
|
Copy between CR, MR, and SFR. Supported combinations
|
|
<targetCR> = (<sourceCR>)
|
R0 = (R4)
|
Indirect addressing of MR by source register (cpy_cmx instruction) | |
<cr> = ACC64.U<cr> = ACC64.LACC64.U = <cr>ACC64.L = <cr> |
r4 = acc64.u
|
Copy upper/lower 32 bits of ACC64 to/from a CR | |
| Delay Memory Load/Store | |||
ACC32 = <op1> <instr> <op2>
|
acc32 = acc32 xor r5acc32 = r5 addi 0x05
|
Supported instructions
|
|
| 32 Bit Math Operations | |||
ACC32 = <op1> <instr> <op2>
|
acc32 = acc32 xor r5acc32 = r5 addi 0x05
|
Supported instructions
|
|
ACC32 = <instr> <cr>
|
acc32 = neg R6
|
Supported instructions
|
|
| 64 Bit Accumulating Math Operations | |||
ACC64 += <op1> <instr> <op2>
|
acc64 += R0 macrr R1acc64 += R8 machri -0.7
|
Supported instructions
|
|
| Bitwise Operations | |||
acc32 = <op1> <instr> <op2>
|
acc32 = R0 xor R1acc32 = R8 andi 0x0400
|
Supported instructions
|
|
| Conditional Branching | |||
IF <cr> <cond> [GOTO] <label>
|
if r7 >=0 goto mylabelif acc32 neg mylabelif r0 nz goto mylabel
|
GOTO keyword is optional Supported conditions and [synonyms]
|
|
JMP <label>GOTO <label>
|
goto mylabel
|
Unconditional branch. JMP and GOTO are synonyms. |
|
}
Copyright © Cabintech Global LLC