Add 6502 TYA instruction
This commit is contained in:
parent
e16a879527
commit
d3bcbf974a
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#define NOP "\xEA"
|
||||
|
||||
void txa(FILE *outfile);
|
||||
void tya(FILE *outfile);
|
||||
|
||||
void inx(FILE *outfile);
|
||||
void iny(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], "TXA")) {
|
||||
txa(outfile);
|
||||
} else if (!strcmp(lexed_buf[i][j], "TYA")) {
|
||||
tya(outfile);
|
||||
} else {
|
||||
printf("Unrecognized command: %s\n", lexed_buf[i][j]);
|
||||
break;
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
NOP
|
||||
INX
|
||||
INX
|
||||
INY
|
||||
TXA
|
||||
INY
|
||||
INY
|
||||
INY
|
||||
TYA
|
||||
|
|
|
@ -1 +1 @@
|
|||
киИ
|
||||
кииИЉИИИ<EFBFBD>
|
Loading…
Reference in New Issue