mirror of
https://github.com/RevCurtisP/C02.git
synced 2024-11-22 01:31:33 +00:00
Added HEX Pseudo-Op, Fixed LDY Addressing Modes
This commit is contained in:
parent
18088691d7
commit
bdc3674c59
7
a02.c
7
a02.c
@ -286,6 +286,12 @@ void asmbyt(void) {
|
||||
} while (cpychr(','));
|
||||
}
|
||||
|
||||
/* Assemble HEX Pseudo-Op */
|
||||
void asmhex(void) {
|
||||
if (DEBUG) puts("Assembling HEX Pseudo-Op");
|
||||
do {outbyt(evlhex(0xFF)); } while (cpychr(','));
|
||||
}
|
||||
|
||||
/* Assemble WORD Pseudo-Op */
|
||||
void asmwrd(void) {
|
||||
do {
|
||||
@ -359,6 +365,7 @@ int asmpso(void) {
|
||||
switch (token) {
|
||||
case '=': asmequ(); break; //EQU
|
||||
case 'B': asmbyt(); break; //BYTE
|
||||
case 'H': asmhex(); break; //BYTE
|
||||
case 'W': asmwrd(); break; //WORD
|
||||
case 'F': asmfll(); break; //FILL
|
||||
case 'S': asmsub(); break; //SUBRoutine
|
||||
|
8
a02.h
8
a02.h
@ -41,9 +41,9 @@ struct amd amdesc[] = {
|
||||
|
||||
struct opc {char name[5], token; int amode;};
|
||||
struct opc psolst[] = {
|
||||
{"BYTE", 'B', 0}, {"WORD", 'W', 0}, {"EQU", '=', 0}, {"FILL", 'F', 0}, {"INCL", 'I', 0},
|
||||
{"SUBR", 'S', 0}, {"ORG", '*', 0}, {"PROC", 'P', 0}, {"DC", 'B', 0}, {"DS", 'F', 0},
|
||||
{"", 0, 0}
|
||||
{"BYTE", 'B', 0}, {"HEX", 'H'}, {"WORD", 'W', 0}, {"EQU", '=', 0}, {"FILL", 'F', 0},
|
||||
{"INCL", 'I', 0}, {"SUBR", 'S', 0}, {"ORG", '*', 0}, {"PROC", 'P', 0},
|
||||
{"DC", 'B', 0}, {"DS", 'F', 0}, {"", 0, 0}
|
||||
};
|
||||
|
||||
struct opc opclst[] = {
|
||||
@ -74,7 +74,7 @@ struct opc opclst[] = {
|
||||
{"STZ", 0x60, 0x006C},
|
||||
{"JMP", 0x4C, 0x0620},
|
||||
{"JSR", 0x14, 0x0020},
|
||||
{"LDY", 0xA0, 0x002E},
|
||||
{"LDY", 0xA0, 0x006E},
|
||||
{"STY", 0x80, 0x002C},
|
||||
{"", 0, 0}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user