@@@ @@@@
@ @ @
@@@
@ @ @ @ @ @@ @@@@ @@@ @@@
@ @ @ @ @@@ @ @ @ @ @ @ @
@ @ @ @ @ @ @ @@ @@@@ @ @
@ @ @ @ @ @@ @ @ @ @ @ @ @@
@@ @@ @@@ @@ @ @@ @@@@ @@@@ @
@@@@
@@
(c) P. Fedin @@@@
FULL DESCRIPTION + FULL ROM DISASSEMBLER TR-DOS 5.04 (5.03)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
FOR PROFESSIONALS, AND ALSO FOR THOSE WHO WANT TO BECOME THEM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
continued
Address 7450. Handling syntax error. Install 23610,
23822, 23829, and all for subroutine 467. Also used withaddresses 7465 (error handling; in A - error code, in HL - address
messages).
7450 BIT 7,(IY+0); BASIC error code already assigned?
JR Z,7461 ;if not, then installation error
LD A,11 ;NONSENCE IN BASIC
LD (23610),A
7461 INC A ;receiving DOS error code
LD HL,10674 ;message address ERROR
7465 CALL 963 ;print message if possible
JP 467 ;completion
───────────────────────── ─────────────────── ────────────────────
Address 7471. Handling an error received from a BASIC ROM without
stack clearing. Install 23610.
7471 LD A,(23610);take the BASIC error code
LD HL,10186 ;message address *BREAK*
CP 20 ;BREAK INTO PROGRAM ?
JR Z,7465 ;if yes, then print the message
CP 12 ;BREAK - CONT REPEATS ?
JR Z,7465 ;if yes, then print the message
LD HL,10194 ;message address OUT OF RAM
CP 3 ;OUT OF MEMORY ?
JR Z,7465 ;if yes, then print the message
LD HL,10205 ;message address ARRAY NOT FOUND
CP 1 ;VARIABLE NOT FOUND ?
JR Z,7465 ;if yes, then print the message
JR 7450 ;otherwise message *ERROR*
──────────────────────────────── ────────────────────────────────
Address 7501. Executing the RUN command. Install 23825 and 23611.
7501 CALL 6226 ;download file
CALL 6198 ;parameter processing and file loading
CALL 7541 ;if there is a syntax check, then return
LD HL,(23782); take the default file download address
Error!! After all, the file could have been downloaded to a different address. In the sub-
program 6315 needs to store the actual address of the register in 23840
download the file, and here restore it.
LD A,(23781) ;file extension B ?
CP "B"
JP Z,298 ;if yes, then launch the program in BASIC
PUSH HL ;launch the program in codes
RET
Oh my God!! Well who does that!!! Firstly, the program address when downloaded
start must be in BC; secondly, you need to completely quit TR-DOS,
otherwise the program will go crazy when calling 15635; thirdly, where the program
Ramma will be coming back?; fourthly... In general, it should be like this
(after CALL 7541):
LD A,(23781)
CP "D"
JP Z,7450
CP "B"
J.P.Z.298
LD HL,START
LD (23834),HL
JP 467
───────────────────────── ─────────────────── ────────────────────
START CALL 562
LD BC,(23840)
PUSH BC
RET
───────────────────────── ─────────────────── ────────────────────
Address 7523. Clearing the working memory area.
7523 LD HL,23822;clean the work area?
LD A,(HL)
CP 255
LD (HL),0 ;work area cleared
RET NZ ;if the work area is cleared, then return
RST 32 ;cleaning the work area
DEFW #1bBF
RET ;return
───────────────────────── ─────────────────── ────────────────────
Address 7536. Checking whether the string is being checked for syntax or
command execution. If execution is in progress, the Z flag will be reset
shen, otherwise installed.
7536 BIT 7,(IY+1)
RET
to be continued...
Share your thoughts about the article