Convert BASIC DATA Instructions to Binary Data
Many BASIC programs published in the magazine 8000PLUS include machine code which will be moved to upper memory.
To create an assembler source – disassembling the machine code – these instructions must be available in binary form.
The BASIC programs include machine code in the form of DATA instructions which have different versions.
Find here an overview of formats I found till today:
(1) 540 DATA FD,21,A0,C0,0A,B7,3E,86,28,02,3E,C6,32,68,C0,4E,23,46,EB,C5,5E,23,56,23,ED,53,B9
(2) 54160 DATA CD, DF, C4, CD, 2C, C4, CD, 04, 4FE
50120 DATA 0A,32,7C,C0,4E,23,46,21,250
(3) 350 DATA 229,213,197,221,229,42,27,192,237,91,25,192,205,29,192
The utility expects DATA lines written to a file starting with a format type
and closed by the character '*'.
The format types are defined as follows:
(1) Hex code less checksum H
(2) Hex code including checksum C
(3) Decimal code D
The presented utility creates the required binary code.
Call it: DATA2COM file{.ext}
The source file type (.ext) defaults to .TXT.
A binary file defaults to file.COM.
In a number of articles the character set of a PCW will be also changed by DATA lines.
Those ones are grouped as eight ASCII decimal numbers, e.g. for three characters
70 DATA 0,0,30,102,198,205,118,0,48,48,96,108,198,199,60,0,0,0,60,102,192,193,126,0
The dispaly of the first character is:
Current key number: 160
________
________
___XXXX_
_XX__XX_
XX___XX_
XX__XX_X
_XXX_XX_
________
Select format type by: M[&]num
'num' is a decimal and '&num' a hex number.