Repository navigation
Releases
Releases · jamesots/maz
v0.6.1
New:
- The
quietoption ofcompile()stops errors and warnings being logged to the console, for tools which use maz as a library. Errors are still in the programme'serrors.
Full Changelog: v0.6.0...v0.6.1
v0.6.0
New:
.rept,.reptiand.reptc, ended with.endr, like z88dk'srept,reptiandreptc. Labels in each repetition are local to it, and repeats can be nested.- Libraries of routines:
.library "file"assembles only the routines in the file which are used, defined with.routine nameand.endroutine. Libraries can use other libraries, and are found using the search paths. .ifcan use symbols: equs defined anywhere, and labels defined before the.if. A symbol can be defined in more than one branch of such an.if..include,.incbinand macro definitions can't be inside one.(ix-d)and(ix)index register addressing, as well as(ix+d). The same goes foriy.- Instruction operands are checked for range: 8 bit values must be -128 to 255, 16 bit values -32768 to 65535, and index offsets -128 to 127.
- Division by zero is an error in instruction operands,
dbanddw. - Unbalanced
.if,.elseand.endifare reported. getSegments(),getLines()and asymbolsmap of final values, for tools which use maz as a library.
Fixed:
- A
defb/defwwhose size depends on a label defined after it (e.g.defw cat(label, "x")) could be overwritten by the following bytes. - An
.ifnested inside a false.ifwas assembled. .incbinin an included file looked for the file relative to the top level file.- Nested includes could look for files in the wrong directory.
- Assembling was slow for large files (40,000 lines took 11.6 seconds, now under a second).
ld hl,(ix), and other instructions which don't exist, reported "Symbol 'ix' not found". They now report "Register 'ix' can't be used here".- A circular equ is reported as one error showing the cycle, instead of several.
- The CLI showed the wrong version number.
- The listing showed "undefined" or an extra line at the end of some included files.
- The columns in the listing didn't line up for phased code, as it has two addresses. If any code is phased, every line now has room for both.
rstonly accepted addresses written as e.g.08hor$08, sorst 8orrst 0was treated as a call to a macro. It now accepts any expression, and reports an invalid address.add ix,ixandadd iy,iyweren't recognised; their opcodes were assembled fromld ix,ixandld iy,iy, which aren't real instructions.- The undocumented
ld ixh,ixh,ld ixh,ixl,ld ixl,ixhandld ixl,ixl(and theiyversions) were written asld ixh,h,ld ixh,land so on, which suggested they usedhandl.
Changed:
- "Cannot ORG to earlier address than first ORG" is reported when assembling, so no output file is written.
$is no longer listed in the listing's symbol table.require('maz')gives the compiler (compile(),Programmeand so on), instead of running the command line program.- Upgrade all packages to their latest versions. maz now needs Node 22.12 or later, as some of the packages it uses are ES modules.
- maz is compiled in TypeScript's strict mode, so its type declarations are more precise: e.g.
compile()takesCompileOptions, anderrorsis a list of error objects.
Full Changelog: v0.3.2...v0.6.0