]> Shamusworld >> Repos - rmac/blobdiff - docs/rmac.rst
Produce error when ".opt +o" or ".opt ~o" is encountered. Also, small doc additions
[rmac] / docs / rmac.rst
index bfbd66c08eac4e3abf390d77995a0bfca59f15e2..24110c46eb220330d3104d49a1356e26b5d2eb12 100644 (file)
@@ -404,7 +404,7 @@ necessary to make other assemblers' source code assemble.
   **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.
 
@@ -414,6 +414,8 @@ necessary to make other assemblers' source code assemble.
 
                                 * = 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.
@@ -422,7 +424,7 @@ necessary to make other assemblers' source code assemble.
 * 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:
 
    ::
@@ -942,6 +944,29 @@ described in the chapter on `6502 Support`_.
    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).
@@ -1207,6 +1232,17 @@ described in the chapter on `6502 Support`_.
                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