summaryrefslogtreecommitdiff
path: root/opcode.h
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2019-12-11 11:28:30 -0500
committermrb0nk500 <b0nk@b0nk.xyz>2019-12-11 11:28:30 -0500
commit9526483f93b5950ecfa81a93f30b617bec22dfe1 (patch)
tree34ee0e468f3d9ea239870967df1931cef2206dcf /opcode.h
parent3dfde833082fc66cededd0206ae5fc76162867b6 (diff)
We can print to the Screen!!!!
I also added the ASR instruction, for doing arithmetic shifts, and have added a hello world program.
Diffstat (limited to 'opcode.h')
-rw-r--r--opcode.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/opcode.h b/opcode.h
index 990df5a..92d504c 100644
--- a/opcode.h
+++ b/opcode.h
@@ -69,6 +69,7 @@
#define BVC 0xA0 /* Branch if oVerflow Clear. */
#define DIV 0xA1 /* DIVide with accumulator. */
#define CLV 0xA8 /* CLear oVerflow flag. */
+#define ASR 0xA9 /* Arithmetic Shift Right. */
#define RTS 0xB0 /* ReTurn from Subroutine. */
#define CMP 0xB1 /* CoMPare accumulator. */
#define CPY 0xB2 /* ComPare Y register. */
@@ -232,8 +233,8 @@ static const char *opname[0x100] = {
[0x95] = "MUL zm",
OPNAME(SEV),
[0x99] = "LDA zm, y",
- [0x9B] = "LDX zm, y",
- [0x9C] = "STA zm, y",
+ [0x9B] = "STA zm, y",
+ [0x9C] = "LDX zm, y",
[0x9E] = "STX zm, y",
OPNAME(BVC),
[DIV] = "DIV #",
@@ -242,6 +243,9 @@ static const char *opname[0x100] = {
[0xA4] = "XRX zm",
[0xA5] = "DIV zm",
OPNAME(CLV),
+ [ASR] = "ASR #",
+ [0xAB] = "ASR a",
+ [0xAD] = "ASR zm",
OPNAME(RTS),
[CMP] = "CMP #",
[CPY] = "CPY #",