Hopefully fixed literals and implemented most instructions

This commit is contained in:
Luxferre
2022-08-09 20:59:08 +03:00
parent 31166c8e7f
commit 0be72ee3fd
2 changed files with 143 additions and 61 deletions
+2 -1
View File
@@ -99,6 +99,7 @@ CR |`( -- )` |In the command mode, output a line break an
`*`|`( a b -- a*b )` |Product
`/`|`( a b -- a/b rem )` |Integer division (with remainder)
`N`|`( a -- -a )` |Single-instruction negation (complement to 65536)
`T`|`( a XY -- [a >> X] << Y )` |Bitwise shif**t**: by the first nibble to the right and then by the second nibble to the left
`~`|`( a -- ~a )` |Bitwise NOT
`&`|`( a b -- a&b )` |Bitwise AND
`\|`|`( a b -- a\|b )` |Bitwise OR
@@ -106,7 +107,7 @@ CR |`( -- )` |In the command mode, output a line break an
`.`|`( a -- ) ` |Output a character by the ASCII (or Unicode, if supported) value into the standard terminal
`,`|`( -- a ) ` |Non-blocking key input of an ASCII (or Unicode, if supported) value from the standard terminal
`?`|`( -- a ) ` |Blocking key input of an ASCII (or Unicode, if supported) value from the standard terminal
`P`|`( p1 p2 port -- status r1 r2 )`|**P**ort I/O: pass two 16-bit parameters to the port and read the operation status and results into the words on the stack top
`P`|`( p1 p2 port -- r1 r2 status )`|**P**ort I/O: pass two 16-bit parameters to the port and read the operation status and results into the words on the stack top
`}`|`( adh adl len maddr -- status)`|Persistent storage write operation. Stack parameters: persistent address high 2 bytes, low 2 bytes, data length, RAM address
`{`|`( adh adl len maddr -- status)`|Persistent storage read operation. Stack parameters: persistent address high 2 bytes, low 2 bytes, data length, RAM address
`Q`|`( -- )` |**Q**uit the interpretation mode (unset IM flag if set), or the interpreter shell itself if in command mode (halt the machine when it's nowhere to exit to)