Add 6502 TYA instruction

This commit is contained in:
g1n 2021-10-14 15:09:58 +03:00
parent e16a879527
commit d3bcbf974a
5 changed files with 14 additions and 1 deletions

View File

@ -5,6 +5,10 @@ void txa(FILE *outfile) {
fwrite(TXA, 1, 1, outfile);
}
void tya(FILE *outfile) {
fwrite(TYA, 1, 1, outfile);
}
void inx(FILE *outfile) {
fwrite(INX, 1, 1, outfile);
}

View File

@ -14,6 +14,7 @@
#define NOP "\xEA"
void txa(FILE *outfile);
void tya(FILE *outfile);
void inx(FILE *outfile);
void iny(FILE *outfile);

View File

@ -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], "TXA")) {
txa(outfile);
} else if (!strcmp(lexed_buf[i][j], "TYA")) {
tya(outfile);
} else {
printf("Unrecognized command: %s\n", lexed_buf[i][j]);
break;

View File

@ -1,3 +1,9 @@
NOP
INX
INX
INY
TXA
INY
INY
INY
TYA

View File

@ -1 +1 @@
киИ
кииИЉИИИ<EFBFBD>