From: cuz Date: Thu, 13 Nov 2003 22:02:45 +0000 (+0000) Subject: Remove bank.offs address spec X-Git-Tag: V2.12.0~1139 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=274bafe6a567c2ca48dccb5e53f2006a9b992b78;p=cc65 Remove bank.offs address spec git-svn-id: svn://svn.cc65.org/cc65/trunk@2661 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/ea.c b/src/ca65/ea.c index fbac2cfba..e243a83f5 100644 --- a/src/ca65/ea.c +++ b/src/ca65/ea.c @@ -159,63 +159,42 @@ void GetEA (EffAddr* A) /* Remaining stuff: * * adr - * bank.adr * adr,x - * bank.adr,x * adr,y * adr,s */ A->Expr = Expression (); - if (Tok == TOK_DOT) { - - /* Expr was a bank specification: bank.adr or bank.adr,x */ - A->Bank = A->Expr; - NextTok (); - A->Expr = Expression (); - if (Tok == TOK_COMMA) { - /* bank.adr,x */ - NextTok (); - Consume (TOK_X, "`X' expected"); - A->AddrModeSet = AM_ABS_LONG_X; - } else { - /* bank.adr */ - A->AddrModeSet = AM_ABS_LONG; - } + if (Tok == TOK_COMMA) { - } else { - - if (Tok == TOK_COMMA) { - - NextTok (); - switch (Tok) { + NextTok (); + switch (Tok) { - case TOK_X: - A->AddrModeSet = AM_ABS_LONG_X | AM_ABS_X | AM_DIR_X; - NextTok (); - break; + case TOK_X: + A->AddrModeSet = AM_ABS_LONG_X | AM_ABS_X | AM_DIR_X; + NextTok (); + break; - case TOK_Y: - A->AddrModeSet = AM_ABS_Y | AM_DIR_Y; - NextTok (); - break; + case TOK_Y: + A->AddrModeSet = AM_ABS_Y | AM_DIR_Y; + NextTok (); + break; - case TOK_S: - A->AddrModeSet = AM_STACK_REL; - NextTok (); - break; + case TOK_S: + A->AddrModeSet = AM_STACK_REL; + NextTok (); + break; - default: - Error ("Syntax error"); + default: + Error ("Syntax error"); - } + } - } else { + } else { - A->AddrModeSet = AM_ABS_LONG | AM_ABS | AM_DIR; + A->AddrModeSet = AM_ABS_LONG | AM_ABS | AM_DIR; - } - } + } } /* Apply addressing mode overrides */