Add 6502 TAX instruction
This commit is contained in:
parent
d3bcbf974a
commit
f9b2019e7a
|
@ -1,6 +1,10 @@
|
|||
#include <stdio.h>
|
||||
#include "6502.h"
|
||||
|
||||
void tax(FILE *outfile) {
|
||||
fwrite(TAX, 1, 1, outfile);
|
||||
}
|
||||
|
||||
void txa(FILE *outfile) {
|
||||
fwrite(TXA, 1, 1, outfile);
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
#define NOP "\xEA"
|
||||
|
||||
void tax(FILE *outfile);
|
||||
void txa(FILE *outfile);
|
||||
void tya(FILE *outfile);
|
||||
|
||||
|
|
|
@ -39,6 +39,8 @@ void parser(char lexed_buf[512][128][128], FILE *outfile) { // outfile is needed
|
|||
inx(outfile);
|
||||
} else if (!strcmp(lexed_buf[i][j], "INY")) {
|
||||
iny(outfile);
|
||||
} else if (!strcmp(lexed_buf[i][j], "TAX")) {
|
||||
tax(outfile);
|
||||
} else if (!strcmp(lexed_buf[i][j], "TXA")) {
|
||||
txa(outfile);
|
||||
} else if (!strcmp(lexed_buf[i][j], "TYA")) {
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
NOP
|
||||
INX
|
||||
INX
|
||||
INY
|
||||
TXA
|
||||
INY
|
||||
INY
|
||||
INY
|
||||
TYA
|
||||
INY
|
||||
TAX
|
||||
INX
|
||||
INX
|
||||
TYA
|
||||
INY
|
||||
INY
|
||||
INY
|
||||
|
|
|
@ -1 +1 @@
|
|||
кииИЉИИИ<EFBFBD>
|
||||
ИИ<EFBFBD>ИЄии<EFBFBD>ИИИ
|
Loading…
Reference in New Issue