M a65.c => a65.c +20 -1
@@ 85,7 85,8 @@ int main(int argc, char **argv) {
SCRATCH unsigned *o;
printf("6502 Cross-Assembler (Portable) Ver 0.2n\n");
- printf("Copyright (c) 1986 William C. Colley, III\n\n");
+ printf("Copyright (c) 1986 William C. Colley, III\n");
+ printf("Modifications by Nathan Misner\n\n");
while (--argc > 0) {
if (**++argv == '-') {
@@ 454,6 455,24 @@ static void pseudo_op() {
else error('S');
break;
+ case MSG:
+ do_label();
+ if (pass == 2) {
+ do {
+ if ((lex()->attr & TYPE) == STR) {
+ fputs(token.sval, stdout);
+ if ((lex()->attr & TYPE) != SEP) unlex();
+ }
+ else {
+ unlex();
+ u = expr();
+ printf("%d", u);
+ }
+ } while ((token.attr & TYPE) == SEP);
+ putchar('\n');
+ }
+ break;
+
case ORG:
u = expr();
if (forwd) error('P');
M a65.h => a65.h +1 -0
@@ 127,6 127,7 @@ typedef enum {
EQU,
IF,
INCL,
+ MSG,
ORG,
PAGE,
RMB,
M a65util.c => a65util.c +1 -0
@@ 165,6 165,7 @@ OPCODE *find_code(char *nam) {
{ LDXY, 0xa0, "LDY" },
{ LOGOP, 0x46, "LSR" },
{ INHOP, 0x4a, "LSRA" },
+ { PSEUDO, MSG, "MSG" },
{ INHOP, 0xea, "NOP" },
{ TWOOP, 0x01, "ORA" },
{ PSEUDO, ORG, "ORG" },
M readme.txt => readme.txt +1 -1
@@ 32,7 32,7 @@ your workflow.
- Give each .c file its own header file - done
- Change the assembler to output binary files instead of Intel HEX - done
- Allow for forcing loads/stores to not be optimized for zero page - done (! operator)
-- Add a "MSG" statement that prints out arbitrary strings and symbols
+- Add a "MSG" statement that prints out arbitrary strings and symbols - done
- Print the error messages to stdout instead of the assembler listing - done
- Add a makefile for our GNU/Linux and Mac OS X using friends - done
- Update A65.DOC with the new changes