home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
DRI-archive
/
roche
/
AFTER8C.TXT
< prev
next >
Wrap
Internet Message Format
|
2009-12-11
|
4KB
From: "French Luser" <Bill.Ga...@microsoft.com>
Newsgroups: comp.os.cpm
References: <419f187a$0$7241$8fcfb975@news.wanadoo.fr> <41a45904$0$9082$8fcfb975@news.wanadoo.fr>
Subject: Re: AFTER8 File Format
Date: Tue, 30 Nov 2004 15:04:52 +0100
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
Lines: 120
Message-ID: <41ac7e04$0$24832$8fcfb975@news.wanadoo.fr>
Organization: les newsgroups par Wanadoo
NNTP-Posting-Host: APoitiers-106-2-3-17.w81-248.abo.wanadoo.fr
X-Trace: 1101823492 news.wanadoo.fr 24832 81.248.43.17:52316
X-Complaints-To: abuse@wanadoo.fr
AFTER8C.TXT by Emmanuel ROCHE
-----------
The more you play with AFTER8 ComManD files, the more fun it is.
("The only difference between men and boys is the price of their
toys...")
However, there is a slight problem: the fact that the "program"
file needs an exact copy of the "Subroutine Table" contained in
the RTS file...
After making this table a few times manually, I decided to
finally let my computer work a little!
So, I did a SUBTAB program, producing an INC file that will be
loaded by ASM-86 at assembly time of the "program" file. An
added bonus is that the source file of the "program" file
contains now only
INCLUDE filename.INC
As a result, the listing appears much neater. However, if you
write a demo "program" by hand, it is easier to be able to see
the Subroutine Table inside the file, at the beginning (or to
print it).
Example of use:
Sub_Tab> Enter A86 File Name: diyrts
Ok
That's all! As you can see, no need to open a Window...
Note that the whole thing could be put in a submit file, and the
full process of generating an AFTER8 file from two A86 files
could be automated. I will provide such a file in the near
future.
For example, here are some lines from the INC file produced:
Chk_CPMP EQU 0
Bak_CPMP EQU 1
(...)
Set_Segment_X2 EQU 29
Set_Segment_X3 EQU 30
Set_Segment_X4 EQU 31
The original A86 file contained the following:
;--------------------------------
DSEG $
;--------------------------------
Sub_Tab: ; Table of Subroutines
;
Chk_CPMP EQU 0! DW Sub_Chk_CPMP
;
Bak_CPMP EQU 1! DW Sub_Bak_CPMP
;
(...)
;
Set_Segment_X2 EQU 29! DW Sub_Set_Segment_X2
;
Set_Segment_X3 EQU 30! DW Sub_Set_Segment_X3
;
Set_Segment_X4 EQU 31! DW Sub_Set_Segment_X4
;
;-------------------------------- Start of Subroutines
CSEG $
;-------------------------------- 0
So, I decided to parse the A86 file until the Sub_Tab: label,
then not include the empty lines beginning with a semicolon
(";"), but include the lines defining the command bytes of the
"program", but not the DWs (else, they would be found in the
DSEG, with potential catastrophic results).
Here is the silly little program that does this. (I should have
timed the time it took me to write it. BASIC is wonderful for
writing those kind of little utilities.) Very useful if you want
to experiment with AFTER8 files.
list
10 REM SUBTAB.BAS by Emmanuel ROCHE
20 :
30 PRINT
40 INPUT "Sub_Tab> Enter A86 File Name: " ; file$
50 file1$ = file$ + ".A86"
60 file2$ = file$ + ".INC"
70 OPEN "I", #1, file1$
80 OPEN "O", #2, file2$
90 :
100 INPUT #1, line$
110 IF EOF(1) THEN GOTO 230
120 IF LEFT$ (line$, 8) = "Sub_Tab:" THEN GOTO 150
130 GOTO 100
140 :
150 INPUT #1, line$
160 IF LEFT$ (line$, 5) = ";----" THEN GOTO 230
170 IF LEFT$ (line$, 1) = ";" THEN GOTO 150
180 FOR i = 1 TO LEN (line$)
190 IF MID$ (line$, i, 1) = "!" THEN PRINT #2, LEFT$ (line$, i-1)
200 NEXT i
210 GOTO 150
220 :
230 line$ = CHR$ (26) : PRINT #2, line$ ' EOF needed for ASM-86...
240 CLOSE
250 PRINT
260 END
system
A>That's all, folks!
Yours Sincerely,
"French Luser"
EOF