Skip to main content

Full text of "sdSystems :: SD Systems PROM-100 Prom Programmer Aug81"

See other formats


PROM-100 




SD #7140044 REV. C 
AUGUST, 1981 


SDSystems 



OPERATIONS 
MANUAL 



PROM-100 
PROM PROGRAMMER 



COPYRIGHT (a 1979 

BY SD SYSTEMS 

JULY 1979 



REVISION C 
AUGUST, 1981 



TABLE OF CONTENTS 



SECTION 



DESCRIPTION 



PAGE 



1-1 
1-2 
1-3 
1-4 



INTRODUCTION 
GENERAL DESCRIPTION 
PHYSICAL DESCRIPTION 
SPECIFICATION 



II 

2-1 
->_ ? 

2-3 
2-4 
2-5 
2-6 
2-7 
2-8 
2-9 
2-10 



FUNCTIONAL DESCRIPTION 

INTRODUCTION 

DATA OUT BUS 

DATA IN BUS 

A0-A7 

1/0 CONTROL LINES 

ADDRESS DECODER 

OUTPUT PORT 68H 

OUTPUT PORT 69H 

OUTPUT PORT 6AH 

INPUT PORT 68H 



III 
3-1 

3-2 

3-3 

3-4 

3-5 

3-6 

3-7 

3-8 

3-9 

3-10 

3-11 

3-12 



CONTROL SOFTWARE 
INTRODUCTION 

2758/2716/2732 PROGRAMMING 
2708 PROGRAMMING 
LOAD SEQUENCE 
READ SEQUENCE 
PROGRAMMING SEQUENCE 
CAUTION: 

USING THE PROM PROGRAMMER 
LOADING AN OBJECT FILE 
READING A PROM 
PROGRAMMING A PROM 
COPYING A PROM 



9 

9 

9 

10 

10 

11 

12 

12 

14 



IV 
4-1 
4-2 
4-3 



CONTSTRUCTION 
INTRODUCTION 
ASSEMBLY PROCEDURE 
VOLTAGE CHECK 



15 
15 
16 



V 
5-1 



SWITCH SELCTION 
INTRODUCTION 



VI 
6-1 

6-2 

VII 
7-1 



CHECK OUT 

INTRODUCTION 

I/O PORT VERIFICATION 

SOFTWARE REQUIREMENTS 
INTRODUCTION 



19 
19 



2 



APPENDIX A 
APPENDIX B 
APPENDIX C 
APPENDIX D 



APPENDICES 
SCHEMATIC 
PART LIST 
ASSEMBLY DRAWING 
SOFTWARE LISTING 



SECTION I 

1-1 INTRODUCTION 

The SD SYSTEMS Prom Programmer Board (PROM- 100) provides a low 
cost means for programming read only memory capability for com- 
puters utilizing the S-100 bus structure. 

1-2 GENERAL DESCRIPTION 

The SD SYSTEMS PROM-100 board is a high performance circuit 
capable of programming the industry standard 2708 IK X 8 EPROM, 
Intel's 2758 IK X 8 EPROM, 2716 2K X 8 EPROM, 2732 4K X 8 EPROM 
and Texas Instruments 2516 2K X 8 EPROM. The PROM-100 is selected 
for the appropriate EPROM type through dip switches SI and S2. 
Another notable feature of the PROM-100 is the 2 5V programming 
pulse generated on board, eliminating the need for an external 25V 
supply. 

1-3 P HY SICAL 

The SD SYSTEMS Prom Programmer is implemented on a single 7.00" 
X 10.0" X .065" printed circuit board and is interfaced to the 
System by connector J-l. 

1-4 SPECIFICATION 

Table 1-1 lists the overall specifications for the SD SYSTEMS 
Prom Programmer Board. Table 1-2 lists the pin usages of con- 
nector J-l for the Prom Programmer Board. 



PAGE 1 



TABLE 1-1/ 


+ 8 to + 10V 


300 ma maximum 


+16 to 18V 


100 ma maximum 


-16 to 18V 


60 ma maximum 


Operating temperature 


d C to 50°C 


Interface levels 


TTL Compatible 


Programming time 


100 seconds max for 16,389 bits 



TABLE 1-2 


PIN NO 


SIGNAL NAME 


DIRECTION 


DESCRIPTION 


1,51 


+8V to +10V 


INPUT 


POWER 


2 


+16V to +20V 


INPUT 


POWER 


100,50 


. GND 


■ 




79,80,81,31,30 
29,82,83 


A0-A7 


INPUT 


ADDRESS BUS 


36,35,88,89,38 
39,40,90 


DO-0 to DO- 7 


INPUT 


DATA BUS OUT 


95,94,41,42,91, 
9 2,93,43 


DI-0 to DI-7 


OUTPUT 


DATA BUS IN 


77 


PWR 




WRITE 


78 


PDBIN 




DATA BUS IN 


46 


SINP 




PORT INPUT CYCLE 


45 


SOUT 


INPUT 


PORT OUTPUT CYCLE 


99 


POC 


INPUT 


POWER ON CLEAR 



PAGE 2 



SECTION TT 
FUNCTIONAL DESCRIPTION 

2-1 INTRODUCTION 

Functionally, the PROM Programmer consist of two main portions; 
hardware, and the software. The hardware allows the computer 
to select the port bits, generate the programming pulse, and 
control the decoder. The software must direct the hardware in 
each of the operations described above. The major functions con 
tained in the PROM Programmer hardware are shown in the block 
diagram (Figure 2-1). 

2-2 DATA OUT BUS 

The 8-Bit Data Out Bus is the S-100 path for transferring data 
from the computer (CPU) to the output ports on the Prom Program- 
mer board. 

2-3 DATA IN BUS 

The 8-Bit Data In Bus is the S-100 path for transferring data 
from the input port on the Prom Programmer Board to the computer 
(CPU) . 

2-4 A0-A7 

The A0-A7 low order eight address lines are used by the computer 
(CPU) to select the various input/output ports through a decoder 
on the Prom Programmer Board. 



PAGE 3 



2-5 I/O CONTROL LINES AND READ WRITE CONTROL 
The I/O Control Lines consist of M, PD BIN, SINP and SOUT. 
These lines are used to control the input and output operations 
from/to the I/O ports on the board. 

2-6 ADDRESS DECODER 

The Address Decoder detects when a port address used by the 
Prom Programmer is present on (A0-A7). The output of the de- 
coder is used to gate read and write pulses to the I/O ports. 

2-7 OUTPUT PORT 68H 

Output port 68H is an 8 bit data register that transfers the 

data from CPU to ROM. 

2-8 OUTPUT PORT 69H 

Output port 69H is an 8 bit address register that determines the 

location in the ROM for the data to be programmed or read. 

2-9 OUTPUT PORT 6A H 

Output port 6AH is an 8 bit control register with several 

control functions. 

1. Bit 1 § 2 Two high order address bits A8 § A9 address inputs 

2. Bit 3 One high order bit A10 (address input for 2716). 

3. Bit 4 One high order bit All (address input for 2732). 

4. Bit 6 Program pulse for 2716/58. 

5. Bit 7 Drive MOS clock drive. 

6. Bit 8 Controls port 68H chip select for 2716/58/08. 



PAGE 4 



2-10 INPUT PORT 68 H 

Input port 68H is used to read the present data in the ROM 



PAGE 5 



PROM -100 



8 

V 



DATA INPUT 
PORT 

(68H) 



24 PIN ZIP DIP SOCKET 



A 



8 



DATA OUTPUT 
PORT 

(68H) 



ft 



Jl 



8 



y 



y\ 



E 



ADDRESS 

OUTPUT 

PORT 

(69H) 



ft 



DATA OUT 
BUFFER 



7£ 



PROGRAMMING 

PULSE 
CIRCUITRY 



UI 



5 



CONTROL 

OUTPUT 

PORT 

(6AH) 



A 



FIGURE 2-1 



SECTION III 
CONTROL SOFTWARE 

3-1 INTRODUCTION 

Certain sequences must be executed to ensure proper programming 

of the prom. 

3-2 2758/16/32 PROGRAMMING 

Initially, and after each erasure, all bits of the 2716 are in 

the "high" state. Data is introduced by selectively programming 

"O's" into the required locations. Although only "0 f s" will be 

programmed both "l's" and O's" can be presented in the data word. 

The only way to change a "0" to a "1" is by ultraviolet light 

erasure. 

The 2716 is in the programming mode when the VPP power supply is 
2 5V and CS is at a low TTL level. The data to be programmed is 
applied 8 bits in parallel to the data output port. The levels 
required for the address and data inputs are TTL. 

When the addresses and data are stable a 50 MSEC, active high, 
TTL program pulse is applied to the appropriate input pin on the 

EPROM. 

A program pulse must be applied to each address location to be 
programmed. The user can program any location at any time - 
either individually, sequentially, or at random. The program pulse 
has a maximum width of 55 MSEC. 



PAGE 6 



A verify is performed on the program bits to determine that they 
are correctly programmed. The verify may be performed with VPP 
at 25V. 

3,-3 2708 PROGRAMMING 

Initially and after each erasure all 8192 bits are in high state 
(output high) . Information is introduced by selectively program- 
ming "0" into the desired bit location. A programmed M 0" can be 
changed to a "1" by UV. erasure. 

The circuit is set up for programming operation by raising the 
CS/WE input (pin 20) to +12V. The word address is selected in 
the same manner as in the read mode. Data to be programmed is 
presented 8 bits in parallel to the data output lines (D0 o -D0y) 
Logic levels for address and data lines and the supply voltages 
are the same as for the read mode. 

After address and data set up, one program pulse per address is 
applied to the program input pin 18. One pass through an address 
is defined as a program loop. The number of loops (N) required 
is a function of the program pulse width (tpw) allowing to 
(N) X (tpw) > 100. tpw in MSEC. 

The width of the program pulse is from 0.1 to 1ms. The number 
of loops (N) is from a minimum of 100 (tpw=lms) to greater 
than 1000 (tpw=0.1). There must be N successive loops through 
all 1024 addresses. It is not permitted to apply N program 
pulses to an address and then change to the next address to be 
programmed. 

PAGE 7 



*The PROM Programmer writes data received from the host com- 
puter into the PROM as guided by the address/control outputs 
supplied by the driver software. Basically, the PROM Program- 
mer manipulates the data and the address/control inputs from the 
computer so that the subject PROM receives proper data, address 
and control inputs. The PROM-100 generates the programming 
pulse for the 2708 from the output of a step up switching vol- 
tage regulator provided on the board. The same pulse is used 
to provide VPP (25V) at pin 21 of 2716/58. This 25V is set up 
by the driver software of the PROM Programmer. 

Driver software for PROM Programmer must meet three requirements. 
These are: loading the object modules (diskettes) into host 
computer memory, reading a PROM into memory and programming a 
PROM. Within the software, the executive system coordinates all 
three operations while each operation sequence is run by its 
respective routine. In regards to the PROM Programmer, only 
the read and program sequences are significant because they in- 
volve specific address/control inputs to the PROM Programmer. 
The requirements imply that, in addition to allocating a memory 
buffer for the driver software, the host computer must also supply 
a 1, 2 or 4K byte memory buffer for the data module to be loaded, 
read, and programmed. 



PAGE 8 



3-4 LOAD SEQUENCE 

The load sequence must be able to load data into memory at any 
location regardless of the routine load address contained in 
the file. Once the number of bytes to be loaded has been 
specified, the user may load and program a portion of the file 
and then return for the rest. For example, if a file to be 
programmed contains 4K bytes, the user could program 2K bytes 
into one 2 716 PROM and then program the remaining 2K bytes of 
the module into a second PROM. 

3-5 READ SEQUENCE 

The read sequence is necessary in order to perform a PROM copy 
function. Since the PROM programmer contains only one 24 pin 
ZIP DIP socket, the master PROM must first be read into the IK, 
2K or 4K memory buffer (2708, 58 or 2716/32) and then programmed 
into an erased PROM. The host computer should offer memory editing 
to allow modification of the memory buffer before programming the 
new PROM. 

3-6 PROGRAMMING SEQUENCE 

The programming sequence actually involves a three step process. 

1. Verify that PROM is erased. 

2. Program the PROM. 

3. Verify that the PROM contains correct data. 



PAGE 9 



The entire PROM is read to verify erasure, that each location 
contains FF H . If unerased locations are found, the details are 
output to the console. 

The programming of the PROM involves outputting the data for 
each of the IK, 2K or 4K locations sequentially along with the, 
PROM address and the 50ms program pulse for 2758/16/32 or 1ms 
program pulse for 2708. After this programming attempt is com- 
plete, the entire PROM must be read and compared with the memory 
buffer. If any locations do not match, the address and data 
should be output to the console. 

3-7 CAUTION: 



In order to prevent possible destruction of PROMS, PROMS must 
never be inserted into the ZIP DIP socket on the PROM Programmer 
until the driver software is running. If the PROM is inserted 
prior to starting the driver software, the PROM may be subjected 
to a continuous program pulse which will destroy the PROM. For 
the same reason, the host computer must not be reset while the 
PROM is in the socket. 

• 3-8 USING THE PROM PROGRAMMER 

The driver software can be used to load object files from diskettes, 
read object code from PROMS and program object code into PROMS. 
As the driver software starts, the console prints the start/options 
message. The sign-on portion of the message indicates that the 
PROM Programmer software is operative. The options portion con- 
sist of the first of three questions about which operations are 

PAGE 10 



to be performed (load a file, read a PROM, and program a PROM), 
in that order. The user answers the questions by entering a Y 
(for Yes) or N (for No) at the end of each question. If a Y is 
entered the respective operation is performed after the necessary 
parameters are entered. 

3-9 LOADING AN OBJECT FILE DISK FILE ONLY 

Prior to answering the first question: READY TO LOAD A FILE (Y/N) ? 
the user sets up the object file by specifying the file name, when 
loading the PROM-100 Software: A> PR0MQ8 filename. Ext . When the 
user answers the question with a Y, the PROM Programmer software 
asks the user to enter two parameters (load start address and load 
size) by printing HEX LOAD address, MBytes: The parameters must be 
separated by a comma or space and terminated with a carriage return. 
If no parameters are entered in front of the carriage return, the 
object file will be loaded into the RAM locations specified on the 
module. However, since the PROM Programmer driver software occupies 
the memory location 01OO„ through 5FFtt the object file must not 
overlay these locations. This condition can be prevented by using 
the load address parameter which allows relocating the object data 
to any area of memory. The number of bytes parameter allows the 
loading of a limited number of bytes of the file into RAM so that 
object file may be loaded and programmed in blocks. If the load size 
parameter is not entered, the entire module is loaded. If a period 
is entered before the end of the parameter, the software repeats 



PAGE 11 



the request for parameters allowing the user to correct the 
parameter. When the load is complete the PROM Programmer 
software asks: READY TO PROGRAM A PROM (Y/N)? 

3-10 READING A PROM 

In the console printout - READY TO READ A PROM (Y/N)? If a Y 
is entered, the PROM Programmer software asks the user to enter 
three parameters (MEM start address, MEM end address, PROM start 
address) by printing MEMORY START, MEMORY END, PROM START: 
The MEM start and END parameters specify the memory space into 
which the data is to be read. The PROM START defines the first 
PROM location to be read. The three parameters must be separated 
by a comma or space and terminated with a carriage return. If a 
period is entered before the end of the parameter the software 
repeats the request for parameters allowing the user to correct 
the parameters. When the read is complete or when the user 
answers the question: READY TO READ A PROM (Y/N)? With an N, the 
PROM Programmer software asks: READY TO PROGRAM A PROM (Y/N)? 

5-11 PROGRAMMING A PROM 

When the user answers the question: READY TO PROGRAM A PROM (Y/N)? 
with a Y, the programmer software asks the user to enter three 
parameters MEM start address, MEM end address and PROM start 
address by printing MEMORY START, MEMORY END, PROM START: The 
MEMORY START and END parameters specify the memory space from 
which the data is to be programmed. The three parameters must be 
separated by a comma or space and terminated with a carriage return 

PAGE 12 - 



If a period is entered before the end of the parameters, the 
software repeats its request for parameters allowing the user 
to correct the parameters. 

The PROM Programmer software first verifies that the PROM is 
erased (contains FF H in all locations) . If the PROM Programmer 
software finds unerased locations, it prints the first unerased 
location. To check for other unerased locations the user enters 
a carriage return after each unerased location printed. If the 
PROM contains unerased location, the PROM must be erased again 
before starting programming. If there are unerased locations, 
the user may attempt programming by entering C. If there are no 
unerased locations, programming begins automatically. During the 
programming sequence, the PROGRAMMING LED COMES ON and stays on 
till the program ends. To stop programming during the sequence 
the user enters a period (.). The PROM Programmer software asks 
DO YOU WISH TO LOAD A MODULE (Y/N)? when the programming sequence 
is complete, the PPOM Programmer reads the PROM to verify that the 
data has been programmed correctly. If the PROM Programmer soft- 
ware finds locations with BAD data, it prints the bad locations. 
To stop the error listing the user enters a period and the soft- 
ware returns to the start asking: READY TO LOAD A FILE (Y/N)? 
If the PROM contains bad locations it should be re-erased and 
re-programmed until it is correctly programmed. When programming 
is done the user can exit the PROM Programmer software by typing 
a period (. ) . 

PAGE 13 



5-12 COPYING A PROM 

Copying a master PROM into a subject PROM requires only that 
the master PROM be read as described in paragraph 3-10 and 
the subject PROM be programmed as described in paragraph 3-11 



PAGE 14 



SECTION IV 
CONSTRUCTION 

4-1 INTRODUCTION 

The SD SYSTEMS PROM Programmer board is intended for those people 

who have had some prior experience with kit building and digital 

electronics. If you do not fall into this category it is highly 

recommended that you find an experienced person to help you in 

assembly and checkout of the board. Appendix B shows the parts 

list for the SD SYSTEMS PROM Programmer board. Double check all 

parts against this parts list. If any differences are noted 

please contact SD SYSTEMS. 

NOTE: General construction information assembly diagram and 

schematic diagram can be found in the appendices. 

4-2 ASSEMBLY PROCEDURE (SEE APPENDIX C) 

1. Install and solder the IC sockets in their proper locations. 

8 Pin at 1114 

14 Pin at U2 ,U3 ,U5 ,U9 ,U10 , Ull 

16 Pin at U4 

20 Pin at U6 ,U7 ,U8 ,U12 ,U13 

NOTE: DO NOT INSTALL SOCKETS AT LOCATIONS SI and S2. 

2. Install and solder the resistors as follows: 

A. R8 220 Ohm %W 51 (Red, Red, Brown) 

B. R4 22 .IK Ohm 1/8W \% (Precision Resistor) 

C. R5 1 Ohm %W 5% (Brown, Black, Gold) 

D. R6 270 Ohm %W 51 (Red, Violet , Brown) 
E". R7 100 Ohm %W 5$ (Brown, Black, Brown) 
F. Fl,2,3 IK Ohm %W 5% (Brown, Black, Red) 



PAGE 15 



3. Install and solder diodes CR1 with banded end as shown on the 
PC board. 

A. CR1 1N5803 

B. CR2 Zener Diode 1N751 -5V 

4. Install and solder the capacitors as follows: 

A. C1-C3,C6-C11,C14,C15 0.1MF Ceramic 

B. C12,C16-C18, 10MF 20V Tantalum 

C. C13 .002MF Ceramic 

D. C4 500MF 35V Dilectric Axial Leads 

E. C5 300pf 

5. Install and solder the voltage regulators with the heatsinks 6106-14 

using the #6-32 hardware supplies. 

VR1 = 5v 7805 or LM340T-5 
VR2 +12V 7812 or LM340T-12 

6. Install and solder LI coil. 
LI J12044 500 Micro Henry 

7. Install and solder dip switches SI and S2. 

8. Double check all solder connections for cold solder joints, 
unsoldered connections or shorted connections. 

4-3 VOLTAGE CHECK 

1. Install the board in the computer and measure the output of 
+ 5V regulator, +12V regulator and - 5V of CR1 respectively. 

A. VR1 = +5V (Top Pin) 

B. VR2 = + 12V (Bottom Pin) 

C. CR2 = -5'V (Anode) 

NOTE: Do not proceed with board checkout until all power supply 
voltages are correct. The TTL and MOS logic can be permanently 
damaged if improper voltages are applied. 

PAGE 16 



Install the IC's in their sockets observing the Pin 1 

designation on each socket marked on the PC Board. 

24 Pin Zip Dip socket (Pin 1 lever in lower left.) 

TL497ACN 

74LS30 

74LS155 

74LS273 

74LS14 

74LS373 

7406 

74LS08 

74LS244 

DS0025CN 

Double check all IC's for proper orientation and location. 

Refer the switch selection option and position then as described 

in Section V. 





A. 


Ul 




B. 


U2 




C. 


U3 




D. 


U4 




E. 


U6, U8 




F. 


U5, U10 




G. 


U7 




H. 


U9 




I. 


Oil 




J. 


U12, 13 




K. 


U14 


3. 


Double chec 


4. 


Ref 


er the s 



PAGE 17 



SECTION V 
SWITCH SELECTION 

5-1 INTRODUCTION 

PROM Programmer has been designed to accomodate a variety of 
PROMS. Care must be taken to select the right positions of 
the switches for the users specific PROM selection. Table 5-1 
lists the proper switch positions for each PROM type. 



PROM TYPE 


SI 


S2 


2708 ( ) IK x 8 
2758 (5V) 
2716 (5V) 
2732 (5V) 


All other 
All other 
All other 

2732 


2708 

All other 
All other 
All other 



Table 5-1 



PAGE 18 



SECTION VI 
CHECK OUT 

6-1 INTRODUCTION 

This section will describe some basic checks that should be 

made on the PROM Programmer. 

NOTE: It is assumed at this point that the voltage checks 
described in Section 4 have been previously made. The following 
checks require that the CPU board also be plugged into the bus. 

6-2 I/O P ORT WRITE/READ VERI FICATION 

Using the monitor in the system or a short program. Write data 
to output port 68 and read it back. Verify that the data read 
back is the same as that was written. This can be done as 
follows if using the monitor. 

.0 6A 80 (cr) - enable Port 68 

.0 68 dd (cr) - output data (dd) to port 68 

. I 68 (cr) - input from port 68 

68 dd - Data Read should be identical to data output 



PAGE 19 



SECTION VII 
SOFTWARE REQUIREMENTS 



6-1 INTRODUCTION 



The SD Systems PROM- 100 Programming Board software is available 
on disk on Intel 2716 EPROM. 

A listing of the software in EPROM is included in Appendix D, 
while the disk version is included on the disk. (.PRN extension) 

The program in PROM must be moved to 100H prior to execution. 
PROM 08, the 2708 programming utility, is located in the first 
IK section of the PROM (0-3FFH). PROM 16, the Intel 2758, 
2716, 2732 programming utility is located in the latter IK 
section of the PROM (400 H -7FFH). 



PAGE 20 



APPENDIX A 
SCHEMATIC 



APPENDIX B 
PART LIST 




P.O. Box 2BB1 • Delias. Texas 7522S 21-4-271 -46B7 

BILL OF MATERIALS 



Titlo: 

PROM- 100 


■I No. Rov. 

0100140 6 


Data Raleated: 

sM-bi 


ffir m K*f<.* 


Shoot / of n 




■w 


Qty 


SD-P/N 


V Description 


Unit Cost 


ixtonsion 


1 


1 


7010007 


7406, U9 






2 


1 


7010166 


74LS08, Ull 






■r 


1 


7010172 


74LS14, U5, U10 






4 


1 


7010180 


74LS30, U3 






5 


1 


7010226 


74LS155, U4 






6 


2 


7010264 


74LS244, U12, U13 






7 


2 


7010276 


74LS273, U6, U8 






pS*- 


1 


7010304 


74LS373, U7 






r 

u 


1 


7010353 


DS0025CN, U14 






10 


1 


7010354 


TL497ACN, U2 






l.i 


1 


7060010 


24 PIN ZIP DIP, Ul 






12 


1 


7030007 


.1 MF CM 






13 


1 


7030022 


500MF 35V, C4 






14 


1 


7030006 


300 pf, C5 






15 


4 


7030009 


10 MF 20V, C12, C.16-18 






16 


1 


7030034 


.002 MF Ceramic, C13 






17 


3 


7020073 


IK Ohm 1/4W 5%., R1-R3 






18 


1 


7020175 


"22. IK Ohm, 1%,.. R4- 






19 


1 


7020001 


1 Ohm 1/4W 5%, R5 






20 


1 


70 200 59 


2 70 Ohm 1/4W 5%., R6 






|Si- 


1 


7020177 


220 Ohm 1/2W, 5%,- R8 






Cz 


1 


7060003 


16 Pin Socket, U4 






23 


1 


7120001 


LI Inductor 500 uh 






24 


1 


7040003 


1N751, CR2 







SD Systems 

P.O. Box 2SB1 • Dallas. Taxaa 7S22B 21 4-271 -4BB7 

BILL OF MATERIALS 



Titla: 

PROM- 100 ^ 


•L Na. Rav. 

0100140 ft 


Data Ralaosad: , 




«ra^ &tf 


Shaat 2 


"■2 


Itam 


Qty 


SD-P/N 


'/ Dascriptian 


Unit Cast 


Ixtanskm 


2 5 


1 


7040014 


1N5803, CR1 






26 


1 


7050012 


Dip Switch, SI 






27 


1 


7050013 


Dip Switch, S2 






28 


6 


7060002 


14 Pin Socket 02,3,5,9, \0 f II 






29 


5 


7060005 


20 Pin Socket uGjT.8,12^13 






30 


1 


7060001 


8 Pin Socket UI4 






31 


1 


7000014 


PCB Prom- 100 FAB #0100042 






32 


1 


7160001 


7805 VR\ 






33 


1 


7160003 


7812 VR2 






34 


2 


7130005 


Heatsink 






35 


2 


7130006 


Screw 6-32x3/8 






36 


2 


7130007 


Nut 6-32 






37 


1 


70Z004-9 


RESISTOR, IOO OHM 7 k*W, 5%, R7 






38 


1 


7180002 


LEDl 






39 


i £> 


7A300 4-S 


AtUF CI-C3, CG-CIO^CI^CS 
























































































i 



























APPENDIX C 
PROM- 100 
ASSEMBLY DRAWING 



APPENDIX D 
SOFTWARE LISTINGS 



PROMO 8 
ADDR CODE 



STMT SOURCE STATEMENT 



SD SYSTEMS Z80 ASSEMBLER PAGE 0001 



>0000 
>0100 
>0068 
>0069 
>006A 
>0000 
>0005 
>005C 
>0080 
>000F 
>0010 
>0014 
>001A 
>0080 
>0064 



>0100 



0100 
0103 
0106 
0109 
010B 
010E 
0110 
0112 
0114 
0116 
0118 
0119 
011C 
011E 



319607 

218602 

CDA005 

1E80 

CD4D02 

FE31 

3 806 

1EBF 

2802 

1E00 

7B 

328C06 

3E80 

329306 



0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 
0018 
0019 
0020 
0021 
0022 
0023 
0024 
0025 
0026 
0027 
0028 
0029 
0030 
0031 
0032 
0033 
0034 
0035 
0036 
0037 
0038 
0039 
0040 
0041 
0042 
0043 
0044 
0045 
0046 
0047 
0048 
0049 
0050 
0051 
0052 
0053 
0054 
0055 
0056 
0057 
0058 



NAME 



PROMO 8 



2708 PROM PROGRAMMER CONTROL PROGRAM 

SDOS ENVIRONMENT 

9/27/79 



VERSION 1.3 



SYSTEM EQUATES 



CP/M COMPATIBLE 



8/26/80 



EXIT 

TBASE 

DATA 

LADD 

HACTL 

RBOUT 

FDOS 

FCB 

BUFFER 

OPEN 

CLOSE 

READ 

SETDMA 

NBYTES 

LOOPS 



EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 



OH 

100H 

6 8H 

69H 

6 AH 



5 

5CH 

80H 

15 

16 

20 

26 

128 

100 



BASE OF TRANSIENT AREA 

DATA PORT 

LOW ADDRESS PORT 

HIGH ADDRESS + CONTROL PORT 



PSECT ABS 

ORG TBASE ; START AT 100H 

PROGRAM PROM ENTRY POINT 



PPG 



SETDLY: 



LD 

LD 

CALL 

LD 

CALL 

CP 

JR 

LD 

JR 

LD 

LD 

LD 

LD 

LD 



SP,SPVAL 

HL f MSGl 

PTXT 

E, 80H 

CONIN 

31H 

C, SETDLY 

E,0BFH 

Z, SETDLY 

E,0 

A,E 

(DLAY) , A 

A , NBYTES 

(BCOUNT) ,A 



"PROMO 8 VERSION 1. 



PROMO 8 










SD SYSTEMS Z80 ASSEMBLER PAGE 0002 


ADDR 


CODE 


STMT 


SOURCE 


STATEMENT 




0121 


AF 


0059 




XOR 


A 




0122 


329206 


0060 




LD 


(FOPEN) r A 




0125 


319607 


0061 


PPGO 


LD 


SP , SPVAL 




0128 


AF 


0062 




XOR 


A 


CLEAR ACC 


0129 


D36A 


0063 




OUT 


(HACTL) ,A 




012B 


CD9105 


0064 




CALL 


CRLF 




012E 


21EB02 


0065 




LD 


HL,MSG2 




0131 


CDA005 


0066 




CALL 


PTXT ; 


"READY TO LOAD A FILE ?" 


0134 


210000 


0067 




LD 


HL,0 




0137 


228D06 


006 8 




LD 


(SCR1) ,HL 


; CLEAR BYTE COUNTER 


013A 


CD 2D 02 


0069 




CALL 


YORN 




013D 


D2FD03 


0070 




JP 


NC,READ2 


; IF NOT,CHK READ 


0140 


CD9105 


0071 


PPG OB 


CALL 


CRLF 




0143 


3A9206 


0072 




LD 


A, (FOPEN) 




0146 


B7 


0073 




OR 


A 




0147 


2015 


0074 




JR 


NZ r PPG0C-! 


s 


0149 


OEOF 


0075 




LD 


C,OPEN 




014B 


115C00 


0076 




LD 


DE,FCB 




014E 


CD0500 


0077 




CALL 


FDOS 




0151 


FEFF 


0078 




CP 


255 




0153 


2009 


0079 




JR 


NZ,PPG0C-5 


s 


0155 


218303 


0080 




LD 


HL,MSG10 




0158 


CDA005 


0081 




CALL 


PTXT 




015B 


C36602 


0082 




JP 


RENTRY 




015E 


0E1A 


0083 


PPGOC 


LD 


CSETDMA 




0160 


118000 


0084 




LD 


DE, BUFFER 




0163 


CD0500 


0085 




CALL 


FDOS 




0166 


210703 


0086 




LD 


HL,MSG3 




0169 


CDA005 


0087 




CALL 


PTXT ; 


"HEX LOAD ADDRESS, # BYTES 


016C 


CD1806 


0088 




CALL 


SCAN ; COLLECT DATA 


016F 


3A9106 


0089 




LD 


A, (NXCHR) 




0172 


FE2E 


0090 




CP 


i i 

• 




0174 


28CA 


0091 




JR 


Z r PPG0B-$ 




0176 


21B603 


0092 




LD 


HL,MSG12 




0179 


CDA005 


0093 




CALL 


PTXT 




017C 


2A9606 


0094 




LD 


HL f (OPR1) 




017P 


CD7E02 


0095 




CALL 


PADDR 




0182 


CD9105 


0096 




CALL 


CRLF 




0185 


CD0D02 


0097 




CALL 


THDR 


READ ADDR/#BYTES 1ST LINE 


0188 


E5 


0098 




PUSH 


HL 




0189 


ED5B9606 


0099 




LD 


DE f (OPR1) 


; LOAD ADDRESS ENTERED 


018D 


3A9006 


0100 




LD 


A, (OPCNT) 




0190 


A7 


0101 




AND 


A 




0191 


2804 


0102 




JR 


Z,PPG0A-$ 


; IF NO OPR'S JUMP 


0193 


ED52 


0103 




SBC 


HL,DE 


COMPUTE OFFSET 


0195 


E5 


0104 




PUSH 


HL 




0196 


Dl 


0105 




POP 


DE ; 


OFFSET REG 


0197 


El 


0106 


PPGOA 


POP 


HL 




0198 


ED53 8F06 


0107 




LD 


(SCR3) f DE 


; SAVE OFFSET 


019C 


1803 


0108 




JR 


PPG2-$ 




019E 


CD0D02 


0109 


PPG1 


CALL 


THDR 


LOAD ADDR/# BYTES 


01A1 


ED5B8F06 


0110 


PPG2 


LD 


DE, (SCR3) 




01A5 


B7 


0111 




OR 


A 


CLEAR CARRY 


01A6 


ED52 


0112 




SBC 


HL,DE 


SUBTRACT OFFSET 


01A8 


CD6405 


0113 


PPG3 


CALL 


TWDG ; 


READ A BYTE 


01AB 


77 


0114 




LD 


(HL) ,A ; 


STORE IT 


01 AC 


229406 


0115 




LD 


(LAST) f HL 




01AF 


23 


0116 




INC 


HL 





PROMO 8 










SD SYSTEMS Z 80 ASSEMBLER PAGE 0003 


ADDR 


CODE 


STMT 


SOURCE 


STATEMENT 




01B0 


E5 


0117 




PUSH 


HL 




01B1 


2A8D06 


0118 




LD 


HL r (SCR1) 


; BYTE COUNTER 


01B4 


23 


0119 




INC 


HL 




01B5 


228D06 


0120 




LD 


(SCR1) f HL 




01B8 


El 


0121 




POP 


HL 




01B9 


10ED 


0122 




DJNZ 


PPG3-$ ; 


READ ENTIRE LINE 


01BB 


CD6405 


0123 




CALL 


TWDG ; 


READ CHECKSUM 


01BE 


AF 


0124 




XOR 


A 




OIBF 


81 


0125 




ADD 


A,C 




01C0 


280B 


0126 




JR 


Z,PPG4-$ 




01C2 


E5 


0127 




PUSH 


HL 




01C3 


21CB03 


0128 




LD 


HL,MSG13 




01C6 


CDA005 


0129 




CALL 


PTXT 




01C9 


CD7E02 


0130 




CALL 


PADDR ; 


CHECKSUM ERROR 


OICC 


El 


0131 




POP 


HL 




OICD 


2A8D06 


0132 


PPG 4 


LD 


HL f (SCR1) 




OlDO 


ED4B9806 


0133 




LD 


BC, (OPR2) 


; # OF BYTES TO READ 


01D4 


2B 


0134 




DEC 


HL ; 


IF r THEN FFFF 


01D5 


OB 


0135 




DEC 


BC 




01D6 


A7 


0136 




AND 


A 




01D7 


ED 4 2 


0137 




SBC 


HL,BC 




01D9 


DA9E01 


0138 




JP 


C,PPG1 ; 


IF MORE, JUMP 


OlDC 


21E803 


0139 


PPG10 


LD 


HL,MSG14 




OlDF 


CDA005 


0140 




CALL 


PTXT 




01E2 


2A9406 


0141 




LD 


HL r (LAST) 




01E5 


CD7E02 


0142 




CALL 


PADDR 




01E8 


CD9105 


0143 


PPG10A 


CALL 


CRLF 




OlEB 


212303 


0144 




LD 


HL r MSG4 




OlEE 


CDA005 


0145 




CALL 


PTXT ; 


"READY TO PROG A PROM ?" 


01F1 


CD2D02 


0146 




CALL 


YORN 




01F4 


D26602 


0147 




JP 


NC,RENTRY 




01F7 


CD9105 


0148 


PPG11 


CALL 


CRLF 




OlFA 


214203 


0149 




LD 


HL f MSG5 


i 


OlFD 


CDA005 


0150 




CALL 


PTXT 


" MEM START , MEM END , PROM START 


0200 


CD1806 


0151 




CALL 


SCAN 




0203 


3A9106 


0152 




LD 


A, (NXCHR) 




0206 


FE2E 


0153 




CP 


ii 


IF '.' EXIT 


0208 


28ED 


0154 




JR 


Z,PPGll-$ 




020A 


C34C04 


0155 
0156 
0157 
0158 




JP 


PROG 




020D 


CD5A06 


0159 


THDR 


CALL 


FREAD ; 


LOOK FOR ' : * 


0210 


FE3A 


0160 




CP 


i . i 




0212 


2 OF 9 


0161 




JR 


NZ,THDR-$ 




0214 


AF 


0162 




XOR 


A 


CLEAR CHECKSUM 


0215 


4F 


0163 




LD 


C, A 




0216 


CD6405 


0164 




CALL 


TWDG 




0219 


A7 


0165 




AND 


A 


IS RECORD LENGTH 0? 


021A 


280D 


0166 




JR 


Z, THDRl -$ 




021C 


47 


0167 




LD 


B,A 




021D 


CD6405 


0168 




CALL 


TWDG ; 


GET FIRST BYTE OF ADDRESS 


0220 


67 


0169 




LD 


H,A 




0221 


CD6405 


0170 




CALL 


TWDG ; 


GET SECOND BYTE 


0224 


6F 


0171 




LD 


L,A 




0225 


CD6405 


0172 




CALL 


TWDG ; 


GET RECORD TYPE 


0228 


C9 


0173 




RET 






0229 


Fl 


0174 


THDRl 


POP 


AF 





PROMO 8 
ADDR CODE 



SD SYSTEMS Z80 ASSEMBLER PAGE 0004 



STMT SOURCE STATEMENT 



022A 


C3DC01 


0175 
0176 
0177 


• 
9 

• 
9 


J.P' 


PPG 10 


022D 


CD4D02 


017 8 


YORN 


CALL 


ECHO 


0230 


4F 


0179 




LD 


C,A 


0231 


FE2E 


0180 




CP 


it 

• 


0233 


CA6602 


0181 




JP 


Z, RENTRY 


0236 


B7 


0182 




OR 


A 


0237 


FE4E 


0183 




CP 


»N» 


0239 


C8 


0184 




RET 


Z 


023A 


FE59 


0185 




CP 


•Y' 


023C 


20EF 


0186 




JR 


NZ f YORN-$ 


023E 


37 


0187 




SCF 




023F 


C9 


0188 
0189 
0190 


• 
9 

• 
/ 


RET 




0240 


C5 


0191 


CONST 


PUSH 


BC 


0241 


D5 


0192 




PUSH 


DE 


0242 


E5 


0193 




PUSH 


HL 


0243 


0E0B 


0194 




LD 


C,0BH 


0245 


CD0500 


0195 




CALL 


5 


0248 


B7 


0196 




OR 


A 


0249 


El 


0197 




POP 


HL 


024A 


Dl 


0198 




POP 


DE 


024B 


CI 


0199 




POP 


BC 


024C 


C9 


0200 
0201 


■ • 


RET 




>024D 




0202 


ECHO: 






024D 


C5 


0203 


CONIN 


PUSH 


BC 


024E 


D5 


0204 




PUSH 


DE 


024F 


E5 


0205 




PUSH 


HL 


0250 


0E01 


0206 




LD 


C,l 


0252 


CD0500 


0207 




CALL 


5 


0255 


El 


0208 




POP 


HL 


0256 


Dl 


0209 




POP 


DE 


0257 


CI 


0210 




POP 


BC 


0258 


C9 


0211 
0212 


• 
9 


RET 




0259 


D5 


0213 


CONOUT: 


PUSH 


DE 


025A 


C5 


0214 




PUSH 


BC 


025B 


E5 


0215 




PUSH 


HL 


025C 


59 


0216 




LD 


E,C 


025D 


0E02 


0217 




LD 


C,02 


025F 


CD0500 


0218 




CALL 


5 


0262 


El 


0219 




POP 


HL 


0263 


CI 


0220 




POP 


BC 


0264 


Dl 


0221 




POP 


DE 


0265 


C9 


0222 
0223 


• 
9 


RET 




0266 


AF 


0224 


RENTRY 


XOR 


A 


0267 


D36A 


0225 




OUT 


(HACTL) ,A 


0269 


CD9105 


0226 




CALL 


CRLF 


026C 


3A9206 


0227 




LD 


A, (FOPEN) 


026F 


B7 


0228 




OR 


A 


0270 


CA0O00 


0229 




JP 


Z,EXIT 


0273 


0E10 


0230 




LD 


C r CLOSE 


0275 


115C00 


0231 




LD 


DE/FCB 


0278 


CD0500 


0232 




CALL 


FDOS 



; CALL SDOS CONSOLE STATUS 



; CALL SDOS CONSOLE INPUT 



PROMO 8 
ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0005 



STMT SOURCE STATEMENT 



027B C30000 



027E 7C 

027F CDAC05 

0282 7D 

0283 C38505 



0286 



0299 
029D 



02C9 
02CB 



02E8 
02EA 
02EB 



0306 
0307 



0322 
0323 



50524F4D 

2D303820 

56455253 

494F4E20 

312E33 

0D0A0D0A 

49532054 

48495320 

53595354 

454D2052 

554E4E49 

4E472032 

2E302C20 

322E352C 

204F5220 

342E3020 

4D485A3F 

ODOA 

28322E30 

202D2030 

202C2032 

2E35202D 

2031202C 

20342E30 

202D2032 

29 

OAOD 

03 

52454144 

5920544F 

204C4F41 

44204120 

46494C45 

2028592F 

4E293F 

03 

48455820 

4C4F4144 

20414444 

52455353 

2C202320 

42595445 

533A20 

03 

52454144 

5920544F 

2050524F 

4752414D 



0233 

0234 ; 

0235 ; 

0236 PADDR 
0237 

0238 
0239 
0240 
0241 
0242 
0243 MSG1 



JP 



LD 

CALL 
LD 
JP 



DEFM 



0244 
0245 



DEFW 
DEFM 



0246 
0247 



DEFW 
DEFM 



0248 
0249 
0250 MSG2 



DEFW 
DEFB 
DEFM 



0251 
0252 MSG3 



DEFB 
DEFM 



0253 
0254 MSG4 



DEFB 
DEFM 



EXIT 



A f H 
PACC 
A f L 
PASP 



•PROM-OS VERSION 1.3* 



OAODH f 0AODH 

•IS THIS SYSTEM RUNNING 2.0, 2.5, OR 4.0 



OAODH 
'(2.0 - 



2.5-1 



4.0 - 2) 



ODOAH 

03H 

•READY TO LOAD A FILE (Y/N) ? • 



03H 

• HEX LOAD ADDRESS , # BYTES : 



03H 

•READY TO PROGRAM A PROM (Y/N)?' 



PROMO 8 
ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0006 



STMT SOURCE STATEMENT 



0341 
0342 



0366 
0367 



03 82 
0383 



0391 
0392 



03B5 
03B6 



03CA 
03CB 



03E7 
03E8 



03FC 



20412050 

524F4D20 

28592F4E 

293F 

03 

4D454D4F 

52592053 

54415254 

2C4D454D 

4F525920 

454E442C 

50524F4D 

20535441 

52543A20 

03 

52454144 

5920544F 

20524541 

44204120 

50524F4D 

2028592F 

4E293F 

03 

46494C45 

204E4F54 

20464F55 

4E44 

03 

41545445 

4D505449 

4E472054 

4F205245 

41442050 

41535420 

454E4420 

4F462046 

494C45 

03 

4C4F4144 

20535441 

52542041 

44445245 

53533D20 

03 

43484543 

4B53554D 

20455252 

4F522041 

54204C4F 

43415449 

4F4E5320 

03 

4C4F4144 

2020454E 

44202041 

44445245 

53533D20 

03 



0255 
0256 MSG5 



DEFB 
DEFM 



0257 
0258 MSG6 



DEFB 
DEFM 



0259 
0260 



0261 
0262 



MSG10 



MSG11 



DEFB 
DEFM 



DEFB 
DEFM 



0263 
0264 



MSG12 



DEFB 
DEFM 



0265 

0266 MSG13 



DEFB 
DEFM 



0267 
0268 



MSG14 



DEFB 
DEFM 



03H 

'MEMORY START, MEMORY END, PROM START: ' 



03H 

'READY TO READ A PROM (Y/N) ? ' 



03H 

'FILE NOT FOUND' 



03H 



'ATTEMPTING TO READ PAST END OF FILE' 



03H 

'LOAD START ADDRESS= ' 



03H 

'CHECKSUM ERROR AT LOCATIONS 



03H 

'LOAD END ADDRESS= ' 



026 9 



DEFB 



03H 



PROMO 8 
ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0007 



STMT SOURCE STATEMENT 







0270 






0271 






0272 






0273 






0274 






0275 






0276 






0277 


03FD 


CD9105 


0278 


0400 


216703 


0279 


0403 


CDA005 


0280 


0406 


CD2D02 


0281 


0409 


D2E801 


0282 


040C 


CD9105 


0283 


040F 


214203 


0284 


0412 


CDA005 


0285 


0415 


CD1806 


0286 


0418 


3A9106 


0287 


041B 


FE2E 


0288 


041D 


28ED 


0289 


041F 


3E40 


0290 


0421 


D36A 


0291 


0423 


2A9606 


0292 


0426 


ED5B9A06 


0293 


042A 


CD1705 


0294 


042D 


77 


0295 


042E 


CD3904 


0296 


0431 


20F7 


0297 


0433 


AF 


0298 


0434 


D36A 


0299 


0436 


C3E801 


0300 
0301 
0302 
0303 
0304 
0305 
0306 
0307 
0308 


0439 


13 


0309 


043A 


7A 


0310 


043B 


E607 


0311 


043D 


57 


0312 


043E 


23 


0313 


043F 


D5 


0314 


0440 


E5 


0315 


0441 


ED5B9806 


0316 


0445 


13 


0317 


0446 


A7 


0318 


0447 


ED52 


0319 


0449 


El 


0320 


044A 


Dl 


0321 


044B 


C9 


0322 
0323 
0324 
0325 
0326 
0327 



PROM READ SEQUENCE 



READ2 



READ0 



READ1 



CALL 

LD 

CALL 

CALL 

JP 

CALL 

LD 

CALL 

CALL 

LD 

CP 

JR 

LD 

OUT 

LD 

LD 

CALL 

LD 

CALL 

JR 

XOR 

OUT 

JP 



CRLF 

HL,MSG6 

PTXT ; 

YORN 

NC,PPG10A 

CRLF 

HL,MSG5 

PTXT 

SCAN ; 

A, (NXCHR) 

i i 

• 

Z,READ0-$ 
A,40H 
(HACTL) , A 
HL f (OPR1) 
DE, (OPR3) 
PREAD 
(HL) ,A 
ADCMP , 
NZ,READ1- 
A 

(HACTL) ,.A 
PPG10A ; 



READ PROM INTO MEMORY 
"READY TO READ (Y/N)?" 
; NO r THEN PROGRAM 



"MEM START, MEM END, PROM START 
INPUT PARAMETERS 



TURN ON PROM VOLTAGE 

MEM START ADDR 

PROM START ADDR 
READ A BYTE OF PROM 
SAVE BYTE IN MEM 
INC ADDR & COMPARE 
$ ; IF NOT END, THEN JUMP 



WHEN COMPLETE, RETURN 



INC HL & DE THEN COMPARE HL WITH (IX) 
EXIT WITH ZERO FLAG SET IF EQUAL 



ADCMP 



INC 


DE 




7 


INC PROM ADDR 


LD 


A,D 








AND 


7H 




• 


MAX PROM ADDR=7FF 


LD 


D,A 








INC 


HL 








PUSH 


DE 








PUSH 


HL 




• 


SAVE HL & DE 


LD 


DE, 


(OPR2) 


; GET RAM END ADDR 


INC 


DE 








AND 


A 








SBC 


HL,] 


DE 


• 


COMPARE 


POP 


HL 








POP 


DE 








RET 











PROGRAMMING SEQUENCE 



PROMO 8 
ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0008 



STMT SOURCE STATEMENT 



044C 
044F 
0453 
0456 
0458 
045A 
045D 
045F 
0461 
0462 
0465 
0468 
0469 
046 B 
046E 
0471 
0472 
0474 
0476 
0478 
047A 
047C 
047E 
0480 
0483 
0486 
0488 
048B 
048F 
0490 
0492 
0493 
0496 
0497 
049A 
049C 
049F 
04A1 
04 A3 
04A6 
04A8 
04AA 
04 AC 
04AE 
04B0 
04B1 
04B4 
04B5 
04B7 
04BA 
04BE 
04C1 
04C2 
04C4 
04C7 
04C9 



2A9606 

ED5B9A06 

CD1705 

FEFF 

2007 

CD3904 

20F4 

1822 

E5 

214505 

CDA005 

El 

DB6 8 

CD2605 

CD4D02 

4F 

FE2E 

2806 

FE43 

2809 

18DE 

3E00 

D36A 

C32501 

CD9105 

0665 

2A9606 

ED5B9A06 

05 

2818 

C5 

CDEE04 

CI 

CD4002 

2807 

CD4D02 

FE2E 

2843 

CD3904 

20EA 

18DE 

3E00 

D36A 

1614 

AF 

CD0B05 

15 

20F9 

2A9606 

ED5B9A06 

CD1705 

BE 

2007 

CD3904 

2.0F5. 

18B1 



0328 
0329 
0330 
0331 
0332 
0333 
0334 
0335 
0336 
0337 
0338 
0339 
0340 
0341 
0342 
0343 
0344 
0345 
0346 
0347 
0348 
0349 
0350 
0351 
0352 
0353 
0354 
0355 
0356 
0357 
0358 
0359 
0360 
0361 
0362 
0363 
0364 
0365 
0366 
0367 
0368 
0369 
0370 
0371 
0372 
0373 
0374 
0375 
0376 
0377 
0378 
0379 
0380 
0381 
0382 
0383 
0384 
0385 



PROG 
PROG1 

PRG1A 

PROG2 



PRG2A 

PROG3 
PROG4 

PROG5 



PROG5A 

PROG6 

PROG6B 

PROG6A 
PROG7 

PRG7A 



LD 

LD 

CALL 

CP 

JR 

CALL 

JR 

JR 

PUSH 

LD 

CALL 

POP 

IN 

CALL 

CALL 

LD 

CP 

JR 

CP 

JR 

JR 

LD 

OUT 

JP 

CALL 

LD 

LD 

LD 

DEC 

JR 

PUSH 

CALL 

POP 

CALL 

JR 

CALL 

CP 

JR 

CALL 

JR 

JR 

LD 

OUT 

LD 

XOR 

CALL 

DEC 

JR 

LD 

LD 

CALL 

CP 

JR 

CALL 

JR 

JR 



HL, (OPR1) 

DE,(OPR3) 

PREAD ; 

0FFH ; 

NZ,PROG2- 

ADCMP ; 

NZ,PROGl- 

PROG3-$ ; 

HL 

HL,MSG7 

PTXT 

HL 

A, (DATA) 

PRTER ; 

ECHO 

C,A 

Z,PRG2A-$ 

•C 

Z f PROG3-$ 
PRGlA-$ ; 
A,0 

(HACTL) ,A 

PPG0 

CRLF 

B r LOOPS+l 

HL r (OPR1) 

DE, (OPR3) 

B 

Z,PROG6-$ 

BC 

PPROG 

BC 

CONST 

Z,PROG5A-: 

CONIN 

i i 

• 

Z,PROG9-$ 
ADCMP 
NZ,PROG5- 
PROG4-$ 
A,0 

(HACTL) r A 
D,20 
A 

DELAY 
D 

NZ,PROG6B 
HL,(OPRl) 
DE r (OPR3) 
PREAD ; 
(HL) 

NZ,PROG8- 
ADCMP 
NZ,PROG7- 
PRG2A-$ ; 



; MEM START ADDRESS 
; PROM START ADDRESS 
READ A BYTE (PROM) 
CHECK FOR ERASED BYTES 

$ ; IF NOT ERASED JUMP 
INC ADDR & CHECK FOR END 

$ ; LOOP UNTIL END 
GO PROGRAM PROM 



"NOT ERASED" 



PRINT BAD LOCATION 
READ FROM CONSOLE 

CHECK FOR PERIOD 

; EXIT 

CHECK FOR »C 

; CONTINUE IF 'C ENTERED 

IF NOT , PRINT NEXT ERROR 



; SET MEM START ADDR 
; SET PROM START ADDR 



PROGRAM ONE BYTE 



INC ADDR & CHECK END 
$ ; FINISH THIS LOOP 



; TURN OFF ALL CONTROL LINES 



-$ 
; MEM START ADDR 
; PROM START ADDR 
READ PROM DATA 

$ ; IF NOT MATCH, JUMP 

CHECK FOR END 
$ 

EXIT, COMPLETE 



PROMO 8 






/ 




SD SYSTEMS Z80 ASSEMBLER PAGE 


ADDR 


CODE 


STMT SOURCE 


STATEMENT 


04CB 


F5 


03 86 PROG8 


PUSH 


AF 


04CC 


E5 


0387 




PUSH 


HL 


04CD 


215205 


0388 




LD 


HL,MSG8 


04D0 


CDA005 


0389 




CALL 


PTXT ; "BAD LOCATION" 


04D3 


El 


0390 




POP 


HL 


04D4 


CD4002 


0391 




CALL 


CONST 


04D7 


2807 


0392 




JR 


Z,PROG8A-$ 


04D9 


CD4D02 


0393 




CALL 


CONIN 


04DC 


FE2E 


0394 




CP 


ii 

• 


04DE 


289C 


0395 




JR 


Z,PRG2A-$ 


04E0 


Fl 


0396 PROG8A 


POP 


AF 


04E1 


CD2605 


0397 




CALL 


PRTER ; PRINT ERROR MESSAGE 


04E4 


18DE 


0398 




JR 


PRG7A-$ ; PRINT ALL BAD LOCATION 


04E6 


215C05 


0399 PROG9 


LD 


HL,MSG9 


04E9 


CDA005 


0400 




CALL 


PTXT ; ABORTED 


04EC 


188E 


0401 

0402 , 

0403 j 

0404 ; 




JR 


PRG2A-$ 






0405 , 


• PULSE 


ONE PROM LOCATION 






0406 j 












0407 , 








04EE 


CD2205 


0408 1 


?PROG 


CALL 


PADD ; LATCH LSB OF ADDRESS 


04F1 


7A 


0409 




LD 


A,D 


04F2 


F680 


0410 




OR 


080H 


04F4 


D36A 


0411 




OUT 


(HACTL) , A 


04F6 


7E 


0412 




LD 


A, (HL) ; FETCH DATA 


04F7 


D368 


0413 




OUT 


(DATA), A ; OUTPUT DATA 


04F9 


7A 


0414 




LD 


A r D 


04FA 


F6C0 


0415 




OR 


0C0H ; TURN ON PROG PULSE 


04FC 


D36A 


0416 




OUT 


(HACTL), A 


04FE 


3E01 


0417 




LD 


A,l 


0500 


CD0B05 


0418 




CALL 


DELAY ; 1 MILLISEC DELAY 


0503 


7A 


0419 




LD 


A,D 


0504 


F6 80 


0420 




OR 


080H 


0506 


E6 87 


0421 




AND 


087H ; PROG PULSE OFF 


0508 


D36A 


0422 




OUT 


(HACTL) ,A 


050A 


C9 


0423 
0424 


t 


RET 




05 OB 


F5 


0425 I 


DELAY: 


PUSH 


AF 


050C 


3A8C06 


0426 




LD 


A, (DLAY) ; 2.0 MHZ - 80H 


050F 


47 


0427 




LD 


B,A ; 2.5 MHZ - OBFH 


0510 


Fl 


0428 




POP 


AF ; 4.0 MHZ - 00H 


0511 


10FE 


0429 I 


DELAY1 


DJNZ 


DELAYl-$ 


0513 


3D 


0430 




DEC 


A 


0514 


2 OF 5 


0431 




JR 


NZ, DELAY- $ 


0516 


G9 


0432 

0433 ; 

0434 ; 

0435 , 

0436 ; 




RET 








0437 j 


i READ 


ONE LOCATION OF PROM 






0438 , 












0439 , 








0517 


CD2205 


0440 I 


?READ 


CALL 


PADD ; LATCH LSB OF ADDRESS 


051A 


7A 


0441 




LD 


A r D 


051B 


E607 


0442 




AND 


7 


051D 


D36A 


0443 




OUT 


(HACTL) ,A 



PROMO 8 
ADDR CODE 

051F DB68 
0521 C9 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0010 



STMT SOURCE STATEMENT 



0522 7B 

0523 D369 
0525 C9 



0526 
0527 
0528 
052B 
052C 
052F 
0531 
0534 
0535 
053 8 
053A 
053D 
053E 
0541 
0544 



0545 



0551 
0552 



055B 
055C 

0563 



47 

7A 

CDAC05 

7B 

CDAC05 

0E20 

CD5902 

78 

CDAC05 

0E20 

CD5902 

7E 

CDAC05 

CD9105 

C9 



4E4F5420 

45524153 

45442020 

03 

42414420 

4C4F4320 

20 

03 

41424F52 

544544 

03 



0564 CD5A06 
0567 CD7D05 
056 A 07 



0444 
0445 
0446 
0447 
0448 
0449 
0450 
0451 
0452 
0453 
0454 
0455 
0456 
0457 
0458 
0459 
0460 
0461 
0462 
0463 
0464 
0465 
0466 
0467 
0468 
0469 
0470 
0471 
0472 
0473 
0474 
0475 
0476 
0477 
0478 
0479 
0480 
0481 
0482 



IN 
RET 



A r (DATA) 



LATCH LOWER 8 BITS OF PROM ADDRESS 



PADD 



LD 

OUT 

RET 



A f E 
(LADD) f A 



PRINTS ADDR/BAD DATA/GOOD DATA 
OF ERROR LOCATION 



PRTER 



LD 


B f A 


LD 


A f D 


CALL 


PACC 


LD 


A f E 


CALL 


PACC 


LD 


C,20H 


CALL 


CONOUT 


LD 


A r B 


CALL 


PACC 


LD 


C,20H 


CALL 


CONOUT 


LD 


A f (HL) 


CALL 


PACC 


CALL 


CRLF 


RET 





PRINT MSB OF ADDR 



PRINT LSB OF ADDR 



PRINT BAD DATA 



PRINT GOOD DATA 



MSG7 



0483 
0484 MSG8 



0485 
0486 MSG9 



0487 
0488 
0489 
0490 
0491 
0492 
0493 
0494 
0495 
0496 



DEFM 



DEFB 
DEFM 



DEFB 
DEFM 

DEFB 



NOT ERASED 



03H 

•BAD LOC 



03H 

1 ABORTED f 



03H 



TWDG-READ AND CONVERT 2 DIGITS TO BINARY 



TWDG 



CALL 
CALL 
RLCA 



FREAD ; READ A CHAR, 1ST DIGIT 
ASBIN ; ASCII TO BINARY 



PROMO 8 










SD SYSTEMS Z80 ASSEMBLER PAGE 00 


ADDR 


CODE 


STMT SOURCE 


STATEMENT 




056B 


07 


0497 




RLCA 






056C 


07 


0498 




RLCA 






056D 


07 


0499 




RLCA 






056E 


C5 


0500 




PUSH 


BC 


; SAVE C REG (CKSM) 


056F 


4F 


0501 




LD 


C,A 


; SAVE 1ST DIGIT 


0570 


CD5A06 


0502 




CALL 


FREAD 


• 2ND DIGIT 


0573 


CD7D05 


0503 




CALL 


ASBIN 




0576 


Bl 


0504 




OR 


C t 


? OR IN MSB'S 


0577 


CI 


0505 




POP 


BC 


; RESTORE CKSM 


0578 


F5 


0506 




PUSH 


AF , 


; SAVE ACC 


0579 


81 


0507 




ADD 


A,C 


' ADD IN 2 DIGITS TO CKSM 


057A 


4F 


0508 




LD 


C,A 




057B 


Fl 


0509 




POP 


AF t 


• RESTORE ACC 


057C 


C9 


0510 

0511 , 

0512 , 

0513 t 

0514 , 




RET 










0515 , 


\ ASCII 


TO BINARY CONVERSION 






0516 , 














0517 j 










057D 


D630 


0518 I 


^SBIN 


SUB 


03 OH 




057F 


FEOA 


0519 




CP 


10 




0581 


F8 


0520 




RET 


M 




0582 


D607 


0521 




SUB 


7 




0584 


C9 


0522 

0523 j 

0524 , 

0525 j 

0526 j 

0527 ; 




RET 







PROMO 8 
ADDR CODE 



SD SYSTEMS Z80 ASSEMBLER PAGE 0012 



STMT SOURCE STATEMENT 







0529 






0530 


0585 


C5 


0531 


0586 


CDAC05 


0532 


0589 


CD9B05 


0533 


058C 


CD9105 


0534 


058F 


CI 


0535 


0590 


C9 


0536 
0537 
0538 
0539 


0591 


0E0D 


0540 


0593 


CD5902 


0541 


0596 


OEOA 


0542 


0598 


C35902 


0543 
0544 
0545 


059B 


0E20 


0546 


059D 


C35902 


0547 
0548 
0549 
0550 
0551 
0552 
0553 
0554 
0555 


05A0 


7E 


0556 


05A1 


FE03 


0557 


05 A3 


C8 


0558 


05A4 


4F 


0559 


05A5 


CD5902 


0560 


05A8 


23 


0561 


05A9 


C3A005 


0562 
0563 
0564 
0565 
0566 
0567 


05AC 


F5 


0568 


05AD 


OF 


0569 


05AE 


OF 


0570 


05AF 


OF 


0571 


05B0 


OF 


0572 


05B1 


CDB505 


0573 


05B4 


Fl 


0574 
0575 
0576 


05B5 


E60F 


0577 


05B7 


C690 


0578 


05B9 


27 


0579 


05BA 


CE40 


0580 


05BC 


27 


0581 


05'BD 


4F 


0582 


05BE 


C35902 


0583 
0584 
0585 



PASP 



PUSH 


BC 


CALL 


PACC 


CALL 


SPACE 


CALL 


CRLF 


POP 


BC 


RET 





CRLF 



SPACE 



LD 

CALL 
LD 
JP 



LD 
JP 



C,0DH 
CONOUT 
C,0AH 
CONOUT 



C,' ' 

CONOUT 



PRINT TEXT 



PTXT 



PRINT 



PACC 



PRVAL 



LD 


A, (HL) 


; FETCH A ] 


CP 


3 




RET 


Z 




LD 


C,A 




CALL 


CONOUT 




INC 


HL 




JP 


PTXT 




ACCUMULATOR 




PUSH 


AF 




RRCA 






RRCA 






RRCA 






RRCA 






CALL 


PRVAL 




POP 


AF 




AND 


0FH 




ADD 


A f 90H 




DAA 






ADC 


A,40H 




DAA 






LD 


C,A 




JP 


CONOUT 


; PRINT IT 



PROMO 8 










SD SYSTEMS Z80 ASSEMBLER PAGE ( 


ADDR 


CODE 


STMT SOURCE 


STATEMENT 






0586 , 












0587 , 












0588 , 


r CHECK 


FOR VALID HEX CHARACTER 






0589 t 












0590 t 








05C1 


FE30 


0591 AORN 


CP 


•O' 


05C3 


DAD705 


0592 




JP 


C r AORN2 ; JUMP IF < 3 OH 


05C6 


FE3A 


0593 




CP 


•9'+l 


05C8 


DAD505 


0594 




JP 


C f AORNl ; JUMP IF < 3AH 


05CB 


FE40 


0595 




CP 


'A»-l 


05CD 


DAD705 


0596 




JP 


C,AORN2 ; JUMP IF < f A' 


05D0 


FE47 


0597 




CP 


'F'+l 


05D2 


D2D705 


0598 




JP 


NC,AORN2 ; JUMP IF < 'G* 


05D5 


AF 


0599 AORN1 


XOR 


A 


05D6 


C9 


0600 




RET 


; VALID DATA RET 


05D7 


AF 


0601 AORN2 


XOR 


A 


05D8 


3C 


0602 




INC 


A 


05D9 


C9 


0603 

0604 ; 

0605 j 




RET 


; NOT HEX CHAR 






0606 ; 


• CHECK 


FOR TERMINATOR 






0607 ; 












0608 , 


• SPACE 


, COMMA, 


OR CARRIAGE RETURN 






0609 , 












0610 i 








05DA 


FE20 


0611 : 


PERMCK 


CP 


it 


05DC 


C8 


0612 




RET 


Z 


05DD 


FE2C 


0613 




CP 




05DF 


C8 


0614 




RET 


z 


05E0 


FE2E 


0615 




CP 


II 

• ■ 


05E2 


CAE805 


0616 




JP 


Z,TCHK0 


05E5 


FEOD 


0617 




CP 


0DH 


05E7 


CO 


0618 




RET 


NZ 


05E8 


C5 


0619 1 


DCHKO 


PUSH 


BC 


05E9 


CD9105 


0620 




CALL 


CRLF 


05EC 


CI 


0621 




POP 


BC 


05ED 


AF 


0622 




XOR 


A 


05EE 


C9 


0623 

0624 , 

0625 , 




RET 








0626 , 


r SCAN 


FOR OPERAND FROM KEYBOARD 






0627 ; 












0628 , 












0629 , 


-, EXIT 


WITH DATA IN HL, AND TERMINATOR 






0630 , 


• IN C. 


IF VALID DATA r RETURN WITH 






0631 i 


r ZERO 


FLAG SET 


. B CONTAINS # OF CHARACTERS ENT 






0632 j 












0633 j 








05EF 


210000 


0634 I 


CEYIN 


LD 


HL r 


05F2 


45 


0635 




LD 


B f L 


05F3 


CD4D02 


0636 B 


CEY1 


CALL 


ECHO 


05F6 


4F 


0637 




LD 


C r A 


05F7 


04 


0638 




INC 


B ; INC CHAR COUNT 


05F8 


CDDA05 


0639 




CALL 


TERMCK 


05FB 


C8 


0640 




RET 


Z ; IF TERMINATOR, RETURN 


05FC 


CDC105 


0641 




CALL 


AORN ; VALID DATA CHECK 


05FF 


CO 


0642 




RET 


NZ ; IF NOT RETURN 


0600 


7 9 


0643 




LD 


A f C 



PROMO 8 

ADDR CODE 

0601 CD7D05 

0604 29 

0605 29 

0606 29 

0607 29 

0608 85 

0609 6F 
060A C3F305 



060D 0E3F 

06 OF CD5902 

0612 3E2E 

0614 329106 

0617 C9 



0618 
0619 
061C 
061D 
061F 
0620 
0623 
0626 
0628 
062B 
062E 
0631 
0632 
0635 
0637 
0639 
063B 
063D 
06 3 E 
063F 
0642 
0645 
0648 
0649 
064C 
064E 
0650 
0651 
0653 
0655 
0657 
0659 



AF 

219606 

E5 

DDE1 

77 

010900 

119706 

EDBO 

329006 

CDEF05 

C20D06 

79 

329106 

FE20 

2806 

FE2C 

2802 

05 

C8 

DD7500 

DD7401 

3A9006 

3C 

329006 

DD23 

DD23 

79 

FE20 

28D6 

FE2C 

28D2 

C9 



CALL 


ASBIN 


ADD 


HL,HL 


ADD 


HL,HL 


ADD 


HL f HL 


ADD 


HL,HL 


ADD 


A,L 


LD 


L, A 


JP 


KEY1 



INVCMD LD 

CALL 
LD 
LD 
RET 



SCAN — SCANS THE OPERANDS INPUT FROM THE 
CONSOLE. THE OPERANDS ARE SAVED IN OP1, 
AS THE ARGUMENTS TO EXECUTE THEIR COMMANDS. 



SCAN 



STMT SOURCE STATEMENT 



0644 
0645 
0646 
0647 
0648 
0649 
0650 
0651 
0652 
0653 
0654 
0655 
0656 
0657 
0658 
0659 
0660 
0661 
0662 
0663 
0664 
0665 
0666 
0667 
0668 
0669 
0670 
0671 
0672 
0673 
0674 
0675 
0676 
0677 
0678 
0679 
06 80 
06 81 
06 82 
06 83 
06 84 
06 85 
06 86 
06 87 
0688 
0689 
0690 
0691 
0692 
0693 
0694 
0695 
06 96 
0697 
0698 
0699 
0700 
0701 



SD SYSTEMS Z80 ASSEMBLER PAGE 0014 



; CONVERT TO BINARY 



; SHIFT 4 BITS 



C, ' ? ' 
CONOUT 
A ' . ' 
(NXCHR) f A 



SCAN1 



SCAN2 



XOR 


A INITIALIZE 


LD 


HL,OPRS ; CLEAR OPERANDS 


PUSH 


HL 


POP 


IX ;IX=POINTER TO OPERANDS 


LD 


(HL) ,A 


LD 


BC,9 


LD 


DE f OPRS+l 


LDIR 




LD 


(OPCNT), A 


CALL 


KEYIN ; GET ONE OPERAND 


JP 


NZ , INVCMD 


LD 


A,C 


LD 


(NXCHR) , A 


CP 


i i 


JR 


Z,SCAN2-$ 


CP 


i i 


JR 


Z f SCAN2-$ 


DEC 


B 


RET 


Z ; IF NO DATA, RET 


LD 


(IX) f L 


LD 


(IX+1),H 


LD 


A, (OPCNT) 


INC 


A 


LD 


(OPCNT) ,A 


INC 


IX 


INC 


IX ; POINT TO NEXT OPR 


LD 


A,C 


CP 


it 


JR 


Z r SCANl-$ 


CP 


i i 


JR 


Z,SCANl-$ 


RET 





PROMO 8 










SD SYSTEMS Z 80 ASSEMBLER PAGE 001! 


ADDR 


CODE 


STMT 


SOURCE 


STATEMENT 






0702 


• 










0703 


• 






065A 


E5 


0704 


FREAD 


PUSH 


HL 


065B 


D5 


0705 




PUSH 


DE 


065C 


C5 


0706 




PUSH 


BC 


065D 


3A9306 


0707 




LD 


A, (BCOUNT) 


0660 


FE80 


0708 




CP 


NBYTES 


0662 


200C 


0709 




JR 


NZ f FREADl-$ 


0664 


0E14 


0710 




LD 


C,READ 


0666 


115C00 


0711 




LD 


DE,FCB 


0669 


CD0500 


0712 




CALL 


FDOS ; LEAD FILE 


066C 


B7 


0713 




OR 


A 


066D 


2011 


0714 




JR 


NZ,FERROR-$ 


066F 


AF 


0715 




XOR 


A 


0670 


218000 


0716 


FREAD1 


LD 


HL f BUFFER 


0673 


5F 


0717 




LD 


E,A 


0674 


3C 


0718 




INC 


A 


0675 


329306 


0719 




LD 


(BCOUNT) , A 


0678 


1600 


0720 




LD 


D,0 


067A 


19 


0721 




ADD 


HL f DE ; POINT TO NEXT DATA 


067B 


7E 


0722 




LD 


A,(HL) 


067C 


CI 


0723 




POP 


BC 


067D 


Dl 


0724 




POP 


DE 


06 7 E 


El 


0725 




POP 


HL 


067F 


C9 


0726 




RET 




06 80 


CI 


0727 


F ERROR 


POP 


BC 


0681 


Dl 


0728 




POP 


DE 


06 82 


El 


0729 




POP 


HL 


06 83 


219203 


0730 




LD 


HL,MSG11 


06 86 


CDA005 


0731 




CALL 


PTXT ; ATTEMPT TO READ PAST EOF 


0689 


C36602 


0732 
0733 


• 
9 


JP 


RENTRY 


>06 8C 




0734 


DLAY 


DEFS 


1 


>06 8D 




0735 


SCR1 


DEFS 


1 


>06 8E 




0736 


SCR2 


DEFS 


1 


>06 8F 




0737 


SCR3 


DEFS 


1 


>0690 




0738 


OPCNT 


DEFS 


1 


>0691 




0739 


NXCHR 


DEFS 


1 


>0692 




0740 


FOPEN 


DEFS 


1 


>0693 




0741 


BCOUNT 


DEFS 


1 


>0694 




0742 


LAST 


DEFS 


2 


>0696 




0743 


OPRS 


DEFS 


6 


>0696 




0744 


OPR1 


EQU 


OPRS 


>0698 




0745 


OPR2 


EQU 


OPRS+2 


>069A 




0746 


OPR3 


EQU 


OPRS+4 


>07 96 




0747 
0748 
0749 
0750 


SPVAL 


EQU 


OPRS+100H 



PROMO 8 
ADDR CODE 



SD SYSTEMS Z80 ASSEMBLER PAGE 0016 



STMT SOURCE STATEMENT 



CROSS REFERENCE LISTING 
SYMBOL VALUE TYPE STMT 



STATEMENT REFERENCES 



ADCMP 


0439 


0309 


0383 


036 8 


0335 


0296 


AORN 


05C1 


0591 


0641 








AORN1 


05D5 


0599 


0594 








AORN2 


05D7 


0601 


0598 


0596 


0592 




ASBIN 


057D 


0518 


0644 


0503 


0495 




BCOUNT 


0693 


0741 


0719 


0707 


0058 




BUFFER 


0080 


0022 


0716 


0084 






CLOSE 


0010 


0024 


0230 








CON IN 


024D 


0203 


0393 


0365 


0049 




CONOUT 


0259 


0213 


0657 


0583 


0560 


0547 0543 0541 0473 


CONST 


0240 


0191 


0391 


0363 






CRLF 


0591 


0540 


0620 


0534 


0476 


0354 0283 0278 0226 








0143 


0096 


0071 


0064 


DATA 


0068 


0016 


0444 


0413 


0342 




DELAY 


050B 


0425 


0431 


0418 


0375 




DELAY1 


0511 


0429 


0429 








DLAY 


06 8C 


0734 


0426 


0056 






ECHO 


024D 


0202 


0636 


0344 


0178 




EXIT 


0000 


0014 


0233 


0229 






FCB 


005C 


0021 


0711 


0231 


0076 




FDOS 


0005 


0020 


0712 


0232 


0085 


0077 


FERROR 


06 80 


0727 


0714 








FOPEN 


0692 


0740 


0227 


0072 


0060 




FREAD 


065A 


0704 


0502 


04 94 


0159 




FREAD1 


0670 


0716 


0709 








HACTL 


006A 


0018 


0443 
0225 


0422 
0063 


0416 


0411 0372 0352 0299 


INVCMD 


060D 


0656 


067 9 








KEY1 


05F3 


0636 


0651 








KEYIN 


05EF 


0634 


0678 








LADD 


0069 


0017 


0452 








LAST 


0694 


0742 


0141 


0115 






LOOPS 


0064 


0028 


0355 








MSG1 


0286 


0243 


0046 








MSG10 


0383 


0260 


0080 








MSG11 


0392 


0262 


0730 








MSG12 


03B6 


0264 


0092 








MSG13 


03CB 


0266 


0128 








MSG14 


03E8 


0268 


0139 








MSG2 


02EB 


0250 


0065 








MSG3 


0307 


0252 


0086 








MSG4 


0323 


0254 


0144 








MSG5 


0342 


0256 


0284 


0149 






MSG6 


0367 


0258 


0279 








MSG7 


0545 


0482 


0339 








MSG8 


0552 


0484 


0388 








MSG9 


055C 


0486 


0399 








NBYTES 


0080 


0027 


0708 


0057 






NXCHR 


0691 


0739 


06 81 


0659 


0287 


0152 0089 


OPCNT 


06 90 


073 8 


06 92 


06 90 


0677 


0100 


OPEN 


000F 


0023 


0075 








OPR1 


06 96 


0744 


037 8 


0356 


0330 


0292 0099 0094 


OPR2 


0698 


0745 


0316 


0133 







0469 



0148 



0291 



PROMO 8 




ADDR .< 


:ode 


OPR3 


06 9A 


OPRS 


0696 


PACC 


05 AC 


PADD 


0522 


PADDR 


027E 


PASP 


0585 


PPG 


0100 


PPGO 


0125 


PPGOA 


0197 


PPGOB 


0140 


PPGOC 


015E 


PPG1 


019E 


PPG10 


01DC 


PPG10A 


01E8 


PPG11 


01F7 


PPG2 


01A1 


PPG3 


01A8 


PPG4 


01CD 


PPROG 


04EE 


PREAD 


0517 


PRG1A 


045A 


PRG2A 


047C 


PRG7A 


04C4 


PROG 


044C 


PROG1 


0453 


PROG2 


0461 


PROG3 


0483 


PROG4 


0488 


PROG5 


0492 


PROG5A 


04A3 


PROG6 


04AA 


PROG6A 


04B7 


PROG6B 


04B0 


PROG7 


04BE 


PROG 8 


04CB 


PROG 8 A 


04E0 


PROG9 


04E6 


PRTER 


0526 


PRVAL 


05B5 


PTXT 


05A0 


RBOUT 


0000 


READ 


0014 


READQ 


040C 


READ! 


042A 


READ 2 


03FD 


RENTRY 


0266 


SCAN 


0618 


SCAN1 


062B 


SCAN2 


063F 


SCR1 


06 8D 


SCR2 


068E 


SCR3 


06 8F 


SETDLY 


0118 


SETDMA 


001A 


SPACE 


059B 


SPVAL 


0796 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0017 



STMT SOURCE STATEMENT 



0746 


0379 


0357 


0331 


0293 


0743 


0747 


0746 


0745 


0744 0675 0670 


0568 


0532 


0475 


0471 


0467 0465 0237 


0451 


0440 


040 8 






0236 


0142 


0130 


0095 




0531 


0239 








0045 










0061 


0353 








0106 


0102 








0071 


0091 








0083 


0079 


0074 






0109 


0138 








0139 


0175 








0143 


0300 


0282 






0148 


0154 








0110 


0108 








0113 


0122 








0132 


0126 








0408 


0361 








0440 


0380 


0332 


0294 




0335 


0350 








0351 


0401 


0395 


0385 


0347 


0383 


0398 








0330 


0155 








0332 


0336 








0338 


0334 








0354 


0349 


0337 






0356 


0370 








0360 


0369 








0368 


0364 








0371 


0359 








0378 










0374 


0377 








0380 


0384 








0386 


0362 








0396 


0392 








0399 


0367 








0463 


0397 


0343 






0577 


0573 








0556 


0731 


0562 


0400 


0389 0340 0285 




0145 


0140 


0129 


0093 0087 0081 


0019 










0025 


0710 








0283 


0289 








0294 


0297 








0278 


0070 








0224 


0732 


0181 


0147 


0082 


066 9 


0286 


0151 


0088 




0678 


0699 


0697 






0688 


06 85 


06 83 






0735 


0132 


0120 


0118 


0068 


0736 










0737 


0110 


0107 






0055 


0053 


0051 






0026 


0083 








0546 


0533 








0747 


0061 


0045 







0066 



0150 
0047 



PROM 08 




ADDR 


CODE 


TBASE 


0100 


TCHKO 


05E8 


TERMCK 


: 05DA 


THDR 


020D 


THDR1 


0229 


TWDG 


056 4 


YORN 


022D 


ERRORS= 


=0000 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0018 



STMT SOURCE STATEMENT 



0015 


0037 








0619 


0616 








0611 


0639 








0159 


0161 


0109 


0097 




0174 


0166 








0494 


0172 


0170 


0168 


0164 


017 8 


0281 


0186 


0146 


0069 



0123 0113 



PROM 16 
ADDR CODE 



SD SYSTEMS Z80 ASSEMBLER PAGE 0001 



STMT SOURCE STATEMENT 



>0000 
>0100 
>0068 
>0069 
>006A 
>0000 
>0005 
>005C 
>0080 
>000F 
>0010 
>0014 
>001A 
>0080 
i>0064 



>0100 



0100 
0103 
0106 
0109 
010B 
010E 
0110 
0112 
0114 
0116 
0118 
0119 
011C 
011E 



318507 

218602 

CD8F05 

1E25 

CD4D02 

FE31 

3 806 

1E32 

2802 

1E4A 

7B 

327B06 

3E80 

328206 



0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 
0018 
0019 
0020 
0021 
0022 
0023 
0024 
0025 
0026 
0027 
0028 
0029 
0030 
0031 
0032 
0033 
0034 
0035 
0036 
0037 
0038 
0039 
0040 
0041 
0042 
0043 
0044 
0045 
0046 
0047 
0048 
0049 
0050 
0051 
0052 
0053 
0054 
0055 
0056 
0057 
0058 



NAME 



PROM 16 



2716/2758 PROM PROGRAMMER CONTROL PROGRAM 

SDOS ENVIRONMENT 

9/27/79 



VERSION 1.3 



SYSTEM EQUATES 



CP/M COMPATIBLE 



8/26/80 



EXIT 

TBASE 

DATA 

LADD 

HACTL 

RBOUT 

FDOS 

FCB 

BUFFER 

OPEN 

CLOSE 

READ 

SETDMA 

NBYTES 

LOOPS 



EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 



OH 

100H 

6 8H 

69H 

6AH 



5 

5CH 

80H 

15 

16 

20 

26 

128 

100 



BASE OF TRANSIENT AREA 

DATA PORT 

LOW ADDRESS PORT 

HIGH ADDRESS + CONTROL PORT 



PSECT ABS 

ORG TBASE ; START AT 10 OH 

PROGRAM PROM ENTRY POINT 



PPG LD SP,SPVAL 

LD HL,MSG1 

CALL PTXT ; 

LD E,25H 

CALL CONIN 

CP 31H 

JR CSETDLY 

LD E,32H 

JR Z,SETDLY 

LD E f 4AH 

SETDLY: LD A,E 

LD (DLAY) ,A 

LD A , NBYTES 

LD (BCOUNT) ,A 



"PROM16 VERSION .1.3" 



ROM 16 










SD SYSTEMS Z80 


ASSEMBLER PAGE 0002 


ADDR 


CODE 


STMT 


SOURCE 


STATEMENT 






0121 


AF 


0059 




XOR 


A 






0122 


328106 


0060 




LD 


(FOPEN) , A 




0125 


318507 


0061 


PPGO 


LD 


SP,SPVAL 






0128 


AF 


0062 




XOR 


A ; 


CLEAR 


ACC 


0129 


D36A 


0063 




OUT 


(HACTL) , A 




012B 


CD8005 


0064 




CALL 


CRLF 






012E 


21EB02 


0065 




LD 


HL,MSG2 






0131 


CD8F05 


0066 




CALL 


PTXT ; 


"READY TO LOAD A FILE ? n 


0134 


210000 


0067 




LD 


HL,0 






0137 


227C06 


0068 




LD 


(SCR1) ,HL 


; CLEAR BYTE COUNTER 


013A 


CD2D02 


0069 




CALL 


YORN 






013D 


D2FD03 


0070 




JP 


NC,READ2 




; IF NOT, CHK READ 


0140 


CD 80 05 


0071 


PPGOB 


CALL 


CRLF 






0143 


3A8106 


0072 




LD 


A, (FOPEN) 






0146 


B7 


0073 




OR 


A 






0147 


2015 


0074 




JR 


NZ,PPG0C- 


-$ 




0149 


OEOF 


0075 




LD 


C,OPEN 






014B 


115C00 


0076 




LD 


DE,FCB 






0.1 4 E 


CD0500 


0077 




CALL 


FDOS 






0151 


FEFF 


0078 




CP 


255 






0153 


2009 


0079 




JR 


NZ,PPG0C- 


-$ 




0155 


218303 


0080 




LD 


HL,MSG10 






0158 


CD8F05 


0081 




CALL 


PTXT 






015B 


C36602 


0082 




JP 


RENTRY 






015E 


0E1A 


0083 


PPGOC 


LD 


CSETDMA 






0160 


118000 


0084 




LD 


DE f BUFFER 




0163 


CD0500 


0085 




CALL 


FDOS 






0166 


210703 


0086 




LD 


HL,MSG3 






0169 


CD8F05 


0087 




CALL 


PTXT ; 


"HEX 


LOAD ADDRESS , # BYTES 


016C 


CD0706 


0088 




CALL 


SCAN ; 


COLLECT DATA 


016F 


3A8006 


0089 




LD 


A, (NXCHR) 






0172 


FE2E 


0090 




CP 


• 






0174 


28CA 


0091 




JR 


Z, PPGOB- S 


i» 




0176 


21B603 


0092 




LD 


HL f MSG12 






0179 


CD8F05 


0093 




CALL 


PTXT 






017C 


2A8506 


0094 




LD 


HL, (OPR1) 






017P 


CD7E02 


0095 




CALL 


PADDR 






0182 


CD8005 


0096 




CALL 


CRLF 






0185 


CD0D02 


0097 




CALL 


THDR ; 


READ 


ADDR/#BYTES 1ST LINE 


0188 


E5 


0098 




PUSH 


HL 






0189 


ED5B8506 


0099 




LD 


DE, (OPR1) 


; LOAD ADDRESS ENTERED 


018D 


3A7F06 


0100 




LD 


A r (OPCNT) 






0190 


A7 


0101 




AND 


A 






0191 


2804 


0102 




JR 


Z f PPG0A-$ ; IF 


NO OPR'S JUMP 


0193 


ED52 


0103 




SBC 


HL f DE j 


COMPUTE OFFSET 


0195 


E5 


0104 




PUSH 


HL 






0196 


Dl 


0105 




POP 


DE j 


OFFSET REG 


0197 


El 


0106 


PPGOA 


POP 


HL 






0198 


ED537E06 


0107 




LD 


(SCR3),DE ; SAVE OFFSET 


019C 


1803 


0108 




JR 


PPG2-$ 






019E 


CD0D02 


0109 


PPG1 


CALL 


THDR j 


• LOAD 


ADDR/# BYTES 


01A1 


ED5B7E06 


0110 


PPG2 


LD 


DE f (SCR3) 






01A5 


B7 


0111 




OR 


A j 


> CLEAR CARRY 


01A6 


ED52 


0112 




SBC 


HL f DE j 


• SUBTRACT OFFSET 


01A8 


CD5305 


0113 


PPG3 


CALL 


TWDG , 


• READ 


A BYTE 


01AB 


77 


0114 




LD 


(HL) f A , 


; STORE 


; IT 


01AC 


228306 


0115 




LD 


(LAST) f HI 






01AF 


23 


0116 




INC 


HL 







PROM 16 
ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0003 



STMT SOURCE STATEMENT 



01B0 
01B1 
01B4 
01B5 
01B8 
01B9 
01BB 
01BE 
01BF 
01C0 
01C2 
01C3 
01C6 
01C9 
01CC 
01CD 
01D0 
01D4 
01D5 
01D6 
01D7 
01D9 
01D.C 
01DF 
01E2 
01E5 
01E8 
01EB 
01EE 
01F1 
01F4 
01F7 
01FA 
01FD 
0200 
0203 
0206 
0208 
020A 



020D 
0210 
0212 
0214 
0215 
0216 
0219 
021A 
021C 
021D 
0220 
0221 
0224 
0225 
0228 
0229 



E5 

2A7C06 

23 

227C06 

El 

10ED 

CD 53 05 

AF 

81 

280B 

E5 

21CB03 

CD8F05 

CD7E02 

El 

2A7C06 

ED4B8706 

2B 

OB 

A7 

ED42 

DA9E01 

21E803 

CD8F05 

2A8306 

CD7E02 

CD8005 

212303 

CD8F05 

CD 2D 02 

D26602 

CD8005 

214203 

CD8F05 

CD0706 

3A8006 

FE2E 

28ED 

C34C04 



CD4906 

FE3A 

20F9 

AF 

4F 

CD5305 

A7 

280D 

47 

CD53 05 

67 

CD5305 

6F 

CD53 05 

C9 

Fl 



0117 
0118 
0119 
0120 
0121 
0122 
0123 
0124 
0125 
0126 
0127 
0128 
0129 
0130 
0131 
0132 
0133 
0134 
0135 
0136 
0137 
0138 
0139 
0140 
0141 
0142 
0143 
0144 
0145 
0146 
0147 
0148 
0149 
0150 
0151 
0152 
0153 
0154 
0155 
0156 
0157 
0158 
0159 
0160 
0161 
0162 
0163 
0164 
0165 
0166 
0167 
0168 
0169 
0170 
0171 
0172 
0173 
0174 



PPG 4 



PPG10 



PPG10A 



PPG11 



THDR 



THDR1 



PUSH 

LD 

INC 

LD 

POP 

DJNZ 

CALL 

XOR 

ADD 

JR 

PUSH 

LD 

CALL 

CALL 

POP 

LD 

LD 

DEC 

DEC 

AND 

SBC 

JP 

LD 

CALL 

LD 

CALL 

CALL 

LD 

CALL 

CALL 

JP 

CALL 

LD 

CALL 

CALL 

LD 

CP 

JR 

JP 



CALL 

CP 

JR 

XOR 

LD 

CALL 

AND 

JR 

LD 

CALL 

LD 

CALL 

LD 

CALL 

RET 

POP 



HL 

HL, (SCR1) 

HL 

(SCR1) r HL 

HL 

PPG3-$ ; 

TWDG ; 

A 

A,C 

Z,PPG4-$ 

HL 

HL,MSG13 

PTXT 

PADDR 

HL 

HL, (SCR1) 

BC, (OPR2) 

HL ; 

BC 

A 

HL,BC 

C,PPG1 ; 

HL,MSG14 

PTXT 

HL, (LAST) 

PADDR 

CRLF 

HL,MSG4 

PTXT ; 

YORN 

NC,RENTRY 

CRLF 

HL,MSG5 

PTXT ; 

SCAN 

A, (NXCHR) 
t # i 

Z,PPGll-$ 
PROG 



; BYTE COUNTER 



READ ENTIRE LINE 
READ CHECKSUM 



CHECKSUM ERROR 



; # OF BYTES TO READ 
IF 0,THEN FFFF 



IF MORE, JUMP 



"READY TO PROGRAM A PROM ?" 



"MEM START,MEM END, PROM START" 



IF f . ' EXIT 



FREAD ; LOOK FOR * : * 
» . i 

• ■ ■ ' . ■ ■ . 

NZ,THDR-$ 

A ; CLEAR CHECKSUM 

C,A 

TWDG 

A 

Z,THDRl-$ 

B,A 



IS RECORD LENGTH 0? 



TWDG 

H,A 

TWDG 

L,A 

TWDG 

AF 



; GET FIRST BYTE OF ADDRESS 
; GET SECOND BYTE 
; GET RECORD TYPE 



PR0M16 
ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0004 



STMT SOURCE STATEMENT 



022A 


C3DC01 


0175 

0176 ; 

0177 ; 


JP 


PPG10 


022D 


CD4D02 


017 8 YORN 


CALL 


ECHO 


0230 


4F 


017 9 


LD 


C,A 


0231 


FE2E 


0180 


CP 


• 


0233 


CA6602 


0181 


JP 


Z , RENTRY 


0236 


B7 


0182 


OR 


A 


0237 


FE4E 


0183 


CP 


•N» 


0239 


C8 


0184 


RET 


Z 


023A 


FE59 


0185 


CP 


i Y i 


023C 


20EF 


0186 


JR 


NZ f YORN-$ 


023E 


37 


0187 


SCF 




023F 


C9 


0188 

0189 ; 

0190 ; 


RET 




0240 


C5 


0191 CONST 


PUSH 


BC ; 


0241 


D5 


0192 


PUSH 


DE 


0242 


E5 


0193 


PUSH 


HL 


0243 


0E0B 


0194 


LD 


C r 0BH 


0245 


CD0500 


0195 


CALL 


5 


0248 


B.7 


0196 


OR 


A 


0249 


El 


0197 


POP 


HL 


024A 


Dl 


0198 


POP 


DE 


024B 


CI 


0199 


POP 


BC 


024C 


C9 


0200 
0201 ; 


RET 




>024D 




0202 ECHO: 






024D 


C5 


0203 CONIN: 


PUSH 


BC 


024E 


D5 


0204 


PUSH 


DE 


024F 


E5 


0205 


PUSH 


HL 


0250 


0E01 


0206 


LD 


C r l 


0252 


CD0500 


0207 


CALL 


5 


0255 


El 


0208 


POP 


HL 


0256 


Dl 


0209 


POP 


DE 


0257 


CI 


0210 


POP 


BC 


0258 


C9 


0211 
0212 ; 


RET 




0259 


D5 


0213 CONOUT: 


PUSH 


DE 


025A 


C5 


0214 


PUSH 


BC 


025B 


E5 


0215 


PUSH 


HL 


025C 


59 


0216 


LD 


E,C 


025D 


0E02 


0217 


LD 


C f 02 


025F 


CD0500 


0218 


CALL 


5 


0262 


El 


0219 


POP 


HL 


0263 


CI 


0220 


POP 


BC 


0264 


Dl 


0221 


POP 


DE 


0265 


C9 


0222 
0223 ; 


RET 




0266 


AF 


0224 RENTRY 


XOR 


A 


0267 


D36A 


0225 


OUT 


(HACTL) , A 


026 9 


CD 80 05 


0226 


CALL 


CRLF 


026C 


3A8106 


0227 


LD 


A f (FOPEN) 


026F 


B7 


0228 


OR 


A 


0270 


CA0000 


0229 


JP 


Z/EXIT 


0273 


0E10 


0230 


LD 


Q, CLOSE 


0275 


115C00 


0231 


LD 


DE r FCB 


027 8 


CD0500 


0232 


CALL 


FPOS 



; CALL SDOS CONSOLE STATUS 



; CALL SDOS CONSOLE INPUT 



PROM 16 
ADDR CODE 

027B C30000 



027E 7C 

027F CD9B05 

0282 7D 

0283 C37405 



SD SYSTEMS Z80 ASSEMBLER PAGE 0005 



02 86 



0299 
029D 



02C9 
02CB 



02E8 
02EA 
02EB 



0306 
0307 



0322 
0323 



50524F4D 

2D313620 

56455253 

494F4E20 

312E33 

0D0A0D0A 

49532054 

48495320 

53595354 

454D2052 

554E4E49 

4E472032 

2E302C20 

322E352C 

204F5220 

342E3020 

4D485A3F 

ODOA 

28322E30 

202D2030 

202C2032 

2E35202D 

2031202C 

20342E30 

202D2032 

29 

OAOD 

03 

52454144 

5920544F 

204C4F41 

44204120 

46494C45 

2028592F 

4E293F 

03 

48455820 

4C4F4144 

20414444 

52455353 

2C202320 

42595445 

533A20 

03 

52454144 

5920544F 

2050524F 

4752414D 



STMT SOURCE STATEMENT 



0233 
0234 
0235 
0236 
0237 
0238 
0239 
0240 
0241 
0242 
0243 



JP 



PADDR 



MSG1 



DEFM 



0244 
0245 



DEFW 
DEFM 



0246 
0247 



DEFW 
DEFM 



0248 
0249 
0250 MSG2 



DEFW 
DEFB 
DEFM 



0251 
0252 MSG3 



DEFB 
DEFM 



0253 
0254 MSG4 



DEFB 
DEFM 



EXIT 



LD 


A f H 


CALL 


PACC 


LD 


A f L 


JP 


PASP 



'PROM-16 VERSION 1.3' 



0A0DH f 0A0DH 

'IS THIS SYSTEM RUNNING 2.0/2.5', OR 4.0 



OAODH 

'(2.0 - , 2.5 - 1,4.0-2)' 



ODOAH 

03H 

'READY TO LOAD A FILE (Y/N)?» 



03H 

•HEX LOAD ADDRESS, # BYTES: ' 



03H 

•READY TO PROGRAM A PROM (Y/N) ? ' 



PR0M16 
ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0006 



STMT SOURCE STATEMENT 



03 41 

0342 



0366 
0367 



0382 
03 83 



0391 
0392 



03B5 
03B6 



03CA 
03CB 



03E7 
03E8 



03FC 



20412050 

524F4D20 

28592F4E 

293F 

03 

4D454D4F 

52592053 

54415254 

2C4D454D 

4F525920 

454E442C 

50524F4D 

20535441 

52543A20 

03 

52454144 

5920544F 

20524541 

44204120 

50524F4D 

2028592F 

4E293F 

03 

46494C45 

204E4F54 

20464F55 

4E44 

03 

41545445 

4D505449 

4E472054 

4F205245 

41442050 

41535420 

454E4420 

4F462046 

494C45 

03 

4C4F4144 

20535441 

52542041 

44445245 

53533D20 

03 

43484543 

4B53554D 

20455252 

4F522041 

54204C4F 

43415449 

4F4E5320 

03 

4C4F4144 

2020454E 

44202041 

44445245 

53533D20 

03 



0255 
0256 MSG5 



DEFB 
DEFM 



0257 
0258 MSG6 



DEFB 
DEFM 



0259 

0260 MSG10 



0261 
0262 



MSG11 



DEFB 
DEFM 



DEFB 
DEFM 



0263 
0264 



MSG12 



DEFB 
DEFM 



0265 
0266 



MSG13 



DEFB 
DEFM 



0267 
0268 



MSG14 



DEFB 
DEFM 



03H 

'MEMORY START .MEMORY END, PROM START; 



03H 

•READY TO READ A PROM (Y/N) ? ' 



03H 

'FILE NOT FOUND' 



03H 



'ATTEMPTING TO READ PAST END OF FILE 



03H 

'LOAD START 



ADDRESS^ 



03H 
•CHECKSUM 



ERROR AT LOCATIONS 



0.3 H 
•LOAD 



END ADDRESS= 



026 9 



DEFB 



03H 



PROM 16 
ADDR CODE 



STMT SOURCE STATEMENT 



SD SYSTEMS Z80 ASSEMBLER PAGE 0007 







0270 






0271 






0272 






0273 






0274 






0275 






0276 






0277 


03FD 


CD8005 


0278 


0400 


216703 


0279 


0403 


CD8F05 


0280 


0406 


CD2D02 


0281 


0409 


D2E801 


0282 


040C 


CD8005 


0283 


040F 


214203 


0284 


0412 


CD8F05 


0285 


0415 


CD0706 


0286 


0418 


3A8006 


0287 


041B 


FE2E 


0288 


041D 


28ED 


0289 


041F 


3E40 


0290 


0421 


D36A 


0291 


0423 


2A8506 


0292 


0426 


ED5B8906 


0293 


042A 


CD0605 


0294 


04 2D 


77 


0295 


042E 


CD3904 


0296 


0431 


20F7 


0297 


0433 


AF 


0298 


0434 


D36A 


0299 


0436 


C3E801 


0300 
0301 
0302 
0303 
0304 
0305 
0306 
0307 
0308 


0439 


13 


0309 


043A 


7A 


0310 


043B 


E607 


0311 


043D 


57 


0312 


043E 


23 


0313 


043F 


D5 


0314 


0440 


E5 


0315 


0441 


ED5B8706 


0316 


0445 


13 


0317 


0446 


A7 


0318 


0447 


ED52 


0319 


0449 


El 


0320 


044A 


Dl 


0321 


04-4B 


C9 


0322 
0323 
0324 
0325 
0326 
0327 



PROM READ SEQUENCE 



READ 2 



READO 



READ1 



CALL 


CRLF ; 


LD 


HL r MSG6 


CALL 


PTXT ; 


CALL 


YORN 


JP 


NC f PPG10A 


CALL 


CRLF 


LD 


HL f MSG5 


CALL 


PTXT ; 


CALL 


SCAN 


LD 


A f (NXCHR) 


CP 


i i 

• 


JR 


Z, READO- $ 


LD 


A f 40H 


OUT 


(HACTL) , A 


LD 


HL r (OPR1) 


LD 


DE, (OPR3) 


CALL 


PREAD ; 


LD 


(HL) , A ; 


CALL 


ADCMP ; 


JR 


NZ,READ1- 


XOR 


A 


OUT 


(HACTL) ,A 


JP 


PPG10A ; 



READ PROM INTO MEMORY 
"READY TO READ (Y/N)?" 
; NO, THEN PROGRAM 



"MEM START, MEM END, PROM START" 
INPUT PARAMETERS 



; TURN ON PROM VOLTAGE 
; MEM START ADDR 
; PROM START ADDR 
READ A BYTE OF PROM 
SAVE BYTE IN MEM 
INC ADDR & COMPARE 
$ ; IF NOT END, THEN JUMP 



WHEN COMPLETE, RETURN 



INC HL & DE THEN COMPARE HL WITH (IX) 
EXIT WITH ZERO FLAG SET IF EQUAL 



ADCMP 



INC 


DE 




• 


INC PROM ADDR 


LD 


A,D 








AND 


7H 




7 


MAX PROM ADDR=7FF 


LD 


D,A 








INC 


HL 








PUSH 


DE 








PUSH 


HL 




• 


SAVE HL & DE 


LD 


DE, 


(OPR2) 


; GET RAM END ADDR 


INC 
AND 


DE 
A 








SBC 


HL,] 


DE 


• 


COMPARE 


POP 


HL 








POP 


DE 








RET 











PROGRAMMING SEQUENCE 



PROM 16 
ADDR CODE 



SD SYSTEMS Z80 ASSEMBLER PAGE 0008 



STMT SOURCE STATEMENT 



044C 
044E 
0450 
0453 
0457 
045A 
045C 
045E 
0461 
0463 
0465 
0466 
0469 
046C 
046D 
046F 
0472 
0475 
0476 
047 8 
047A 
047C 
047E 
0480 
0482 
04 84 
0487 
04 8 A 
04 8D 
0491 
0494 
0497 
0499 
049C 
049E 
04A0 
04A3 
04A5 
04A7 
04A9 
04 AC 
04B0 
04B3 
04B4 
04B6 
04B9 
04BB 
04BD 
04 BE 
04BF 
04C2 
04C5 
04C6 
04C9 
04CB 
04CE 



3E40 

D36A 

2A8506 

ED5B8906 

CD0605 

FEFF 

2007 

CD3904 

20F4 

1822 

E5 

213405 

CD8F05 

El 

DB6 8 

CD1505 

CD4D02 

4F 

FE2E 

2806 

FE43 

2809 

18DE 

3E00 

D36A 

C32501 

CD8005 

2A8506 

ED5B8906 

CDE004 

CD4002 

2807 

CD4D02 

FE2E 

2838 

CD3 904 

20EC 

3E00 

D36A 

2A8506 

ED5B8906 

CD0605 

BE 

2007 

CD3904 

20F5 

18C3 

F5 

E5 

214105 

CD8F05 

El 

CD4002 

2807 

CD4D02 

FE2E 



0328 
0329 
0330 
0331 
0332 
0333 
0334 
0335 
0336 
0337 
0338 
0339 
0340 
0341 
0342 
0343 
0344 
0345 
0346 
0347 
0348 
0349 
0350 
0351 
0352 
0353 
0354 
0355 
0356 
0357 
0358 
0359 
0360 
0361 
0362 
0363 
0364 
0365 
0366 
0367 
0368 
0369 
0370 
0371 
0372 
0373 
0374 
0375 
0376 
0377 
0378 
0379 
03 80 
0381 
0382 
0383 
0384 
0385 



PROG 

PROG1 
PRG1A 
PROG2 



PRG2A 



PROG 3 
PROG4 

PROG5 



PROG5A 
PROG6 
PROG6A 
PROG7 

PRG7A 
PROG 8 



LD 

OUT 

LD 

LD 

CALL 

CP 

JR 

CALL 

JR 

JR 

PUSH 

LD 

CALL 

POP 

IN 

CALL 

CALL 

LD 

CP 

JR 

CP 

JR 

JR 

LD 

OUT 

JP 

CALL 

LD 

LD 

CALL 

CALL 

JR 

CALL 

CP 

JR 

CALL 

JR 

LD 

OUT 

LD 

LD 

CALL 

CP 

JR 

CALL 

JR 

JR 

PUSH 

PUSH 

LD 

CALL 

POP 

CALL 

JR 

CALL 

CP 



A r 40H 
(HACTL) f A 
HL, (OPR1) 
DE, (OPR3) 
PRE AD 
0FFH ; 
NZ,PROG2- 
ADCMP ; 
NZ,PROGl- 
PROG3-$ ; 
HL 

HL,MSG7 
PTXT ; 
HL 

A r (DATA) 
PRTER ; 
ECHO ; 
C,A 

Z,PRG2A-$ 
1 C ' • 
Z,PROG3-$ 
PRGlA-$ ; 
A,0 

(HACTL) f A 
PPG0 
CRLF 

HL, (OPR1) 
DE f (OPR3) 
PPROG 
CONST 
Z f PROG5A- 

CONIN 

i i 

• 

Z,PROG9-$ 

ADCMP ; 

NZ f PROG5- 

A f 

(HACTL) r A 

HL f (OPR1) 

DE f (OPR3) 

PREAD ; 

(HL) 

NZ f PROG8- 

ADCMP ; 

NZ,PROG7- 

PRG2A-$ ; 

AF 

HL 

HL r MSG8 

PTXT 

HL 

CONST 

2, PROG 8 A- 

CONIN 



TURN ON PROM VOLTAGE 
MEM START ADDRESS 
PROM START ADDRESS 
READ A BYTE (PROM) 
CHECK FOR ERASED BYTES 
$ ; IF NOT ERASED JUMP 

INC ADDR & CHECK FOR END 
$ ; LOOP UNTIL END 
GO PROGRAM PROM 



"NOT ERASED" 



PRINT BAD LOCATION 
READ FROM CONSOLE 

CHECK FOR PERIOD 
; EXIT 



CHECK FOR 'C 
; CONTINUE IF 



! C' ENTERED 
IF NOT , PRINT NEXT ERROR 



; SET MEM START ADDR 
; SET PROM START ADDR 
PROGRAM ONE BYTE 



INC ADDR & CHECK END 
$ ; FINISH THIS LOOP 



TURN OFF ALL CONTROL LINES 
MEM START ADDR 
PROM START ADDR 
READ PROM DATA 



$ ; IF NOT MATCH, JUMP 

CHECK FOR END 
$ 

EXIT, COMPLETE 



"BAD LOCATION" 



ROM 16 










SD SYSTEMS Z80 ASSEMBLER PAGE 0009 


ADDR 


CODE 


STMT SOURCE 


STATEMENT 


04D0 


28AE 


0386 




JR 


Z,PRG2A-$ 


04D2 


Fl 


03 87 PROG 8 A 


POP 


AF 


04D3 


CD1505 


0388 




CALL 


PRTER ; PRINT ERROR MESSAGE 


04D6 


18DE 


0389 




JR 


PRG7A-$ ; PRINT ALL BAD LOCATIONS 


04D8 


214B05 


0390 PROG9 


LD 


HL f MSG9 


04DB 


CD8F05 


0391 




CALL 


PTXT ; ABORTED 


04DE 


18A0 


0392 
0393 
03 94 , 
0395 




JR 


PRG2A-$ 






0396 


\ PULSE 


ONE PROM LOCATION 






0397 












0398 








04E0 


CD1105 


0399 PPROG 


CALL 


PADD ; LATCH LSB OF ADDRESS 


04E3 


7A 


0400 




LD 


A r D 


04E4 


F6C0 


0401 




OR 


0C0H 


04E6 


D36A 


0402 




OUT 


(HACTL) , A 


04E8 


7E 


0403 




LD 


A, (HL) ; FETCH DATA 


04E9 


D368 


0404 




OUT 


(DATA) , A ; OUTPUT DATA 


04EB 


7A 


0405 




LD 


A r D 


04EC 


F6E0 


0406 




OR 


0E0H ; TURN ON PROG PULSE 


04EE 


D36A 


0407 




OUT 


(HACTL) r A 


04F0 


3A7B06 


0408 
0409 
0410 




LD 


A r (DLAY) ; 2.0 MHZ - 25H 

; 2.5 MHZ - 32H 
; 4.0 MHZ - 4AH 


04F3 


CDFE04 


0411 




CALL 


DELAY ; 50 MILLISEC DELAY 


04F6 


7A 


0412 




LD 


A,D 


04F7 


F6C0 


0413 




OR 


0C0H 


04F9 


E6C7 


0414 




AND 


0C7H ; PROG PULSE OFF 


04FB 


D36A 


0415 




OUT 


(HACTL) f A 


04FD 


C9 


0416 
0417 , 


> 


RET 




04FE 


06BF 


0418 DELAY 


LD 


B f 191 


0500 


10FE 


0419 DELAY1 


DJNZ 


DELAYl-$ 


0502 


3D 


0420 




DEC 


A 


0503 


20F9 


0421 




JR 


NZ, DELAY-? 


0505 


C9 


0422 
0423 , 
0424 

0425 , 

0426 , 




RET 








0427 , 


; READ 


ONE LOCATION OF PROM 






0428 , 












0429 '., 








0506 


CD1105 


0430 I 


PREAD 


CALL 


PADD ; LATCH LSB OF ADDRESS 


0509 


7A 


0431 




LD 


A,D 


050A 


F640 


0432 




OR 


40H 


050C 


D36A 


0433 




OUT 


(HACTL) f A 


050E 


DB6 8 


0434 




IN 


A, (DATA) 


0510 


C9 


0435 

0436 j 

0437 j 




RET 








0438 j 


• LATCH 


LOWER 


8 BITS OF PROM ADDRESS 






0439 j 












0440 ; 








0511 


7B 


0441 I 


3 ADD 


LD 


A f E 


0512 


D369 


0442 




OUT 


(LADD) , A 


0514 


C9 


0443 




RET 





PR0M16 
ADDR CODE 



SD SYSTEMS Z80 ASSEMBLER PAGE 0010 



STMT SOURCE STATEMENT 



0515 
0516 
0517 
051A 
051B 
051E 
0520 
0523 
0524 
0527 
0529 
052C 
052D 
053 
0533 



0534 



0540 
0541 



054A 



0552 



0553 
0556 
0559 
055A 
055B 
055C 
055D 
055E 
055F 
0562 
0565 
0566 
0567 



47 

7A 

CD9B05 

7B 

CD9B05 

0E20 

CD5902 

7 8 

CD9B05 

0E20 

CD5902 

7E 

CD9B05 

CD 80 05 

C9 



4E4F5420 
45524153 
45442020 
03 

42414420 
4C4F4320 
20 
03 

054B 41424F52 
544544 
03 



CD4906 

CD6C05 

07 

07 

07 

07 

C5 

4F 

CD4906 

CD6C05 

Bl 

CI 

F5 



0444 
0445 
0446 
0447 
0448 
0449 
0450 
0451 
0452 
0453 
0454 
0455 
0456 
0457 
0458 
0459 
0460 
0461 
0462 
0463 
0464 
0465 
0466 
0467 
0468 
0469 
0470 
0471 
0472 



PRINTS ADDR/ BAD DATA/GOOD DATA 
OF ERROR LOCATION 



PRTER 



LD 


B, A 


LD 


A,D 


CALL 


PACC 


LD 


A,E 


CALL 


PACC 


LD 


C,20H 


CALL 


CONOUT 


LD 


A f B 


CALL 


PACC 


LD 


C,20H 


CALL 


CONOUT 


LD 


A f (HL) 


CALL 


PACC 


CALL 


CRLF 


RET 





PRINT MSB OF ADDR 



PRINT LSB OF ADDR 



PRINT BAD DATA 



PRINT GOOD DATA 



MSG7 



0473 
0474 MSG8 



0475 
0476 MSG9 



0477 
047 8 
0479 
0480 
0481 
0482 
0483 
0484 
0485 
0486 
0487 
0488 
0489 
0490 
0491 
0492 
0493 
0494 
0495 
0496 



DEFM 



DEFB 
DEFM 



DEFB 
DEFM 

DEFB 



NOT ERASED 



03H 

•BAD LOC 



03H 

* ABORTED ' 

03H 



TWDG-READ AND CONVERT 2 DIGITS TO BINARY 



TWDG 



CALL 


FREAD j 


• READ A CHAR, 1ST 


CALL 


ASBIN j 


• ASCII TO BINARY 


RLCA 






RLCA 






RLCA 






RLCA 






PUSH 


BC j 


• SAVE C REG (CKSM) 


LD 


' C,A j 


► SAVE 1ST DIGIT 


CALL 


FREAD j 


• 2ND DIGIT 


CALL 


ASBIN 




OR 


C ; 


• OR IN MSB'S 


POP 


BC j 


r RESTORE CKSM 


PUSH 


AF j 


• SAVE ACC 



PR0M16 
ADDR CODE 

0568 81 

0569 4F 
056A Fl 
056B C9 



056C 


D630 


056E 


FEOA 


0570 


F8 


0571 


D607 


0573 


C9 



ADD 


A r C 


LD 


C f A 


POP 


AF 


RET 





ASCII TO BINARY CONVERSION 



STMT SOURCE STATEMENT 



0497 
0498 
0499 
0500 
0501 
0502 
0503 
0504 
0505 
0506 
0507 
0508 
0509 
0510 
0511 
0512 
0513 
0514 
0515 
0516 
0517 



SD SYSTEMS Z80 ASSEMBLER PAGE 0011 

; ADD IN 2 DIGITS TO CKSM 
; RESTORE ACC 



ASBIN 



SUB 


030H 


CP 


10 


RET 


M 


SUB 


7 


RET 





PROM 16 
ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0012 



STMT SOURCE STATEMENT 



0574 
0575 
0578 
057B 
057E 
057P 



0580 
0582 
0585 
0587 



058A 
058C 



058F 
0590 
0592 
0593 
0594 
0597 



059B 
059C 
059D 
059E 
059F 
05A0 



C5 

CD9B05 

CD8A05 

CD8005 

CI 

C9 



0E0D 
CD5902 
0E0A 
C35902 



0E20 
C35902 



7E 

FE03 

C8 

4F 

CD5902 

23 



0598 C38F05 



F5 
OF 
OF 
OF 
OF 
CDA405 



05A3 Fl 



05 A4 E60F 

05A6 C690 

05A8 27 

05A9 CE40 

05AB 27 

05 AC 4F 

05 AD C35902 



0519 
0520 
0521 
0522 
0523 
0524 
0525 
0526 
0527 
0528 
0529 
0530 
0531 
0532 
0533 
0534 
0535 
0536 
0537 
0538 
0539 
0540 
0541 
0542 
0543 
0544 
0545 
0546 
0547 
0548 
0549 
0550 
0551 
0552 
0553 
0554 
0555 
0556 
0557 
0558 
0559 
0560 
0561 
0562 
0563 
0564 
0565 
0566 
0567 
056 8 
0569 
0570 
0571 
0572 
0573 
0574 
0575 



PASP 



CRLF 



PUSH 

CALL 

CALL 

CALL 

POP 

RET 



LD 

CALL 
LD 
JP 



BC 

PACC 

SPACE 

CRLF 

BC 



SPACE 



LD 
JP 



C,0DH 
CONOUT 
C r 0AH 
CONOUT 



C ' ' 
CONOUT 



PRINT TEXT 



PTXT 



LD 

CP 

RET 

LD 

CALL 

INC 

JP 



A, (HL) 

3 

Z 

C,A 

CONOUT 

HL 

PTXT 



FETCH A BYTE 



PRINT ACCUMULATOR 



PACC 



PRVAL 



PUSH 


AF 




RRCA 






RRCA 






RRCA 






RRCA 






CALL 


PRVAL 




POP 


AF 




AND 


0FH 




ADD 


A r 90H 




DAA 






ADC 


A r 40H 




DAA 






LD 


C,A 




JP 


CONOUT 


; PRINT IT 



PROM 16 










SD SYSTEMS Z 80 ASSEMBLER PAGE 


ADDR 


CODE 


STMT I 


SOURCE 


STATEMENT 






0576 












0577 












0578 


', CHECK 


k FOR VALID HEX CHARACTER 






0579 












0580 








05B0 


FE30 


0581 AORN 


CP 


'0' 


05B2 


DAC605 


0582 




JP 


C r AORN2 ; JUMP IF < 3 OH 


05B5 


FE3A 


0583 




CP 


•9'+l 


05B7 


DAC405 


0584 




JP 


C r AORNl ; JUMP IF < 3 AH 


05BA 


FE40 


0585 




CP 


'A^l 


05BC 


DAC605 


0586 




JP 


C f AORN2 ; JUMP IF < 'A' 


05BF 


FE47 


0587 




CP 


•F f +1 


05C1 


D2C605 


0588 




JP 


NC r AORN2 ; JUMP IF < 'G f 


05C4 


AF 


0589 AORN1 


XOR 


A 


05C5 


C9 


0590 




RET 


; VALID DATA RET 


05C6 


AF 


0591 AORN2 


XOR 


A 


05C7 


3C 


0592 




INC 


A 


05C8 


C9 


0593 

0594 , 

0595 , 




RET 


; NOT HEX CHAR 






0596 , 


• CHECK 


FOR TERMINATOR 






0597 , 












0598 , 


» SPACE 


, COMMA f 


OR CARRIAGE RETURN 






0599 , 












0600 , 








05C9 


FE20 


0601 1 


?ERMCK 


CP 


it 


05CB 


C8 


0602 




RET 


Z 


05CC 


FE2C 


0603 




CP 


• i 
r 


05CE 


C8 


0604 




RET 


z 


05CF 


FE2E 


0605 




CP 


1 1 

• 


05D1 


CAD705 


0606 




JP 


Z,TCHK0 


05D4 


FEOD 


0607 




CP 


0DH 


05D6 


CO 


0608 




RET 


NZ 


05D7 


C5 


0609 1 


DCHKO 


PUSH 


BC 


05D8 


CD8005 


0610 




CALL 


CRLF 


05DB 


CI 


0611 




POP 


BC 


05DC 


AF 


0612 




XOR 


A 


05DD 


C9 


0613 

0614 , 

0615 j 




RET 








0616 j 


• SCAN 


FOR OPERAND FROM KEYBOARD 






0617 j 












0618 j 












0619 j 


• EXIT 


WITH DATA IN. HL, AND TERMINATOR 






0620 j 


• IN C. 


IF VALID DATA, RETURN WITH 






0621 j 


ZERO 


FLAG SET 


. B CONTAINS # OF CHARACTERS ENT 






0622 j 












0623 j 








05DE 


210000 


0624 B 


CEYIN 


LD 


HL,0 


05E1 


45 


0625 




LD 


B,L 


05E2 


CD4D02 


0626 B 


:eyi 


CALL 


ECHO 


05E5 


4F 


0627 




LD 


C f A 


05E6 


04 


0628 




INC 


B ; INC CHAR COUNT 


05E7 


CDC905 


0629 




CALL 


TERMCK 


05EA 


C8 


0630 




RET 


Z ; IF TERMINATOR, RETURN 


05EB 


CDB005 


0631 




CALL 


AORN ; VALID DATA CHECK 


05EE 


CO 


0632 




RET 


NZ ; IF NOT RETURN 


05EF 


79 


0633 




LD 


A r C 



0013 



R0M16 










SD SYSTEMS Z 80 ASSEMBLER PAGE 


ADDR 


CODE 


STMT SOURCE 


STATEMENT 


05F0 


CD6C05 


0634 




CALL 


ASBIN ; CONVERT TO BINARY 


05F3 


29 


0635 




ADD 


HL f HL 


05F4 


29 


0636 




ADD 


HL r HL 


05F5 


29 


0637 




ADD 


HL r HL 


05F6 


29 


0638 




ADD 


HL f HL ; SHIFT 4 BITS 


05F7 


85 


0639 




ADD 


A,L 


05F8 


6F 


0640 




LD 


L r A 


05F9 


C3E205 


06 41 

0642 , 

0643 , 

0644 , 

0645 , 




JP 


KEY1 


05FC 


0E3F 


0646 INVCMD 


LD 


C f •?• 


05FE 


CD5902 


0647 




CALL 


CONOUT 


0601 


3E2E 


0648 




LD 


A,'.' 


0603 


328006 


0649 




LD 


(NXCHR) r A 


0606 


C9 


0650 

0651 , 

0652 j 

0653 ; 

0654 j 




RET 








0655 , 


•SCAN ■ 


— SCANS 


THE OPERANDS INPUT FROM THE 






0656 j 


? CONSOLE. THE 


OPERANDS ARE SAVED IN OPl, 






0657 , 


; AS ' 


rHE ARGUMENTS TO EXECUTE THEIR COMMANDS. 






0658 , 








0607 


AF 


0659 i 


3CAN 


XOR 


A ; INITIALIZE 


0608 


218506 


0660 




LD 


HL r OPRS ; CLEAR OPERANDS 


060B 


E5 


0661 




PUSH 


HL 


060C 


DDE1 


0662 




POP 


IX ; IX=POINTER TO OPERANDS 


060E 


77 


0663 




LD 


(HL) r A 


060F 


010900 


0664 




LD 


BC f 9 


0612 


118606 


0665 




LD 


DE f OPRS+l 


0615 


EDBO 


0666 




LDIR 




0617 


327F06 


0667 




LD 


(OPCNT) r A 


061A 


CDDE05 


0668 i 


3CAN1 


CALL 


KEYIN ; GET ONE OPERAND 


06 ID 


C2FC05 


0669 




JP 


NZ f INVCMD 


0620 


79 


0670 




LD 


A r C 


0621 


328006 


0671 




LD 


(NXCHR) r A 


0624 


FE20 


0672 




CP 


it 


0626 


2806 


0673 




JR 


Z f SCAN2-$ 


0628 


FE2C 


0674 




CP 


ii 
r 


062A 


2802 


0675 




JR 


Z f SCAN2-$ 


062C 


05 


0676 




DEC 


B 


06 2D 


C8 


0677 




RET 


Z ; IF NO DATA, RET 


062E 


DD7500 


067 8 I 


3CAN2 


LD 


(IX) r L 


0631 


DD7401 


0679 




LD 


(IX+1) f H 


0634 


3A7F06 


06 80 




LD 


A f (OPCNT) 


0637 


3C 


06 81 




INC 


A 


0638 


327F06 


06 82 




LD 


(OPCNT) f A 


063B 


DD23 


06 83 




INC 


IX 


063D 


DD23 


06 84 




INC 


IX ', POINT TO NEXT OPR 


063F 


79 


06 85 




LD 


A>C 


0640 


FE20 


06 86 




CP 


ii 


0642 


28D6 


0687 




JR 


Z f SCANl-$ 


0644 


FE2C 


06 88 




CP 


ii 

r '•■■.--. 


0646 


28D2 


06 89 




JR 


Z,SCANl-$ 


0648 


C9 


06 90 
0691 


• .'.■. 

r 


RET 





PROM 16 










SD SYSTEMS Z 80 ASSEMBLER PAGE 001 


ADDR 


CODE 


STMT 


SOURCE 


STATEMENT 






06 92 


• 










06 93 


• 






0649 


E5 


0694 


FREAD 


PUSH 


HL 


064A 


D5 


0695 




PUSH 


DE 


064B 


C5 


06 96 




PUSH 


BC 


064C 


3A8206 


06 97 




LD 


A, (BCOUNT) 


064F 


FE80 


0698 




CP 


NBYTES 


0651 


200C 


0699 




JR 


NZ f FREADl-$ 


0653 


0E14 


0700 




LD 


C,READ 


0655 


115C00 


0701 




LD 


DE f FCB 


0658 


CD0500 


0702 




CALL 


FDOS ; LEAD FILE 


06 5'B 


B7 


0703 




OR 


A 


065C 


2011 


0704 




JR 


NZ f FERROR- $ 


065E 


AF 


0705 




XOR 


A 


065F 


218000 


0706 


FREAD1 


LD 


HL, BUFFER 


0662 


5F 


0707 




LD 


E f A 


0663 


3C 


0708 




INC 


A 


0664 


328206 


0709 




LD 


(BCOUNT) , A 


0667 


1600 


0710 




LD 


D,0 


0669 


19 


0711 




ADD 


HL,DE ; POINT TO NEXT DATA 


066A 


7E- 


0712 




LD 


A, (HL) 


066B 


Cl 


0713 




POP 


BC 


066C 


Dl 


0714 




POP 


DE 


066D 


El 


0715 




POP 


HL 


066E 


C9 


0716 




RET 




066F 


CI 


0717 


FERROR 


POP 


BC 


0670 


Dl 


0718 




POP 


DE 


0671 


El 


0719 




POP 


HL 


0672 


219203 


0720 




LD 


HL,MSG11 


0675 


CD8F05 


0721 




CALL 


PTXT ; ATTEMPT TO READ PAST EOF 


0678 


C36602 


0722 
0723 


• 
9 


JP 


RENTRY 


>067B 




0724 


DLAY 


DEFS 


1 


>067C 




0725 


SCR1 


DEFS 


1 


>067D 




0726 


SCR2 


DEFS 


1 


>067E 




0727 


SCR3 


DEFS 


1 


>067F 




0728 


OPCNT 


DEFS 


1 


>06 80 




0729 


NXCHR 


DEFS 


1 


>06 81 




0730 


FOPEN 


DEFS 


1 


>06 82 




0731 


BCOUNT 


DEFS 


1 


>06 83 




0732 


LAST 


DEFS 


2 


>0685 




0733 


OPRS 


DEFS 


6 


>06 85 




0734 


OPR1 


EQU 


OPRS 


>0687 




0735 


OPR2 


EQU 


OPRS+2 


>06 89 




0736 


OPR3 


EQU 


OPRS+4 


>07 85 




0737 
073 8 
0739 
0740 


SPVAL 


EQU 


OPRS+100H 



PR0M16 
ADDR CODE 



SD SYSTEMS Z80 ASSEMBLER PAGE 0016 



STMT SOURCE STATEMENT 



CROSS REFERENCE LISTING 
SYMBOL VALUE TYPE STMT 



STATEMENT REFERENCES 



ADCMP 


0439 


0309 


0374 


0365 


0337 


0296 




AORN 


05B0 


0581 


0631 










AORN1 


05C4 


0589 


0584 










AORN2 


05C6 


0591 


0588 


0586 


0582 






ASBIN 


056C 


0508 


0634 


0493 


0485 






BCOUNT 


06 82 


0731 


0709 


06 97 


0058 






BUFFER 


0080 


0022 


0706 


0084 








CLOSE 


0010 


0024 


0230 










CON IN 


024D 


0203 


0384 


0362 


0049 






CONOUT 


0259 


0213 


0647 


0573 


0550 


0537 


0533 0531 0463 0459 


CONST 


0240 


0191 


0382 


0360 








CRLF 


0580 


0530 


0610 


0524 


0466 


0356 


0283 027 8 0226 014 8 








0143 


0096 


0071 


0064 




DATA 


0068 


0016 


0434 


0404 


0344 






DELAY 


04FE 


0418 


0421 


0411 








DELAY 1 


0500 


0419 


0419 










DLAY 


06 7 B 


0724 


0408 


0056 








ECHO 


024D 


0202 


0626 


0346 


0178 






EXIT 


0000 


0014 


0233 


0229 








FCB 


005C 


0021 


0701 


0231 


0076 






FDOS 


0005 


0020 


0702 


0232 


0085 


0077 




FERROR 


066F 


0717 


0704 










FOPEN 


0681 


0730 


0227 


0072 


0060 






FREAD 


0649 


0694 


0492 


0484 


0159 






FREAD1 


065F 


0706 


0699 










HACTL 


006A 


0018 


0433 
0291 


0415 
0225 


0407 
0063 


0402 


0368 0354 0331 0299 


INVCMD 


05FC 


0646 


0669 










KEY1 


05E2 


0626 


0641 










KEYIN 


05DE 


0624 


0668 










LADD 


006 9 


0017 


0442 










LAST 


06 83 


0732 


0141 


0115 








LOOPS 


0064 


0028 












MSG1 


0286 


0243 


0046 










MSG10 


0383 


0260 


0080 










MSG11 


0392 


0262 


0720 










MSG12 


03B6 


0264 


0092 










MSG13 


03CB 


0266 


0128 










MSG14 


03E8 


0268 


0139 










MSG2 


02EB 


0250 


0065 










MSG3 


0307 


0252 


0086 










MSG-4 


0323 


0254 


0144 










MSG5 


0342 


0256 


0284 


0149 








MSG6 


0367 


0258 


0279 








v 


MSG7 


0534 


0472 


0341 










MSG8 


0541 


0474 


0379 










MSG9 


054B 


0476 


0390 










NBYTES 


0080 


0027 


0698 


0057 








NXCHR 


0680 


0729 


0671 


0649 


0287 


0152 


0089 


OPCNT 


067F 


0728 


0682 


0680 


0667 


0100 




OPEN 


000F 


0023 


0075 










OPR1 


06 85 


0734 


0369 


0357 


0332 


0292 


0099 0094 


OPR2 


0687 


0735 


0316 


0133 









PROM 16 








SD 


SYSTE 


MS Z80 ASSEMBLER PAGE 


0017 


ADDR ( 


CODE 


STMT SOURCE 


STATEMENT 








OPR3 


0689 


0736 


0370 


0358 


0333 


0293 




OPRS 


06 85 


0733 


0737 


0736 


0735 


0734 0665 0660 




PACC 


059B 


0558 


0522 


0465 


0461 


0457 0455 0237 




PADD 


0511 


0441 


0430 


0399 








PADDR 


027E 


0236 


0142 


0130 


0095 






PASP 


0574 


0521 


0239 










PPG 


0100 


0045 












PPGO 


0125 


0061 


0355 










PPGOA 


0197 


0106 


0102 










PPGOB 


0140 


0071 


0091 










PPGOC 


015E 


0083 


0079 


0074 








PPG1 


019E 


0109 


0138 










PPG10 


01DC 


0139 


0175 










PPG10A 


01E8 


0143 


0300 


0282 








PPG11 


01F7 


0148 


0154 










PPG2 


01A1 


0110 


0108 










PPG3 


01A8 


0113 


0122 










PPG4 


01CD 


0132 


0126 










PPROG 


04E0 


0399 


0359 










PREAD 


0506 


0430 


0371 


0334 


0294 






PRG1A 


045E 


0337 


0352 










PRG2A 


0480 


0353 


0392 


0386 


0376 


0349 




PRG7A 


04B6 


0374 


0389 










PROG 


044C 


0330 


0155 










PROG1 


0457 


0334 


0338 










PROG2 


0465 


0340 


0336 










PROG3 


0487 


0356 


0351 


0339 








PROG4 


048A 


0357 












PROG5 


0491 


0359 


0366 










PROG5A 


04A0 


0365 


0361 










PROG6 


04A5 


0367 












PROG6A 


04A9 


0369 












PROG7 


04B0 


0371 


0375 










PROG 8 


04BD 


0377 


0373 










PROG 8 A 


04D2 


03 87 


0383 










PROG 9 


04D8 


0390 


0364 










PRTER 


0515 


0453 


0388 


0345 








PRVAL 


05A4 


0567 


0563 










PTXT 


058F 


0546 


0721 


0552 


0391 


0380 0342 0285 0280 0150 


- 






0145 


0140 


0129 


0093 0087 0081 0066 0047 


RBOUT 


0000 


0019 












READ 


0014 


0025 


0700 










READO 


040C 


0283 


0289 










READ1 


042A 


0294 


0297 










READ2 


03FD 


0278 


0070 










RENTRY 


0266 


0224 


0722 


0181 


0147 


0082 




SCAN 


0607 


0659 


0286 


0151 


0088 






SCAN1 


061A 


0668 


0689 


06 87 








SCAN2 


062E 


0678 


0675 


0673 








SCRl 


067C 


0725 


0132 


0120 


0118 


006 8 




SCR2 


067D 


0726 












SCR3 


067E 


0727 


0110 


0107 








SETDLY 


0118 


0055 


0053 


0051 








SETDMA 


001A 


0026 


0083 










SPACE 


058A 


0536 


0523 










SPVAL 


0785 


0737 


0061 


0045 








TBASE 


0100 


0015 


0037 











PR0M16" 






SD 


SYSTEMS Z 80 ASSEMBLER 


ADDR CODE 


STMT 


SOURCE 


STATEMENT 






TCHKO 05D7 




0609 


0606 






TERMCK 05C9 




0601 


0629 






THDR 020D 




0159 


0161 0109 


0097 




THDR1 0229 




0174 


0166 






TWDG 0553 




04 84 


0172 0170 


016 8 


0164 0123 Oil 


YORN 022D 




0178 


0281 0186 


0146 


0069 


ERRORS=0000 













PAGE 0018 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z80 ASSEMBLER PAGE 0001 



ADDR CODE 



STMT SOURCE STATEMENT 



>0000 
>0100 
>0068 
>0069 
>006A 
>0000 
>0005 
>005C 
>0080 
>000F 
>0010 
>0014 
>001A 
>0080 
>0064 



>0100 



0100 
0103 
0106 
0109 
010B 
010E 
0110 
0112 
0114 
0116 
0118 
0119 
011C 
01 IE 



318207 

218802 

CD8C05 

1E25 

CD4F02 

FE31 

3 806 

1E32 

2802 

1E4A 

7B 

327806 

3E80 

327F06 



0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 
0010 
0011 
0012 
0013 
0014 
0015 
0016 
0017 
0018 
0019 
0020 
0021 
0022 
0023 
0024 
0025 
0026 
0027 
0028 
0029 
0030 
0031 
0032 
0033 
0034 
0035 
0036 
0037 
0038 
0039 
0040 
0041 
0042 
0043 
0044 
0045 
0046 
0047 
0048 
0049 
0050 
0051 
0052 
0053 
0054 
0055 
0056 
0057 
0058 
0059 



NAME 



PROM32 



2732 PROM PROGRAMMER CONTROL PROGRAM 

SDOS ENVIRONMENT 

9/27/79 



VERSION 1.3 



SYSTEM EQUATES 



CP/M COMPATIBLE 



8/26/80 



EXIT 

TBASE 

DATA 

LADD 

HACTL 

RBOUT 

FDOS 

FCB 

BUFFER 

OPEN 

CLOSE 

READ 

SETDMA 

NBYTES 

LOOPS 



EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 
EQU 



OH 

100H 

6 8H 

69H 

6 AH 



5 

5CH 

80H 

15 

16 

20 

26 

128 

100 



BASE OF TRANSIENT AREA 

DATA PORT 

LOW ADDRESS PORT 

HIGH ADDRESS + CONTROL PORT 



PSECT ABS 

ORG TBASE ; START AT 100H 

PROGRAM PROM ENTRY POINT 



PPG LD 
LD 

CALL 
LD 

CALL 
CP 
JR 
LD 
JR 
LD 

SETDLY: LD 
LD 
LD 
LD 



SP/SPVAL 

HL,MSG1 

PTXT 

E,25H 

CONIN 

31H 

C f SETDLY 

E,32H 

Z , SETDLY 

E,4AH 

A,E 

(DLAY) r A 

A , NBYTES 

(BCOUNT) ,A 



"PROM32 VERSION 1.3" 



PROM32 4K EPROM PROGRAMMING 



ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0002 



STMT SOURCE STATEMENT 



0121 


AF 


0060 




XOR 


A 




0122 


327E06 


0061 




LD 


(FOPEN),A 


0125 


318207 


0062 


PPGO 


LD 


SP,SPVAL 




0128 


AF 


0063 




XOR 


A ; 


', CLEAR ACC 


0129 


F620 


0064 




OR 


20H 


f STROBE OFF 


01-2B 


D36A 


0065 




OUT 


(HACTL) ,A 


012D 


CD7D05 


0066 




CALL 


CRLF 




0130 


21EB02 


0067 




LD 


HL,MSG2 




0133 


CD8C05 


0068 




CALL 


PTXT ., 


• "READY TO LOAD A FILE ?" 


0136 


210000 


0069 




LD 


HL,0 




0139 


227 906 


0070 




LD 


(SCR1) ,HL ;CLEAR BYTE COUNTER 


013C 


CD2F02 


0071 




CALL 


YORN 




013F 


D2FD03 


0072 




JP 


NC f READ2 


; IF NOT f CHK READ 


0142 


CD7D05 


0073 


PPGOB 


CALL 


CRLF 




0145 


3A7E06 


0074 




LD 


A, (FOPEN) 




0148 


B7 


0075 




OR 


A 




0149 


2015 


0076 




JR 


NZ,PPG0C- 


-■$■■■ 


014B 


OEOF 


0077 




LD 


COPEN 




014D 


115C00 


0078 




LD 


DE,FCB 




0150 


CD0500 


007 9 




CALL 


FDOS 




0153 


FEFF 


0080 




CP 


255 




0155 


2009 


0081 




JR 


NZ f PPGOC- 


-$ 


0157 


218303 


0082 




LD 


HL f MSG10 




015A 


CD8C05 


0083 




CALL 


PTXT 




015D 


C36 802 


0084 




JP 


RENTRY 




0160 


0E1A 


0085 


PPGOC 


LD 


C r SETDMA 




0162 


118000 


0086 




LD 


DE f BUFFER 


0165 


CD0500 


0087 




CALL 


FDOS 




0168 


210703 


0088 




LD 


HL r MSG3 




016B 


CD8C05 


0089 




CALL 


PTXT j 


•■ "HEX LOAD ADDRESS, # BYTES ft 


016E 


CD0406 


0090 




CALL 


SCAN j 


•COLLECT DATA 


0171 


3A7D06 


0091 




LD 


A f (NXCHR) 




0174 


FE2E 


0092 




CP 


i i 

• 




0176 


28CA 


0093 




JR 


Z, PPGOB- $ 


0178 


21B603 


0094 




LD 


HL r MSG12 




017B 


CD8C05 


0095 




CALL 


PTXT 




017E 


2A8206 


0096 




LD 


HL f (OPR1) 




0181 


CD8002 


0097 




CALL 


PADDR 




0184 


CD7D05 


0098 




CALL 


CRLF 




0187 


CD0F02 


0099 




CALL 


THDR j 


• READ ADDR/#BYTES 1ST LINE 


01 8A 


E5 


0100 




PUSH 


HL 




018B 


ED5B8206 


0101 




LD 


DE, (OPR1) 


? LOAD ADDRESS ENTERED 


018F 


3A7C06 


0102 




LD 


A f (OPCNT) 




0192 


A7 


0103 




AND 


A 




0193 


2804 


0104 




JR 


Z f PPGO A- 1 


? ; IF NO OPR'S JUMP 


0195 


ED52 


0105 




SBC 


HL,DE , 


', COMPUTE OFFSET 


0197 


E5 


0106 




PUSH 


HL 




0198 


Dl 


0107 




POP 


DE ; 


', OFFSET REG 


0199 


El 


0108 


PPGOA 


POP 


HL 




019A 


ED537B06 


0109 




LD 


(SCR3) f DE ; SAVE OFFSET 


019E 


1803 


0110 




JR 


PPG2-$ 




01A0 


CD0F02 


0111 


PPG1 


CALL 


THDR 


? LOAD ADDR/# BYTES 


01 A3 


ED5B7B06 


0112 


PPG2 


LD 


DE f (SCR3) 


\ 


01A7 


B7 


0113 




OR 


A 3 


\ CLEAR CARRY 


01A8 


ED 5 2 


0114 




SBC 


HL f DE 


? SUBTRACT OFFSET 


01AA 


CD5005 


0115 


PPG3 


CALL 


TWDG t 


} READ A BYTE 


01AD 


77 


0116 




LD 


(HL) r A -, 


; STORE IT 


Q1AE 


228006 


0117 




LD 


(LASt) -,m 





PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z80 ASSEMBLER PAGE 0003 



ADDR CODE 



STMT SOURCE STATEMENT 



01B1 
01B2 
01B3 
01B6 
01B7 
01BA 
01BB 
01BD 
01C0 
01C1 
01C2 
01C4 
01C5 
01C8 
01CB 
01CE 
01CF 
01D2 
01D6 
01D7 
01D8 
01D9 
01DB 
01DE 
01E1 
01E4 
01E7 
01EA 
01ED 
01F0 
01F3 
01F6 
01F9 
01FC 
01FF 
0202 
0205 
0208 
020A 
020C 



020F 
0212 
0214 
0216 
0217 
0218 
021B 
021C 
021E 
021F 
0222 
0223 
0226 
0227 
022 A 



23 

E5 

2A7906 

23 

227906 

El 

10ED 

CD5005 

AF 

81 

280B 

E5 

21CB03 

CD8C05 

CD8002 

El 

2A7906 

ED4B8406 

2B 

OB 

A7 

ED42 

DAA001 

21E803 

CD8C05 

2A8006 

CD8002 

CD7D05 

212303 

CD8C05 

CD2F02 

D26802 

CD7D05 

214203 

CD8C05 

CD0406 

3A7D06 

FE2E 

2 8ED 

C33D04 



CD4606 

FE3A 

20F9 

AF 

4F 

CD5005 

A7 

280D 

47 

CD5005 

67 

CD5005 

6F 

CD5005 

C9 



0118 
0119 
0120 
0121 
0122 
0123 
0124 
0125 
0126 
0127 
0128 
0129 
0130 
0131 
0132 
0133 
0134 
0135 
0136 
0137 
0138 
0139 
0140 
0141 
0142 
0143 
0144 
0145 
0146 
0147 
0148 
0149 
0150 
0151 
0152 
0153 
0154 
0155 
0156 
0157 
0158 
0159 
0160 
0161 
0162 
0163 
0164 
0165 
0166 
0167 
0168 
0169 
0170 
0171 
0172 
0173 
0174 
0175 



PPG4 



PPG10 



PPG10A 



PPG11 



THDR 



INC 

PUSH 

LD 

INC 

LD 

POP 

DJNZ 

CALL 

XOR 

ADD 

JR 

PUSH 

LD 

CALL 

CALL 

POP 

LD 

LD 

DEC 

DEC 

AND 

SBC 

JP 

LD 

CALL 

LD 

CALL 

CALL 

LD 

CALL 

CALL 

JP 

CALL 

LD 

CALL 

CALL 

LD 

CP 

JR 

JP 



CALL 

CP 

JR 

XOR 

LD 

CALL 

AND 

JR v 

LD 

CALL 

LD 

CALL 

LD 

CALL 

RET 



HL 

HL 

HL, (SCR1) 

HL 

(SCR1) ,HL 

HL 

PPG3-$ ; 

TWDG ; 

A 

A r C 

Z,PPG4-$ 

HL 

HL,MSG13 

PTXT 

PADDR 

HL 

HL,(SCR1) 

BC, (OPR2) 

HL ; 

BC 

A 

HL,BC 

C,PPG1 ; 

HL,MSG14 

PTXT 

HL, (LAST) 

PADDR 

CRLF 

HL r MSG4 

PTXT ; 

YORN 

NC f RENTRY 

CRLF 

HL f MSG5 

PTXT 

SCAN 

A, (NXCHR) 
i # i 

Z,PPGll-$ 
PROG 



FREAD ; 

• ■ ■ ■ 

NZ,THDR-$ 

A 

C,A 

TWDG 

A 

Z,THDRl-$ 

B,A 

TWDG ; 

H f A 

TWDG ; 

L,A 

TWDG ; 



; BYTE COUNTER 



READ ENTIRE LINE 
READ CHECKSUM 



CHECKSUM ERROR 



; # OF BYTES TO READ 
IF 0,THEN FFFF 



IF MORE, JUMP 



"READY TO PROGRAM A PROM ?" 



"MEM START, MEM END, PROM START" 



IF ' . ' EXIT 



LOOK FOR 



i • i 



CLEAR CHECKSUM 

IS RECORD LENGTH 0? 

GET FIRST BYTE OF ADDRESS 
GET SECOND BYTE 
GET RECORD TYPE 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0004 



ADDR CODE 



STMT SOURCE STATEMENT 



022B 
022C 



022F 
0232 
0233 
0235 
023 8 
0239 
023B 
023C 
023E 
0240 
0241 



Fl 
C3DE01 



CD4F02 

4F 

FE2E 

CA6 802 

B7 

FE4E 

C8 

FE59 

20EF 

37 

C9 



0242 C5 

0243 D5 

0244 E5 

0245 0E0B 
0247 CD0500 
024A B7 
024B El 
024C Dl 
024D CI 
024E C9 

>024F 

024F C5 

0250 D5 

0251 E5 

0252 0E01 
0254 CD0500 

0257 El 

0258 Dl 

0259 CI 
025A C9 

025B D5 

025C C5 

025D E5 

025E 59 

025F 0E02 

0261 CD0500 

0264 El 

0265 CI 

0266 Dl 

0267 C9 

026 8 AF 

0269 D36A 

026B CD7D05 

026E 3A7E06 

0271 B7 

0272 CA0000 
0275 0E10 
0277 115C00 



0176 THDR1 POP 

0177 JP 

0178 ; 

0179 ; 

0180 TORN CALL 

0181 LD 

0182 CP 

0183 JP 

0184 OR 

0185 CP 

0186 RET 

0187 CP 

0188 JR 

0189 SCF 

0190 RET 

0191 ; 

0192 ; 

0193 CONST PUSH 

0194 PUSH 

0195 PUSH 

0196 LD 

0197 CALL 

0198 OR 

0199 POP 

0200 POP 

0201 POP 

0202 RET 

0203 ; 

0204 ECHO: 

0205 CONIN PUSH 

0206 PUSH 

0207 PUSH 

0208 LD 

0209 CALL 

0210 POP 

0211 POP 

0212 POP 

0213 RET 

0214 ; 

0215 CONOUT: PUSH 

0216 PUSH 

0217 PUSH 

0218 LD 

0219 LD 

0220 CALL 

0221 POP 

0222 POP 

0223 POP 

0224 RET 

0225 ; 

0226 RENTRY XOR 

0227 OUT 

0228 CALL 

0229 LD 

0230 OR 

0231 JP 

0232 LD 

0233 LD 



AF 
PPG10 



ECHO 

C,A 

ii 

• 

Z r RENTRY 

A 

•N* 

Z 

lyl 

NZ r YORN-$ 



BC 

DE 

HL 

C f 0BH 

5 

A 

HL 

DE 

BC 



BC 

DE 

HL 

C,l 

5 

HL 

DE 

BC 



DE 

BC 

HL 

E,C 

C f 02 

5 

HL 

BC 

DE 



A 

(HACTL) , A 
CRLF 

A f (FOPEN) 
A 

Z r EXIT 
C, CLOSE 
DE,FCB 



; CALL SDOS CONSOLE STATUS 



; CALL SDOS CONSOLE INPUT 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z80 ASSEMBLER PAGE 0005 



ADDR CODE 



027A 
027D 



0280 
0281 
0284 
0285 



0288 



029B 
029F 



02CB 
02CD 



02E8 
02EA 
02EB 



0306 
0307 



0322 
0323 



CD0500 
C30000 



7C 

GD9805 
7D 
C37105 



50524F4D 

2D333220 

56455253 

494F4E20 

312E33 

0D0A0D0A 

49532054 

48495320 

53595354 

454D2052 

554E4E49 

4E472032 

2E4P2C20 

322E352G 

204F5220 

342E3020 

4D485A3F 

ODOA 

28322E30 

202D2030 

2C20322E 

35202D20 

312C2034 

2E30202D 

203229 

OAOD 

03 

52454144 

5920544F 

204C4F41 

44204120 

46494C45 

2028592F 

4E293F 

03 

48455820 

4C4F4144 

20414444 

52455353 

2C202320 

42595445 

533A20 

03 

52454144 

5920544F 

2050524F 

4752414D 



STMT SOURCE STATEMENT 



0234 
0235 

0236 ; 

0237 ; 

023 8 PADDR 

0239 

0240 

0241 

0242 

0243 

0244 

0245 MSG1 



CALL 
JP 



LD 

CALL 
LD 
JP 



DEFM 



0246 
0247 



DEFW 
DEFM 



0248 
0249 



DEFW 
DEFM 



0250 
0251 
0252 MSG2 



DEFW 
DEFB 
DEFM 



0253 
0254 MSG3 



DEFB 
DEFM 



0255 
0256 MSG4 



DEFB 
DEFM 



FDOS 
EXIT 



A r H 
PACC 
A f L 
PASP 



•PROM-32 VERSION 1.3' 



0A0DH,0A0DH 

'IS THIS SYSTEM RUNNING 2.0, 2.5, OR 4.0 



OAODH 

'(2.0 - 0, 2.5 - 1, 4.0 - 2) ' 



ODOAH 

03H 

'READY TO LOAD A FILE (Y/N) ? ' 



03H 

'HEX LOAD ADDRESS, # BYTES: ' 



03H 

'READY TO PROGRAM A PROM (Y/N)?' 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0006 



ADDR CODE 



STMT SOURCE STATEMENT 



0341 
0342 



0366 
0367 



0382 
0383 



0391 
0392 



03B5 
03B6 



03CA 
03CB 



03E7 
03 E8 



03 PC 



20412050 

524F4D20 

28592F4E 

293F 

03 

4D454D4F 

52592053 

54415254 

2C4D454D 

4F525920 

454E442C 

50524F4D 

20535441 

52543A20 

03 

52454144 

5920544F 

20524541 

44204120 

50524F4D 

2028592F 

4E293F 

03 

46494C45 

204E4F54 

20464F55 

4E44 

03 

41545445 

4D505449 

4E472054 

4F205245 

41442050 

41535420 

454E4420 

4F462046 

494C45 

03 

4C4F4144 

20535441 

52542041 

44445245 

53533D20 

03 

43484543 

4B53554D 

20455252 

4F522041 

54204C4F 

43415449 

4F4E5320 

03 

4C4F4144 

2020454E 

44202041 

44445245 

53533D20 

03 



0257 
0258 MSG5 



DEFB 
DEFM 



0259 
0260 MSG6 



DEFB 
DEFM 



0261 

0262 MSG10 



0263 

0264 MSG11 



DEFB 
DEFM 



DEFB 
DEFM 



0265 

0266 MSG12 



DEFB 
DEFM 



0267 

026 8 MSG13 



DEFB 
DEFM 



0269 

0270 MSG14 



0271 



DEFB 
DEFM 



03H 

•MEMORY START, MEMORY END, PROM START: ' 



03H 

'READY TO READ A PROM (Y/N) ? f 



03H 

'FILE NOT FOUND' 



03H 



•ATTEMPTING TO READ PAST END OF FILE 



03H 

•LOAD START ADDRESS= ' 



03H 

'CHECKSUM ERROR AT LOCATIONS ' 



03H 

'LOAD END ADDRESS= ' 



DEFB 



03H 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z80 ASSEMBLER PAGE 0007 



ADDR CODE 



STMT SOURCE STATEMENT 



03FD 
0400 
0403 
0406 
0409 
040C 
040F 
0412 
0415 
0418 
041B 
041D 
041F 
0422 
0425 
0426 
0429 
042B 



042E 
042F 



0432 
0436 
0437 



0443 
0445 
0447 



CD7D05 

216703 

CD8C05 

CD2F02 

D2EA01 

CD7D05 

214203 

CD8C05 

CD0406 

3A7D06 

FE2E 

28ED 

CDF004 

CDFE04 

77 

CD2E04 

20F7 

C3EA01 



13 
23 



0430 D5 

0431 E5 



ED5B8406 

13 

A7 



043 8 ED52 

043A El 

043B Dl 

043C C9 



043D CDF004 
0440 CDFE04 



FEFF 
2007 
CD2E04 



04 4 A 2 OF 4 



0272 
0273 
0274 
0275 
0276 
0277 
0278 
0279 
0280 
0281 
0282 
0283 
0284 
0285 
0286 
0287 
0288 
0289 
0290 
0291 
0292 
0293 
0294 
0295 
0296 
0297 
0298 
0299 
0300 
0301 
0302 
0303 
0304 
0305 
0306 
0307 
0308 
0309 
0310 
0311 
0312 
0313 
0314 
0315 
0316 
0317 
0318 
0319 
0320 
0321 
0322 
0323 
0324 
0325 
0326 
0327 
0328 
0329 



PROM READ SEQUENCE 



READ2 



READ0 



READ1 



CALL 


CRLF 


LD 


HL r MSG6 


CALL 


PTXT ; 


CALL 


YORN 


JP 


NC,PPG10A 


CALL 


CRLF 


LD 


HL,MSG5 


CALL 


PTXT ; 


CALL 


SCAN ; 


LD 


A f (NXCHR) 


CP 


t i 

• 


JR 


Z,READ0-$ 


CALL 


RDSET 


CALL 


PREAD ; 


LD 


(HL) , A ; 


CALL 


ADCMP ; 


JR 


NZ,READ1- 


JP 


PPG10A ; 



READ PROM INTO MEMORY 
"READY TO READ (Y/N) ?" 
; NO, THEN PROGRAM 



"MEM START, MEM END, PROM START" 
INPUT PARAMETERS 



READ A BYTE OF PROM 
SAVE BYTE IN MEM 
INC ADDR & COMPARE 
$ ; IF NOT END, THEN JUMP 
WHEN COMPLETE, RETURN 



INC HL & DE THEN COMPARE HL WITH (IX) 
EXIT WITH ZERO FLAG SET IF EQUAL 



ADCMP 



INC 


DE 


INC 


HL 


PUSH 


DE 


PUSH 


HL 


LD 


DE 


INC 


DE 


AND 


A 


SBC 


HL 


POP 


HL 


POP 


DE 


RET 





; INC PROM ADDR 



; SAVE HL & DE 
, (OPR2) ? GET RAM END ADDR 



,DE ; COMPARE 



PROGRAMMING SEQUENCE 



PROG: 
PROG1 



PRGIA 



CALL RDSET 

CALL PREAD ; READ A BYTE (PROM) 

CP 0FFH ; CHECK FOR ERASED BYTES 

JR NZ,PROG2-$ ; IF NOT ERASED JUMP 

CALL ADCMP ; INC ADDR & CHECK FOR END 

JR NZ,PROGl-$ ; LOOP UNTIL END 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z80 ASSEMBLER PAGE 0008 



ADDR CODE 



STMT SOURCE STATEMENT 



044C 
044E 
044F 
0450 
0453 
0456 
0457 
0458 
045B 
045E 
045F 
0461 
0463 
0465 
0467 
0469 
046B 
046D 
0470 
0473 
0476 
047A 
047B 
047D 
047E 
047F 
0481 
0483 
0486 
0489 
04 8B 
048E 
0490 
0492 
0495 
0497 
0499 
049B 
049E 
04A1 
04A2 
04A4 
04A7 
04A9 
04AB 
04 AC 
04AD 
04B0 
04B3 
04B4 
04B7 
04B9 
04BC 
04BE 
04C0 
04C1 
04C4 
04C6 



1822 

F5 

E5 

213105 

CD8C05 

El 

Fl 

CD1005 

CD4F02 

4F 

FE2E 

2806 

FE43 

2809 

18DE 

3E20 

D36A 

C32501 

CD7D05 

2A8206 

ED5B8606 

7A 

F6E0 

57 

7A 

CBF7 

D36A 

CDCE04 

CD4202 

2807 

CD4F02 

FE2E 

2834 

CD2E04 

20E7 

3E20 

D36A 

CDF004 

CDFE04 

BE 

2007 

CD2E04 

20F5 

18BE 

F5 

E5 

213E05 

CD8C05 

El 

CD4202 

2807 

CD4F02 

FE2E 

28A9 

Fl 

CD1005 

18DE 

214805 



0330 
0331 
0332 
0333 
0334 
0335 
0336 
0337 
0338 
0339 
0340 
0341 
0342 
0343 
0344 
0345 
0346 
0347 
0348 
0349 
0350 
0351 
0352 
0353 
0354 
0355 
0356 
0357 
0358 
0359 
0360 
0361 
0362 
0363 
0364 
0365 
0366 
0367 
0368 
0369 
0370 
0371 
0372 
0373 
0374 
0375 
0376 
0377 
0378 
0379 
03 80 
0381 
0382 
03 83 
0384 
0385 
0386 
03 87 



PROG2 



PRG2A 



PROG3 
PROG4 



PROG5 : 



PROG5A 
PROG6 

PROG6A: 
PROG7 

PRG7A 

PROG 8 



PROG 8 A 
PROG 9 



JR 

PUSH 

PUSH 

LD 

CALL 

POP 

POP 

CALL 

CALL 

LD 

CP 

JR 

CP 

JR 

JR 

LD 

OUT 

JP 

CALL 

LD 

LD 

LD 

OR 

LD 

LD 

SET 

OUT 

CALL 

CALL 

JR 

CALL 

CP 

JR 

CALL 

JR 

LD 

OUT 

CALL 

CALL 

CP 

JR 

CALL 

JR 

JR 

PUSH 

PUSH 

LD 

CALL 

POP 

CALL 

JR 

CALL 

CP 

JR 

POP 

CALL 

JR 

LD 



PROG3-$ ; 

AF 

HL 

HL,MSG7 

PTXT ; 

HL 

AF 

PRTER ; 

ECHO ; 

C f A 

Z,PRG2A-$ 
'C 

Z,PROG3-$ 
PRGlA-$ ; 
A,20H 
(HACTL) r A 
PPG0 
CRLF 

HL f (OPR1) 
DE, (OPR3) 
A,D 
0E0H 
D,A 
A,D 
6, A 

(HACTL) r A 
PPROG ; 
CONST 
Z f PROG5A-i 

CONIN 

i i 

• 

Z,PROG9-$ 

ADCMP 

NZ,PROG5- 

A,20H 

(HACTL) r A 

RDSET 

PREAD ; 

(HL) 

NZ,PROG8- 

ADCMP ; 

NZ,PROG7- 

PRG2A-$ ; 

AF 

HL 

HL,MSG8 

PTXT 

HL 

CONST 

Z r PROG8A-: 

CONIN 
i i 

Z f PRG2A-$ 

AF 

PRTER ; 

PRG7A-$ ; 

HL f MSG9 



GO PROGRAM PROM 



"NOT ERASED' 



PRINT BAD LOCATION 
READ FROM CONSOLE 

CHECK FOR PERIOD 

; EXIT 

CHECK FOR 'C 1 

; CONTINUE IF 'C 1 ENTERED 

IF NOT , PRINT NEXT ERROR 



; SET MEM START ADDR 
; SET PROM START ADDR 



PROGRAM ONE BYTE 



INC ADDR & CHECK END 
$ ; FINISH THIS LOOP 

; TURN OFF ALL CONTROL LINES 

READ PROM DATA 

$ ; IF NOT MATCH, JUMP 

CHECK FOR END 
$ 

EXIT, COMPLETE 



"BAD LOCATION" 



PRINT ERROR MESSAGE 
PRINT ALL BAD LOCATIONS 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0009 



ADDR CODE 



STMT SOURCE STATEMENT 



04C9 


CD8C05 


0388 




CALL 


PTXT ; ABORTED 




04CC 


189B 


0389 

0390 , 

0391 , 

0392 , 




JR 


PRG2A-$ 








0393 , 


\ PULSE 


ONE PROM LOCATION 








0394 , 














0395 , 


f 








04CE 


7B 


0396 PPROG: 


LD 


A f E 




04CF 


D369 


0397 




OUT 


(LADD) , A ; LATCH LSB 


OF 


04D1 


7A 


0398 




LD 


A f D 




04D2 


D36A 


0399 




OUT 


(HACTL)rA 




04D4 


7E 


0400 




LD 


A r (HL) ; FETCH DATA 




04D5 


D368 


0401 




OUT 


(DATA) ,A ; OUTPUT DATA 




04D7 


7A 


0402 




LD 


A,D 




04D8 


CBAF 


0403 




RES 


5, A ; TURN ON PROG PULSE 


04DA 


D36A 


0404 




OUT 


(HACTL) f A 




04DC 


3A7806 


0405 
0406 
0407 




LD 


A f (DLAY) ; 2.0 MHZ - 

; 2.5 MHZ - 
; 4.0 MHZ - 


25H 
32H 
4 AH 


04DF 


CDE804 


0408 




CALL 


DELAY ; 50 MILLISEC DELAY 




04E2 


7A 


0409 




LD 


A,D 




04E3 


CBEF 


0410 




SET 


5, A ; PROGRAM PULSE OFF 




04E5 


D36A 


0411 




OUT 


(HACTL) r A 




04E7 


C9 


0412 
0413 j 


> 


RET 






04E8 


06BF 


0414 DELAY 


LD 


B,191 




04EA 


10FE 


0415 DELAY1 


DJNZ 


DELAYl-$ 




04 EC 


3D 


0416 




DEC 


A 




04ED 


20F9 


0417 




JR 


NZ f DELAY- $ 




04EF 


C9 


0418 

0419 , 

0420 , 


> 

» 


RET 






04F0 


2A8206 


0421 RDSET: 


LD 


HL r (OPRl) 




04F3 


ED5B8606 


0422 




LD 


DE f (OPR3) 




04F7 


7A 


0423 




LD 


A,D 




04F8 


E60F 


0424 




AND 


0FH 




04FA 


CBEF 


0425 




SET 


5, A 




04FC 


57 


0426 




LD 


D r A 




04FD 


C9 


0427 

0428 , 

0429 ; 




RET 










0430 \ 


' READ 


ONE LOCATION OF PROM 








0431 j 














0432 i 










04FE 


7B 


0433 I 


3 READ: 


LD 


A f E 




04FF 


D369 


0434 




OUT 


(LADD) ,A ; LATCH LSB 


OF 


0501 


7A 


0435 




LD 


A r D 




0502 


D36A 


0436 




OUT 


(HACTL) ,A 




0504 


CBAF 


0437 




RES 


5 f A 




0506 


D36A 


043 8 




OUT 


(HACTL), A 




0508 


DB6 8 


0439 




IN 


A f (DATA) 




050A 


F5 


0440 




PUSH 


AF 




050B 


7A 


0441 




LD 


A f D 




050C 


D36A 


0442 




OUT 


(HACTL) , A 




050E 


Fl 


0443 




POP 


AF 




050F 


C9 


0444 
0445 j 


. ' ■ ■ ■ ' 


RET 







PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0010 



ADDR CODE 



STMT SOURCE STATEMENT 







0446 , 


r PRINTS ADDR/ BAD DATA/GOOD DATA 






0447 , 


', OF ERROR LOCATION 










0448 , 
















0449 , 












0510 


47 


0450 PRTER 


LD 


B,A 






0511 


7A 


0451 




LD 


A f D 






0512 


E60F 


0452 




AND 


0FH 






0514 


CD9805 


0453 




CALL 


PACC 


• 


PRINT MSB OF ADDR 


0517 


7B 


0454 




LD 


A,E 






0518 


CD9805 


0455 




CALL 


PACC 


• 


PRINT LSB OF ADDR 


051B 


0E20 


0456 




LD 


C f 20H 






051D 


CD5B02 


0457 




CALL 


CONOUT 






0520 


78 


0458 




LD 


A r B 






0521 


CD9805 


0459 




CALL 


PACC 


• 


PRINT BAD DATA 


0524 


0E20 


0460 




LD 


C f 20H 






0526 


CD5B02 


0461 




CALL 


CONOUT 






0529 


7E 


0462 




LD 


A f (HL) 






052A 


CD9805 


0463 




CALL 


PACC 


• 


PRINT GOOD DATA 


052D 


CD7D05 


0464 




CALL 


CRLF 






0530 


C9 


0465 

0466 i 

0467 ; 

0468 ; 

0469 ] 




RET 








0531 


4E4F5420 


0470 I 


4SG7 


DEFM 


' NOT ERASED ' 




45524153 
















45442020 














053D 


03 


0471 




DEFB 


03H 






053E 


42414420 


0472 I 


1SG8 


DEFM 


'BAD LOC 


i 




4C4F4320 
















20 














0547 


03 


0473 




DEFB 


03H 






0548 


41424F52 


0474 I 


1SG9 


DEFM 


' ABORTED « 






544544 














054F 


03 


0475 

0476 j 

0477 j 

0478 j 




DEFB 


03H 










0479 j 


► TWDG- 


-READ AND 


CONVERT 


2 


DIGITS TO BINARY 






0480 , 
















0481 , 












0550 


CD4606 


0482 •] 


PWDG 


CALL 


FREAD 


• 


READ A CHAR r 1ST DIGIT 


0553 


CD6905 


0483 




CALL 


ASBIN 


• 
i 


ASCII TO BINARY 


0556 


07 


0484 




RLCA 








0557 


07 


0485 




RLCA 








0558 


07 


0486 




RLCA 








0559 


07 


0487 




RLCA 








055A 


C5 


0488 




PUSH 


BC 


• 


SAVE C REG (CKSM) 


055B 


4F 


0489 




LD 


C r A 


< • 


SAVE 1ST DIGIT 


055C 


CD4606 


0490 




CALL 


FREAD 


• 


2ND DIGIT 


055F 


CD6905 


0491 




CALL 


ASBIN 






0562 


Bl 


0492 




OR 


C 


• 


OR IN MSB'S 


0563 


CI 


0493 




POP 


BC 


• 


RESTORE CKSM 


0564 


F5 


0494 




PUSH 


AF 


• 


SAVE ACC 


0565 


81 


0495 




ADD 


A f C 


• 


ADD IN 2 DIGITS TO CKSM 


0566 


4F 


0496 




LD 


C f A 






0567 


Fl 


0497 




POP 


AF 


• 


RESTORE ACC 


056 8 


C9 


0498 




RET 









PROM32 4K EPROM PROGRAMMING 



ADDR CODE 



SD SYSTEMS Z80 ASSEMBLER PAGE 0011 



STMT SOURCE STATEMENT 







0499 , 












0500 < 












0501 , 












0502 t 












0503 j 


? ASCII 


TO BINARY CO 






0504 j 












0505 , 








0569 


D630 


0506 ASBIN 


SUB 


03 OH 


056B 


FEOA 


0507 


CP 


10 


056D 


F8 


0508 


RET 


M 


056E 


D607 


0509 


SUB 


7 


0570 


C9 


0510 


RET 








0511 j 












0512 j 












0513 j 












0514 j 












0515 j 









PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z80 ASSEMBLER PAGE 0012 



ADDR CODE 



STMT SOURCE STATEMENT 







0517 


» 












0518 


' 








0571 


C5 


0519 PASP 


PUSH 


BC 




0572 


CD9805 


0520 




CALL 


PACC 




0575 


CD8705 


0521 




CALL 


SPACE 




057 8 


CD7D05 


0522 




CALL 


CRLF 




057B 


CI 


0523 




POP 


BC 




057C 


C9 


0524 
0525 

0526 , 

0527 , 




RET 






057D 


0E0D 


0528 CRLF 


LD 


C f 0DH 




057P 


CD5B02 


0529 




CALL 


CONOUT 




0582 


OEOA 


0530 




LD 


C r 0AH 




0584 


C35B02 


0531 

0532 , 

0533 j 


> 

r 
* 


JP 


CONOUT 




05 87 


0E20 


0534 SPACE 


LD 


C f ' • 




0589 


C35B02 


0535 

0536 | 

0537 ; 
053 8 j 

0539 j 

0540 , 

0541 , 

0542 ; 

0543 , 


1 PRINT 


JP 
TEXT 


CONOUT 




058C 


7E 


0544 1 


?TXT 


LD 


A, (HL) 


; FETCH A 1 


058D 


FE03 


0545 




CP 


3 




058F 


C8 


0546 




RET 


Z 




0590 


4F 


0547 




LD 


C,A 




0591 


CD5B02 


0548 




CALL 


CONOUT 




0594 


23 


0549 




INC 


HL 




0595 


C38C05 


0550 

0551 ; 

0552 , 




JP 


PTXT 








0553 ; 


I PRINT 


ACCUMULATOR 








0554 , 














0555 , 










0598 


F5 


0556 1 


?ACC 


PUSH 


AF 




0599 


OF 


0557 




RRCA 






059A 


OF 


0558 




RRCA 






059B 


OF 


0559 




RRCA 






059C 


OF 


0560 




RRCA 






059D 


CDA105 


0561 




CALL 


PRVAL 




05A0 


Fl 


0562 

0563 , 

0564 , 


f 

i 

t 


POP 


AF 




05A1 


E60F 


0565 3 


?RVAL 


AND 


0FH 




05 A3 


C690 


0566 




ADD 


A f 90H 




05A5 


27 


0567 




DAA 






05A6 


CE40 


056 8 




ADC 


A, 4 OH 




05A8 


27 


0569 




DAA 






05A9 


4F 


0570 




LD 


C f A 




05AA 


C35B02 


0571 

0572 , 

0573 , 


r 


JP 


CONOUT 


; PRINT IT 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z80 ASSEMBLER PAGE 0013 



ADDR CODE 



STMT SOURCE STATEMENT 







0574 j 














0575 , 














0576 j 


• CHECK 


FOR VALID HEX CHARACTER 






0577 , 














0578 , 










05AD 


FE30 


0579 AORN 


CP 


»0' 




05AF 


DAC305 


0580 




JP 


C r AORN2 


; JUMP IF < 3 OH 


05B2 


FE3A 


0581 




CP 


^■■H-l 




05B4 


DAC105 


0582 




JP 


C r AORNl 


; JUMP IF < 3 AH 


05B7 


FE40 


0583 




CP 


•A f -1 




05B9 


DAC305 


0584 




JP 


C r AORN2 


; JUMP IF < 'A* 


05BC 


FE47 


0585 




CP 


'F'+l 




05BE 


D2C305 


0586 




JP 


NC r AORN2 ; JUMP IF < 'G* 


05C1 


AF 


0587 AORN1 


XOR 


A 




05C2 


C9 


0588 




RET 




; VALID DATA RET 


05C3 


AF 


0589 AORN2 


XOR 


A 




05C4 


3C 


0590 




INC 


A 




05C5 


C9 


0591 

0592 j 

0593 ; 




RET 




; NOT HEX CHAR 






0594 j 


• CHECK 


FOR TERMINATOR 








0595 j 














0596 , 


• SPACE 


r COMMA r 


OR CARRIAGE RETURN 






0597 j 














0598 ; 










05C6 


FE20 


0599 1 


PERMCK 


CP 


it 




05C8 


C8 


0600 




RET 


Z 




05C9 


FE2C 


0601 




CP 


i i 
r 




05CB 


C8 


0602 




RET 


Z 




05CC 


FE2E 


0603 




CP 


i i 

• 




05CE 


CAD405 


0604 




JP 


Z r TCHK0 




05D1 


FEOD 


0605 




CP 


ODH 




05D3 


CO 


0606 




RET 


NZ 




05D4 


C5 


0607 1 


PCHKO 


PUSH 


BC 




05D5 


CD7D05 


0608 




CALL 


CRLF 




05D8 


CI 


0609 




POP 


BC 




05D9 


AF 


0610 




XOR 


A 




05DA 


C9 


0611 

0612 , 

0613 , 




RET 










0614 , 


? SCAN 


FOR OPERAND FROM 


KEYBOARD 






0615 , 














0616 , 














0617 j 


» EXIT 


WITH DATA IN HL, 


AND TERMINATOR 






0618 j 


- IN C. 


IF VALID DATA, RETURN WITH 






0619 j 


■ ZERO 


FLAG SET 


. B CONTAINS # OF CHARACTERS ENT 






0620 j 














0621 j 










05DB 


210000 


0622 B 


CEYIN 


LD 


HL,0 




05DE 


45 


0623 




LD 


B f L 




05DF 


CD4F02 


0624 I 


CEY1 


CALL 


ECHO 




05E2 


4F 


0625 




LD 


C f A 




05E3 


04 


0626 




INC 


B 


; INC CHAR COUNT 


05E4 


CDC605 


0627 




CALL 


TERMCK 




05E7 


C8 


0628 




RET 


Z 


; IF TERMINATOR, RETURN 


05E8 


CDAD05 


0629 




CALL 


AORN 


; VALID DATA CHECK 


05EB 


CO 


0630 




RET 


NZ 


; IF NOT RETURN 


05EC 


79 


0631 




LD 


A f C 





PROM32 4K EPROM PROGRAMMING 



ADDR CODE 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0014 



STMT SOURCE STATEMENT 



05ED 


CD6905 


0632 




CALL 


ASBIN ; CONVERT TO BINARY 


05F0 


29 


0633 




ADD 


HL f HL 


05F1 


29 


0634 




ADD 


HL f HL 


05F2 


29 


0635 




ADD 


HL r HL 


05F3 


29 


0636 




ADD 


HL r HL ; SHIFT 4 BITS 


05F4 


85 


0637 




ADD 


A,L 


05F5 


6F 


0638 




LD 


L/A 


05F6 


C3DF05 


0639 
0640 
0641 
0642 
0643 
0644 
0645 




JP 


KEYl 


05F9 


0E3F 


0646 : 


:nvcmd 


LD 


c r •?• 


05FB 


CD5B02 


0647 




CALL 


CONOUT 


05FE 


3E2E 


0648 




LD 


A,V.» 


0600 


327D06 


0649 




LD 


(NXCHR) r A 


0603 


C9 


0650 
0651 , 
0652 
0653 
0654 




RET 








0655 , 


•SCAN 


— SCANS 


THE OPERANDS INPUT FROM THE 






0656 , 


• CONSOLE. THE 


OPERANDS ARE SAVED IN OP1, 






0657 , 


• AS 


THE ARGUMENTS TO EXECUTE THEIR COMMANDS. 






0658 , 








0604 


AF 


0659 i 


SCAN 


XOR 


A INITIALIZE 


0605 


218206 


0660 




LD 


HL,OPRS ; CLEAR OPERANDS 


0608 


E5 


0661 




PUSH 


HL 


0609 


DDE1 


0662 




POP 


IX ;IX=POINTER TO OPERANDS 


060B 


77 


0663 




LD 


(HL) r A 


060C 


010900 


0664 




LD 


BC f 9 


060F 


118306 


0665 




LD 


DE f OPRS+l 


0612 


EDBO 


0666 




LDIR 




0614 


327C06 


0667 




LD 


(OPCNT) r A 


0617 


CDDB05 


0668 I 


3CAN1 


CALL 


KEYIN ; GET ONE OPERAND 


06 1A 


C2F905 


0669 




JP 


NZ,INVCMD 


06 ID 


79 


0670 




LD 


A r C 


061E 


327D06 


0671 




LD 


(NXCHR) , A 


0621 


FE20 


0672 




CP 


ii 


0623 


2806 


0673 




JR 


Z,SCAN2-$ 


0625 


FE2C 


0674 




CP 


ii 
r 


0627 


2802 


0675 




JR 


Z r SCAN2-$ 


0629 


05 


0676 




DEC 


B 


062A 


C8 


0677 




RET 


Z ; IF NO DATA, RET 


062B 


DD7500 


067 8 I 


3CAN2 


LD 


(IX) ,L 


062E 


DD7401 


0679 




LD 


(IX+1) r H 


0631 


3A7C06 


06 80 




LD 


A, (OPCNT) 


0634 


3C 


06 81 




INC 


A 


0635 


327C06 


06 82 




LD 


(OPCNT) f A 


0638 


DD23 


06 83 




INC 


IX 


063A 


DD23 


0684 




INC 


IX ; POINT TO NEXT OPR 


06 3C 


79 


0685 




LD 


A,C 


063D 


FE20 


0686 




CP 


ii 


06 3F 


28D6 


06 87 




JR 


Z f SCANl-$ 


0641 


FE2C 


06 88 




CP 


ii 

t -.-.:'■■■ 


0643 


28D2 


06 89 




JR 


Z f SCANl-$ 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0015 



ADDR CODE 



STMT SOURCE STATEMENT 



0645 


C9 


0690 
06 91 
0692 
06 93 




RET 




06 46 


E5 


0694 


FREAD 


PUSH 


HL 


0647 


D5 


0695 




PUSH 


DE 


0648 


C5 


06 96 




PUSH 


BC 


0649 


3A7F06 


06 97 




LD 


A, (BCOUNT) 


064C 


FE80 


0698 




CP 


NBYTES 


064E 


200C 


0699 




JR 


NZ r FREADl-$ 


0650 


0E14 


0700 




LD 


C,READ 


0652 


115C00 


0701 




LD 


DE f FCB 


0655 


CD0500 


0702 




CALL 


FDOS ; LEAD FILE 


0658 


B7 


0703 




OR 


A 


0659 


2011 


0704 




JR 


NZ,FERROR-$ 


065B 


AF 


0705 




XOR 


A 


065C 


218000 


0706 


FREAD1 


LD 


HL, BUFFER 


065F 


5F 


0707 




LD 


E,A 


0660 


3C 


0708 




INC 


A 


0661 


327F06 


0709 




LD 


(BCOUNT), A 


0664 


1600 


0710 




LD 


D,0 


0666 


19 


0711 




ADD 


HL,DE ; POINT TO NEXT DATA 


0667 


7E 


0712 




LD 


A,(HL) 


0668 


CI 


0713 




POP 


BC 


0669 


Dl 


0714 




POP 


DE 


066A 


El 


0715 




POP 


HL 


066B 


C9 


0716 




RET 




066C 


CI 


0717 


F ERROR 


POP 


BC 


066D 


Dl 


0718 




POP 


DE 


066E 


El 


0719 




POP 


HL 


066F 


219203 


0720 




LD 


HL,MSG11 


0672 


CD8C05 


0721 




CALL 


PTXT ; ATTEMPT TO READ PAST EOF 


0675 


C36802 


0722 
0723 


• 


JP 


RENTRY 


>067 8 




0724 


DLAY 


DEFS 


1 


>0679 




0725 


SCR1 


DEFS 


1 


>067A 




0726 


SCR2 


DEFS 


1 


>067B 




0727 


SCR3 


DEFS 


1 


>067C 




0728 


OPCNT 


DEFS 


1 


>067D 




0729 


NXCHR 


DEFS 


1 


>067E 




0730 


FOPEN 


DEFS 


1 


>067F 




0731 


BCOUNT 


DEFS 


1 


>0680 




0732 


LAST 


DEFS 


2 


>0682 




0733 


OPRS 


DEFS 


6 


>06 82 




0734 


OPR1 


EQU 


OPRS 


>0684 




0735 


OPR2 


EQU 


OPRS+2 


>06 86 




0736 


OPR3 


EQU 


OPRS+4 


>07 82 




0737 
0738 
0739 
0740 


SPVAL 


EQU 


OPRS+100H 



PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0016 



ADDR CODE 



STMT SOURCE STATEMENT 



CROSS REFERENCE LISTING 
SYMBOL VALUE TYPE STMT 



STATEMENT REFERENCES 



ADCMP 


042E 


AORN 


05AD 


AORN1 


05C1 


AORN2 


05C3 


ASBIN 


0569 


BCOUNT 


067F 


BUFFER 


0080 


CLOSE 


0010 


CONIN 


024F 


CONOUT 


025B 


CONST 


0242 


CRLF 


057D 


DATA 


0068 


DELAY 


04E8 


DELAY1 


04EA 


DLAY 


0678 


ECHO 


024F 


EXIT 


0000 


FCB 


005C 


FDO.S 


0005 


FERROR 


066C 


FOPEN 


067E 


FREAD 


0646 


FREAD1 


065C 


HACTL 


006A 


INVCMD 


05F9 


KEY1 


05DF 


KEYIN 


05DB 


LADD 


0069 


LAST 


06 80 


LOOPS 


0064 


MSG1 


0288 


MSG10 


0383 


MSG11 


0392 


MSG12 


03B6 


MSG13 


03CB 


MSG14 


03E8 


MSG2 


02EB 


MSG3 


0307 


MSG4 


0323 


MSG5 


0342 


MSG6 


0367 


MSG7 


0531 


MSG8 


053E 


MSG9 


0548 


NBYTES 


0080 


NXCHR 


067D 


OPCNT 


067C 


OPEN 


000F 


OPR1 


06 82 


OPR2 


0684 



0306 


0371 


0363 


0328 


0295 


0579 


0629 








0587 


0582 








0589 


0586 


0584 


0580 




0506 


0632 


0491 


0483 




0731 


0709 


0697 


0059 




0023 


0706 


0086 






0025 


0232 








0205 


0381 


0360 


0050 




0215 


0647 


0571 


0548 


0535 0531 


0193 


0379 


0358 






0528 


0608 


0522 


0464 


0348 0285 




0145 


0098 


0073 


0066 


0017 


0439 


0401 






0414 


0417 


0408 






0415 


0415 








0724 


0405 


0057 






0204 


0624 


0338 


0180 




0015 


0235 


0231 






0022 


0701 


0233 


0078 




0021 


0702 


0234 


0087 


007 9 


0717 


0704 








0730 


0229 


0074 


0061 




06 94 


0490 


0482 


0161 




0706 


0699 








0019 


0442 


043 8 


0436 


0411 0404 




0346 


0227 


0065 




0646 


0669 








0624 


0639 








0622 


0668 








0018 


0434 


0397 






0732 


0143 


0117 






0029 










0245 


0047 








0262 


0082 








0264 


0720 








0266 


0094 








0268 


0130 








0270 


0141 








0252 


0067 








0254 


0088 








0256 


0146 








0258 


0286 


0151 






0260 


0281 








0470 


0333 








0472 


0376 








0474 


03 87 








0028 


0698 


0058 






0729 


0671 


0649 


0289 


0154 0091 


0728 


06 82 


06 80 


0667 


0102 


0024 


0077 








0734 


0421 


0349 


0101 


0096 


0735 


0310 


0135 







PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0017 



ADDR < 


SODE 


STMT SOURCE 


STATEM 


ENT 








OPR3 


06 86 


0736 


0422 


0350 








OPRS 


06 82 


0733 


0737 


0736 


0735 


0734 0665 0660 




PACC 


0598 


0556 


0520 


0463 


0459 


0455 0453 0239 




PADDR 


0280 


0238 


0144 


0132 


0097 






PASP 


0571 


0519 


0241 










PPG 


0100 


0046 












PPGO 


0125 


0062 


0347 










PPGOA 


0199 


0108 


0104 










PPGOB 


0142 


0073 


0093 










PPGOC 


0160 


0085 


0081 


0076 








PPG1 


01A0 


0111 


0140 










PPG10 


01DE 


0141 


0177 










PPG10A 


01EA 


0145 


0297 


0284 








PPG11 


01F9 


0150 


0156 










PPG2 


01 A3 


0112 


0110 










PPG3 


01AA 


0115 


0124 










PPG4 


01CF 


0134 


0128 










PPROG 


04CE 


0396 


0357 










PREAD 


04FE 


0433 


0368 


0325 


0293 






PRG1A 


0447 


0328 


0344 










PRG2A 


0469 


0345 


0389 


0383 


0373 


0341 




PRG7A 


04A4 


0371 


0386 










PROG 


043D 


0324 


0157 










PROG1 


0440 


0325 


0329 










PROG2 


044E 


0331 


0327 










PROG3 


0470 


0348 


0343 


0330 








JPROG4 


0473 


0349 












PROG5 


047E 


0354 


0364 










PROG5A 


0492 


0363 


0359 










PROG6 


0497 


0365 












PROG6A 


049B 


0367 












PROG7 


049E 


0368 


0372 










PROG 8 


04AB 


0374 


0370 










PROG 8 A 


04C0 


0384 


0380 










PROG9 


04C6 


0387 


0362 










PRTER 


0510 


0450 


0385 


0337 








PRVAL 


05A1 


0565 


0561 










PTXT 


058C 


0544 


0721 


0550 


0388 


0377 0334 0287 0282 0152 








0147 


0142 


0131 


0095 0089 0083 0068 0048 


RBOUT 


0000 


0020 












RDSET 


04F0 


0421 


0367 


0324 


0292 






READ 


0014 


0026 


0700 










READO 


040C 


0285 


0291 










READ1 


0422 


0293 


0296 










READ 2 


03FD 


0280 


0072 










RENTRY 


026 8 


0226 


0722 


0183 


0149 


0084 




SCAN 


0604 


0659 


0288 


0153 


0090 






SCAN1 


0617 


0668 


06 89 


06 87 








SGAN2 


062B 


067 8 


0675 


0673 








SCR1 


0679 


0725 


0134 


0122 


0120 


0070 




SCR2 


067A 


0726 












SCR3 


067B 


0727 


0112 


0109 








SETDLY 


0118 


0056 


0054 


0052 








SETDMA 


001A 


0027 


0085 










SPACE 


0587 


0534 


0521 










SPVAL 


0782 


0737 


0062 


0046 








TBASE 


0100 


0016 


003 8 











PROM32 4K EPROM PROGRAMMING 



SD SYSTEMS Z 80 ASSEMBLER PAGE 0018 



ADDR CODE 


STMT SOURCE 


STATEMENT 






TCHKO 05D4 


0607 


0604 






TERMCK 05C6 


0599 


0627 






THDR 020F 


0161 


0163 0111 


0099 




THDRl 022B 


0176 


016 8 






TWDiG 0550 


0482 


0174 0172 


0170 


0166 


TORN 022F 


0180 


0283 0188 


0148 


0071 


ERRORS* 00 00 











0125 0115