This repository has been archived on 2024-08-24. You can view files and clone it, but cannot push or open issues or pull requests.
PlutoISA/assembly.txt

68 lines
1.4 KiB
Text
Raw Permalink Normal View History

2024-08-22 17:26:49 +02:00
This is the documentation for the PlutoISA assembly.
Copyright (c) 2024 Patrick_Pluto.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".
2024-08-23 11:46:12 +02:00
2024-08-22 17:26:49 +02:00
Legend:
V: Value
R: ROM Address
C: Register/Cache Address
M: Memory Address
Keywords:
00 - GET - get from rom
LOAD DESTINATION SOURCE
2024-08-22 21:17:22 +02:00
LOAD C00 V00
2024-08-22 17:26:49 +02:00
01 - LOAD - load from memory
LOAD DESTINATION SOURCE
LOAD C00 M00
02 - STORE - store in memory
STORE SOURCE DESTINATION
STORE C00 M00
03 - ADD - addition
ADD RESULT SOURCE1 SOURCE2
ADD C02 C00 C01
04 - SUB - subtaction
SUB RESULT SOURCE1 SOURCE2
SUB C02 C00 C01
05 - JMP - jump
JMP DESTINATION
JMP R00
06 - JEQ - jump if equals
JMP DESTINATION SOURCE1 SOURCE2
JMP R00 R01 C00
2024-08-23 10:38:22 +02:00
07 - HIN - halt for input
HIN DESTINATION
HIN R00
Reserved registers:
Register 8 is used for text and number output. Numbers through hex 01-25 correspond to a number, here is the sheet:
00 - Nothing
01-0A - Numbers from 0-9
0B-24 - Letters from A-Z (capitalized)
25 - Space
26 - New line
27-FF - Nothing
To print, just make sure to store the corresponding number in register 8, and don't forget to replace it with 00, else it will constantly print out, as it doesn't clear.