X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=riscasm.c;h=50fecf4e8e412b5a44f3f2b0684e2b9355f7b35a;hp=d595ebc96257f275a907febb33e63b9cebcf81d5;hb=c59f7a33730dacf753e066a4002e2f749051a137;hpb=33bb2746fadd3501eccf6b1046cf8acdfb0f1e37 diff --git a/riscasm.c b/riscasm.c index d595ebc..50fecf4 100644 --- a/riscasm.c +++ b/riscasm.c @@ -1,7 +1,7 @@ // // RMAC - Reboot's Macro Assembler for all Atari computers // RISCA.C - GPU/DSP Assembler -// Copyright (C) 199x Landon Dyer, 2011-2018 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2011-2019 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 // Source utilised with the kind permission of Landon Dyer // @@ -13,6 +13,7 @@ #include "expr.h" #include "mark.h" #include "procln.h" +#include "rmac.h" #include "sect.h" #include "token.h" @@ -134,16 +135,6 @@ static const char * malformErr[] = { }; -// -// Convert a string to uppercase -// -static void strtoupper(char * s) -{ - while (*s) - *s++ &= 0xDF; -} - - // // Function to return "malformed expression" error // This is done mainly to remove a bunch of GOTO statements in the parser @@ -267,7 +258,7 @@ int GenerateRISCCode(int state) // UNPACK case RI_ONE: reg2 = EvaluateRegisterFromTokenStream(FU_REGTWO); - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, parm >> 6, reg2); break; @@ -285,7 +276,7 @@ int GenerateRISCCode(int state) altbankok = 1; // MOVETA reg2 = EvaluateRegisterFromTokenStream(FU_REGTWO); - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, reg1, reg2); break; @@ -347,7 +338,7 @@ int GenerateRISCCode(int state) CHECK_COMMA; reg2 = EvaluateRegisterFromTokenStream(FU_REGTWO); - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, reg1, reg2); break; @@ -396,7 +387,7 @@ int GenerateRISCCode(int state) CHECK_COMMA; reg2 = EvaluateRegisterFromTokenStream(FU_REGTWO); - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, 0, reg2); val = WORDSWAP32(eval); @@ -419,7 +410,7 @@ int GenerateRISCCode(int state) CHECK_COMMA; reg2 = EvaluateRegisterFromTokenStream(FU_REGTWO); - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, reg1, reg2); break; @@ -542,7 +533,7 @@ int GenerateRISCCode(int state) tok++; CHECK_COMMA; reg2 = EvaluateRegisterFromTokenStream(FU_REGTWO); - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, reg1, reg2); break; @@ -661,7 +652,7 @@ int GenerateRISCCode(int state) return MalformedOpcode(MALF_RPAREN); tok++; - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, reg2, reg1); break; @@ -679,7 +670,7 @@ int GenerateRISCCode(int state) tok++; CHECK_COMMA; reg2 = EvaluateRegisterFromTokenStream(FU_REGTWO); - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, reg1, reg2); break; @@ -698,7 +689,7 @@ int GenerateRISCCode(int state) return MalformedOpcode(MALF_RPAREN); tok++; - at_eol(); + ErrorIfNotAtEOL(); DepositRISCInstructionWord(parm, reg2, reg1); break; @@ -811,7 +802,7 @@ int GenerateRISCCode(int state) return MalformedOpcode(MALF_RPAREN); tok++; - at_eol(); + ErrorIfNotAtEOL(); } DepositRISCInstructionWord(parm, reg2, reg1);