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