ASM80.com News

A log of new features

View on GitHub

Version 2.6.3 - Some fixes

This version fixes some errors:

  • 6809: corrected opcode for CLR 128,X
  • 6809: corrected opcode for LEAY 65535,Y
  • all: proper using %%M placeholder in nested macros

Version 2.6.0 - UI extras

This version adds some new features - see left menu, item “Settings”:

  • Font size: 3 font sizes
  • Theme: Dark or Light
  • Width: Standard or Full

Version 2.5.15 - DD, DF, DFF, DFZXS

This version fixes some errors:

  • The .error directive (now it works in a propper way and invoke an error in the 2nd pass)
  • Some characters in strings causes errors
  • 6502 emulator has an error in the FLAG register bit 5
  • .SET and := are fixed to allow redefine value

Version 2.5.3 - DD, DF, DFF, DFZXS

A new directives for defining numbers, like DB and DW:

  • DD for defining double words (4 bytes)
  • DF for defining floating point number (IEEE-754), 32bit
  • DFF for defining double precision FP number (64bit)
  • DFZXS for defining floating point number in the ZX Spectrum style (warning: 0.5 error is fixed, so no 7f 7f ff ff ff)

Version 2.5.3 - floats

There is just one update: enable floating point (FP) numbers in the expressions.

It brings three new PRAGMAs:

pragma meaning
.pragma nofloat all float numbers are stripped down to the integer (just drop all the digits after the decimal point)
.pragma float leave FP numbers intact
.pragma roundfloat all FP numbers are rounded to their nearest integer

Version 2.5.2 - nested IFs and better macros

This version brings you a two big news. The first is the possibility of nested IFs. So you can write constructions like:

IF foo
 ...something
 IF bar
 ...something
 ELSE
 ...something else
 ENDIF
ELSE
 ...something
ENDIF

The second improvement is the slightly enriched syntax for the macros.

Old form is .macro name. New macro can be defined as name: .macro or name .macro.

Now you can name formal parameters too. For example - assume a macro cpymem for copy memory content. Such macro has three arguments - source, destination and length. The old form of macro has mute parameters, just referenced by its number:

.macro cpymem
LD HL,%%1
LD DE,%%2
LD BC,%%3
LDIR
.endm

New formal parameters, introduced in revision 2.5.2, allows to write this:

.macro cpymem, src, dst, len
LD HL,src
LD DE,dst
LD BC,len
LDIR
.endm

Preprocessor also check if the number of given parameters is sufficient for the macro, i.e. you cannot specify less parameters than formal, like cpymem 100, 200.

All those named parameters are strictly local (in fact, they are replaced with its values before assembly phase).

Version 2.5.1 - some fixes

This version fixes a bunch of errors, as reported by Keith Howell (thanks!)

  • LABEL EQU 123 ;strips comments from listing fixed
  • FCC "string" was not implemented. fixed
  • DS "something" was silently done, totally disrupted the code. fixed
  • EQU something without a label now throw an exception.
  • M6800 assembler has a problem with an empty comment line. fixed

Version 2.5.0 - partial includes

Now you can include not only the whole file, but only a part of file. This is achieved by the concept of “named block”.

Let’s have a file “library.a80”:

.block serout
; a routine for serial output
@putchar:
...
.endblock

.block serin
;a routine for serial input
@getchar
...
.endblock

In your file, e.g. “main.a80”, you can include the whole file with .include library.a80. Now you can include only the needed parts using a special naming convention file:block.

.include library.a80:serout
call putchar:
...

It includes only the block “serout” (with a global label putchar, in our case). Other blocks will be omitted.

Include local block

You can reference the actual included file by the placeholder this. Let’s add a “serial init” to our library:

...
.block serinit
;serial port init
@uart_init:
...
.endblock

Now you can add the “dependency” with a little bit modification of our library:

.block serout
; a routine for serial output
.include this:serinit
@putchar:
...
.endblock

.block serin
;a routine for serial input
.include this:serinit
@getchar:
...
.endblock

.block serinit
;serial port init
@uart_init:
...
.endblock

Don’t worry, the init code will be included only once! If you need include the block twice or more, you can overrule the check with the dual colon: .include file::block.

Version 2.4.2 - Macro nesting

Now you can nest a macro in another macro:

.macro one
 ld c,%%1
.endm

.macro two
 one 1
 add a,c
.endm

Version 2.4.0 - Macro compound parameter

Let’s imagine a macro:

.macro test
 db %%1
 dw %%2
.endm

If you use this macro in such form, everything is OK:

 test $12, $3456

Two parameters is OK. But what if you need the first DB is something like db $de,$ad,$be,$ef? You can use the compound parameter:

 test {$de,$ad,$be,$ef}, $3456