Add 6502 TSX and TXS instructions
This commit is contained in:
parent
7e5e9d5e30
commit
94b94c611d
|
@ -9,10 +9,18 @@ void tay(FILE *outfile) {
|
|||
fwrite(TAY, 1, 1, outfile);
|
||||
}
|
||||
|
||||
void tsx(FILE *outfile) {
|
||||
fwrite(TSX, 1, 1, outfile);
|
||||
}
|
||||
|
||||
void txa(FILE *outfile) {
|
||||
fwrite(TXA, 1, 1, outfile);
|
||||
}
|
||||
|
||||
void txs(FILE *outfile) {
|
||||
fwrite(TXS, 1, 1, outfile);
|
||||
}
|
||||
|
||||
void tya(FILE *outfile) {
|
||||
fwrite(TYA, 1, 1, outfile);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,9 @@
|
|||
|
||||
void tax(FILE *outfile);
|
||||
void tay(FILE *outfile);
|
||||
void tsx(FILE *outfile);
|
||||
void txa(FILE *outfile);
|
||||
void txs(FILE *outfile);
|
||||
void tya(FILE *outfile);
|
||||
|
||||
void inx(FILE *outfile);
|
||||
|
|
|
@ -47,6 +47,10 @@ void parser(char lexed_buf[512][128][128], FILE *outfile) { // outfile is needed
|
|||
txa(outfile);
|
||||
} else if (!strcmp(lexed_buf[i][j], "TYA")) {
|
||||
tya(outfile);
|
||||
} else if (!strcmp(lexed_buf[i][j], "TSX")) {
|
||||
tsx(outfile);
|
||||
} else if (!strcmp(lexed_buf[i][j], "TXS")) {
|
||||
txs(outfile);
|
||||
} else {
|
||||
printf("Unrecognized command: %s\n", lexed_buf[i][j]);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue