README: describe more syntax
This commit is contained in:
parent
6647d6ddda
commit
a8572a7fb8
66
README.rst
66
README.rst
@ -124,9 +124,9 @@ emit "add mode 1" via the ``DMA1`` and ``DMAH1`` mnemonics.
|
||||
DMA "add mode" and bytes
|
||||
------------------------
|
||||
|
||||
All of the documentation you have read is invalid; here is the correct
|
||||
relationship between DMA "add mode" mnemonics, and the number of
|
||||
incremented bytes:
|
||||
All of the documentation you have read is invalid; this is the correct
|
||||
relationship between DMA "add mode" mnemonics. The right columns represent the
|
||||
the increment added an offset of RA0/WA0 after each bus transfer:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
@ -159,3 +159,63 @@ incremented bytes:
|
||||
* - DMA64
|
||||
- 4 bytes
|
||||
- 128 bytes
|
||||
|
||||
Note that the DMA transfer length is always decremented by 1 after 4 bytes are
|
||||
transferred, regardless of the size of the bus transfer.
|
||||
|
||||
The SCU manual (ST-97-R5-072694) contains this contradictory text:
|
||||
|
||||
Only add numbers 0 and 1 are valid for the A-Bus and the write unit is
|
||||
32bit. [...] Write unit is 16bit; 32bit data is divided in half and written
|
||||
at intervals of 16X (0-64).
|
||||
|
||||
"Multiply the 'add number' by the [number of bytes per transfer] **depending on
|
||||
the value of WA0/RA0**" is completely incorrect. The text in the original
|
||||
Japanese document is also incorrect.
|
||||
|
||||
Syntax features that are supported, but with misleading consequences
|
||||
====================================================================
|
||||
|
||||
``NOP`` mnemonics inside OP instructions
|
||||
----------------------------------------
|
||||
|
||||
In both scu-dsp-asm and ``dspasm.exe``, ALU, X-bus, Y-bus, and D1-bus mnemonics
|
||||
may appear in any order in a single OP instruction and/or line of source code.
|
||||
|
||||
From a grammar perspective, it is impossible to disambiguate which bus a ``NOP``
|
||||
is referring to. For example, this is valid code:
|
||||
|
||||
.. code::
|
||||
|
||||
NOP NOP NOP NOP MOV MUL,P
|
||||
|
||||
Even though it visually might appear that the X-bus operation might be
|
||||
simultaneously ``NOP`` and ``MOV MUL,P``, due to syntactical ambiguity the
|
||||
assembler is not able to generate an error for this case.
|
||||
|
||||
There is no restriction on the number of ``NOP`` values that can appear on a
|
||||
single line.
|
||||
|
||||
Feel free to use this syntax feature if desired stylistically, but be aware
|
||||
scu-dsp-asm is not able to verify intent, and does not/can not generate errors
|
||||
related to a "conflict" between a ``NOP`` mnemonic and any other bus operation.
|
||||
|
||||
Immediates with ``:``-suffixes or ``#``-prefixes
|
||||
------------------------------------------------
|
||||
|
||||
In both scu-dsp-asm and ``dspasm.exe``, neither of these characters mean
|
||||
anything in the grammar. If encountered, they are ignored.
|
||||
|
||||
For example, all of the following is valid source code:
|
||||
|
||||
.. code::
|
||||
|
||||
MVI #1,MC0
|
||||
MVI 1:,MC0
|
||||
MVI #foobar,MC0
|
||||
MVI #foobar:,MC0
|
||||
MVI #1+1:,MC0
|
||||
MVI #(1+1):,MC0
|
||||
|
||||
Feel free to use these characters if desired stylistically, but be aware that
|
||||
scu-dsp-asm does not generate errors regardless of how they are used.
|
||||
|
@ -2,6 +2,7 @@ V=2
|
||||
M=scu-dsp-asm.$V
|
||||
|
||||
make TARGET=x86_64-pc-linux-gnu- MAIN=$M.Linux.x86_64 clean all
|
||||
make TARGET=aarch64-unknown-linux-gnu- MAIN=$M.Linux.aarch64 clean all
|
||||
make TARGET=x86_64-w64-mingw32- MAIN=$M.Windows.x86_64.exe clean all
|
||||
make TARGET=i686-w64-mingw32- MAIN=$M.Windows.i686.exe clean all
|
||||
#make MAIN=$M.MacOS-Ventura.x86_64 clean all
|
||||
|
Loading…
x
Reference in New Issue
Block a user