[00/02] compiler description
ZXNet echo conference «zx.spectrum»
From Konstantin Afendikov → To All 10 May 1997
Hello, All!
I’m posting an old description of the compiler for ZASM 3.10. Everything seems to be described there,
except:
- PHASE can be nested. Max. nesting - 5. By UNPHASE
the _previous_ compilation address is restored, not the main one.
- JR, JP, CALL can be written together with flags, i.e.
jr nz,Label = jrnz Label
call c,Proc = callc Proc
jp z,Label1 = jpz Label1
-ENDREP shortened to ENDR
-IFPARAM shortened to IFP
-Parameters removed from MAKELAB. Only the file name is left.
-Not included in the demo, but the following logical operators are present in the calculator:
[=],[>],[<] - return 1 if TRUE, 0 if FALSE.
2=3 - result 0
4=4 - result 1
5>1 - result 1
6<2 - result 0
- USERERR directive is planned - user error. Syntax:
USERERR 'error text'. Convenient to use when you need to track the compilation address. Example:
The body of the program is divided into two parts. The first starts from 25000, the second - from
49152. You need to make sure that the lower part does not overlap the upper one.
It looks something like this:
org 25000
...
body of the program
...
if $>49152
usererr 'The program is too big!'
endif
org 49152
....
When executing USERERR, the specified error is displayed in the compilation window,which
is not considered critical.
Best wishes, Konstantin.
[Team ZX ASM] [Team Dos Navigator] [Team DOOM]