diff --git a/CHANGELOG.md b/CHANGELOG.md index ad4328d7..8dae3017 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,16 @@ +## [1.18.1](https://github.com/z00m128/sjasmplus/releases/tag/v1.18.1) - 23.1.2021 +- Big-Endian hosts support (experimental and not tested continuously) +- added "listall", "listact" commands to [OPT](http://z00m128.github.io/sjasmplus/documentation.html#po_opt) - to switch between listing types +- [`WHILE`](http://z00m128.github.io/sjasmplus/documentation.html#po_while) has optional argument to set explicit guardian-counter +- [`ASSERT`](http://z00m128.github.io/sjasmplus/documentation.html#po_assert) has optional argument (to add description/notes for expression) +- [`SLOT`](http://z00m128.github.io/sjasmplus/documentation.html#po_slot) and [`MMU`](http://z00m128.github.io/sjasmplus/documentation.html#po_mmu) will now accept also starting address of slot instead of its number +- fix: option `--sym` was not exporting labels starting with underscore +- fix: `SAVENEX` BMP-loader bug when certain builds of sjasmplus were unable to open BMP files +- fix: after `STRUCT` instance the "main" label is not polluted by last field of STRUCT +- minor bugfixes in parser, windows cmake-builds have now icon +- docs: adding "Index" section +- docs: adding some missing information (`__DATE__`, `__TIME__`), fixing HTML anchor names + ## [1.18.0](https://github.com/z00m128/sjasmplus/releases/tag/v1.18.0) - 12.12.2020 - [may break old sources] the colon between end of EQU/DEFL/= expression and instruction is mandatory - [may break old sources] new [abs operator](http://z00m128.github.io/sjasmplus/documentation.html#s_expressions) for absolute integer value diff --git a/docs/documentation.html b/docs/documentation.html index f1dbe74e..c7088da5 100644 --- a/docs/documentation.html +++ b/docs/documentation.html @@ -1,4 +1,4 @@ -
- Big-Endian hosts support (experimental and not tested continuously) - added "listall", "listact" commands to OPT - to switch between listing types - `WHILE` has optional argument to set explicit guardian-counter - `ASSERT` has optional argument (to add description/notes for expression) +- `SLOT` and `MMU` will now accept also starting address of slot instead of its number - fix: option --sym was not exporting labels starting with underscore - fix: SAVENEX BMP-loader bug when certain builds of sjasmplus were unable to open BMP files - fix: after STRUCT instance the "main" label is not polluted by last field of STRUCT @@ -416,7 +417,7 @@ Comment blocks start with '/*
' and end with '*/
' (work in "nested" way, i.e. comment block started inside comment block must be also ended, before main block ends). -Example 2.1.
+Example 2.1.
; comment @@ -482,7 +483,7 @@(since v1.18.0) If you start the label with an ! (exclamation mark), it will not affect following local labels (same syntax as sjasm).
-Example 3.1. docs_examples/s_local_labels.asm
+Example 3.1. docs_examples/s_local_labels.asm
MODULE main ; module "main" @@ -513,7 +514,7 @@Labels starting with a '@' are not touched by the label processing - and used 'as-is'. See 'SetScreen' in the previous example code.
Example 3.2. docs_examples/s_at_labels.asm
+ and used 'as-is'. See 'SetScreen' in the previous example code.Example 3.2. docs_examples/s_at_labels.asm
MODULE xxx @@ -538,7 +539,7 @@ in the same order during every pass of assembling, but they can be used within macro, or repeating blocks (old sjasmplus versions didn't allow usage within macro). -Example 3.3. docs_examples/s_temp_labels.asm
+Example 3.3. docs_examples/s_temp_labels.asm
ADD A,E @@ -611,7 +612,7 @@ \R 13 \T 9 \V 11Inside single quotes two quotes after each other are - parsed as the apostrophe itself (since v1.11).
Example 4.1.
+ parsed as the apostrophe itself (since v1.11).Example 4.1.
BYTE "stringconstant\n" ; escape sequence assembles to newline @@ -1003,7 +1004,7 @@If only single DEVICE is used in whole source batch, the device becomes "global" and will affect also source ahead of the DEVICE line. -
Example 4.2. docs_examples/s_realdevice.asm
+Example 4.2. docs_examples/s_realdevice.asm
DEVICE ZXSPECTRUM128 @@ -1095,7 +1096,7 @@ mid-word substitution, will make more sense with new substitution rules (if ever the sjasmplus v2.x happens, would be too big change for v1.x). Right now call LUA for the rescue. -Example 4.3. __COUNTER__ usage in LUA script
+Example 4.3. __COUNTER__ usage in LUA script
DB __COUNTER__ ; DB 0 @@ -1119,7 +1120,7 @@The predefined values were renamed and extended to be more like gcc/clang pre-defines, the following ones are deprecated originals.
- _SJASMPLUS = 1
- -
Deprecated, consider using similar __SJASMPLUS__
Example 4.4.
+Deprecated, consider using similar __SJASMPLUS__
- _VERSION = "version"
- -
Deprecated, renamed to __VERSION__
Example 4.5.
+Deprecated, renamed to __VERSION__
- _RELEASE = releasenumber
- -
Deprecated, consider using similar __SJASMPLUS__
Example 4.6.
+Deprecated, consider using similar __SJASMPLUS__
Example 4.6.
IF _RELEASE = 1 ; 0 - is stable version @@ -1177,7 +1178,7 @@
- .<repeat-count> <single instruction>
Repeat <single instruction> <repeat-count> many times. Doesn't work in the beginning of line. The <repeat-count> must be either simple integer - number or expression fully enclosed in parentheses.
Example 5.1. docs_examples/po_dot_repeat.asm
+ number or expression fully enclosed in parentheses.Example 5.1. docs_examples/po_dot_repeat.asm
.3 INC A ;will be compiled to INC A:INC A:INC A @@ -1187,7 +1188,7 @@
- ABYTE <offset> <bytes>
Defines a byte or a string of bytes. The offset is added - to each of the following bytes.
Example 5.2.
+ to each of the following bytes.Example 5.2.
ABYTE 2 4,9 ; Same as BYTE 6,11 @@ -1196,7 +1197,7 @@- ABYTEC <offset> <bytes>
Defines a byte or a string of bytes, where the last byte of the string will have bit 7 set. The offset is added to each - of the following bytes.
Example 5.3.
+ of the following bytes.
- ABYTEZ <offset> <bytes>
Defines a byte or a string of bytes, followed by a zero. - The offset is added to each of the following bytes.
Example 5.4.
+ The offset is added to each of the following bytes.Example 5.4.
ABYTEZ 0 "KIP" ; Same as BYTE "KIP",0@@ -1215,7 +1216,7 @@Align advances to nearest address where <new address> modulo <expression> (default 4) equals zero (stays at current address if possible).
If <byte> is specified, memory advanced over is set to it. -
Example 5.5.
+Example 5.5.
ALIGN ; => ALIGN 4 - simply align by 4 @@ -1225,7 +1226,7 @@- ASSERT <expression>[, <anything>]
An 'assertion failed' error is issued if the expression evaluates to zero. The "anything" (optional argument since v1.18.1) is then also visible in the error - message, so you can add description/notes about expression there.
Example 5.6.
+ message, so you can add description/notes about expression there.Example 5.6.
STACKPOINTER=0D500H @@ -1238,7 +1239,7 @@ byte>]Defines space. Has to be followed by the number of byte to reserve, optionally followed by the value to fill these bytes - with.
Example 5.7.
+ with.Example 5.7.
BLOCK 500 ; define a block of 500 bytes of zero @@ -1260,7 +1261,7 @@ loaded snapshot/NEX/... file, or it will even disable breakpoints when changing machine parameters and ignore the--enable-breakpoints
option - will be hopefully improved in the future) -Example 5.8.
+Example 5.8.
BPLIST "bpx.ini" unreal ; open breakpoints list in "Unreal" format @@ -1270,7 +1271,7 @@- BYTE <bytes>
Defines a byte or a string of bytes. Each value should be - between -129 and 256.
Example 5.9.
+ between -129 and 256.Example 5.9.
BYTE 0x56 @@ -1293,7 +1294,7 @@If no filename is provided, default is created by appending ".map" to source name.
- D24
Defines three bytes by 24b constant. Values should be between - -16777217 and 16777216.
Example 5.10.
+ -16777217 and 16777216.Example 5.10.
D24 0x123456 ; define three bytes 0x56, 0x34, 0x12@@ -1302,7 +1303,7 @@Synonym of BYTE.
- DC
Same as BYTE, but every - last character of a string will have bit 7 set.
Example 5.11.
+ last character of a string will have bit 7 set.Example 5.11.
DC "kip" ; same as BYTE "ki",'p'|128@@ -1310,7 +1311,7 @@- DD
Synonym of DWORD.
- DEFARRAY <id> <replacements>
- -
Array of DEFINEs. Use
id[#]
to retrieve current size of array.Example 5.12. docs_examples/po_defarray.asm
+Array of DEFINEs. Use
id[#]
to retrieve current size of array.Example 5.12. docs_examples/po_defarray.asm
DEFARRAY myarray 10*20,"A",20,</D,40>,50,70 @@ -1321,7 +1322,7 @@ EDUP
- DEFARRAY+ <id> <additional replacements>
- -
Appending more DEFINEs to already defined array
Example 5.13.
+Appending more DEFINEs to already defined array
Example 5.13.
DEFARRAY myarray 'A', 'B', 'C' @@ -1345,7 +1346,7 @@ TheDEFINE+
(since v1.18.0) will also redefine the identifier <id> if it already exists. The replacement could be omitted, in such case it is still possible to check if the identifier was defined - with IFDEF or IFNDEF.Example 5.14.
+ with IFDEF or IFNDEF.Example 5.14.
DEFINE str_honderd "Honderd" @@ -1359,7 +1360,7 @@Assigns value of <expression> to symbol <label>. New label defined by DEFL is marked internally as "modifiable", allowing to re-assign new values to it with further DEFL statements (you can use also
=
instead ofDEFL
). -Example 5.15.
+Example 5.15.
counter DEFL 0 @@ -1412,14 +1413,14 @@ is converted to a byte value.A hyphen '-' (also '.' and '_') represents 0 and any other non-whitespace character - represents 1. It ignores spaces, use them for formatting if you like. Warning, "DG 10100001" is value 255, because character '0' is not a dash '-'. (since v1.11)
Example 5.16.
+ represents 1. It ignores spaces, use them for formatting if you like. Warning, "DG 10100001" is value 255, because character '0' is not a dash '-'. (since v1.11)Example 5.16.
DG 1-1----1 ; store 161 at the current location DG ...# #... .##. .... ; store two bytes: 0x18, 0x60
- DH "<data>"[,"<data2>"...]
The data string comprises pairs of hexadecimal digits, each pair is converted to - a byte value. You can add spaces between pairs as you like. (since v1.11)
Example 5.17.
+ a byte value. You can add spaces between pairs as you like. (since v1.11)Example 5.17.
DH "0123456789ABCDEF" ; eight bytes #01 #23 ... DH "01 23 45 67" ; four bytes #01 #23 #45 #67@@ -1434,7 +1435,7 @@ instructions and regular labels, but to avoid warning, you must also map-in the target page into the target memory slot (MMU). When no fixed page in DISP is specified, the current mapping of memory pages is used. -Example 5.18. docs_examples/po_disp.asm
+Example 5.18. docs_examples/po_disp.asm
DEVICE ZXSPECTRUM48 @@ -1468,7 +1469,7 @@ /C - out as character in apostrophes (truncated to 8 bit) /H - out only in Hexadecimal /A - out both in Hexadecimal and Decimal-
Example 5.19. docs_examples/po_display.asm
+Example 5.19. docs_examples/po_display.asm
ORG 100h @@ -1489,7 +1490,7 @@Synonym of BLOCK.
- DUP <count>
DUP specifies the number of times to generate the - following lines until an EDUP pseudo-op is encountered. DUP can be used in macro's.
Example 5.20.
+ following lines until an EDUP pseudo-op is encountered. DUP can be used in macro's.Example 5.20.
DUP 3 @@ -1506,7 +1507,7 @@Synonym of WORD.
- DWORD
Defines a so called doubleword. Values should be between - -2147483649 and 4294967296.
Example 5.21.
+ -2147483649 and 4294967296.
- DZ
Same as BYTE, but an extra - zero will be added at the end.
Example 5.22.
+ zero will be added at the end.Example 5.22.
DZ 1 ; same as BYTE 1,0 @@ -1539,7 +1540,7 @@Set the current encoding, i.e. if you set "DOS", SjASMPlus will automatically convert strings from ANSI to DOS-866. Encoding may be "DOS"(DOS-866) or "WIN"(ANSI/Win-1251). Default - is "WIN".
Example 5.23.
+ is "WIN".Example 5.23.
ENCODING "WIN" @@ -1567,7 +1568,7 @@ counter. The label should not already exist (you can assign only one value to it). The optionalpageNumber
can enforce explicit page value for the label (for the$$label
operator). - For modifiable labels holding temporary values use DEFL.Example 5.24.
+ For modifiable labels holding temporary values use DEFL.Example 5.24.
Label EQU 3 @@ -1577,7 +1578,7 @@The named label will be written to the export-file, in the form 'label: EQU value'. This way the export-file can be included in other sources. Order of labels in file follows the order of EXPORT statements. -
Example 5.25.
+Example 5.25.
DRIE=3 @@ -1592,7 +1593,7 @@In combination with OUTPUT <filename>,r it is possible to update existing files.
-Example 5.26.
+Example 5.26.
; This example will result in a file with a length of one byte: @@ -1607,7 +1608,7 @@ <filename>[,<offset>[,<length>]]To include a binary file into the outputfile. The offset and length are optional. Added in v1.12.1: if negative offset or length is provided, - it counts relatively from the end of the file.
Example 5.27.
+ it counts relatively from the end of the file.
- INCHOB <filename>[,<offset>[,<length>]]
To include a data from a hobeta file into the outputfile. - The offset and length are optional.
Example 5.28.
+ The offset and length are optional.Example 5.28.
INCHOB "gfx.$c",7 ; include gfx.scc, skip first 7 bytes @@ -1638,7 +1639,7 @@ with completely empty include-path list, use "--inc
" option early (order matters) without the "=" to empty the current list, like:sjasmplus --inc --inc=path1 --inc=path2 file.asm
-Example 5.29.
+Example 5.29.
INCLUDE <VDP.I> ; search for file "VDP.I" in the include directories, then in current @@ -1651,7 +1652,7 @@ directory is the directory the current file comes from) the file will be searched for in the directories specified at the commandline. When angle brackets are used, the commandline - directories are searched before the current directory.Example 5.30.
+ directories are searched before the current directory.Example 5.30.
INCLUDELUA <mylibrary1.lua> @@ -1661,7 +1662,7 @@- INCTRD <filenameoftrdimage>,<filenameintrdimage>[,<offset>[,<length>]]
To include a file from a TRD image into the outputfile. - The offset and length are optional.
Example 5.31.
+ The offset and length are optional.Example 5.31.
INCTRD "test.trd","mygfx.C" ; include mygfx.C from test.trd @@ -1684,7 +1685,7 @@If
-<virtual labels>
is non zero, then the page number NN is not part of output, and ADDRESS is truncated to 0000..FFFF range.Example 5.32.
+Example 5.32.
LABELSLIST "x:/somepath/user.l"@@ -1698,7 +1699,7 @@ PASS3 - interpret Lua script in third pass only. By default. ALLPASS - interpret Lua script in all passes. It is needed if you generate some Z80 code. -Example 5.33.
+
- MEMORYMAP
Not available yet.
-- MMU <first slot number> [<last slot number>|<single slot option>], <page number>[,<address>]
- +
- MMU <first slot number or address> [<last slot number or address>|<single slot option>], <page number>[,<address>]
Maps memory page(s) to slot(s), similar to SLOT + PAGE combination, but allows to set up whole range of consecutive slots (with consecutive memory pages). Or when only single slot is specified, extra option can be used to extend particular slot @@ -1724,11 +1725,14 @@
The optional third argument is address for ORG functionality.
+(since v1.18.1) You can also use starting address of particular slot instead + of its number, ie. for ZX128:
+MMU $8000,3
is alias ofMMU 2,3
Single slot option (default state is: no error/warning and no wrap = nothing special):
e = error on writing beyond last byte of slot w = warning on writing beyond last byte of slot n = wrap address back to start of slot, map next page-
Example 5.34. docs_examples/po_mmu.asm
+Example 5.34. docs_examples/po_mmu.asm
DEVICE ZXSPECTRUM128 : LABELSLIST "po_mmu.lbl" ; to check label pages @@ -1751,7 +1755,7 @@ Labels has to be unique only whithin the current module (module is added as prefix to them). Also note the use of '@' operator to suppress all this label-processing. Modules can be nested, and module has to be ended by ENDMODULE. -Example 5.35. docs_examples/po_module.asm
+Example 5.35. docs_examples/po_module.asm
MODULE xxx @@ -1830,7 +1834,7 @@The id-warning system state is NOT saved/restored by OPT push/pop/reset and can be modified only by
--W
option.Example 5.36. docs_examples/po_opt.asm
+Example 5.36. docs_examples/po_opt.asm
POP bc, hl ; pops BC first @@ -1850,7 +1854,7 @@When used inside DISP block, only the virtual "displaced" program counter is affected, but the machine code will be still sequentially emitted in the original physical location and warning is emitted. -
Example 5.37. docs_examples/po_org.asm
+Example 5.37. docs_examples/po_org.asm
ORG 100h ; or 0x100, or $100, or #100 @@ -1892,7 +1896,7 @@ of the file).OUTPUT <filename>,t ; truncate (default) OUTPUT <filename>,r ; rewind OUTPUT <filename>,a ; append-
Example 5.38. bigfile.asm
+Example 5.38. bigfile.asm
OUTPUT loader.com @@ -1916,7 +1920,7 @@Set the current memory page to current slot.
-Example 5.39.
+Example 5.39.
PAGE 7 ;set 7 page @@ -1963,7 +1967,7 @@Save the block of RAM.
-Example 5.40.
+Example 5.40.
PAGE 7 ;set 7 page to current slot @@ -1985,7 +1989,7 @@The offset is not limited to page size, i.e. arguments page=1,offset=0x500 are equal to arguments page=0,offset=0x4500 for ZXSPECTRUM128 device (has page size 0x4000).
-