**ifne**, **ifeq** (etc.), and **endc**.
* The tilde (~) character is an operator, and back-quote (`) is an illegal character.
AS68 permitted the tilde and back-quote characters in symbols.
-* There are no equivalents to org or section directives.
+* There are no equivalents to org or section directives apart from .text, .data, .bss.
The **.xdef** and **.xref** directives are not implemented,
but **.globl** makes these unnecessary anyway.
* = expression
+ Exceptions to this rule are when outputting a binary using the **-fr** switch,
+ 6502 mode, and Jaguar GPU/DSP.
* Back-slashes in strings are "electric" characters that are used to escape C-like
character codes. Watch out for GEMDOS path names in ASCII constants -
you will have to convert them to double-backslashes.
* Mark your segments across files.
Branching to a code segment that could be identified as BSS will cause a "Error: cannot initialize non-storage (BSS) section"
* In 68020+ mode **Zan** and **Zri** (register suppression) is not supported.
-* rs.b/rs.w/rs.l/rscount/rsreset can be simulated in rmac using abs.
+* rs.b/rs.w/rs.l/rscount/rsreset can be simulated in rmac using **.abs**.
For example the following source:
::
Therefore, to align GPU/DSP code, align the current section before and
after the GPU/DSP code.
+**.print**
+ This directive is similar to the standard ‘C’ library printf() function
+ and is used to print user messages from the assembly process. You can
+ print any string or valid expression. Several format flags that can be used
+ to format your output are also supported.
+
+ ::
+
+ /x hexadecimal
+ /d signed decimal
+ /u unsigned decimal
+ /w word
+ /l long
+
+ For example:
+
+ ::
+
+ MASK .equ $FFF8
+ VALUE .equ -100000
+ .print “Mask: $”,/x/w MASK
+ .print “Value: “,/d/l VALUE
+
**.phrase**
Align the program counter to the next integral phrase boundary (8 bytes).
bne .1 ; (no -- try again)
rts ; return string length
+**.error** ["*string*"]
+
+ Aborts the build, optionally printing a user defined string. Can be useful
+ inside conditional assembly blocks in order to catch errors. For example:
+
+ ::
+
+ .if ^^defined JAGUAR
+ .error "TOS cannot be built on Jaguar, don't be silly"
+ .endif
+
**.end**
End the assembly. In an include file, end the include file and resume assembling
*s++ &= 0xDF;
}
-
//
// Manipulate file extension.
//
return 1;
}
-
//
// Display command line help
//
" o7: clr.l Dx to moveq #0,Dx (off)\n"
" o8: adda.w/l #x,Dy to addq.w/l #x,Dy (off)\n"
" o9: adda.w/l #x,Dy to lea x(Dy),Dy (off)\n"
- " op: Enforce PC relative (alternative: o10) (off)\n"
+ " o10: Enforce PC relative (alternative: op) (off)\n"
" ~o[value] Turn a specific optimisation off\n"
" +oall Turn all optimisations on\n"
" ~oall Turn all optimisations off\n"
"V%01i.%01i.%01i %s (%s)\n\n", MAJOR, MINOR, PATCH, __DATE__, PLATFORM);
}
-
//
// Parse optimisation options
//
else if (*optstring != '~')
return ERROR;
+ if (optstring[2] == 0)
+ return error(".opt called with zero arguments");
+
if ((optstring[2] == 'a' || optstring[2] == 'A')
&& (optstring[3] == 'l' || optstring[3] == 'L')
&& (optstring[4] == 'l' || optstring[4] == 'L'))
return OK;
}
-
//
// Process command line arguments and do an assembly
//
return errcnt;
}
-
//
// Determine processor endianess
//
return 1;
}
-
//
// Application entry point
//
return 0;
}
-