Skip to content

Commit

Permalink
Add .global as alias for .globl
Browse files Browse the repository at this point in the history
  • Loading branch information
TheThirdOne committed Jun 28, 2022
1 parent b4943e8 commit 27a7c1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rars/assembler/Assembler.java
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ private void executeDirective(TokenList tokens) {
true, errors);
this.externAddress += size;
}
} else if (direct == Directives.GLOBL) {
} else if (direct == Directives.GLOBL || direct == Directives.GLOBAL) {
if (tokens.size() < 2) {
errors.add(new ErrorMessage(token.getSourceProgram(), token.getSourceLine(),
token.getStartPos(), "\"" + token.getValue()
Expand Down
3 changes: 2 additions & 1 deletion src/rars/assembler/Directives.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public final class Directives {
public static final Directives FLOAT = new Directives(".float", "Store the listed value(s) as single precision floating point");
public static final Directives EXTERN = new Directives(".extern", "Declare the listed label and byte length to be a global data field");
public static final Directives GLOBL = new Directives(".globl", "Declare the listed label(s) as global to enable referencing from other files");
public static final Directives GLOBAL = new Directives(".global", "Declare the listed label(s) as global to enable referencing from other files");
/* EQV added by DPS 11 July 2012 */
public static final Directives EQV = new Directives(".eqv", "Substitute second operand for first. First operand is symbol, second operand is expression (like #define)");
/* MACRO and END_MACRO added by Mohammad Sekhavat Oct 2012 */
Expand Down Expand Up @@ -178,4 +179,4 @@ public static boolean isFloatingDirective(Directives direct) {
return direct == Directives.FLOAT || direct == Directives.DOUBLE;
}

}
}

0 comments on commit 27a7c1f

Please sign in to comment.