ZX-ASM 3.1 and STS
ZXNet echo conference «zxnet.soft»
From Eugene Stahov → To Eugene Palenock 24 August 2000
Hello Eugene.
21 Aug 00 23:29, you wrote to me:
ES>> Move to ALASM 4.2 RULES IMMERERYANHY. (After M80:-))
EP> And where can I get it? What are the differences from 4.1/64?
I took it from zx.da.ru (although there seemed to be something tricky with the bootloader - I
I inserted the old one from 4.1 :)
=== Cut ===
Alasm v4.2 (upgraded by KVA of E-mage from v4.1 by ALEM)
0. Preface.
I would like to immediately apologize to the author of Alasm for daring
add a piece of your code inside the assembler. The reason for this
the reason was that ALEM, as far as I understand, neglected the Spectrum
in general (in particular on Alasm). Therefore, it was decided to take a little of it
screw up in terms of conditional compilation and macros.
1. Loading and after.
At the very beginning there is a memory test. Then it prints
Author's message and built-in help. After all this you
you get to the main command line, where you can type
commands:
Help - will display help about commands
Quit [address][,page] - exit, if the parameter is not specified, then
output occurs on the stack
Debug - call Stalker
Run [address][,page] - run the program (default
the address of the last ORG is taken and
page 0)
Work [d:][name[.ext]] - load the file if the name is not specified,
then all Alasmov’s people will appear in front of you
files that are on disk.If a file with that name was not on
disk, it will be created.
(here and everywhere else where work is going on
with files you can replace the name
use mask: ? - any symbol,
* - any characters to the end. Also
everywhere before the file name you can
specify drive)
Catalog [d:][mask] - display the disk directory
nUmbers [parameter] - change the type of number output (HEX/DEC)
Print [bytes list] - bytes are output to the printer first,
indicated in the line, and then the text
Name [name[.ext]] - change the file name
Edit [d:][name[.ext]] - editing the file (if specified
name, then it will load first)
Merge [filename] - will merge two files
counT [arithm.expression] - calculator, you can use everything
operations as during assembly.
You can also use tags.
sYmbol [mask] - will display a list of tags that are suitable
under the mask (by default mask = *.*)
is a label
NoDef - the label to which it was
appeal, but it was not determined.
Macro - macro name
Wrong - type is incorrect (memory glitches)
Jumb [+] - replaces all minuses with pluses in the text
or in all texts (if + is specified)Save [+][d:] - writes text to disk. If + is specified,
then all unsaved ones will be recorded
texts that were discovered in
memory.
Assemble - file assembly
Info - will show the assembler version and the names of all
texts that it finds in memory (if
after the text there is +, then it contains
unsaved changes)
paGe [page number] - switch to text in the page
SS+SPACE or SS+ENTER - a list will appear with texts that
are in memory, in it you can
choose the ones you need.
Ban [+] - deletes text from memory (+ - texts)
conFig - calling the config that is loaded
from disk. All configuration
information is stored in the first 256
bytes of file alasm.C
Object - object code has not yet been uploaded
implemented (so far for this command
I hung a little pervert - unloading
marks)
2. Edit the file.
Below is written the file name, its extension, the number of available
byte for this text. The number of bytes can then be specified
which is in your pocket (if this number is followed by |, then they
were brought into the crane using the SS+Q command).
SS+D - RUS/LAT switching
SS+I - search continuationSS+E - the current line is entered into the pocket and the cursor moves
to the next line.
SS+Q - deletes the current line, while it is entered into
pocket (if there were no lines entered by SS+E)
SS+W - insert an empty line
CS+1 - table
CS+2 - insert space
CS+9 - delete the character that is to the right of the cursor
In EXTEND mode:
[Q] Quit - exit to the main menu
[B] Begin - go to the beginning of the text
[E] End - goes to the end of the text
[S] Search [what we are looking for] - search
[Y] sYmbol [label] - search for a label (the label must start with
start of line
[D] coDe xxx-[code] - display a character with a given code, xxx - code
character on which the cursor is located
[R] Restore - insert rows from pocket
[C] Clear - clear your pocket
[X] Replace [what] -> [to what] - replacement when a sample is found
the line Replace(Y/N/G) will appear, Y - yes, N - no,
G - yes for everyone else
[L] Line [line number] - go to the desired line
3. Configuration.
Alasm is fully configurable by clicking
F keys (conFig)
- SHELL
nUmbers - number output format at boot (HEX/DEC)
beEp - sound when pressing a key (ACT/OFF)
bOrder - screen border color
pAper - background color
iNk - ink color
briGht - brightness (ACT/OFF)
- KEYBOARD
Russian - Russian keyboard layout (YAVERT/YTSUKE)
KBD Forming - delay before forming a keystroke
KBD Holder - delay when holding a keyKBD Wait - pause after the first key activation
- PAGES
SRC sTarting - initial text page
Debugger - debugger page (JP #DB00 is made at startup)
disk Buffer - buffer for disk operations (page and address)
Config program - buffer where config is loaded
System - the page where the assembler itself is located
Pocket data - pocket page (usually equal to symbols list page)
Macro data - page for macros
Symbols list - page for marks
Post symbols - page for post symbols (one-pass assembler)
- Other
- load a new font
HiMEM DRIVER - load new high memory driver
- exit without saving to disk
- write the configuration to a file
4. Compiler.
Alasm is a standard assembler. The format of the Alasmov string is as follows:
[+/-] [label] [command] [;comment]
If there is a minus before a line, then this line will not be
compile. If there is a plus, then it will compile, and a plus
will be replaced with a minus, which allows some blocks to be compiled
only once. When uploading a file, all minuses are replaced with
pluses in the file (of course only those that come before
command) This operation can be done by force using the command
JUMB in main mode.
There can be no more than one command per line (similarly,
tags). The label can consist of symbols with codes from #40 to #7B,
and also from numbers (cannot start with numbers).Halves IX and IY are addressed as HX and HY, LX and LY. Also
compile undocumented INF type commands.
In commands where any expression is used,
Operators present:
a+b - addition
a-b - subtraction
a*b - multiplication
a/b - division
a&b - AND operation (*)
a|b - OR operation (*)
a!b - XOR operation (*)
a>b - cyclic shift of word a by b positions to the right (*)
a[,byte string]
Repeats the string times in memory if no string is specified,
then it is considered that there is simply #00.
- INCLUDE "[d:]"[,]
Compile file from jar . If in this
the jar does not have this file, it will be loaded. If you
use the same jar, then after compiling the file
will load the file from which it was called.
Those. nesting of INCLUDEs is allowed (limited only
stack).
- MAIN "[d:]"[,]
Name and bank of the main file. This directive should be one of
the first directives in the file. She makes an irrevocable transition to
main file. MAIN is then ignored.
- INCBIN "[d:]"[,]
Loads file either completely (if the length is not
indicated), or a piece of it size
- ORG [,]
Setting the compilation address from to jar .
- DUP
EDUP
Repeats the piece times in a row. Allowed
nested definitions:
DUP 100
DUP 2
INC H
EDUP
INC L
EDUP
-