added nnn shortcut
This commit is contained in:
@@ -196,6 +196,7 @@ The shortcut mnemonics for other operations are as follows:
|
|||||||
* `sin` is a shortcut to `tri 0` (sine)
|
* `sin` is a shortcut to `tri 0` (sine)
|
||||||
* `cos` is a shortcut to `tri 1` (cosine)
|
* `cos` is a shortcut to `tri 1` (cosine)
|
||||||
* `atn` is a shortcut to `tri 2` (arctangent)
|
* `atn` is a shortcut to `tri 2` (arctangent)
|
||||||
|
* `nnn` is a shortcut to `nop 0 0 0` (a short alias for NOP)
|
||||||
|
|
||||||
### Port input and output
|
### Port input and output
|
||||||
|
|
||||||
|
|||||||
+23
-22
@@ -19,28 +19,29 @@ mnemos = ['nop', 'jmp', 'iat', 'out', 'inp', 'set', 'cpy', 'fma',
|
|||||||
|
|
||||||
# mu808 jump/function shortcuts
|
# mu808 jump/function shortcuts
|
||||||
jmpfunc_shorts = {
|
jmpfunc_shorts = {
|
||||||
'ige': 'jmp 10', # indirect jump if greater than or equals to zero
|
'nnn': 'nop 0 0 0', # alias for nop
|
||||||
'ile': 'jmp 11', # indirect jump if less than or equals to zero
|
'ige': 'jmp 10', # indirect jump if greater than or equals to zero
|
||||||
'ine': 'jmp 12', # indirect jump if not equals to zero
|
'ile': 'jmp 11', # indirect jump if less than or equals to zero
|
||||||
'iuc': 'jmp 13 0', # indirect unconditional jump
|
'ine': 'jmp 12', # indirect jump if not equals to zero
|
||||||
'jeq': 'jmp 0', # direct jump if equals to zero
|
'iuc': 'jmp 13 0', # indirect unconditional jump
|
||||||
'jgt': 'jmp 1', # direct jump if greater than zero
|
'jeq': 'jmp 0', # direct jump if equals to zero
|
||||||
'jlt': 'jmp 2', # direct jump if less than zero
|
'jgt': 'jmp 1', # direct jump if greater than zero
|
||||||
'jge': 'jmp 3', # direct jump if greater than or equals to zero
|
'jlt': 'jmp 2', # direct jump if less than zero
|
||||||
'jle': 'jmp 4', # direct jump if less than or equals to zero
|
'jge': 'jmp 3', # direct jump if greater than or equals to zero
|
||||||
'jne': 'jmp 5', # direct jump if not equals to zero
|
'jle': 'jmp 4', # direct jump if less than or equals to zero
|
||||||
'juc': 'jmp 6 0', # direct unconditional jump
|
'jne': 'jmp 5', # direct jump if not equals to zero
|
||||||
'ieq': 'jmp 7', # indirect jump if equals to zero
|
'juc': 'jmp 6 0', # direct unconditional jump
|
||||||
'igt': 'jmp 8', # indirect jump if greater than zero
|
'ieq': 'jmp 7', # indirect jump if equals to zero
|
||||||
'ilt': 'jmp 9', # indirect jump if less than zero
|
'igt': 'jmp 8', # indirect jump if greater than zero
|
||||||
'dia': 'cpy 0', # direct integer assignment
|
'ilt': 'jmp 9', # indirect jump if less than zero
|
||||||
'dva': 'cpy 1', # direct value assignment
|
'dia': 'cpy 0', # direct integer assignment
|
||||||
'iva': 'cpy 2', # indirect value assignment
|
'dva': 'cpy 1', # direct value assignment
|
||||||
'exp': 'nel 0', # natural exponent
|
'iva': 'cpy 2', # indirect value assignment
|
||||||
'log': 'nel 1', # natural logarithm
|
'exp': 'nel 0', # natural exponent
|
||||||
'sin': 'tri 0', # sine
|
'log': 'nel 1', # natural logarithm
|
||||||
'cos': 'tri 1', # cosine
|
'sin': 'tri 0', # sine
|
||||||
'atn': 'tri 2' # arctangent
|
'cos': 'tri 1', # cosine
|
||||||
|
'atn': 'tri 2' # arctangent
|
||||||
}
|
}
|
||||||
|
|
||||||
# converts the MU8A source code to the plaintext machine code representation
|
# converts the MU8A source code to the plaintext machine code representation
|
||||||
|
|||||||
Reference in New Issue
Block a user