From 282fa7725993c9b0b0d2bb0977c124f11abea1fd Mon Sep 17 00:00:00 2001 From: Ian C Date: Tue, 8 Mar 2016 13:51:57 +0000 Subject: Wildcard for args, EX changes and CP/M test. + Added '*' wildcard for macro arguments + Allow 'EX' with parameters reversed on the Z80 + Added simple CP/M example test. + Added some files to gitignore --- doc/manual.asciidoc | 26 +++++++++++++++++++++++++- doc/manual.html | 27 +++++++++++++++++++++++++-- doc/manual.pdf | Bin 145493 -> 148743 bytes 3 files changed, 50 insertions(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/manual.asciidoc b/doc/manual.asciidoc index 888a9f0..99d07f6 100644 --- a/doc/manual.asciidoc +++ b/doc/manual.asciidoc @@ -317,7 +317,9 @@ Macros ~~~~~~ Macros can be defined in one of two ways; either parameterless or with named -parameters. Macro names are case-insensitive. +parameters. Macro names are case-insensitive. In the parameterless mode the +special identifier '*' can be used to expand all arguments, which will be +separated with commas. ---- macro1: macro @@ -325,6 +327,7 @@ macro1: macro ld a,\1 ld b,\2 call \3 + defb \* endm @@ -456,6 +459,27 @@ EOR can be used the same as XOR: and b ---- +For exchange opcodes with parameters the parameters can be reversed from their +official form: + +---- + ; The official forms + ; + ex de,hl + ex af,af' + ex (sp),hl + ex (sp),ix + ex (sp),iy + + ; Also supported + ; + ex hl,de + ex af',af + ex hl,(sp) + ex ix,(sp) + ex iy,(sp) +---- + Where the high/low register parts of the IX and IY registers are to be used, simply use ixl, iyl, ixh and iyh. Note that the assembler will accept illegal pairings involving H and L, but these will be warned about: diff --git a/doc/manual.html b/doc/manual.html index 4aa250c..c25be2e 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -1259,7 +1259,9 @@ cbm

Macros

Macros can be defined in one of two ways; either parameterless or with named -parameters. Macro names are case-insensitive.

+parameters. Macro names are case-insensitive. In the parameterless mode the +special identifier * can be used to expand all arguments, which will be +separated with commas.

macro1: macro
@@ -1267,6 +1269,7 @@ parameters.  Macro names are case-insensitive.

ld a,\1 ld b,\2 call \3 + defb \* endm @@ -1477,6 +1480,26 @@ EOR can be used the same as XOR:

and a,b ; These are equivalent and b +

For exchange opcodes with parameters the parameters can be reversed from their +official form:

+
+
+
    ; The official forms
+    ;
+    ex      de,hl
+    ex      af,af'
+    ex      (sp),hl
+    ex      (sp),ix
+    ex      (sp),iy
+
+    ; Also supported
+    ;
+    ex      hl,de
+    ex      af',af
+    ex      hl,(sp)
+    ex      ix,(sp)
+    ex      iy,(sp)
+

Where the high/low register parts of the IX and IY registers are to be used, simply use ixl, iyl, ixh and iyh. Note that the assembler will accept illegal pairings involving H and L, but these will be warned about:

@@ -1570,7 +1593,7 @@ lda $8000,x ; Produces $bd $00 $80

diff --git a/doc/manual.pdf b/doc/manual.pdf index d39db3e..5cd5ea7 100644 Binary files a/doc/manual.pdf and b/doc/manual.pdf differ -- cgit v1.2.3