The Development Library 6-9
A source is a set of instructions, comments, and separation characters and ends with a carriage return and an
x
character.
MASD is case sensitive, so be careful, as
!"ukkq1 and!"ELL21!are two different things for MASD.
Separation characters are those with an ASCII number below 32. They include spaces, tabs, line feed and carriage
return.
In Saturn mode, some instructions need a parameter. Separation characters between an instruction and the
parameter are spaces, tabs, and points. Therefore
!B'SdB can be used instead of B'S!B.
In ARM mode, parameters for the instruction are separated by spaces and commas. In Saturn or ARM mode,
comments can be placed everywhere and begin with
!{ or!• and finish at the end of the current line.
In RPL mode, comments are delimited by ‘
-‘ ‘/’ as isolated characters and can be multi line. A line that starts with
a ‘
.’ on the first character will also be considered a comment.
Directives change the way MASD interprets your source. Theses directives begin with a
• and will be explained later.
4.1.5 Errors
If MASD detects one or more syntax error, it will push a list describing all errors on the stack. The!<K command
can help you make sense of that list, point you on the errors and let you correct them.
MASD will report a maximum of 16 errors before stopping compilation.
The
<K command takes 2 objects as arguments:
The original source code (level 2)
The error list generated by MASD (level 1)
Normally, you should compile using a process similar to:
67<KK!BDM!:;<=!<K!<=4 (this is what the!BDMH
command does BTW). Most peoples will just type the
BDM command followed, if error, by the <K!command.
4.1.5.1 Format of the error list:
It’s a list of at most 16 sub-lists.
Each sub-list contains 3 system-binary and 1 global-name.
The first system binary is an error message number.
The second is an extra system binary used to indicate how ‘too long’ a jump is.
The third one is the position in the source where the error is.
The global name is either a NULLNAME if the error was in the main source or the filename of the buggy source.
4.1.5.2 Error messages
6Gw$ut(!7tu)!
The file is not a valid source or macro. (must end with a x)
:kk!o$G@!
You can not do this operation as you are limited to a certain amount of
them (for example, you can not have more than 64 simultaneous skips)
5G|GksG!6GZpjn&ptkG!
Unknown instruction
6Gw$ut(!7t)u(!
Incorrect field
N$u!%)ps!803Q!)?q)&p)(!
An integer between 0 and 15 is expected
N$u!%)ps!303c!)?q)&p)(!
An integer between 1 and 16 is expected
N$u!%)ps!30R!)?q)&p)(!
An integer between 1 and 8 is expected
E$%)u!<?q)&p)(!
A label is expected
;)?$!<?q)&p)(!
An hexadecimal number is expected
4)&to$u!<?q)&p)(!
An decimal number is expected
O$G+p!*tG(!
This object can not be located
E$%)u!$uj)$(@!()*tG)(!
This name is already in use
f!)?q)&p)(!
A { character was expected
h!)?q)&p)(!
A } character was expected (this can happen if you do not close all the
open skips for example)
-!)?q)&p)(!
A ( character was expected
‚!kj!ƒ!)?q)&p)(!
A [ or ] character was expected
7kj%t(()G!
This can not be done
S$(!<?qj)ZZtkG!
This expression is invalid
_noq!pkk!ukGm!
This jump is above the limit of the instruction (use a different type of
jump)