Amazing #02
14 июля 1998

Assembler - Sharing ZX ASM 3.0 and STS 5.1.

<b>Assembler</b> - Sharing ZX ASM 3.0 and STS 5.1.
(C) Ivan Roshchin, Moscow, 1997.

Music by Ironman


         Joint use

          ZX ASM 3.0 and STS 5.1.


   Surely known to every programmer
Monitor - debugger STS. Especially convenient
use this monitor with the assembler: typing program 
assembliruesh it, and then using the STS check her work. 
Starting with version 4.1, this monitor will truly priceless 
opportunity to interactive debugging program output labels on 
their corresponding addresses. The problem is that not everyone 
can use it. Indeed, in the version 4.1 process output labels 
designed only assembler "MASM 1.1" and with any other assembler 
will not work. Similarly, the following version support

only assembler "ALASM". But what about
users of other assemblers? Will try to solve this problem for 
users of "ZX ASM 3.0". 


       WARNING! All the reasons mentioned below

       only applies to STS 5.1!


   To convert the STS 5.1 to
the following:

 1) Make sure that the disk contains
files "STS5.1" (this file may also be called "STS5.1AL", 
"STS5.1XX", etc.) "Sts5.1a", "sts5.1b".

 2) Run the file
"STS5.1".
 3) Press the "U". Address at the top
the screen should be equal to # FE2A.
 4) On the address # FE30 enter the program:

# FE30: PUSH HL

        PUSH DE

        PUSH BC

        LD HL, # FE46

        LD DE, # 57E0

        LD BC, # 001C

        LDIR

        POP BC

        POP DE

        POP HL

        AND # 18

        OR # 06

        RET

        CALL # 57EF

        EX DE, HL

        LD BC, # FFF9

        ADD HL, BC

        LD A, (HL)

        INC HL

        OR (HL)

        INC HL

        INC HL

        LD A, H

        RET

        DEC DE

        DEC DE

        DEC DE

        LD A, (DE)

        RLCA

        JR C, # FE5F

        AND A

        JR NZ, # FE57

        INC DE

        XOR A

        RET



       To control the contents of the quote
this memory area:

# FE30: # E5, # D5, # C5, # 21, # 46, # FE, # 11, # E0
# FE38: # 57, # 01, # 1C, # 00, # ED, # B0, # C1, # D1
# FE40: # E1, # E6, # 18, # F6, # 06, # C9, # CD, # EF
# FE48: # 57, # EB, # 01, # F9, # FF, # 09, # 7E, # 23
# FE50: # B6, # 23, # 23, # 7C, # C9, # 1B, # 1B, # 1B
# FE58: # 1A, # 07, # 38, # 03, # A7, # 20, # F8, # 13
# FE60: # AF, # C9

5) The address # FE71 enter the program:

# FE71: PUSH HL

        PUSH BC

        LD (# FECC), BC

        LD HL, # FEC4

        CALL # E354

        LD HL, # FFFC

        EXX

        PUSH DE

        LD HL, (# E33B)

        LD A, L

        CALL # FE30

        LD L, A

        LD BC, # 7FFD

        CALL # E33D

        EX AF, AF '

        CALL # E348

        POP DE

        EXX

        POP BC

        POP HL

        EX AF, AF '

        JR NZ, # FE6E

        LD A, (# FADD)

        AND A

        CALL Z, # FB1C

        LD B, # 0A

        LD A, (# E33B)

        LD C, A

        AND # 18

        OR # 06

        LD (# E33B), A

        CALL # E590

        NOP

        AND # 7F

        CP # 21

        JR C, # FEBF

        CALL # FB49

        DJNZ # FEAF

        NOP

        LD A, C

        LD (# E33B), A

        RET

        OUT (C), L

        EXX

        LD C, (HL)

        INC HL

        LD B, (HL)

        EX DE, HL

        LD HL, # 8015

        AND A

        SBC HL, BC

        CALL Z, # 57EF

        JR Z, # FEE0

        CALL # 57E0

        JR Z, # FEDF

        CP # BF

        JR NZ, # FEC7

        AND A

        EXX

        OUT (C), H

        RET



     To control the content of this quote
memory areas:

# FE71: # E5, # C5, # ED, # 43, # CC, # FE, # 21, # C4
# FE79: # FE, # CD, # 54, # E3, # 21, # FC, # FF, # D9
# FE81: # D5, # 2A, # 3B, # E3, # 7D, # CD, # 30, # FE
# FE89: # 6F, # 01, # FD, # 7F, # CD, # 3D, # E3, # 08
# FE91: # CD, # 48, # E3, # D1, # D9, # C1, # E1, # 08
# FE99: # 20, # D3, # 3A, # DD, # FA, # A7, # CC, # 1C
# FEA1: # FB, # 06, # 0A, # 3A, # 3B, # E3, # 4F, # E6
# FEA9: # 18, # F6, # 06, # 32, # 3B, # E3, # CD, # 90
# FEB1: # E5, # 00, # E6, # 7F, # FE, # 21, # 38, # 06
# FEB9: # CD, # 49, # FB, # 10, # F1, # 00, # 79, # 32
# FEC1: # 3B, # E3, # C9, # ED, # 69, # D9, # 4E, # 23
# FEC9: # 46, # EB, # 21, # 15, # 80, # A7, # ED, # 42
# FED1: # CC, # EF, # 57, # 28, # 0A, # CD, # E0, # 57
# FED9: # 28, # 04, # FE, # BF, # 20, # E8, # A7, # D9
# FEE1: # ED, # 61, # C9


 6) Use the "B" set
Bank = # 18.
 7) Press "E". A menu appears
"Setup".
 8) Choose menu item "Config Save", write the modified STS on 
the disc. 


   To verify the changes, run ZX ASM 3.0, the Setup menu
select "Load sts" and specify the name
File "sts5.1a". Next, enter the program and kakuyunibud 
otassembliruyte it. Then temporarily leave the STS and activate 
the disassembly of labels (using the keyboard shortcut "SS + 
5"). Instead of numbers you will see the corresponding label.


   Little systematic information about the ZX ASM:
text and labels are on the same page
Memory (Bank = # 1E), table labels organized on the principle 
of the stack and begins with end of the buffer. Each label is 
defined in the program is in the table 5 + <Number of letters 
in the name of> bytes. STS with disassembly analysis of this 
region, and if the value tags and the address or number in a 
team match, the prints label, or - number. If the area is kind 
of nonsense, nothing terrible happens and the computer does not 
hang or reset. Disassembling labeled

runs slower than usual. If the
Your program uses are not very many labels, you almost do not 
notice the difference in performance. But if the labels, the 
disassembled text output may slow in the 4 - 5 times. Procedure 
of disassembling with labels for ZX ASM 3.0 get a longer, 
compared with the procedures for MASM 1.1 and ALASM, and as a 
result it took much of the buffer user function. For this 
function, there are only 6 bytes to FE2A on # FE2F inclusive. 
If your function does not fit into this area, you can do one of 
two things: 

1) Donate regime disassembling
with a tag that has been at # FE71 team
JP # F86A. In this case, you can use for the user function 
memory # FE2A to # FE5B and # FE74 on # FEE3 inclusive (which 
is 162 bytes). 

2) VPomestit HPE Vadresu # FE2A team 3
XXXX, and XXXX is the address to place your
function.


   It should be noted that when the work mode
disassembling tagged spoils 28
byte in the display area, starting at address
# 57E0 (and you yourself can change these
28 bytes as you want - it does not interfere with normal 
operation STS). When downloading ZX ASM'a STS will be loaded 
automatically, but not whole, but only the principal part (the 
file sts5.1a). Therefore, during the work will be

The functions of "Disasm to Disk" and
"Setup", ie when you try to call STS
reset. So it is better not to press the keys "D" and "E". To 
save disk space can erase files

"STS5.1 " and "sts5.1b ", if you do not run separately 
from the STS ZX ASMa. Not Remember that the undocumented 
commands to work with the halves of the index registers in 
various ways indicated in the text program in assembler ZX ASM

(XL, XH, YL, YH) and when viewing the disassembled program in 
STS (LX, HX, LY, HY). 







Other articles:

From the Author - the history of creation of 2nd issue of the magazine.

Authors - the authors of the magazine.

Review - an overview of programs from: STV v1.3, Sample Editor v2.1, TDU v1.0, Crasher, RBI, YES, RDG, MOdule Converter, RC v1.4, Dark Square, in 1912 a secret book.

Softyatina - an overview of new media and games: Odyssey # 2, Oberon # 4, Spectrofon 22-23, ZX-Format 7, Amiga # 1, Faultless 8, ZX-REVIEW 5-6 Amazing 1, X-Reversy, The Last Curieur, Pro Trackerr 3.0.

User'am - Risc processor - the path to the future.

User'am - 64 kilobytes of FIDONet.

User'am - UFO-2 "Devils of the Abyss", on the road to perfection.

User'am - Course polodogo user.

Assembler - talk about a necessary procedure as the derivation of the sprite.

Assembler - Time Management (work with interruptions).

Assembler - Sharing ZX ASM 3.0 and STS 5.1.

Assembler - SH-93: Procedures for direct work with the floppy drive controller.

Present - description of Turbo Disk Utility v1.0.

Present - description of the Sample Editor v2.1 (beta).

Present - description of the Real Commander v1.4.

Present - description of the game Dark Squares v1.98 (demo version).

At leisure - I saw the Amiga and IBM's work and I can not express their thinking about it!

At leisure - answers to frequently asked questions about your Amiga.

Miscellaneous - history: History of Clive Sinclair.

Miscellaneous - Modem: How to use the modem, implements the correction / compression MNP4/MNP5, v.42/v.42bis.

Miscellaneous - lmg: History of Education Last Masters Group.

Spending - Stirlitz.

Spending - ochepyatki: ochepyatoki committed in newspapers and magazines.

Spending - ORT: ADVERTISING motor trade!

Iron - a detailed description of modems.

At leisure - 10:2 Hacker eRRoR new virus from Mitnick.



Similar articles:
Events - International Festival of Computer Art "FunTop98". Official information on the conduct.
Our Guest - an interview with the creator of famous editors Excess de Luxe Paint and Excess Sample Editor - ZK System (Konstantin Zuykov).
VideoPort - The recommendations of assembling, tuning and programming of video (digitizer).

В этот день...   21 November