Started rethinking how this machine should behave. Updated and refactoring some things with a few new ideas.

This commit is contained in:
2023-02-23 22:22:07 -06:00
parent 9a602824b6
commit 1b246e90bc
8 changed files with 68 additions and 193 deletions
+8 -2
View File
@@ -71,7 +71,7 @@
For the opcodes that load or store data at the assembly language level we could have the mnemonics
"store" and "load" and have the assembler pick the opcode based on the inclusion of the word "byte"
or "word" for two bytes. That would make the assembly easier to read but put a bit more work on the
assembler.
assembler. The Stack Pointer will start 2 bytes above the video memory start.
\section{STOB (Store Byte)}
\OpcodeTable{0x20}{stob}{Register}{Address}\\[6pt]
Stores a single byte (the lower nibble) from a register to a memory address.
@@ -104,7 +104,7 @@
Performs subtraction on a register with a value from another (or the same) register.
\section{JMP (Jump)}
\OpcodeTable{0x20}{jmp}{Address}{None}\\[6pt]
Jumps unconditionally to a memory address.
Jumps unconditionally to a memory address. Sets the Program Counter to Address.
\section{JZ (Jump if Zero)}
\OpcodeTable{0x20}{jz}{Register}{None}\\[6pt]
Jumps to a memory address if the status flag is zero.
@@ -141,4 +141,10 @@
\section{NOP (No Operation)}
\OpcodeTable{0x00}{nop}{None}{None}\\[6pt]
Skips a clock cycle, incrementing the program counter.
\section{Push}
\OpcodeTable{0x00}{push}{Register}{None}
Pushes the value of Register onto the stack, decrementing the Stack Pointer by 2.
\section{Pop}
\OpcodeTable{0x00}{pop}{Register}{None}
Pops the top of the stack into Register, incrementing the Stack Pointer by 2.
\end{document}