MICROFRIEND DYNA – 85 User’s Manual
rd
Kailas Vaibhav , G– Wing , 3 Floor, Park Site, Vikhroli ( West ) , Mumbai – 400 079 . INDIA Tel . : 91 - 22 - 5181900 (16 Lines) Fax . : 91 - 22 - 5181930 / 5181940
s a l e s @ d y n a l o g i n d i a . c o m w w w . d y n a l o g i n d i a . c o m
TABLE OF CONTENTS PAGE NO. INTRODUCTION
INTRODUCTON TO MICROFRIEND DYNA-85 CHAPTER
1
CONFIGURATION OF MICROFRIEND DYNA-85 1.1
1
1.1
SYSTEM OVERVIEW……………………………………… 1-1 1.1.1
SYSTEM HARDWARE CONFIGURATION……. 1-1 CENTRAL PROCESSING UNIT………………… 1-1 MEMORY…………………………………………. 1-1 HEX KEYPAD/DISPLAY INTERFACE…………. 1-2 8279 DATA FORMAT……………………………. 1-2 PARALLEL I/O/ INTERFACE…………………… 1-3 SERIAL I/O AND AUDIO CASSETE INTERFACE.1-3 TIMER………………………………………………. 1-3 EXPANSION SLOT………………………………… 1-4
1.1.2
SYSTEM COMMANDS OVERVIEW…………….. 1-4
1.1.3
SYSTEM FIRMWARE OVERVIEW……………… 1-5
1.1.4
APPLICATON OF MICROFRIEND DYNA-85…… 1-6
CHAPTER 2
SYSTEM MEMORY & INPUT / OUTPUT MAPPING
2-1
2.1
MEMORY MAPPING……………………………… 2-1
2.2
INPUT / OUTPUT MAPPING……………………… 2-2
2.3
POWER SUPPLY …………………………………… 2-3 i
TABLE OF CONTENTS PAGE NO. INTRODUCTION
INTRODUCTON TO MICROFRIEND DYNA-85 CHAPTER
1
CONFIGURATION OF MICROFRIEND DYNA-85 1.1
1
1.1
SYSTEM OVERVIEW……………………………………… 1-1 1.1.1
SYSTEM HARDWARE CONFIGURATION……. 1-1 CENTRAL PROCESSING UNIT………………… 1-1 MEMORY…………………………………………. 1-1 HEX KEYPAD/DISPLAY INTERFACE…………. 1-2 8279 DATA FORMAT……………………………. 1-2 PARALLEL I/O/ INTERFACE…………………… 1-3 SERIAL I/O AND AUDIO CASSETE INTERFACE.1-3 TIMER………………………………………………. 1-3 EXPANSION SLOT………………………………… 1-4
1.1.2
SYSTEM COMMANDS OVERVIEW…………….. 1-4
1.1.3
SYSTEM FIRMWARE OVERVIEW……………… 1-5
1.1.4
APPLICATON OF MICROFRIEND DYNA-85…… 1-6
CHAPTER 2
SYSTEM MEMORY & INPUT / OUTPUT MAPPING
2-1
2.1
MEMORY MAPPING……………………………… 2-1
2.2
INPUT / OUTPUT MAPPING……………………… 2-2
2.3
POWER SUPPLY …………………………………… 2-3 i
PAGE NO. PAGE NO.
CHAPTER 6 APPENDIX
SERIAL I/O OPERATION
6-1
CONNECTOR AND STRAPPING DETAILS
A-1
6.1
USE OF MONITOR
6-2
A
CONNECTOR J1 : DYNA BUS INTERFACE
A-1
6.2
COMMAND STRUCTURE
6-2
CONNECTOR J2 : 8155 CONNECTOR
A-2
6.2.1
D – DISPLAY MEMORY COMMAND
6-3
CONNECTOR J3 : 8255 CONNECTOR
A-3
6.2.2
G – PROGRAM EXECUTE COMMAND
6-3
CONNECTOR J4 : 8279 CONNECTOR
A-4
6.2.3
I – INSERT INSTRUCTIONS INTO RAM-1
6-3
CONNECTOR J5 : POWER SUPPLY CONNECTOR
A-4
6.2.4
M – MOVE MEMORY COMMAND
6-4
CONNECTOR J6 : SERIAL CONNECTOR
A-4
6.2.5
S – SUBSTITUTE MEMORY
6-4
CONNECTOR J7 : 8253 CONNECTOR
A-4
6.2.6
X – EXAMINE / MODIFY CPU
6-5
STRAPPING DETAILS
A-5
B
ADD-ON CARDS FOR MICROFRIEND DYNA-85 SYSTEM
B-1
REGISTER COMMAND 6.3
PROGRAM DEBUGGING
6-7
6.4
ERROR CONDITIONS
6-8
6.5
ADDRESS VALUE ERRORS
6-8
C
CIRCUIT DIAGRAM
C-1
6.6
COMMAND EXAMPLES
6-9
D
MICROFRIEND DYNA-85 MONITOR LISTING
D-1
6.7
AUDIO CASSETTE INTERFACE
6-9
TABLE 6.1
6-11
E
PROCEDURE FOR UPLOADING AND
E-1
BAUD RATE SELECTION
DOWNLOADING CHAPTER 7
FOR THE MICROFRIEND ILC USER
7-1
iv v
INTRODUCTION INTRODUCTION TO MICROFRIEND DYNA-85
What will I get DYNA-85 ! Microfriend DYNA-85 is an introduction to a low cost trainer and development kit. It was developed to assist the novice to get familiar with INTEL 8085 microprocessor in a user friendly environments. This user’s manual tells you about –
Hardware of DYNA-85. Monitor commands to interact with DYNA-85. Memory & I/O details of Dyna-85. Working with hex keypad and display. Serial I/O and Audio cassette interface. Circuit diagram and connector details.
Before you begin : 1) 2) 3)
Study this manual carefully. Write your own programs after studying the chapter on Machine Language programming and try them out. Do not hesitate to experiment using the I/O lines for real world interfacing.
1
1-1
CHAPTER 1
CONFIGURATION OF MICROFRIEND DYNA-85 1.1
SYSTEM OVERVIEW
MICROFRIEND DYNA-85 is a single board computer based on 8085A CPU designed specially for training and development applications. It is equally useful for a novice as well as development engineers for studying the 8085A CPU and developing various product based on the 8085A. 1.1.1
SYSTEM HARDWARE OVERVIEW
CENTRAL PROCESSING UNIT
MICROFRIEND DYNA - 85 I s based on the INTEL 8085A high performance CPU operating at 3 MHz.
MEMORY
Powerful system monitor has been provided on a 2732 EPROM covering 4K bytes.This monitor includes all standard commands, codes , functions and utility subroutines. A 6116 battery back up RAM ( 2K ) is provided on the board for inputting and executing programs. Three 28 pin sockets are provided for memory chips so that further expansion of RAM/EPROM is possible upto a maximum of 56K .
1-2
1-3
HEX KEYPAD / DISPLAY INTERFACE
a
A Keypad with 21 keys and 6 digits LED seven segments display is
provided for interaction with the system using 8279 keyboard / display controller. This chip provides the following features.
f
b g
Simultanous Keyboard & Display operation. Scanned Keyboard Model sensor Mode. 2 Key locked / N Key roll over. Contact Debounce. 16 Displays Programmable scan timing.
e
c d
The hex keypad has the standard hexadecimal keys and many other function and Code keys. 4 “User Definable” function keys are also provided which can be defined by the user . All scan, return, shift and control lines of 8279 are brought on to connected J4.
8279 DATA FORMAT :
Writing a 1 in the desired bit lights that particular segment. PARALLEL I/O INTERFACE 46 parallel I/O lines are provided on board , 22 from 8155 and 24 from 8255 . These lines are brought on to connector J2 ( for 8155 ) and (for 8255). SERIAL I/O AUDIO CASSETTE INTERFACE Serial I/O is available through RS232C compatible port. The SID & SOD lines are used under software control for serial operation . Baud rate is adjustable.
The data format for the character being displayed by the 8279 is one bit corresponding to each segment of the seven segment display plus one bit for the decimal point. The display bits are store in the 8279 in the form of one byte digit of the display from RAM location 0 to 5 . The byte format is as follows : A3 c
A2 d
A1 b
A0 a
B3 e
B2 g
B1 f
B0 dp
Onboard Audio Cassette I / F is provided with file management , for storage and retrieval of data using a cassette recorder. TIMER Three channels of 8253 chip , a 16 bit TIMER / COUNTER and one channel of 14 bit TIMER /COUNTER of 8155 are provided on board. All lines of 8253 are provided on connector J7 and 8155 are provided on J2.
1-6
1-7
COLD START entry can be performed through software by using the RST 0 instruction. In WARM START entry, the start of previously executed user program is fully saved before entering the monitor. WARM START entry is possible through software by using th RST 1 instruction. In both cases, the sign on display is ‘FrlEND’ as in case of hardware reset through RESET Key. CODE COMMANDS :
CODE CODE CODE CODE CODE CODE CODE CODE CODE
00 01 02 03 04 05 06 0E 0F
: : : : : : : : :
Move a block of memory. Fill a block with a data byte. Insert a byte in a block. Delete a byte from a block. Search a given block for a given pattern. Hex to Decimal conversion. Decimal to Hex conversion. Complement a block. Rolling Display.
1.1.3
APPLICATION OF MICROFRIEND DYNA-85
MICROFRIEND DYNA-85 is the low cost learning and development system for beginners as well as development engineers The powerful friendly FIRMWARE allows you to learn all application of 8085A and its support chips like 8255 PPI. 8155 PPI and Timer . 8279 prgrammable keyboard and display controller,8253 Programmable timer and counter etc.You can load,debug and finialize your program on the MICROFRIEND DYNA-85 and nce the development is finilize it can also be used as an OEM board.
The areas of application on MICROFRIEND DYNA-85 are as follows :1. 2. 3. 4. 5. 6. 7. 8. 9.
Analog to Digital Converter Interface. Digital to Analog Converter interface. Interfacing Hexadecimal Keyboad. Simulation of an Elevator. Temparature Controller Interface. Stepper motor Controller. Traffic Light Control System. DC Motor Controller. Thumbwheel Interface.
And many more experiment and application can be thought and successfully developed on MICROFRIEND DYNA-85 system.
2-1
CHAPTER 2
SYSTEM MEMORY & INPUT / OUTPUT MAPPING 2.1
MEMORY MAPPING
The system memory is also as important as the CPU itself , because this is where the system program resides and the CPU takes its instruction from the program. The memory is of two types ROM and RAM i.e. READ ONLY MEMORY & RANDOM ACCESS MEMORY. The MICROFRIEND DYNA-85 has a flexible memory map , and for your convenience for program development, the RAM has useful feature such as battery back-up. FFFF
USER RAM IC 6116 C000 BFFF
EXPANSION EPROM/RAM 4000 3FFF 0000
MONITOR EPROM
2-2
2-3
0000H TO 3FFFH :
Monitor EPROM socket.Monitor 2732 is located at 000H to 0FFFH and is mapped at 1000H-1FFFH,2000H-2FFFH and 3000-3FFFh also.
IC
ADDRESS
MODE
I/O FUNCTION
8255
10 11 12 13
R/W R/W R/W WRITE
PORT A PORT B PORT C CONTROL REGISTER
8253
18 19 1A 1B
R/W R/W R/W WRITE
COUNTER 0 COUNTER 1 COUNTER 2 CNTROL REGISTER
It 2764 / 27128 are used , 1000H - 3FFFH can be used for further expansion. 4000H to BFFFH :
This Socket is used for user expansion of EPROM and RAM. EPROMs like 2716 / 2732 / 2732 / 2764 / 27128 / 27256 or RAMs like 6116 / 6264 / 62256 can be installed by suitable strappings. C000H to FFFFH :
User RAM socket.The 2K user RAM IC 6116 is located at F800HFFFFH.This 2K memory is folded after every 2K bytes from C000H to FFFFH.In this socket 6264 can also be used. 2.2
INPUT/ OUTPUT MAPPING
2.3
POWER SUPPLY
Recommanded Power Supply for DYNA-85 kit DMS SMPS – 01
IC 8279
ADDRESS
MODE
I/O FUNCTION
READ WRITE READ WRITE
READ KEYBOARD FIFO WRITE DATA TO DISPLAY READ STATUS WORD WRITE COMMAND WORD
08
WRITE
09 0A 0B 0C 0D
R/W R/W R/W R/W R/W
COMMAND/STATUS REGISTER PORT A PORT B PORT C TIMER LOW BYTE TIMER HIGH BYTE
04 05
8155
Having following specification :
Voltage
+5V + 12 V - 12 V + 30 V
Current Rating
1A 500 mA 250 mA 100 mA
2-4
3-1 CHAPTER 3
OPERATING INSTRUCTION- KEYBOARD KEYPAD LAYOUT :
3.1
RESET
VI
C U1
DCR
8
EXEC
INR
D U2
E U3
F U4
GO/H
9 L
A LOAD
B SAVE
4 SPH
5 SPL
6 PCH
7 PCL
0 SET
1 CODE
2 STEP
3 REG/I
KEYBOARD OPERATION
MICROFRIEND DYNA-85 has a built in keyboard ( KEYPAD).The layout of the keypad is given on the opposite page for ready reference. The system can also be operated through a console connected to the serial interface. While using the built in keyboard , we can work only in the Hexadecimal number system . There are 16 keys for entering Hex numbers from 0 to F. These are all dual meaning keys and the key designated depends on when the key I s pressed. In addition to these 16 keys there is one vector Interrupt key, one RESET key and 3 function keys. When the system is switched on the display shows , sign – on message ’F r l E n d’. This indicates that the system is reset and the monitor expects a command from you. At this moment any one of the command keys : SET , CODE , STEP, REG, GO, LOAD or SAVE can be pressed depending on the desired operation. In case any non command key is pressed, the display will show ‘FErr’ message, you can again press a valid command key or press RESET and then press a valid command key. The various command and function keys are explained below :
3-2 3.2
3-3 SET,INR,DCR KEYS
EXAMPLE 1 :
You can use the SET key to set the address of the memory location to be accessed. On pressing SET key the display becomes blank and a dot appears in the Address field which is made up of the first four digit of the six digit display . The remaining two digit of the six digit display are the data field .The dot in the address field indicates that your next key will be treated as an address entry (entry is from Right to Left and last 4 entries are retained). When you have entered the 4 digit hexadecimal address press the INR key which will terminate the address entry and display the c ontents of that memory location as the two digits in the data field. Now you can modify or retain the contents of the location. Pressing INR key again will load the data field into the memory location at the address shown in the address field . This key also increments the address by 1 location and dispalys the contents of that new locaton with required data. DCR key also works in a similar way but it decrements the address by 1 and points to the previous location.
Address Field
Data Field
RES SET F 0 0 0 INR 3 E INR DCR EXEC
F r I E
n d
0 0 0 F F F F F F F
0 0 F 0 0 0 0 0 0
0 F 0 0 0 0 0 0 0
F 0 0 0 0 0 0 1 0
X 0 3 X 3
X 3 E X E
Pressing EXEC key terminate the loading of memory and the monitor waits for next command. 3.3
Trying to load data into a Monitor EPROM location using SET key results in ‘FErr’ (error). SET, INR, DCR, keys can also be used to verify the data loaded in RAM by displaying one location after another.
Key Pressed
REG
This key allows you to examine and optionally modify the contents of all 8085 internal registers. Pressing REG key will blank the display and a dot appears in the Field. Next press a valid register name. The Register names appears on various hexadecimal number keys as follows :3 4 5
: : :
I ( Interrupt Mask ) SPH ( Stack Pointer High ) SPL ( Stack Pointer Low )
3-4 6 7 8 9 A B C D E F
3-5 : : : : : : : : : :
PCH ( Program Counter High PCL ( Program Counter Low ) H ( H Register ) L ( L Register ) A ( A Register ) B ( B Register ) C ( C Register ) D ( D Register ) E ( E Register ) F ( Flag register )
Format of the F register ( Flag Register ) is as follows :
S
Pressing any one of these keys after pressing REG key will display the particular register name in the address field and the contents of that register will be displayed in the data field. Pressing INR key after this , will point to the next register and DCR will point to the previous register.
X C P X AC Z S
Z : : : : : : :
X
AC
X
P
X
C
Don’t care. Carry Parity Don’t Care Auxillary Carry Zero Sign
EXAMPLE 2 :
Key Pressed
Address Field
Data Field
REG A 0 5 0 INR DCR EXEC
. A A A 0 B A F
X 0 0 5 X 5
Contents of the register can be modified at this point similar to loading any other memory location. Pressing INR and DCR keys after modifying the contents of that register and ENTER terminates the command. Address field shows F in the left most digit , the monitor indicates as usual that the it is waiting for the next command. Format for the I register (Interrupt mask) is as follows :
0
0
0
A
I
M
M
M
E
7.5
6.5
5.5
I Interrupt enable Flag [ 1 is enabled, 0 is disabled ] M Interrupt Mask [1 is masked , 0 is unmasked ]
NOTE : ONLY LAST TWO ENTRIES ARE RETAINED.
X 0 5 0 X 0
3-8
3-9 Address
Data
Mnemonic
F000 F002 F003 F006
3E 05 3D C202F0 76
MVI A, 05h DCR A JNZ F002h HALT
This program first loads register A ( Accumulator ) with 05 , then decrements the accumulator contents by 1 till the contents become zero and halts at that point. The JNZ loop will make use of ‘br’ and ‘Cn’. First let us execute the program with STEP key and using ‘br’ and ‘Cn’ parameters. Key Pressed
Address Field
Data Field
Comments
STEP F000 INR F002 INR 04 INR
PPPP F000
XX
PRESENT PC CONTENTS STARTING ADDRESS BREAK ADDRESS ? BREAK AT F002 Cn ? Cn 4 N + 1 PROGRAM STOPS AFTER BREAKPOINT OCCURRED 3 TIMES EXAMINE REG.A
EXEC REG A
. F002 Cn Cn F002 F . A
br br . 04 3D
02
As the program stopped after the breakpoint occurs 3 times, the original contents of register A which were 05 have been decremented three times. The register A should now contain 02, which is displayed in the data field. The same program can be executed in a single stepping mode.
Key Pressed
Address Field
Data Field
Comments
STEP
PPPP
XX
F000 INR 0 INR 0 INR
F000 . 0000 Cn 0000 F002
br br . 00 3D
PRESENT PC CONTENTS STARTING ADDRESS BREAK POINT ? IGNORE br. Cn ? IGNORE Cn. FIRST INSTRUCTION EXECUTED PC POINTS TO NEXT INSTR . PROGRAM STOPS FOR STATUS CHECK . REG . A (Acc) CONTENS 05 NEXT COMMAND ? STEP SECOND INSTR. EXECUTED PROGRAM STOP FOR STATUS CHECK REGISTER A (Acc) CONTENTS 04 AFTER DECREMENTING ONCE
EXEC REG A
F . A
05
EXEC STEP INR
F F002 F003
3D C2
EXEC
F
REG
.
A
A
04
After counting this sequence till the contents of A become 00, the program comes out from the JNZ loop and the address field shows the last address of the program , i.e. F006H. Contents of this location are displayed in the data field as 76 (HALT). If you press EXEC at this stage and examine the stage and examine the contents of register A using REG command , the result will be 00 as expected.
3-10 3.6
3-11 VI : VECTOR INTERRUPT
This key is used to interrupt the program execution and transfe r the control to location 003CH in the monitor.This location has a jump to location FFCEH in the user RAM.By inserting another jump instruction at FFCEH , we can transfer the control to an interrupt service routine located to another area in the memory. For proper operation of this key, the user program must enable the interrupt through the EI instruction and the RST 7.5 must be unmasked using the SIM instruction. The exmple of a decimal counter included in the chapter on programming, will make the application of key will make it more clear. 3.7
RES : RESET
Pressing RES key causes a hardware RESET operation.The control is transferred to location 0000H in the monitor. The monitor program is executed from 0000H onwards without saving the status resulting from any user program executed before the ‘RESET’. The display shows ‘F r l E N D’ as the sign-on message and the monitor waits for a valid command. 3.8
CODE
The code key allows you to access one of the coded subroutines in the monitor firmware. All the user accessible coded subroutines are explained in Chapter 4.
3.9
USER KEYS U1,U2,U3,U4
There are 4 user definable keys on the MICROFRIEND DYNA-85. Each of these keys has a vector in the scratchpad RAM area . By loading an appropriate jump instruction at these location, you can define the functon of keys U1, U2, U3, U4. The vector location are as follows :
Key
Memory Location
U1 U2 U3 U4
FF9CH, FF9DH, FF9EH FF9FH, FFA0H, FFA1H FFA2H, FFA3H, FFA4H FFA5H, FFA6H, FFA7H
An example will illustrate how these keys can be used . There is a subroutine in the monitor for a “ROLLING DISPLAY” at location 0E5BH. Using the SET key load a jump instruction C3 5B 0E at location FF9CH, FF9DH and FF9EH which are the U1 key vector location.Mow reset the system and then press U1 key, the display immediately blanks for a moment and then a rolling message appears D Y n A L o G
h E L P S
Y o U
L E A r n I n G
U P
By using the U1 key vector, ypu have efficiently transferred the control to the rolling display subroutine.
3-12
3-13
3.10
SAVE
This command is used for saving your program on an audio cassette. The procedure for saving is as follows : 1. 2.
Command the MIC socket (on the top) of the MICROFRIEND DYNA – 85 to the MIC socket of the CTR.
3. Turn CTR ON, keep it in PLAY mode. 4. Immediately press EXED Key. L appears in the data field, indicating that the CPU is searching for the file with file number Fn.
Press SAVE key, enter the following parameters
5. Whenever the CPU comes across any File Number , it is displayed in the data field. Loading starts only when the specified File number is found and displayed.
SS : SE : Fn :
6. The SS parameter of your program is already saved on the cassette tape, and when the program is being loaded back into RAM , it automatically gets loaded at the same address.
Source Start Source End File Number – any hex number from 00 to FF.
3.
Turn CTR ON and keep it in RECORD mode.
4.
Press the EXEC key, S appears in the data field indicates that your program is being saved on the audio cassette.
5.
On completion of SAVE operation, F r l E n d appears again on the display.
6.
2. Press LOAD key, enter the File Number Fn of the program to be loaded.( A hex number between 00 & FF )
Turn CTR OFF.
3.11
LOAD
This command loads your program from the cassette to the RAM . The procedure for loading is described below : 1. Connect the EAR Socket of MICROFRIEND DYNA-85 to the EAR or external speaker socket of the CTR. (Select volume control setting by trial)
7. On completion of loading the program with File number Fn , SS parameter is displayed in the address field.
NOTE : There shouldn’t be a gap of more than 10 sec. Between turning CTR ON and pressing EXEC key.
4-1
CHAPTER 4
CODES As we have seen in the previous chapter, the code key allows us to access the various coded subroutines from the monitor program. It is not essential to remember the starting location addresses of all these subroutines, as they have been coded to be used with the CODE key. A “Code Referance Chart” has been included in this chapter for quick referance. Detailed explainaton of operation of all the coded are given below.For executing any code,the ‘CODE’ key is pressed. A dot appesrs in the data field,indicating that the code number should be entered and will be displayed in the data field. Now enter the code number and press INR key. The data field prompts for the data field or the address field will prompt for the next parameter to be entered. After entering all the parameters,the code can be executed using the INR or EXEC key. 4.1
CODE 00
Move a Block of Memory
This code moves a block of memory from one place to other . The parameters required to be entered are SS : Source Block starting address, SE : Source Block end address and dS : Destination Block start address. A point to remember here is that dS must always be a RAM address.Trying to move a block to monitor EPROM results in an error. Please see Chapter 5 for further explanation of this point.
4-2
4-3
Example : 1 Key Pressed
CODE 0 INR 0 INR 5 INR F000 EXEC
4.2 Address Field
CODE 01
Data Field
Fill Block with a Data Byte
. 0 0 0 0. . 0 0 0 5. . F 0 0 0. FrIE
0 0. SS SS SE SE dS dS nd
This code requires the following parameters : SS SE Sr.
: : :
Starting address of the block. End address of the block. Data byte to be filled in all the location from SS to SE
Sr. can be any hex number from 00 to FF must be within the RAM area. 4.3
CODE 02
Insert Byte in a Block ( SE, Sr,IA )
This example program moves a block of memory between 0000H and 0005H to the RAM address F000H. This can be verified by using the SET key as follows : Key Pressed
Address Field
Data Field
In a given block of RAM it is sometimes necessary to insert a byte of data which is missing. A given byte in Sr is inserted at a given insert address IA. The remaining block shifts down by one position, upto the address given by SE. No address relocation for jumps are done. 4.4
SET INR INR INR INR INR INR
F 0 0 0. F000 F001 F002 F003 F004 F005
3E 0 0. d 3. 0 5. 00 C3
CODE 03
Delete a Byte at a Given Address ( SE,DA )
In a given block at a given address DA, a byte is deleted. The remaining block till SE shifts up by one position. The above two INSERT and DELETE commands are very useful in inserting or deleting a display character in the VIDEO RAM at the given cursor position.
4-4
4-5 Ex : INSERT BYTE Load the RAM location 1000H-1007H with the help of SET command. 1000 1 2 3 4 5 6 7 8
3E 00 D3 05 FF 20 19 76 XX
After loading we notice that the instruction to store accumulator STA 200FFH is incorrect.The ‘OPCODE’ 32 is missing. It has to be inserted before FF , 20
If the block is small you an manually make 1004 as 32 and reload theremaining by shifting one down. But if the block is very tedious. To Do this use INSERT byte command.IA (Insert Address ) is 1004. SE ( Block End ) is 1007 and Sr ( Insert byte ) is 32.
Key Pressed
CODE 02 EXEC 1007 INR 1004 INR 32 EXEC
Address Field
Data Field
1 0 0 7.
02 SE SE IA IA
You can insert anything else. With the SET command verify that 3E,00,D3,05,32,FF,20,19,76 is the data from location 1000H-1008H. The block has shifted down by 1 byte. The opposite of INSERT is DELETE and it works as follows : Key Pressed
Address Field
Data Field
CODE 03 EXEC 1008 INR 1004 EXEC
. 1 0 0 8. . 1 0 0 4. FriE
0 3. SE SE DA DA N D.
With the SET command verify that 1000-1007 contents are same as before the INSERT command (i.e 1004 ; FF etc.) 4.5
1 0 0 4. Sr Sr FriE
32 N D.
CODE 04
Search a Given Block for Given Pattern ( SS,SE,Sr )
The given block of memory (RAM or ROM ) between SS and SE is searched for a pattern o f byte given in Sr. Whenever the first match is found, the address and bytes are displayed. Remaining mismatches can be scanned with INR. LOAD the data in Ex.4.3 from 1000H.
4-6
4-7
Ex : BLOCK SEARCH Key Pressed
CODE 04 EXEC 1000 INR 1008 INR 19 EXEC INR
4.7 Address Field
. 1 0 0 0. 1 0 0 8. Sr Sr 1006 FriE
Data Field
0 4. SS SS SE SE . 1 9. 19 nd
CODE : 06
Decimal to Hex Conversion
This code is useful for converting any Decimal number from 0000 to 9999 into a Hex number equivalent. The parameter to be entered is dE, which is the decimal number we desire to convert into Hex format. Pressing EXEC after entering the decimal number displays the Hex equivalent. An important precaution to be taken is that , when you are entering the decimal number to be converted to Hex, do not press any keys from A to F. There is no provision for detecting this error and the results of converting that number are unpredictable. CODE 05 and CODE 06 are very useful in address conversions,relative jumps and total space calculations.
4.6
CODE : 05
Hex to Decimal Conversion
CODE 05 is a utility code for converting any Hex number from 0000 to FFFF into a Decimal number. The parameter to be entered is prompted in the data field as HE, and the Hex number to be converted can now the directly entered in the Address field. Pressing EXEC displays the Decimal equivalent of the Hex number entered.
4.8
CODE : 0E
Complement a block of memory
This code complements all the data contained within a memory block : The required parameters are : SS SE
: :
Starting address of the block. End address of the block.
On executing this code, all the ‘0’ are replaced by ‘1’ by ‘0’ within the specified block of memory. SS and SE must be in RAM area.
4-8
5-1
CHAPTER 5 4.9
CODE : 0F
MACHINE LANGUAGE PROGRAMMING Rolling Display
5.1
This is not a utility code but it is a demonstration code to illustration code illustrate the powerof the display control. On executing 0F, the display starts rolling the message : d Y n A L o G h E L P S Y o U in L E A r n I n G UP. CODES REFERANCE CHART
Code
Function
Parameters
00 01 02 03 04 05 06 0E 0F
Block Move Fill Block Insert Byte Delete Byte Block Search Hex to Dec Dec to Hex Complement Block Rolling Display
SS,SE,dS SS,SE,Sr SE,IA,Sr SE,dA SS,SE,Sr HE dE SS,SE
SS SE dS IA DA Sr
: : : : : :
Statrting Address End Address Destination Insert Address Delete Address Data Byte
MONITOR SUBROUTINES
This section will cover the applications from the software point of view of MICROFRIEND DYNA - 85 . You are advised to get familiar with the assembly language of INTEL 8085 Microprocessor.You should get familiar with the various mnemonics and their power. The 8085 microprocessor makes use of a 16 bit internal register called the stack register to point to a memory area called stack. The stack uses the LIFO ( Last In First Out ) type for storage during subroutine calls. User is advised to initialize the Stack Pointer with his stack area.The suggested stack pointer location is FEFFH. Location beyond this should not be utilized by the user as the monitor uses this area as the scratch-pad RAM. You may borrow several monitor routines to simplify your task of programming and to minimize RAM used. From the Firmware listing provided, take care of noting the parameters required by these routines, as some of the routines destroy the contents of the Registers. Also go through the manuals for the detailed operation of 8155, 8255 and 8279 supporting chips. The following is a list of scratch-pad RAM allocation to the Monitor program.
5-2
5-3 TABLE 5.1
Location (Hex)
Used for
Location (Hex)
Used for
FF9 A, B FF9 C, D, E FF9 F, 0, 1 FFA2, 3, 4 FFA5, 6, 7 FFA8 FFAA, B FFAC, FFAD, E FFA, F, 0 FB1 FFB2, 3 FFB4, 5 FBB6, 7 FFBB, C FFB9, A FFBD, E FFBF FFC0, 1 FFB8 FFC2
HALF BIT U1 Key Jump U2 Key Jump U3 Key Jump U4 Key Jump P DATA Unused CnSave BrSave DESAVE CARRYLOC HESAVE DASAVE IA SAVE SE SAVE DS SAVE SS SAVE COPY TEST BIT TIME SR SAVE User may place a JMP instr. to a RST 5 routine in locs FFFC2H-FFFC4H JMP to RST 6 routine JMP to RST 6.5 routine (Hardwored user interrupt) JMP to RST 7 routine JMP to ‘VECT INTR’Key routine Monitor Stack (temporary storage Used by Monitor E Register D Register C Register
FFED FFEE FFEF FFF0 FFF1 FFF2 FFF3 FFF4 FFF5 FFF6 FFF8 FFF9-FFFC FFFD FFFE FFFF
Flags A Register L Register H Register Interrupt Mask Prog. Cntr – Low Byte Prog. Cntr – Hi Byte Stack Ptr – Low Byte Stack Ptr – Hi Byte Current Address Current Data Output buffer & Temp Loc Register Pointer Input Buffer 8155 command/status Register Image
FFC5 FFC8 FFCB FFCE FFDI-FFE8 FFE9 FFEA FFEB
Important subroutines which can be borrowed from the Monitor FIRMWARE are listed below.These subroutines can be called in your own programs by using the CALL Instruction and specifying the starting address of that particular subroutine.The starting addreses of all these subroutines are given in brackets along with their names. 1.
Modiad (0362) – Modify address field of display
Inputs B
:
HL :
Dot Flag1 Put dot at right edge of the field. 0 No dot. The character to be displayed.
5-4
5-5
The contents of HL Register pair are displayed in the address field.The contents of all the CPU registers are affected
5.
CLEAR (01D7)
Inputs 2.
:
MODIDT ( 036E )
B : Dot Flag1 : Put Dot at the right edge of the field 0 : No dot The contents of the A register are displayed in hex notation in the data field of display the contents of all the CPU registers and flags are affected.
B : Dot falg – 1 – Dot in address field 0 – No Dot
Inputs
3.
RDKBD (02E7)
This routines sends blank characters to both the address field and data field of the display. If the dot flag is set then a Dot appears at the right edge of the address field. 6.
GTHEX (022B) – Get Hex Digits
Inputs
:
Input
:
Nothing
Output
:
A : character read from the keyboard
Outputs
:
Destroys
:
A, H, L, F/E’s.
Carry
:
This routine waits until a character is entered om the hex keypad and on return, places the value of the character in the A register. For the RDKBD routine to work correctly, the user must unmask RST 5.5 hardware interrupt using the SIM instuction in Version 1.
This routine accepts a string of hex digits from keyboard and displays them in address / data field as they are received. In either case a dot will be displayed in the right most field. It is not terminated by INR, DCR or EXEC keys, the received hex digits are invalid. 7.
4. DELAY (05F1)
This routine takes the 16 bit contents of register pair and counts down to zero.Then returns to the calling program. The A,D & E register and flags are affected.
B : Display Flag – 0 – Use address field of display. 1 – Use data field of display. A : Last character read from keyboard. DE : Hex Digits from keyboard last four entered. Set : At least one hex digit read, else it is reset. Destroys contents of all registers.
OUTPUT (02B7)
Inputs
:
A : Display Flag – 0 – To use address field 1 – Use data field
5-6
5-7 B : Dot Flag – 1 - Dot at right edge 0 - No dot
Character H L P I r Blank n U h G J y O
HL : Address of characters to be output. Destroys all Outputs two characters to data field or four to address field. The address of the characters is received as an argument. The routines MODIDT and MODIAD are useful whenever the user wants to display hexadecimal information like messages. The userhas to use the output routine with the following code assigned to the characters to be displayed. The display technique on 7 segment LED is already explained. TABLE 5.2 Character
0 1 2 3 4 5 6 7 8 9 A C d E F
Hex Code 10 11 12 13 14 15 16 17 18 19 1A 1B 1C
Hex Code 5.2
00 01 02 03 04 05 06 07 08 09 0A b
0B 0C 0D 0E 0F
SERIAL ROUTINES
The following are the routines you can borrow from the serial Monitor. Whenever the user straps the SID to TTY ( 20 mA loop ) or CRT (RS232C) the serial routine is invoked. The serial routine is AUTOBAUD type i.e. on power up or RESET, the contents for HALFBIT and BITTIME are undefined. After sending ASCII space character (20H) from a serial device, and baud rate is calculated . A BRID routine and a sign on message is transmitted at that baud rate. Thus user is advised to set the appropriate values in HALFBIT and BITTIME and then use CIN and COUT routines for any other purpose of block transfer on serial link from one system to another etc. Please refer to the chapter on serial I/O operation for details, before using any of the following routines which can be obtained from the serial monitor.
5-8
5-9
1.CIN (07FD) – Console Input
This routine returns a character in ASCII code received from the serial devices,to the A register. Condition flags are affected.
The following are the program examples . The user should load and execute these program to get familiar with the keyboard of MICROFRIEND DYNA-85. 5.3
PROGRAMMING EXAMPLES
2.COUT (07FA) – Console Output
This routine transmit a character (in ASCII Code) passed from the program in C Register to the serial device. The A, C & F registers are affected. 3.CROUT (05EB) – Carriage Return Line Feed
CROUT send CR and LF characters to console, A, B, C and F are destroyed. 4.NMOUT (06C6) – Hex Number printing
NMOUT converts the 8 bit unsigned integer in A register to 2 ASCII characters representing 2 hex digits and prints the two digits on console. Contents of A,B, and C, F are destroyed. 5.GETHX (0626)
Outputs
:
Carry
:
Destroys :
BC : 16 Bit Integer D : Character which terminated the integer. 1 – First character is not delimiter 0 – If first character is delimiter. A, B, C, D, E & F.
GETHX accepts a string of hex digits from the input stream and returns a value, a 10 bit binary integer, taking only last four digits entered.
Example 1 : Familiarizaton
Let us start with a simple program to understnd exactly what happens inside a microprocessor when a program is run. First, load the following program using ‘SET’ and ‘INR’ keys. Address
Data
Mnemonic
F000 F003 F004 F005 F006 F007 F008 F009
31 FF FE 00 00 00 00 00 00 CD 6E 03
LXI SP NOP NOP NOP NOP NOP NOP CALL
F00C
76
HALT
Comments
Define Stack Pointer
Display contents of A into Data Field Stop Executing
Now to understand exactly how the program works, let us take three simple instructions. MVI A, D8 MVI B, D8 ADD B RST 1
5-10
5-11
The RST 1 instruction will be used so that the register status is saved and we can examine registers after executing the programs , using the ‘REG’ key.
Execute the program at F000H and examine registers A & B, this time the contents of register A are not 23 as before, but it is 34. This is the result of instruction
a.
ADD B, 80 Which contents of B are added to A, A become 34 (23+11).
b.
Execute the program that has been entered at location F000H by using the ‘GO’ and ‘EXEC’ keys .‘E’ will appear in the address field showing that the program is being executed. Press ‘RES’ to reset and ‘FrlEnd’ will appear.
e. Now remove the CF from location F008 and replace it by 00 (NOP) again. Execute the program at F000H and observe the difference.
Modify the initial contents of location , as follows : F003 F004 F005
This time the data field shows 34.Instruction CALL MODIDT has displayed the contents of register A in the data field.Execution of program now select different sets of instruction and study the effect of executing those instruction in the similar manner.
3E 23 CF
In case of long programs, it is very inconvient to insert the CF and remove it for each step. Such programs can be studied by using the ‘STEP’ key which is already explained.
Execute the program at F000H and examine the register A and B. Contents of A should be 23, because the instruction MVI A , 23 (3E 23 ) will load register A with 23. c.
Modify the locations again as follows : F005 F006 F007
06 11 CF
Execute the program at F000H and examine the registers A and B. Register A contain 23, and Register B will contain 11, because the instruction MVI B, 11 (06 11) has now loaded the register B with 11. d.
Modify the location again as follows : F007 80 F008 CF
Example 2 : RDKBD
The following program illustrate the utility of the subroutine RDKBD. Execute the following program and then examine register A . Register A will contain the value of the key you has pressed. Address
Data
Mnemonic
F000 F003 F004 F005 F006
32 FF FE 00 00 00 CD E7 02
LXI SP, FEFF NOP NOP NOP CALL RDKBD
F009
CF
RST 1
Comments
Define Stack Pointer
Read Keyboard value Into A. Save registers & return to monitor
5-12
5-13
Example 3 : MODIDT
This examples loads register A with a value and displays that value in the data field of the display. Address
Data
Mnemonic
Comments
F000
31 FF FE
LXI SP, FEFF
F003
3E 96
MVI A, 96
F005 F008
CD 6E 03 76
CALL MODIDT HLT
Define stack Pointer Load A with Value 96 Display contents of A in the data field
Address
Data
Mnemonics
Comments
F000
31 FFFE
LXI, SP FEFF
F003 F004 F005 F006
00 00 00 CD E702
NOP NOP NOP CALL RKBD
Define stack pointer Unmak interrupt
F009
CD 6E03
CALL MODIDT JMP F006
Mnemonics
F000 F003 F004 F005 F006 F009 F00A F00D F00E
31 FFFE 00 00 00 CD E702 47 CD E702 80 CD 6E03
F001
C3 06F0
LXI SP,FEFF Define stack pointer NOP NOP NOP CALL RDKBD Read Keyboard into A MOV B, A Transfer A to B CALL RDKBD Read next key ADD B Add B to A CALL MODIDT Display result in data field JMP F006 Wait for Next cycle
1.
This example combines previous two programs and the Data field of display the value of the key pressed.
C3 06F0
Data
Comments
Addition Suggestions :
Example 4 : RDKBD + MODIDT
F00C
Address
Read keyboard Into A Display A into data field Wait for next key
2.
Modify this program using the DAA instruction to perform decimal addition. Write a program for 2 digit decimal addition using DAA and RLC instructions.
Example 6 : 4 DIGIT HEX COUNTER
This example program displays a 4 digit Hex count in the address field of the display, from 000 to FFFF and again resets to 0000 before continuing further count. The HL register pair is used for counting and the MODIDT subroutine is used to obtain the display. Address
Data
Mnemonic
F000 F003 F007
31 FFFE 21 0000 CD 6203
LXI SP,FEFF LXI H, PUSH H CALL MODIAD
F00A F00D F010 F011 F012
11 0040 CD F105 EI 23 C3 06F0
LXI D 4000 CALL DELAY POP H INX H JMP F006
Example 5 : HEX ADDITION
This program combines the RDKBD and MODIDT subroutines with the ADD B instruction.The RDLBD subroutine reads two successive key entries and adds them together in register A. The MODIDT subroutines then displays the result of this addition in the data field of the display.
Comments
Define stack pointer Save HL on stack Display count in address field Set Delay Wait out Delay Restore HL Increment count Continue in loop
5-14
5-15
Example 7 : 2 DIGIT DECIMAL COUNTER
This program displays s decimal counter in the data field of display. The count can be stopped using the VI key and restarted by pressing any key, except the Reset key. The address field shows ‘E’ to indicate that user program is being executed. Address
Data
Mnemonics
F000 F003 F005 F006 F007 F009 F00A F00B F00C F00D F010 F012 F015 F016 F017 F020 F022 F023
31 FFFE 3E IB 30 FB 06 00 78 27 47 C5 CD 6E03 16 18 CD F105 C1 04 C3 09F0 3E 1F 30 CD E702
LXI SP,FEFF MVI A, IB SIM EI MVI B, 00 MOV A, B DAA MOV B, A PUSH B CALL MODIDT MVI D, 18 CALL DELAY POP B INR B JMP F009 MVI A, 1F SIM CALL RDKBD
F026 F028 F029 F02A FFCE
3E 1B 30 FB C9 C3 20F0
MVI A, 1B SIM EI RET JMP F020
Comments
Define stack Pointer Load A with 1B Set interrupt mask Enable Interrupt Clear B Load A from B Decimal adjust A Load B from A Save B on stack Display count Set Delay Wait out delay Restore count Increment count Continue Load A with 1 F Set interrupt mask Wait for a key to be Pressed Load a with 1B Set interrupt mask Enable Interrupt Return Jump to interrupt routine
This program executedas GO F000 EXEC, and it can be stopped by pressing the VI key. The count can be restarted by pressing any key other than Reset key. 1. Change the speed of counter by modifying the contents of location F011H which decides the delay. 2. Use the CPI instruction to compare the count with 60, & a conditional jump JNZ, converts this program to count only upto 59.Use the XRA instruction to reset the accumulator to 00 after counting upto 59. Now set the delay in such a way that count advances by 1 per second . This program coverts your MICROFRIEND DYNA – 85 into digital stop watch. 3. Write a program based on these basic ideas to display hours and minutes in the address field and seconds in the data field. You can either have a 12 hour or 24 hour clock. Example 8 : FLASHING DISPLAY ‘LErn’
This program flashes the message ‘Lern’ in the address field of the dispay. Adderss
Data
F000 F001 F002 F003 F004 F005 F006
11 0E 14 16 15 15 15
Mnemonic
Comments
L E r n blank blank blank
5-16
5-17
Address
Data
Mnemonics
F010 F013
31 FFFE 3E 01
LXI SP, FEFF MVI A, 01
F015 F017
06 00 21 06F0
MVI B, 00 LXI, H F006
F01A
CD B702
CALL OUTPUT
F01D F01F F021
3E 00 06 00 21 00F0
MVI A, 00 MVI B, 00 LXI H, F000
F024
CD B702
CALL OUTPUT
F027 F02A F02D F02F F031 F034 F037 F03A F03D
11 FFFF CD F105 3E 00 06 00 21 04F0 CD B702 11 FFFF CD F105 C3 1DF0
LXI D,FFFF CALL DELAY MVI A, 00 MVI B, 00 LXI H F004 CALL OUTPUT LXI D, FFFF CALL DELAY JMP F01D
Comments
Define stack pointer Load A with 1 to use Data field. No decimal point Get characters starting at F006H Display them in data field Use address field No Decimal point Get characters starting at F000 Display them in address Field Set Delay Wait out delay
Example 9 : ROLLING DISPLAY
This program is included in the monitor FIRMWARE and it is accessible through code ‘0F’. On executing this code the display starts showing the rolling message “dYnALOG hELPS YoU In LEArning UP”. The rolling display is using the OUTPUT and DELAY subroutines. To simulate the effect of rolling, characters are taken one from a string of characters and the position is shifted from right to left. When the first letter appears in the highermost position, remaining 5 digits must be blank. This string starts with 5 blank characters. The last character in the string is FFH, which is not used to display any letter but it is used only to detect the end of string , so that the rolling can once again start from the beginning using a conditional jump instruction. The complete listing of this program is given in the FIRMWARE listing at address 0E5BH.
Get blank Blank display
Transfer this program from EPROM to RAM using CODE 00. Then modify all the address locations suitably so that the same program can be executed form RAM.
Continue Flashing
Additional Suggestion :
1.
Find out the location where the delay values are sorted. Change these delay values to change the rate of flashing.
2.
Select any other 4 character word and flash it on the display.
3.
Select a 2 character word and place it at F004H and F005H so that it flashes in between the flashing of 4 character word.
Now you can put any other message in the string and display that message.
6-1
CHAPTER 6
SERIAL I / O OPERATION In the serial I / O section we will discuss about the RS232Ã and Audio Cassette Interface. Apart from the Keyboard Mode, the serial Mode can be selected with appropriate strapping. In the keyboard mode user can communicate with the system only in hexadecimal format . The serial mode is provided for the better interaction mode of communication using a terminal. Normally the mode of cmmunation is ASCII ( American Standard Code for Information Interchange). To Correct MICROFRIEND with a terminal strap SID, the appropriate signals are provided 7 pin cable type connect . After appropriately connecting the terminal the standard Baud Rate is 110 with two stop bits. When the system is powered on the in - built displays show SERIAL. This routine expects a space character (20H in ASCII) from the terninal. The system is claimed to be AUTO BAUD, that is after sensing the space character from the terminal it will adjust to the appropriate Baud Rate and hence forth communicate with this Baud Rate, until the next power ON or the Reset key is pressed, the Baud Rate is unchanged. Thus on power ON or Reset you press a space bar on TTY and sign on message MICROFRIEND DYNA – 85 appears on the console . The procedure is similsr for CRT type of terminals where the communication mode is RS232C. RS232C is a EIA approved standard for communation. For an active signal the channel will give -12V signal and for the inactive signal the voltage will be +12V. This is to keep the long communication line immune to noise and to connect a CRT terminal on RS232C link, strap the SID line to CRT. The communication format is fully duplex, 8 bit ASCII data , no parity start bit and two stop bits. Full Duplex means that whatever character received from the terminal is echoed back.
6-6
6-7 The bits in the byte (F) and interrupt mask (I) are encoded as follows :
Identifier code
I H L M S P
Register
Interrupt mask Register H Register L Register H & L combined Stack Pointer Program Counter
The format of F register : S
Z
X
C
X
P
X
C Carry Parity Aux.Carry Zero
The command operates as follows :
Sign X= Undefined
1. Type X, followed by a register identifier or a carriage return. The format of I register : 2. The contents of the register are displayed (Two hexadecimal digits for A, B, C, D, E, F, I, H and L, four hexadecimal digits for M, S and P) followed by a dash(-). 3. The register can be modifiedby typing the new value, followed by a space comma, or carriage return. If no modification is desired, type only the space comma or carriage return.
0
4. If a space or comma is typed in step (3), the next register in sequence will be displayed as in step 2. If P was displayed the command is terminated. If a carriage return is entered in step 3, the X command is terminated. 5. If a carriage return is typed in step (1) above, an annotated list of all registers and their contents are displayed.
0
0
0
I
M
M
M
E
7.5
6.5
5.5
Interrupt Mask Interrupt enable flag 6.3
PROGRAM DEBUGGING
The monitor treats the RST 1 instruction (CF) as a special sequence initiater. When the RST 1 instruction is executed, the monitor will automatically save the complete CPU status, and after pressing the space bar , it outputs the sign-on message MICROFRIEND DYNA-85 on the console. Now you may display the contents of the CPU status register by initiating the ‘X’ command. After examining the machine status and making any changes you can resume execution of the program by inputting ‘G’ and carriage return on the console. You can step through large portions of your program by inserting RST 1 instructions at key location.
6-8 6.4
6-9 ERROR CONDITIONS
2.
Each character is checked as it is entered from the console. As soon as the monitor determines that the last character entered is il legal, it aborts the commands and issues ‘*’ to indicate an error has occurred.
I COMMAND EXAMPLE :
1 1 0 0 0 (CR) 0123456789A$ This command puts the following into RAM.
6.5
ADDRESS VALUE ERRORS
3.
Some commands require an address pair in the form of ( Low Address ) ( High Address ). While these commands are used and the value of Low address is greater than or equal to the value of high address, the action indicated by the command will be performed on the data at low address only. Addresses are evaluated modulo 2 10 , thus if a hexadecimal address greater than FFFFFH is entered, only the last 4 hex digits will be used. Another type of address error may occur when you specify a part of memory in a command which does not exit in the hardware configuration you are using. In general, if a nonexistent portion of memory is specified as the source field for an instruction, the data fetched will be unpredictable. If a non existent portion of memory is given as the distrinct field in a command, the command effect. 6.6
M 0 0 0 0, 0 0 1 0, F 0 0 0 (CR) Block area from 0H to 0010H (27 Bytes) is moved to RAM from F000H. User can check it with two commands. D0, 10 (CR) and DF000, F020 (CR) 4.
3E- 00-05
D3-00
05-07 (CR)
The location F000H which contains 3E is unchanged. Location F001H contains 00 is replaced with 05 , location F002H contains D3 is replaced with 00 and F0003H contains 05, which is replaced by 07. The user can verify it with the D command.
COMMAND EXAMPLES AUDIO CASSETTE I/F
D COMMAND EXAMPLE :
DC5, D6 (CR) 00C5 00D0
S COMMAND EXAMPLE :
SF000
6.7 1.
M COMMAND EXAMPLE :
DA 9D 00 C3 E9 02 FE 10 CA EC
01 00
CD 32
00
02
CD
E7
Till now the full discussion was concentrated on CRT (RS232C) type of communication interface . Additional useful interface provided on SID and SOD lines of 8085 Microprocessor is the Audio Cassette I/F.
6-10
6-11
The System RAM is volatile, i.e. whenever the power is OFF, data is lost.EPROM is nonvolatile storage but it is costly and consumes more time for erasing and reburning. Audio Cassette I/F is cheap and fast to use. You can store 30K bytes on one side of the C60 cassette. The two commands SAVE and LOAD in operating section explain the use of this interface. In this section the background of this interface is discussed . A file management type of storage is supported . A very reliable , ‘Simple Hardware Complex Software’ type frequency modulation method is used for M F-DYNA 85. BIT 0 2KHz BIT 1 2KHz
If Err is displayed. It indicates : Open area for RAM (SS-SE) Improper formatting Checksum mismatch Noisy Tape recorde/ tape BAUD RATE TABLE 6.1 (At 6,144 MHz Crystal)
8 cycles + 1KHz 2 cycles 6 ms 4 cycles + 1KHz 4 cycles 6ms
Byte Start Bit ( 0 ) bit 7 to bit 0 Bit 10*6 60ms FILE Hexadecimal file.
1 stop
SAVE / LOAD SEQUENCE :
SS LOAD SYNC
1KHz 4 Sec.
FILE NAME
SE
SS
1 Byte 2 Bytes 1Byte
CHKSUM
1 Byte
MIDSYNC DATA TAIL SS SYNC
2 KHz 2 Sec.
Variable 2KHz Data 2Sec.
The data rate is 165 bps in 30 min. You can store (165 * 30 * 60) * 10 Bytes 25 K. The Output could be connected to MIC or AUX IN of CRTs. The total procedure for SAVING and LOADING is explained in command chapter.
Baud Rate
Bit-Time
Half Bit
110 150 300 600 1200 4800 9600 19200
08C6 05B2 03D7 0269 02B2 0157 0129 0112 0107
04E3 03D9 026C 01A5 0159 012C 0115 0109 0104
Please note that only while using the CIN and COUT routines off line. You have to load these HALFBIT and BITTIME. In all other situations the AUTOBAUD software will adjust to terminal baud rate ( Any nonstandard baud rates also ). While loading the locations are FF9AH for HALFBIT and FFCOH for BITTIME For 600 Baud, load the following using the SET command : FFC0 – 69 FFC1 – 02 FF9A – A5 FF9B – 01
7-1
CHAPTER 7
FOR THE MICROFRIEND ILC USER This manual can be utilized for the user of MICROFRIEND ILC, also because MICROFRIEND DYNA-85 is the upgraded version of ILC (W/P). The differences between MICROFRIEND DYNA-85 and ILC are as follows : 1)
2)
3)
In DYNA-85 Address, Data and Control lines are brought on to a 50 pin FRC connector instead of the 56 pin STD connector provided on ILC. In DYNA-85, three 16 bit timer/ counter channels are available onboard using the 8253 chip and it is brought on to a 10 pin connector. RAM sockets are provided with battery back up on DYNA-85 which is not present on the ILC.
All command, codes, keyboard functions and monitor programs of ILC are the same as that of DYNA-85 system. The Memory and I/O mapping are also the same as DYNA-85. Any program written on DYNA-85 will work on ILC and vice versa,expect the routine code related to the timer/counter of 8253.
7-2
A-1
The details of the 56 pin edge connector is given below :
APPENDIX A
Pin No.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Signal Name
+5V +5V GND GND NC NC AD3 AD7 AD2 AD6 AD1 AD5 AD0 AD4 A7 A15 A6 A14 A5 A13 A4 A12 A3 A11 A2 A10 A1 A9
Pin No.
Signal Name
CONNECTOR & STRAPPING DETAILS
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
A0 A8 WR RD IORQ MEMRQ IOEXP NC NC NC S1 S0 BUSAK (HLDA) BUSRQ (HOLD) INTA INTRQ
The connectors on MICROFRIEND-DYNA 85 are designated as follows :
NMIRQ SYSRST PBRESET CLK NC NC NC NC NC +12V -12V
J1 J2 J3 J4 J5 J6 J7
: : : : : : :
50 pin Edge connector with STD compatible signals 26 pin flat cable connector for 8155 26 pin flat cable cinnector 8255 26 pin flat cable connector for 8279 7 pin power supply connector 7 pin connector for serial I/O 10 pin FRC connector for 8253
Connector J1 : DYNA-85 Bus Interface Pin No.
Signal Name Pin No.
Signal Name
1 2 3 4 5 6 7 8 9 10 11 12 13 14
+ 5V + 5V GND GND RDY ALE AD3 AD7 AD2 AD6 AD1 AD5 AD0 AD4
A10 A1 A9 A0 A8 WR RD IORQ IO/ M IOEXP IOEXP1 IOEXP2 IOEXP3 NMIRQ
26 27 28 29 30 31 32 33 34 35 36 37 38 39
A-2 Pin No.
A-3 Signal Name
Pin No.
Signal Name
A7 A15 A6 A14 A5 A13 A4 A12 A3 A11 A2
40 41 42 43 44 45 46 47 48 49 50
CS2 HLDA HOLD INTA INTRQ CLK RST6.5 SYSRESET PBRESET RST5.5 RST7.5
Connector J3 : 8255 Connector Pin No.
15 16 17 18 19 20 21 22 23 24 25
Connector J2 : 8155 Connector Pin No.
Signal Name
Pin No.
Signal Name
1 3 5 7 9 11 13 15 17 19 21 23 25
PA3 PA1 VCC PA6 PA4 TIM IN PC4 PC1 PC3 PB1 PB3 PB5 PB7
2 4 6 8 10 12 14 16 18 20 22 24 26
PA2 PA0 PA7 PA5 TIM OUT PC5 PC0 PC2 PB0 PB2 PB4 PB6 GND
1 3 5 7 9 11 13 15 17 19 21 23 25
Signal Name
Pin No.
Signal Name
PA3 PA1 VCC PA6 PA4 PC6 PC4 PC1 PC3 PB1 PB3 PB5 PB7
2 4 6 8 10 12 14 16 18 20 22 24 26
PA2 PA0 PA7 PA5 PC7 PC5 PC0 PC2 PB0 PB2 PB4 PB6 GND
Connector J4 : 8279 Connector Pin No.
Signal Name
Pin No.
Signal Name
1 3 5 7 9 11 13 15 17 19 21 23 25
RL0 RL2 RL4 RL6 OUT A3 OUT A1 OUT B3 OUT B1 NC CNTL NC SL3 SL1
2 4 6 8 10 12 14 16 18 20 22 24 26
RL1 RL3 RL5 RL7 OUT A2 OUT A0 OUT B2 OUT B0 VCC SHIFT GND SL2 SL0
A-4
B-1
Connector J5 : Power Supply Connector
APPENDIX B
Pin No.
Signal Name
ADD-ON CARDS FOR MICROFRIEND DYNA-85
1 2 3 4 5 6 7
GND GND + 5V + 5V + 12V -12V NC
The MICROFRIEND DYNA-85 trainer and development system supports various type of add-on interfacing cards like DYNA study card, PIO cards. These cards are designed for the novice as well as those who already know about microprocessors, to carry out experiments for the purpose of thorough understanding of the peripheral chips and interfacing with external world.
Connector J6 : Serial Connector Pin No.
Signal Name
1 2 3 4 5 6 7
NC NC NC NC TXD RXD GND
List of add on card supported by DYNA-85 is as follows : 1) DYNA-SERIES PERIPHERAL STUDY CARDS
[A] [B] [C] [D] [E] [F]
Connector J7 : 8253 Connector Pin No.
Signal Name
Pin No.
Signal Name
1 3 5 7 9
GATE 0 GATE 2 CLK 0 CLK 1 CLK 2
2 4 6 8 10
GATE 1 GND OUT 0 OUT 1 OUT 2
DYNA-PIO DYNA-PIO/1 DYNA-PIO/2 DYNA-TIMER DYNA-SERIAL DYNA-LBDR
: : : : : :
[G] DYNA-INTR [H] DYNA-KBDISP [I] DYNA-DCM
: : :
[J]
:
DYNA-TWH
8155 STUDY CARD 8212 STUDY CARD 8255 STUDY CARD 8253 STUDY CARD 8251 STUDY CARD LATCH, BUFFER, DECODER, RAM STUDY CARD 8259 STUDY CARD 8279 STUDY CARD DC MOTOR CONTROL STUDY CARD THUMBWHEEL STUDY CARD
And many more study cards will be made available in the DYNASERIES.
B-2
D-1
2)
DMS-PIO CARDS
[A] [B] [C] [D] [E] [F] [G] [H]
HEX KEYPAD CARD. STEPPER MOTOR CONTROLLER CARD. ELEVATOR SIMULATOR CARD. D TO A CONVERTER CARD. A TO D CONVERTER CARD. LOGIC INTERFACE CARD. SERIAL DISPLAY CARD. DIGITAL I/O SIMULATOR CARD
For further information or demonstration of the above cards w ith DYNA-85, please contact us or our dealers.
APPENDIX D
MICROFRIEND DYNA-85 MONITOR LISTING ADDRESS
NAME
0000
RST 0 COLD START
0008 004E 0066 0092 00CB 00FD 018B 01D7 01E9 01F1 0200 0215 022B 026C 028E
FUNCTION
Resets & Reinitializes all RST 1 WARM START Stores all CPU status SIGNONK Friend Message CMMND Keyboard command recognizer REG 'REG' Command entry examine/modify CPU registers RUN Execute user program STEP STEP/Breakpoint user program SET Examine/Modify memory ** CLEAR Clear display. Dot as per B flag * CLDIS Clear display, Terminate command CLDST Subroutine for Cold Start DISPC Display program counter & contents ** ERR Display FErr & terminate command ** GTHEX Get hex digits from the keyboard as per B flag * HXDSP Expand hex digits for display ININT Input interrupt RST 5.5 processing
D-2
D-3
ADDRESS
NAME
029F 02A8
* INSDG NXTRG
02B7 02E7 02F7 02FA 02FC 0309 031B 0344 035F
** OUTPUT ** RDKBD RETF RETT RGLOC RGNAM RSTOR SETRG MODIAD
0362
** MODADI
036B
MODIDT
036E
** MODIDT1
03FA 0408 0437 0468 0486 04D0 04F0 0514 0590 05BB 05C4
SIGNON GETCM DCMD GCMD IMCD SCMD SCMD XCMD ** CIN * CNVBN ** COUT
05EB 05F1
** CROUT ** DELAY
05F8
** ECHO
0611 061C 061F
* ERROR FRET ** GETCH
0626
** GETHX
FUNCTION
INSERT hex digit in A into DE Advance register pointer to next reg. Output characters to display Read characters from KBD in A Return False Return True Get register save location Display register name Restore user registers SET Register pointer Update address field of display from CURAD Update address field of display from HL Update address field of display from WRDT Update data field of display from A Print MICROFRIEND-I on TTY Get commands from TTY Display memory block Execute user program Insert byte into memory Block move during memory Examine & Modify memory Examine & Modify registers Gets character in A from TTY Converts ASCII hex to Binary Outputs ASCII character in C to TTY Outputs CR & CF to console Returns when count in DE become 0 Gets character from console & sends it back Outputs to console Get a character from input stream Accept a string of hex digits from input stream
ADDRESS
NAME
FUNCTION
065B
** GETNM
06A0 06C7
* HIL0 ** NMOUT
06E2 06EA
PRVAL REGDS
071B
RGADR
0732 0734 073F
SRET STHF0 STHLF
075E
VALDG
0779 0841 085C
VALDL CODECMD MOVE BLOCK
088D
FILL BLOCK
08A6
COMPL CMENT
08BD
BLOCK Search
08D4
* DISPLAY
08DD
INSERT
0929
DELETE
0951
HEX-DECIMAL
Get specified count of numbers from input stream Compare HL & DE Outputs two ASCII characters for each number in A Convert hex to ASCII Display contents of register save one location From a character denoting register gets the saved location address Success return Store to lower half zero Store into specified half byte of DE the 4 bit value in C 0-9 & A-F valid hex degit check Valid delimiter check CODE Command Move Block of Memory CODE 00 Fill block of RAM with variable CODE 01 Complement RAM block CODE 0E Search a given block for variable CODE 04 Display match/mismatch & wait for INR Insert a byte in a block CODE 02 Delete a byte from a block code 03 CODE 05 Hexadecimal to Decimal
D-3 ADDRESS
-09D7
D-4 NAME
FUNCTION
DEC-HEX
CODE 06 Decimal to Hex conversion Baud Rate id, Sign, Command Baud Rate identification Convert to Binary Break point loading Break point checking Load SS, SE & DS Load SS & SE Display as per code Check EPROM for erasure code 0B Load Pr (Program)type Duplicate CODE 0A Copy PROM into RAM CODE 09 Checksum given PROM CODE 'OC' Verify RAM VS EPROM CODE '08' Read from COPY PROM At a given ADR Program given memory block in COPY ODE 07 SS/SE and Sr. Loading Display message like P,V,C,D Save from memory block onto cassette Output a byte in C onto tape Output a burst of signal
SERIAL
09E3 0A10 0A19 0A4B 0A78 0A93 0AC2 0AE6
BRID CNVBN TPO SSTEP * LDALL LDSSE * DTDISP BLANKCHK
0B16 0B35 055B
Pr LOAD DUPL COPY
0B65
CHKSUM
0BA7
VERIFY
0BD6
* READ
0BF1
PROGRAM
0C46 0C6B
SRKD MESG
0CB7
SAVE
0CDD
TAPEOUT
0CFC
BURST
ADDRESS
NAME
FUNCTION
0D28
LOAD
0D5C 0D84
TAPEIN BITIN
0DAB 0DBA 0DC3 0DD9 0DF8
PRVRG CHK INR DCR VALCHI * BITSPAS
Load from cassette to RAM Input a byte from tape Input a bit at a time from Tape Previous register INR or DCR Check
0E0F 0E50
SRL1 * COMPARE
0E5B 0EA2 *
Validity Check Pass Bits in serial mode Display Serial Block compare compares two blocks SS, SE & ds CODE OF Guess game CODE 0D
These routines are very useful to the user & are re-explained in the programming section
D-5
D-6 0028 C3C2FF
JMP RST 5.5
002C 002C C397FF
ORG 2CH JMP ININT
0030 0030 C3C5FF
ORG 30H JMP RSET6
SOFTWARE LISTING OF MICROFRIEND-DYNA-85
LOC OBJ 0000 0002 0005 0008 0008 000B 000C 000F 0010 0011 0014 0017 0018 001B 001E 001F 0020 0021 0024 0024 0028
SOURCE STATEMENT "RESET" KEY ENTRY POINT-COLD START RST 0 ENTRY POINT 3E00 MVI A, KMODE ;GET CONTROL CHARACTER D30500 OUT CTRL ;SET KEYBOARD/DISPLAY MODE C3F101 JMP CLDST ;GO FINISH COLD START CLDBK ;THEN JUMP BACK HERE ORG 8 SAVE REGISTERS 22EFFF SHLD LSAV ;SAVE H & L REGISTERS E1 POP H ;GET USER PROGRAM COUNTER FROM TOP OF STACK 22F2FF SHLD PSAV ;/AND SAVE IT F5 PUSH PSW ; E1 POP H 22EdFF SHLD FSAV ;SAVE FLIP/FLOP & REGISTER A 210000 LXI H, 0 ;CLEAR H & L 39 DAD SP ;GET USER STACK POINTER 22F4FF SHLD SSAV ;AND SAVE IT 21EDFF LXI H, BSAV+1 ;SET STACK POINTER FOR SAVING F9 SPHL ;REMAINING REGISTERS C5 PUSHB ;SAVE B& C D5 PUSHD ;SAVE D & E C33F00 JMPRES10 ;LEAVE ROOM FOR VECTORED INTERRUPTS TIMER INTERRUPT (TRAP) ENTRY POINT (RST 4.5)-ORG 24H C35701 JMP STP 25 ;BACK TO SINGLE STEP ROUTINE RST5 ENTRY POINT ORG 28H
0034 ORG 34H 0034 C3C8FF
;BRANCH TO RST 5 LOCATION IN RAM INPUT INTERRUPT ENTRY POINT (RST 5.5) ;BRANCH TO USER RAM RST 6 ENTRY POINT ;BRANCH TO RST 6 LOCATION IN RAM HARD WIRED USER INTERRUPT ENTRY POINT (RST 6.5)
JMP RESET 6.5 ;BRANCH TO RST 675 LOCATION IN RAM
0038 ORG 38H 0038 C3CBFF
JMP RSET7
003C ORG 3CH 003C C3CEFF
JMP USINT
;BRANCH TO RST 7 LOCATION IN RAM "VECTORED INTERRUPT" KEY ENTRY POINT(RST 7.5)
;BRANCH TO USER INTERRUPT LOCATION IN RAM. RES10 ; CONTINUE SAVING USER STATUS ;GET USER INTERRUPT STATUS AND INTERRUPT MASK 003F 20 RIM ;GET USER INTERRUPT STATUS AND INTERRUPT MASK 0040 E60F ANI 0FH ;KEEP STATUS & MAK BITS 0042 32F1FF STA ISAV ;SAVE INTERRUPT STATUS & MASK 0045 3E0E MVI A, UNMASK ;UNMASK INTERRUPTS FOR MONITOR USE 0047 30 STM ;INTERRUPTS DISABLED WHILE MONITOR IS RUNNING (EXCEPT WHEN WAITING FOR INPUT) 0049 20 RIM ;TTY OR KEYBOARD MONITOR? 004A 07 RLC ;IS TTY CONNECTED?
D-7
D-8 ****************************************
0048 DAD709
JC SERIAL
;YES - BRANCH TO TTY MONITOR ;NO - ENTER KEYBOARD MONITOR
FUNCTION ; COMMD-COMMAND RECOGNIZER INPUTS ; NONE OUTPUT ; NONE CALLS ; RDKBD, ERR, SET, REG, RUN, STEP, CODE, SAVE, LOAD DESTROYS ; A, B, C, D, E, H, L, F/F'S
******************************************
004E 004F 0051 0054 0057 0059 005B 005E 0061 0063
BEGINNING OF KEYBOARD MONITOR CODE ***************************************************** OUTPUT SIGN-ON MESSAGE AF XRA A ;ARG-USE ADDRESS FIELD OF DISPLAY 0600 MVI B, NODOT ;ARG-NO DOT IN ADDRESS FIELD 21A063 LXI H, SGNAD ;ARG-GET ADDRESS OF ADDRESS FIELD PORTION OF SIGN-ON MESSAGE CDB702 CALL OUTPUT ;OUTPUT SIGN ON MESSAGE TO ADDRESS FIELD 3E01 MVI A, DTFLD ;ARG-USE DATA FIELD OF DISPLAY 0600 MVI B, NODOT ;ARG-NO DOT IN DATA FIELD PORTION OF SIGN-ON MESSAGE 21AA03 LXI H, SGNOT ;ARG-GET ADDRESS OF DATA FIELD PORTION OF SIGN-ON MESSAGE CDB702 CALL OUTPUT ;O/P SIGN-ON MESSAGE TO DATA FIELD 3E80 MVI A, EMPTY 32FEFF STA IBUFF ;SET INPUT BUFFER EMPTY FLAQ
0066 0069 006B 006D 006F
31E9FF 3E90 D305 3E1E D304
0071 00 0072 CDE702 0075 010B00
LXIH MNSTK MVI A, ADISP OUT CNTRL MVI A, F OUT DATA
;MONITOR SP INITIALIZED ;USE ADDRESS FIELD ;OUTPUT TO CNTRL ;PROMPT ;OUTPUT F TO START OF ADDRESS
NOP CALL RDKBD ;READ KEYBOARD LXI B, NUMC ;COUNTER FOR NUMBER OF COMMANDS IN C 0078 210008 CMD10 LXI H, CMDTB ;GET ADDRESS OF COMMAND TABLE 0078 BE CMP M ;RECOGNIZE THE COMMAND? 007C CA8700 JZ CMD15 ;YES GO PROCESS IT 007F 23 INX H ;NO-NEXT COMMAND TABLE ENTRY 0080 0D DCR C ;END OF TABKE? 0081 C27800 JNZ CMD10 ;NO-GP CHECK NEXT ENTRY ;YES - COMMAND UNKNOWN 0084 C31502 JMP ERR ;DISPLAY ERROR MESSAGE AND GET ANOTHER COMMAND CMD15 0087 210B08 LXI H, CMDAD ;GET ADDRESS OF COMMAND ADDRESS TABLE 008A 0D DCR C ;ADJUST COMMAND COUNTER COUNTER ACTS AS POINTER TO COMMAND ADDRESS TABLE
D-9
D-10
008B 09
DAD B
008C 09
DAD B ;
008D 7E
MOV A, M
008E 23 008F 66
INX H MOV H, M
0090 6F
MOV L, A
0091 E9
PCHL
;ADD POINTER TO TABLE ADDRESS TWICE BECAUSE TABLE HAS 2 BYTE ENTRIES GET LOW ORDER BYTE OF COMMAND ADDRESS
00A3 7E 00A4 32F8FF
;GET HIGH ORDER BYTE OF COMMAND ;PUT LOW ORDER BYTE IN L COMMAND ROUTINE ADDRESS IS NOW IN H & L ;BRANCH TO ADDRESS IN H &L
00AC 0601
************************ COMMAND ROUTINES ************************ FUNCTION ; REG EXAMINE AND MODIFY REGISTERS INPUTS ; NONE OUTPUTS ; NONE CALLS ; CLEAR, SETRG, ERR, RGNAM, RGLOC, UPDDT, GTHEX, NXTRG DESTROYS ; A, B, C, D, E, H, L, F/F'S REG 0092 0601 0094 0097
009A 009D 00A0
MVI B, DOT
;ARG-DOT IN ADDRESS FIELD OF DISPLAY CDD701 CALL CLEAR ;CLEAR DISPLAY CD4403 CALL SETRG ;GET REGISTER DESIGNATOR FROM KEYBOARD AND SET REGISTER/POINTER ACCORDINGLY WAS CHARACTER A REGISTER DESIGNATOR FALSE ERR ;NO-DISPLAY ERROR MSG. AND TERMINATE COMMAND D21502 JNC ERR EXAM05 CD0903 CALL RGNAM ;OUTPUT REGISTER NAME TO ADDRESS FIELD CDFC02 CALL RGLOC ;GET REGISTER SAVE LOCATION IN H & L
00A7 0601 00A9 CD6B03
00AE CD2B02
00B1 D2B800 00B4 CDFC02 00B7 73 00B8 FE11 00BA CAE901 00BD FE10 00BF C2E60D 00C2 CDA802
00C5 DA9D00 00C8 C3E901
MOV A, M STA CURDT
;GET REGISTER CONTENTS ;STORE REGISTER CONTENTS AT CURRENT DATA MVI B, DOT ;ARG-DOT IN DATA FIELD CALL UPDOT ;UPDATE DATA FIELD OF DISPLAY MVI A, DTFLD ;ARG-USE DATA FIELD OF DISPLAY CALL GTHEX ;GET HEX DIGIT-WERE ANY DIGIT RECEIVED FALSE EXM10;NO-DOT UPDATE REG.CONTENT JNC EXM10 CALL RGLOC ;YES GET REGISTER SAVE LOCATION IN H & L MOV M, E ;UPDATE REGISTER CONTENTS EXAM10 CPI PERIO ;WAS LAST CHARACTER A PERIOD ? JZ CLDIS ;YES CLEAR DISPLAY AND TERMINATE COMMAND CPI COMMA ;WAS LAST CHARACTER. ? JNZ PRRG ;NO JUMP TO PREVIOUS REG. CALL NXTRG ;YES ADVANCE REG. POINTER TO NEXT REG. ANY MORE REGISTER TRUE EXAM05 ;YES CONTINUE PROCESSING WITH NEXT REGISTER JC EXAM05 JMP CLDIS ;NO CLEAR DISPLAY AND TERMINATE COMMAND
************************************************* FUNCTION RUN -EXECUTE USER PROGRAM INPUTS ; NONE OUTPUTS ; NONE CALLS ; DISPC, RDKBD, CLEAR, ERR, OUTPT DESTROYS ; A, B, C, D, E, H, L, F/F'S
D-11
D-12 00FA C31B03 RUN
00CB CD0002
CALL DISPC
00CE CDE702 00D1 FE11 00D3 CAEC0 00D6
32FEFF
00D9
0601
00DB 00DE 00E0 00E3 00E5
CDD701 0600 CD2B02 FE11 C21902
00E8
EB
00E9
22F2FF
00EC
0600
00EE 00F1
CDD701 AF
00F2
0600
00F4
21A203
00F7
CDB702
G10
;DISPLAY USEER PROGRAM COUNTER CALL RDKBD ;READ FROM KEYBOARD CPI PERIO ;IS CHAR. IS PERIOD ? JZ GIO ;YES GO EXECUTE THE COMMAND ;NO ARG CHARACTER IS IN A STA IBUFF ;REPLACE CHARACTER IN INPUT BUFFER MVI B, DOT ;ARG DOT IN ADDRESS FIELD CALL CLEAR ;CLEAR DISPLAY MVI B, ADFLD ;ARG USE ADDRESS FIELD CALL GTHEX ;GET HEX DIGITS CPI PERIO ;WASLASTCHAR. A PERIOD JNZ ERR ;NO-DISPLAY ERROR MSG. AND TERMINATE COMMAND ECHG ;PUT HEX VALUE FROM GTHEX TO H & L SHLD PSAV ;HEX VALUE IS NEW USER PC MVI B, NODOT ;YES-ARG-NO DOT IN ADDRESS FIELD CALL CLEAR ;CLEAR DISPLAY XRA A ;ARG-USE-NO ADDRESS FIELD OF DISPLAY MVI B, NODOT ;ARG-NO DOT IN ADDR. FIELD LXI H, EXMSG ;GET ADDRESS OF EXECUTION MESSAGE IN H & L CALL OUTPT ;DISPLAY EXECUTION MESSAGE
JMP RSTOR
;RESTORE USER REG.INCLUDING PROGRAM COUNTER i.e.BEGIN EXECUTION OF USER PROGRAM
**************************************************************
FUCTION ; STEP-SINGLE STEP(EXECUTE 1 USER INSTRUCTION) INPUTS ; NONE OUTPUTS ; NONE CALLS ; DISPC, RDKBD, CLEAR, GTHEX, ERR DESTROYS; A, B, C, D, E, H, L, F/F'S STEP 00FD CD0002 CALL DISPC ;DISPLAY USER PROG.COUNTER 0100 CDE702 CALL RDKBD ;READ FROM KEYBOARD 0103 FE11 CPI PERIO ;WAS CHARACTER A PERIOD? 0105 CAE901 JZ STP20 ;YES GO TO STP20 0108 FE10 CPI COMMA ;WAS LAST CHARATER '.'? 010A CA2601 JZ CLD1S ;YES-GO SET TIMER NO-CHARACTER FROM KEYBOARD WAS NEITHER PERIOD NOR COMMA 010D 32FEFF STA IBUFF ;REPLACE THE CHARACTER IN THE INPUT BUFFER 0110 0601 MVI A, DOT ;ARG-DOT IN ADDRESS FIELD 0112 CDD701 CALL CLEAR ;CLEAR DISPLAY 0115 0600 MVI B, ADFLD ;ARG-USE ADDRESS FIELD OF DISPLAY 0117 CD2B02 CALL GTHEX ;GET HEX DIGIT-WERE ANY DIGITS RECIEVED ? FALSE ERR ;NO DISPLAY ERROR MSG. AND TERMINATE COMMAND 011A D21502 JNC ERR
D-13 011D EB XCHG ;HEX VALUE FROM GTHEX TO HL 011E 22F2FF SHLDX PSAV ;HEX VALUE IN NEW USER PC 0121 FE11 CPI PERIO ;WAS LAST CHAR. FROM GTHEX A PERIOD ? 0123 C4190A CNZ STP0 ;NO-GO TO CHECK BREAK 0126 3AF1FF STP20 LDA ISAV ;GET USER INTERRUPT MASK 0129 E608 ANI 08H ;KEEP INTERRUPT STATUS 012B 32FDFF STA TEMP ;SAVE USER INTERRUPT STATUS 012E 2AF2FF LHLD PSAV ;GET USER PC 0131 7E MOV A, M ;GET USER INSTRUCTION 0132 FEF3 CPI (DI) ;DI INSTRUCTION ? 0134 C23B01 JNZ STP21 ;NO 0137 AF XRA A ;YES-RESET USER INTR. STATUS 0138 C34201 STP21 JMP STP22 013B FEFB CPI (EI) ;EI INSTRUCTION ? 013D C24501 JNZ STP23 ;NO 0140 3E08 MVI A,08H ;YES SET USER INTR. STATUS 0142 32FDFF STP22 STA TEMP ;SAVE NEW USER INTR STATUS 0145 3E40 MVI A,(TIMER SHR8);HIGH ORDER BITS OF TIME OR TMODE VALUE OR'ED WITH MODE 0147 D30D OUT TIMHI 0149 3EC5 MVI A,TIMER AND 0FFH;LOW ORDER BITS OFTIMER VAL 014B D30C OUT TIMLO 014D 3AFFFF LDA USCSR ;GRT USER IMAGE OF WHAT'S IN CSR 0150 F6C0 ORI TSTRT ;SET TIMER COMMAND BITS TO START TIMER 0152 D308 OUT CSR ;START TIMER 0154 C31B03 JMP RSTOR ;RESTORE USER REGISTERS 0157 F5 STP25 PUSH PSW ;BRANCH HERE WHEN TIMER INTERRUPTS AFTER 1 USER INSTR 0158 3AFFFF LDA USCSR ;GET USER IMAGE WHAT'S IN SCR 015B E63F ANI 3FH ;CLEAR TWO HIGH ORDER BITS 015D F640 ORI 40H ;SET TIMER STOP BIT 015F DE08 OUT CSR ;STOP TIMER
D-14 0161 F1 0162 22EFFF 0165 E1
POP PSW SHLD PSAV POP H
;RETRIEVE PSW ;SAVE H & L ;GET USER PROGRAM COUNTER FROM TOP OF THE STACK
0166 0169 016A 016B 016E 0171 0172
SHLD PSAV PUSH PSW POP H SHLD PSAV LXI H, 0H DAD SP SHLD SSAV
;SAVE USER PC
22F2FF F5 E1 22EDFF 210000 39 22F4FF
0175 21EDFF 0178
F9
0179 C5 017A D5 017B 20 017C E607 017E 21FDFF 0181 B6 0182 32F1FF 0185 3E0E 0187 30 0188 C34B0A
;SAVE FLIP\FLOP & A REG. ;CLEAR H & L ;GET USER STACK POINTER ;SAVE USER STACK POINTER LXI H, BSAV+1 ;SET MONITOR STACK POINTER SPHL ;SAVING REMAINING USER REG PUSH B ;SAVE B & C PUSH D ;SAVE D & C RIM ;GET USER INTERRUPT MASK ANI 07H ;KEEP MASK BITS LXI H, TEMP ;GET USER INTERRUPT STATUS ORA M ;OR IT INTO MASK STA ISAV ;SAVE INTR. STATUS& MASK MVI A, UNMASK;UNMASK INTERRUPT FOR MONITOR USE SIM JMP SSTEP ;GO GET READY FOR ANOTHER INSTR.
D-15
D-16 *************************************************** FUNCTION : SET-SUBSTITUTE MEMORY INPUTS : NONE OUTPUTS : NONE CALLS : CLEAR, GTHEX, UPADD, UPDDT, ERR DESTROYS : A, B, C, D, E, H, L, F/F'S SET
018B 0601 018D CDD701 0190 0600
MVI B, DOT ;ARG-DOT IN ADDR. FIELD CALL CLEAR ;CLEAR THE DISPALY MVI B, ADFLD ;ARG-USE ADDRESS FIELD OF DISPLAY 0192 CD2B02 CALL GTHEX ;GET HEX DIGITS-WERE ANY DIGIT RECIEVED FALSE ERR ;NO-DISPLAY ERROR MSG. AND 0195 D21502 JNC ERR ;TERMINATE COMMAND 0198 EB XCHG ;ASSIGN HEX VALUE RETURNED BY GTHEX TO CURRENT ADDR. 0199 22F6FF SHLD CURAD 019C CDBA0D SUB05 CALL CHK ;CALL CHK ROUTINE 019F 000000 NOP 01A1 0600 SUB MVI B, NODOT ;ARG-NO DOT IN ADDR. FIELD 01A3 CD5F03 CALL UPDAD ;UPDATE ADDR.FIELD OF DISPLAY 01A6 2AF6FF LHLD CURAD ;GET CURRENT ADDR. IN H & L 01A9 7E MOV A, M ;GET DATA BYTE POINTED TO BY CURRENT ADDRESS 01AA 32F8FF STA CURDT ;STORE DATA BYTE AT CURRENT DATA 01AD 0601 MVI B, DOT ;ARG-DOT IN DATA FIELD
01AF CD6B03
CALL UPDDT ;UPDATE DATA FIELD OF DISPLAY 01B2 0601 MVI B, DTFLD ;ARG-USE DATA FIELD 01B4 CD2B02 CALL GTHEX ;GET HEX DIGITS-WERE ANY HEX DIGITS RECIEVED? 01B7 F5 PUSH PSW ;SAVE LAST CHARACTER FALSE SUB10 ;NO LEAVE DATA UNCHANGED 01B8 D2C401 JNC SUB10 ;AT CURRENT ADDRESS 01BB 2AF6FF LHLD CURAD ;YES-GET CURRENT ADDRESS IN H & L 01BE 73 MOV M, E ;STORE NEW DATA AT CURRENT ADDRESS MAKE SURE DATA WAS ACTUALLY STORED IN CASE CURRENT ADDRESS IN ROM OR IS NON-EXISTANT 01BF 7B MOV A, E ;DATA FOR A COMPARISON 01C0 BE CMP M ;WAS DATA STORED CORRECTLY 01C1 C21502 JNZ ERR ;NO DISPLAY ERROR MSG. AND TERMINATE COMMAND 01C4 C3C30D SUB10 JMP INRDCR ;INCREMENT DECREMENT CHECK 01C7 22F6FF SUB20 SHLD CURAD 01CA C3A101 JMP SUB ;RETRIEVE LAST CHARACTER 01CF FE11 SUB15 CPI PERIO ;WAS LAST CHARACTER '.'? 01D1 C21502 JNZ ERR ;NO-DISPLAY ERROR MSG. AND TERMINATE COMMAND 01D4 C3E901 JMP CLDIS ;YES-CLEAR DISPALY AND TERMINATE COMMAND
D-17
********************************************** UTILITY ROUTINES ********************************************** FUNCTION : CLEAR-CLEAR THE DISPLAY INPUTS : B-DOT FLAG 1 - MEANS DOT IN ADDR. FIELD OF DISPLAY 0 - MEANS NO DOT OUTPUTS : NONE CALLS : OUTPT DESTROYS : A, B, C, D, E, H, L, F\F'S DESCRIPTION : CLEAR SENDS BLANK CHARACTERS TO BOTH THE ADDRESS & DATA FIELD OF THE DISPLAY.IF THE DOT FLAG IS SET THEN A DOT WILL APPEAR AT THE RIGHT EDGE OF THE ADDRESS FIELD. CLEAR 01D7 AF XRA A ;ARG-USEADDRESS FIELD OF DISPLAY ARG-FLAG FOR DOT IN ADDR. FIELD IN B 01D8 219A03 LXI H, BLNKS ;ARG-ADDRESS OF BLANKS FOR DISPLAY 01DB CDB702 CALL OUTPT ;O/P BLANKSTOADDR.FIELD 01DE 3E01 MVI A, DTFLD ;ARG-USE DATA FIELD FOR DISPLAY 01E0 0600 MVI B, NODOT ;ARG-USE NO DOT IN DATA FIELD 01E2 219A03 LXI H, BLNKS ;ARG-ADDRESS OF BLANKS FOR DISPLAY 01E5 CDB702 CALL OUTPT ;OUTPUT BLANKS TO DATA FIELD 01E8 C9 RET ;RETURN
D-18 ******************************************************************* FUNCTION : CLDIS-CLEAR DISPLAY AND TERMINATE COMMAND INPUTS : NONE OUTPUTS : NONE CALLS : CLEAR DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION : CLDIS IS JUMPED TO BY COMMAND ROUTINES WISHING TO TERMINATE NORMALLY. CLDIS CLEARS THE DISPLAY AND BRANCHES TO THE COMMAND RECOGNISER. 01E9 0600 CLDIS MVI B, NODOT ;ARG-NO DOT IN ADDR. FIELD 01EB CDD701 CALL CLEAR ;CLEAR THE DISPLAY 01EE C36600 JMP COMMAND ;GO GET ANOTHER COMMAND **************************************************** FUNCTION : CLDST -COLD START INPUTS : NONE OUTPUTS : NONE CALLS : NOTHING DESTROYS : A DESCRIPTION : CLDST IS JUMPED BY THE MAIN COLD START PROCEDURE,COMPLETES COLD START INITIALIZATION AND JUMPS BACK TO THE MAIN COLD START PROCEDURE. CLDST 01F1 3EC0 MVI A, KBINT ;GET CONTROL CHAR. 01F3 D30500 OUT CNTRL ;INITIALIZE KEYBOARD/ DISPLAY BLANKING 01F7 3E00 MVI A, CSNIT ;INITIAL VALUE OF COMMAND STATUS REG. 01F8 D308 OUT CSR ;INITIALIZE CSR 01FA 32FFFF STA USCSR ;INITIALIZE USER CSR VALUE 01FD C32B0E JMP CLD0 ;BACK TO MAIN PROCEDURE
D-19 *************************************************************** FUNCTION : DISPC-DISPLAY PROGRAM COUNTER INPUTS : NONE OUTPUTS : NONE CALLS : UPDAD,UPDDT DESTYROYS: A, B, C, D, E, H, L, F\F'S DESCRIPTION : DISPC- DISPLAYS THE USER PROGRAM COUNTER IN ADDRESS FIELD OF THE DISPLAY,WITH A DOT AT THE RIGHT EDGE OF THE FIELD.THE BYTE OF DATA ADDRESSED BY THE PROGRAM COUNTER IS DISPLAYED IN THE DATA FIELD OF DISPLAY DISPC 0200 2AF2FF LHLD PSAV ;GET USER PROGRAM COUNTER 0203 22F6FF SHLD CURAD ;MAKE IT THE CURRENT ADDRESS 0206 7E MOV A, M ;GET THE INSTRUCTION AT THAT ADDRESS 0207 32F8FF STA CURDT ;MAKE IT THE CURRENT DATA 020A 0601 MVI B, DOT ;ARG-DOT IN ADDRESS FIELD 020C CD5F03 CALL UPDAD ;UPDATE ADDRESS FIELD OF DISPLAY 020F 0600 MVI B, NODOT ;ARG-NO DOT IN DATA FIELD 0211 CD6B03 CALL UPDDT ;UPDATE DATA FIELD OF DISPLAY 0214 C9 RET
D-20 ********************************************* FUNCTION : ERR-DISPLAY ERROR MASSEGE INPUTS : NONE OUTPUTS : NONE CALL : OUTPT DESTROYS : A, B, C, D, E, H, L, F\F'S DESCRIPTION : ERR IS JUMPED TO BY COMMAND ROUTINES WISHING TO TERMINATE BECAUSE OF AN ERROR ERR OUTPUTS AN ERROR MESSEGS TO THE DISPLAY AND BRANCHES TO THE COMMAND RECOGNISER. ERR 0215 AF XRA A ;ARG-USE ADDRESS FIELD 0216 0600 MVI B, NODOT ;ARG-NO DOT IN ADDRESS FIELD 0218 219E03 LXI H, ERMSG ;ARG-ADDRESS OF ERROR MESSAGE 021B CDB702 CALL OUTPT ;OUTPUT ERROR MESSAGE TO ADDRESS FIELD 021E 3E01 MVI A, DTFLD ;ARG-USE DATA FIELD 0220 0600 MVI B, NODOT ;ARG-NO DOT IN DATA FIELD 0222 219A03 LXI H, BLNKS ;ARG-ADDRESS OF BLANKS FOR 0225 CDB702 CALL OUTPT ;OUTPUT BLANKS TO DATA FOR DISPLAY 0228 C36600 JMP CMMND ;GO GET A NEW COMMAND
D-23 025A 0000 025C FE11 025E CA6702
0261 0264 0267 0268 0269 026A
110000 C3F702 47 79 0F 78
026B C9
D-24 NOP CPI PERIO JZ GTH25
;YES-READY TO RETURN ;NO-WAS LAST CHAR. '.'? ;YES READY TO RETURN `NO-INVALID TERMINATORIGNORE ANY HEX DIGIT READ LXI D, 0 ;SET HEX VALUE TO ZERO JMP RETF ;RETURN FALSE GTH25 MOV B, A ;SAVE LAST CHARACTER MOV A, C ;FHIFT HEX DIGIT FLAG TO RRC ;CARRY BIT MOV A, B ;RESTORE LAST CHARACTER RET ;RETTURN
*************************************************** FUNCTION : HXDSP-EXPAND HEX DIGITS FOR DISPLAY INPUTS : DE-4 HEX DIGITS OUTPUTS : HL-ADDRESS OF OUTPUT BUFFER CALLS : NOTHING DESTROYS : A, H, L, F/F'S DESCRIPTION : HXDSP EXPANDS EACH INPUT BYTE TO 2 BYTE IN A FORM SUITABLE FOR DISPLAY BY THE OUTPUT ROUTINES.EACH HEX DIGIT IS PLACED IN THE LOW ORDER 4 BITS OF A BYTE WHOSE HIGH ORDER 4 BITS ARE SET TO ZERO. THE RESULTING BYTE IS STORED IN THE OUTPUT BUFFER THE FUNCTION RETURNS THE ADDRESS OF THE OUTPUT BUFFER. HXDSP 026C 7A MOV A, D ;GET FIRST DATA BYTE
026D 0F
RRC
026E 026F 0270 0271 0273
RRC RRC RRC ANI 0FH LXI H, BUFF
0F 0F 0F E60F 21F9FF
0276 77
MOV M, A
0277 7A
MOV A, D
0278 027A 027B 027C 027D 027E 027F 0280 0281 0283 0284 0285
E60F 23 77 7B 0F 0F 0F 0F E60F 23 77 7B
ANI 0FH INX H MOV M, A MOV A, E RRC RRC RRC RRC ANI 0FH INX H MOV M, A MOV A, E
0286 0288 0289 028A
E60F 23 77 21F9FF
028D C9
;CONVERT 4 HIGH ORDER BITS TO A SINGLE CHARACTER
;GET ADDR.OF OUTPUT BUFFER ;STORE CHAR.IN O/P BUFFER ;GET FIRST DATA BYTE AND CONVERT 4 LOW ORDER BITS TO A SINGLE CHARACTER. ;NEXT BUFFER POSITION ;STORE CHAR.IN BUFFER ;GET SECOND DATA BYTE ;CONVERT 4 HIGH ORDER ;BITS TO A SINGLE CHAR.
;NEXT BUFFER POSITION ;STORE CHAR. IN BUFFER ;GET SECOND DATA BYTE & ;CONVERT LOW ORDER 4 BIT ANI 0FH ;TO A SINGLE CHARACTER INX H ;NEXT BUFFER POSITION MOV M, A ;STORE CHAR. IN BUFFER LXI H, OBUFF ;RETURN ADDRESS OF OUTPUT RET ;BUFFER IN H & L
D-25 028E 0290 0292 0294 0297
D-26 DB05 INBYTE E607 FE00 CA8E02 3E40
IN, STATUS ANI,07 CPI,00 JZ,INBYTE MVI A,40H
0299 D305 029B DB04
OUT 05H IN,DATA
029D C9 029E FF
RET
;GET 8279 FIFO ;STATUS & KEEP ;COUNT ;IF NO ENTRY WAIT ;IF ENTRY OF KEYBOARD IN ;FIFO ;THEN GET BYTE IN ACC. ;BLANK
**************************************************************** FUNCTION : INSDG-INSERT HEX DIGIT INPUTS : A - HEX DIGIT TO BE INSERTED DE - HEX VALUE OUTPUTS : DE - HEX VALUE WITH DIGIT INSERTED CALLS : NOTHING DESTROYS : A, F/F'S DESCRIPTION : INSDG SHIFTS THE CONTENTS OF D & E. LEFT 4 BITS (1 HEX DIGIT) & INSERTS THE HEX DIGIT INA. THE LOW ORDER DIGIT POSITION OF THE RESULT. A IS ASSUMED TO CONTAIN A SINGLE HEX DIGIT IN THE LOW ORDER 4 BITS AND ZEROS IN THE HIGH ORDER 4 BITS. ***************************************************************** 029F 02A0 02A1 02A2 02A3 02A4 02A5 02A6 02A7
EB 29 29 29 29 85 6F EB C9
XCHG ;PUT D & E IN H & L DAD H DAD H DAD H DAD H ADD L ;INSERT LOW ORDER DIGIT MOV L, A XCHG ;PUT H & L IN D & E RET
******************************************************** FUNCTION : NXTRG - ADVANCE REGISTER POINTER TO NEXT REG. INPUTS : NONE OUTPUTS : CARRY - 1 IF POINTER IS AADVANNCE SUCCESSFULLY 0 OTHERWISE CALLS : NOTHING DESTROYS : A, F/F'S DESCRIPTION : IF THE REG.POINTER POINTS TO THE LAST REG. IN THE EXAMINE REG. SEQUENCE, THE POINTER IS NOT CHANGED AND THE FUNCTION RETURNS FALSE. IF THE REG. POINTER DOES NOT POINT TO THE LAST REG. THEN THE POINTER IS ADVANCED TO THE NEXT REG. IN THE SEQUENCE & THE FUNCTION RETURNS TRUE. NXTRG 02A8 3AFDFF LDA RDPTR ;GET REG. POINTER 02AB FE0C CPI NUMRG-1 ;DOES POINTER POINT TO LAST REGISTER 02AD D2F702 JNC RETF ;YES-UNABLE TO ADVANCE POINTER RETURN ELSE 02B0 3C INR A ;NO ADVANCE REG.POINTER 02B1 32FDFF STA RGPTR ;SAVE REGISTER POINTER 02B4 C3FA02 JMP RETT ;RETURN TRUE
D-27
D-28 02C4 3E94
**************************************************** FUNCTION : OUTPUT - O/P CHARACTER TO DISPLAY INPUTS : A - DISPLAY FLAG 0=USE ADDRESS FIELD 1 = USE DATA FIELD B - DOT FLAG 1 = O/P DOT AT RIGHT EDGE OF FIELD 0 = NO DOT HL - ADDRESS OF CHARACTER TO BE OUTPUT CALLS : NOTHING DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION : OUTPUT SENDS CHARCTERS TO THE DISPLAY. THE ADDRESS OF THE CHARACTER IS RECIEVED AS AN ARGUMENT EITHER 2 CHARACTERS ARE SENT TO THE DATA FIELD,OR 4 CHARACTERS ARE SENT TO THE ADDRESS FIELD ? DEPANDING ON THE DISPLAY FLAG ARGUMENT THE DOT FLAG ARGUMENT DETERMINES WHETHER OR NOT A DOT (DECIMAL POINT) WILL BE SENT ALONGWITH THE LAST OUTPUT CHARACTER. OUTPT 02B7 0F RRC ;USE DATA FIELD? 02B8 DAC202 JC OUT05;YES-GO SET UP TO USE DATA FIELD 02BB 0E04 MVI C, 4 ;NO-COUNT FOR ADDR. FIELD 02BD 3E90 MVI A, ADISP ;CONTROL CHARCTER FOR OUTPUT TO ADDRESS FIELD OF DISPLAY 02BF C3C602 JMP OUT10 02C2 0E02 OUT05 MVI C, 2;COUNT FOR DATA FIELD
MVI A, DDISP
02CC6 D30500 OUT10 OUT CNTRL 02C9 7E OUT15 MOV A, M 02CA EB XCHG 02CB 217803 LXI H, DSPTB 02CE 85
ADD L
02CF 6F 02D0 7E
MOV L, A MOV A, M
02D1 61
MOV H, C
02D2 25
DCR H
02D3 C2DC02 JNZ OUT20 02D6 05 DCR B 02D7 C2DC02 JNZ OUT20 02DA F601
ORI DTMSK
02DC 00 OUT20 NOP 02DD D30400 OUT DSPLY 02E0 EB
XCHG
02E1 23 INX H 02E2 0D DCR C 02E3 C2C902 JNZ OUT15 02E6 C9
RET
;CONTROL CHARACTER FOR O/P TO DATA FIELD OF DISPLAY ;GET O/P CHARACTER ;SAVE O/P CHARACTER ADDRESS IN D & E ;GET DISPLAY FORMAT TABLE ADDRESS ;USE O/P CHARACTER AS A POINTER TO DISPLAY FORMAT TABLE ;GETDISPLAYFORMAT CHARACTER FROM TABLE ;TEST COUNTER WITHOUT CHANGING IT ;IS THIS THE LAST CHARACTER ;NO-GO OUTPUT CHAR. AS IS ;YES-IS DOT FLAG SET? ;NO-GO OUTPUT CHAR. AS IS ;YES-ORINMASKTO DISPLAY DOT WITH LAST CHARACTER ;SEND CHARACTER TO DISPLAY ;RETRIEVE O/P CHAR.ADDRESS ;NEXT O/P CHARACTER ;ANY MORE O/P CHARACTER ;YES-GO PROCESS ANOTHER CHARACTER ;NO-RETURN
D-29 **************************************************** FUNCTION : RDKBD-READ KEYBOARD INPUTS : NONE OUTPUTS : A - CHARCATER READ FROM KEYBOARD CALLS : NOTHING DESTROYS : A, H, L, F/F'S DESCRIPTION : RDKBD DETERMINES WHETHER OR NOT THERE IS A CHARACTER IN THE INPUFT BUFFER IF NOT THE FUNCTION ENABLES INTERRUPTS AND LOOPS UNTIL THE INPUT INTERRUPT ROUTINE STORES A CHARACTER IN THE BUFFER.WHEN THE BUFFER CONTAINS A CHARACTER,THE FUNCTION FLAGS THE BUFFER AS EMPTY AND RETURNS THE CHARACTER AS OUTPUT. RDKBD 02E7 21FFFF LXI H,IBUFF 02EA 7E MOV A, M 02EB B7 ORA A ;IF HIGHER ORDER BIT 02EC F2F302 JP RDKIO ;ONE THEN 02EF F3 DI ;BUFFER EMPTY,DISABLE INT. 02F0 CD8E02 CALL INBYT ;INPUT BYTE 02F3 3680 RDKIO MVI M, EMPTY ;SET B 02F5 FB EI 02F6 C9 RET ******************************************************* FUNCTION : RETF-RETURN FALSE INPUTS : NONE OUTPUTS : CARRY =0 FALSE CALLS : NOTHING DESTROYS : CARRY DESCRIPTION : RETF IS JUMPED TO BY FUNCTIONS WISHING TO RETURN FALSE.RETF RESETS CARRY TO 0 AND RETURNS TO THE CALLER OF THE ROUTINE INVOKING RETF. RETF 02F7 37 STC ;SET CARRY TRUE
D-30 02F8 3F 02F9
CMC RET
;COMPLEMENT CARRY TO MAKE ;IT FALSE
******************************************************* FUNCTION : RETT-RETURN TRUE INPUTS : NONE OUTPUTS : CARRY=1 TRUE CALLS : NOTHING DESTROYS : CARRY DESCRIPTION : RETT IS JUMPED TP BY ROUTINES WISHING TO RETURN TRUE. RETT SETS CARRY TO 1 AND RETURNS TO THE CALLER OF THE ROUTINE INVOKING RETT. RETT 02FA 37 STC ;SET CARRY TRUE 02FB C9 RET ******************************************************** FUNCTION : RGLOC-GET REGISTER SAVE LOCATION INPUTS : NONE OUTPUTS : HL-REGISTER SAVE LOCATION CALLS : NOTHING DESTROYS : B, C, H, L, F/F'S DESCRIPTION : RGLOC RETURNS THE SAVE LOCATION OF THE REG. INDICATED BY THE CURRENT REGISTER POINTER VALUE. RGLOC 02FC 2AFDFF LHLD RGPTR ;GET REG. POINTER 02FF 2600 MVI H, 0 ;IN H AND L 0301 01ED03 LXI B, RGTBL ;GET REG.SAVE LOCATION TABLE ADDRESS 0304 09 DAD B ;POINTER INDEXES TABLE 0305 6E MOV L, M ;GET LOW ORDER BYTE OF REGISTER SAVE LOCATION 0306 26FF MVI H,(RAMST SHR B) ;GET HIGH ORDER BYTE OF 0308 C9 RET ;REGISTER SAVE LOCATION
D-31
0309 030C 030E 030F 0310 0313 0314 0315 0317 031A
*********************************************************** FUNCTION : RGNAM-DISPLAY REGISTER NAME INPUTS : NONE OUTPUTS : NONE CALLS : OUTPT DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION : RGNAM DISPLAYS IN THE ADDRESS FIELD OF THE DISPLAY, THE REGISTER NAME CORRESPONDING TO THE CURRENT REGISTER POINTER VALUE. RGNAM 2AFDFF LHLD RGPTR ;GET REGISTE POINTER 2600 MVI H, 0 29 DAD H ;MULTIPLY POINTERVALUE BY 4 29 DAD H ;REG. NAME TABLE HAS 4 BYTE ENTRIES) 01B903 LXI B, NMTABL ;GET ADDRESS OF START OF REGISTER NAME TABLE 09 DAD B ;ARG-ADD TABLE ADDRESS TO POINTER-RESULT IS ADDRESS OF APPROPRIATE REG.NAME IN H & L AF XRA A ;ARG-USE ADDRESS FIELD OF DISPLAY 0600 MVI B, NODOT ;ARG-NO DOT IN ADDR.FIELD CDB702 CALL OUTPT ;OUTPUT REGISTER NAME TO C9 RET ADDRES FIELD
D-32 ******************************************************** FUNCTION : RSTOR-RESTORE USER REGISTER INPUTS : NONE OUTPUTS : NONE CALLS : NOTHING DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION : RSTOR RESTORES SALL CPU REGISTERS,FLIP/FLOPS, INTERUPT STATUS, INTERRUPT, STACK POINTER AND PROGRAM COUNTER FROM THEIR RESPACTIVE SAVE LOCATION IN MEMORY,BY RESTORING THE PROGRAM COUNTER,THE ROUTINE EFFECTIVELY TRANSFERS CONTROL TO THE ADDRESS IN THE PROGRAM COUNTER SAVE LOCATION.THE TIMING OF THIS ROUTINE IS CRITICAL TO THE CORRECT OPERATION OF THE SINGLE STEP ROUTINE. IF ANY MODIFICATION CHANGES THE NUMBER OF CPU STATUS NEEDED TO EXECUTE THE ROUTINE THEN THE TIMER VALUE MUST BE ADJUSTED BYTHE SAME NUMBER.THIS IS ALSO ENTRY POINT FOR THE TTY MONITOR TO RESTORE THE REGISTER. RSTOR 031B 3AF1FF LDA ISAV ;GET USER INTERRUPT MASK 031E F618 ORI 18H ;ENABLE SETTING OF INTERRUPT MASK AND RESET RST7.5 FLIP FLOP
D-35
D-36
MODIAD 035F 2AF6FF LHLD CURAD ;GET CURRENT ADDRESS 0362 EB XCHG ;ARG-PUT CURRENT IN D & E 0363 CD6C02 CALL HXDSP ;EXPAND CURRENT ADDRESS FOR DISPALY. ARG-ADDRESS OF EXPANDED ADDRESS IS IN H & L 0366 AF XRA A ;ARG-USE ADDRESS FIELD OF DISPLAY 0367 CDB702 CALL OUTPT ;OUTPUT CURRENT ADDRESS TO ADDRESS FIELD 036A C9 RET
036B 036E 036F 0372 0374 0377 0378
******************************************************** FUNCTION : MODIDT - UPDATE DATA FIELD OF DISPLAY INPUTS : B - DOT FLAG - 1 MEANS PUT DOT AT RIGHT OF FIELD 0 MEANS NO DOT OUTPUTS : NONE CALLS : HXDSP,OUTDT DESTROYS : A, B, C, D, E, H, L, F/F, S DESCRIPTION : UPDDT UPDATES THE DATA FIELD OF THE DISPLAY USING THE CURRENT DATA BYTE UPDDT: 3AF8FF LDA CURDT ;GET CURRENT DATA 57 MOV D, A ;ARG-PUT CURRENT DATA IN D CD6C02 CALL HXDSP ;EXPAND CURRENT DATA FOR DISPLAY. ARG-ADDRESS OF EXPANDED DATA IS IN H & L. 3E01 MVI A, DTFLD ;ARG-USE DATA FIELD OF DISPLAY ARG-DOT FLAG IS IN B CDB702 CALL OUTPT ;OUTPUT CURRENT DATA TO DATA FIELD C9 RET 00 FA
0379 037A 037B 037C 037D 037E 037F 0380 0381 0382 0383 0384 0385 0386 0387 0388 0389 038A 038B I 038Cr 038D 038E 038F 0391 0391 0392 0393 0394 0395 0397 0399
01 A0 02 7C 03 F4 04 A6 05 D6 06 DE 07 B0 08 FE 09 B6 0A BE 0B CE 0C 5A 0D EC 0E 5E 0F 1E H AE L 4A P 3E A0 0C BLANK 00 n 8C U EA h 8E G DA J E0 y E6 O CC 3E46 4(19) 01FF 01FF
D-37
D-38
039A 15 039B 039C 039D 039E
MESSAGES FOR OUTPUT TO DISPLAY BLANKS DB BLANK, BLANK, BLANK, BLANK ;FOR ADDRESS OR DATA FIELD.
15 15 15 15
ERMSG
DB BLANK, LETRE, LETRR, LETRR ;ERROR MESSAGE FOR ADDRESS FIELD
039F 0E 03A0 14 03A1 14
EXMSG
DB LETRE, BLANK, BLANK, BLANK ;EXECUTION MESSAGE
03A2 03A3 03A4 03A5 03A6
0E 15 15 15 0F
SGNAD
DB F r I E ;SIGN ON MESSAGE (ADDR. FIELD)
03A7 03A8 03A9 03AA
14 13 0E 16
SGNDT
DB n d ;SIGN ON MESSAGE(DATA FIELD)
******************************************************** RGPTB REGISTER POINTER TABLE :THE ENTRIES IN THIS TABLE ARE IN THE SAME ORDER AS THE REGISTER DESIGNATOR KEYS ON THE KEYBOARD EACH ENTRY CONTAINS THE REGISTER POINTER VALUE WHICH CORROSPONDS TO THE REG. DESIGNATOR. REGISTER POINTER VALUES ARE USED TO POINT INTO THE REGISTER NAME TABLE (NMTBL) AND REGISTER SAVE LOCATION TABLE (RGTBL). 03AC 03AD 03AE 03AF
06 09 0A 0B
DB DB DB DB
6 9 10 11
:INTERRUPT MASK :SPH :SPL :PCH
03B0 03B1 03B2 03B3 03B4 03B5 03B6 03B7 03B8
0C 07 08 00 01 02 03 04 05
DB DB DB DB DB DB DB DB DB
12 7 8 0 1 2 3 4 5
:PCL :H :L :A :B :C :D :E :FLAGS
******************************************************** NMTBL : REGISTER NAME TABLE : NAMES OF REGISTER IN DISPLAY FORMAT 03B9 15 DB BLANK, BLANK, BLANK, LETRA ;A REGISTER 03BA 15 03BB 15 03BC 0A 03BD 15 DB BLANK, BLANK, BLANK, LETRB ;B REGISTER 03BE 15 03BF 15 03C0 0B 03C1 15 DB BLANK, BLANK, BLANK, LETRC ;C REGISTER 03C2 15 03C3 15 03C4 0C 03C5 15 DB BLANK, BLANK, BLANK, LETRD ;D REGISTER 03C6 15 03C7 15 03C8 0D 03C9 15 DB BLANK, BLANK, BLANK, LETRE ;E REGISTER 03CA 15 03CB 15 03CC 0E 03CD 15 DB BLANK, BLANK, BLANK, LETRF ;F REGISTER 03CE 15 03CF 15 03D0 0F
D-39
D-40
03D1 15 03D2 03D3 03D4 03D5
15 15 13 15
03D6 03D7 03D8 03D9
15 15 10 15
03DA 03DB 03DC 03DD
15 15 11 15
03DE 03DF 03E0 03E1
05 12 10 15
03E2 03E3 03E4 03E5
05 12 11 15
03E6 03E7 03E8 03E9
12 0C 10 15
03EA 12 03EB 0C 03EC 11
DB BLANK, BLANK, BLANK, LETRI ;INTERRUPT MASK
DB BLANK, BLANK, BLANK, LETRH ;H REGISTER
DB BLAMK, BLANK, BLANK, LETRL ;L REGISTER
DB BLANK, LETRS, LETRP, LETRH ;STACK POINTER HIGH ORDER BYTE
DB BLANK, LETRS, LETRP, LETRL ;STACK POINTER LOW ORDER BYTE
DB BLANK, LETRP, LETRC, LETRH ;PROGRAM COUNTER HIGH BYTE
DB BLANK, LETRP, LETRC, LETRL ;PROGRAM COUNTER LOW BYTE
************************************************* REGISTER SAVE LOCATION TABLE ADDRESSES OF SAVE LOCATIONS OF REGISTERS IN THE ORDER IN WHICH THE REGISTERS ARE DISPLAYED BY THE EXAMINE COMMAND RGTBL 03ED EE DB 03EE EC DB 03EF EB DB 03F0 EA DB 03F1 E9 DB 03F2 ED DB 03F3 F1 DB 03F4 F0 DB 03F5 EF DB 03F6 F5 DB
ASAV AND OFFH BSAV AND OFFH CSAV AND OFFH DSAV AND OFFH ESAV AND OFFH FSAV AND OFFH ISAV AND OFFH HSAV AND OFFH LSAV AND OFFH SPHSV AND OFFH
03F7 F4
DB SPLSV AND OFFH
03F8 F3
DB PCHSV AND OFFH
03F9 F2
DB OCKSV AND IFFG
000D NUMRG TABLE
EQU ($ - RGTBL)
;A REGISTER ;B REGISTER ;C REGISTER ;D REGISTER ;E REGISTER ;FLAGS ;INTERRUPT MASK ;H REGISTER ;L REGISTER ;STACK POINTER HIGH ORDER BYTE ;STACK POINTER LOW ORDER BYTE ;PROGRAM COUNTER HIGH ORDER BYTE ;PROGRAM COUNTER LOW ORDER BYTE ;/REGISTER SAVE LOCATION NUMBER OF ENTRIES.
D-41
D-42 ********************************************* TTY PRINT SIGNON MESSAGE *********************************************
03FA D E F 0400 1 4 0405
218C07 4E AF B1 C8 CDC405 23 C3FD03
SIGNON S1 XRAA ORAC
LXIH STRING MOVC, M
RZ CALLC OUT INX H JUMP S1
040C 0E2E 040E CDF805 0411
C31404
0414 CD1F06 0417 CDF805 041A 79 041B 010600 041E 21AE07 0421 BE
************************************************************* COMMAND RECOGNIZING ROUTINE ************************************************************* FUNCTION : GETCM INPUTS : NONE OUTPUTS : NONE CALLS : GETCH, ECHO, ERROR DESTROYS : A, B, C, H, L, F/F'S DESCRIPTION : GETCM RECEIVES AN INPUT CHARATER FROM THE USER AND USER AND ATTEMPTS TO LOCATE THIS CHARATER IN ITS COMMAND CHARATER TABLE. IF SUCCESSFUL,THE ROUTINE CORROSPONDING TO THIS IS SELECTED FROM A TABLE OF COMMAND ROUTINE ADDRESSES, AND CONTROL IS TRANSFERED TO THIS ROUTINE. IF THE CHARATER DOES NOT MATCH ANY ENTRIES,CONTROL IS PASSED TO THE ERROR HANDLER. GETCM 0408 21E9FF LXI H, MNSTK ;ALWAYS WAMT TO RESET STACK PTR TO MONITOR 040B F9 SPHL ;STARTING VALUE SO ROUTINE NEED NOT CLEAN UP
0422 CA2D04 0425 23 0426 0D 0427 C22104 042A C31106
MVI C,'.' CALL ECHO
;PROMPT CHARCHTER TO C ;SEND PROMPT CHARATER TO USER TERMINAL JMP GTC03 ;WANT TO LEAVE ROOM FOR RST BRANCH GTC03 CALL GETCH ;GET COMMAND CHARATER TO A CALL ECHO ;ECHO CHARCTER TO USER MOV A, C ;PUT COMMAND CHARCTER INTO ACC. LXI B, NCMDS ;C CONTAINS LOOP AND INDEXCOUNT LXI H, CTAB ;HL POINTS INTO COMMAND TABLE GTC05 CMP M ;COMPARE TABLE ENTRY AND CHARATER JZ GTC10 ;BRANCH IF EQUAL – COMMAND RECOGNIZED INX H ;ELSE,INCREMENT TABLE POINTER DCR C ;DECREMENT LOOP COUNT JNZ GTC05 ;BRANCH IF NOT AT TABLE END JMP ERROR ;ELSE COMMAND CHARACTER IS ILLEGAL
042D 21A007 GTC10 LXI H, CADR ;IF GOOD COMMAND. LOAD ADDRESS OR TABLE OF COMMAND ROUTINE ADDRESSES 0430 09 DAD B ;ADD WHAT IS LEFT OF LOOP COUNT 0431 09 DAD B ;ADD AGAIN -EACH ENTRY IN CADR IS 2 BYTES LONG 0432 7E MOV A, M ;GET LSP OF ADDRESS OF TABLE ENTRY TO A 0433 23 INX H ;POINT TO NEXT BYTE IN TABLE 0434 66 MOV H, M ;GET MSP OF ADDRESS OF TABLE ENTRY TO H
D-43
D-44
0435
6F
MOV L, A
0436
E9
PCHL
;PUT LSP OF ADDRESS OF TABLE ENTRY IMTO L ;NEXT INSTRUCTION COMES FROM COMMAND ROUTINE
*************************************************************** COMMAND IMPLEMENTING ROUTINES *************************************************************** FUNCTION : DCMD INPUTS : NONE OUTPUTS : NONE CALLS : ECHO, NMOUT, HILO, GETCM,CROUT, GETNM DESTROYS : A, B, C, D, E, H, L, F/F'S DESCREPTION : DCMD IMPLEMENTS THE DISPLAY MEMORY (D) COMMAND DCMD 0437 0E02
MVI C, 2
044F CDC706 0452 CDA006
CALL NMOUT CALL HILO
FALSE DCM15 0455 D25E04 0458 CDEB05
JNC DCM15 CALL CROUT
045B C30804 JMP GETCM 045E 23 DCM15 INX H 045F 7D
MOV A,L
0460 E60G
ANI NEWLN
0462 C24904
JNZ DCM10
0465 C33E04
JMP DCM05
;GET 2 NUMBERS FROM INPUT STREAM
0439 CD5B06 CALL GETNM 043C D1 POP D ;ENDING ADDRESS TO DE 043D E1 POP H ;STARTING ADDRESS TO HL DCMO5 043E CDEB05 CALL CROUT ;ECHO CARRIAGE RETURN/LINE FEED 0441 7C MOV A, H ;DISPLAY ADDRESS OF FIRST LOCATION IN LINE 0442 CDC706 CALL NMOUT 0445 7D MOV A, L ;ADDRESS IS 2 BYTES LONG 0446 CDC706 CALL NMOUT DCM10 0449 0E20 MVI C,'.' 044B CDF805 CALL ECHO ;USE BLANK AS SEPARATOR 044E 7E MOV A, M ;GET CONTENTS OF NEXT MEMORY LOC.
;DISPLAY CONTENTS ;SEE IF ADDRESS OF DISPLAY LOC. IS GREATER THAN OR EQUAL TO ENDING ADDRESS ;IF NOT ,MORE TO DISPLAY ;CARRIGE RETURN/LINE FEED TO END LINE ;ALL DOME ;IF MORE TO GO, POINTS TO THE NEW DISPLAY GET LOW ORDER BITS OF NEW ADDRESS ;SEE IF LAST HEX DIGIT OR ADDRESS DENOTES START OF NEWLINE ;NO-DOT AT END OF LINE ;YES-START NEW LINE WITH ADDRESS
D-45
D-46
******************************************************************************* FUNCTION : GCMD INPUTS : NONE OUTPUTS : NONE CALLS : ERROR, GETHX, RSTTF DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION : GCMD IMPLEMENTS THE BEGIN EXECUTION (G) COMMAND 0468 CD2606 046B 046E 046F 0471
D27D04 7A FE0D C21106
0474 21F2FF 0477 0478 0479 047A 047D
71 23 70 C38304 7A
047E FE0D 0480 C21106 0483 C31B03
GCMD CALL GETHX ;GET ADDRESS(IF PRESENT) FROM INPUT STREAM FALSE GCM05 JNC GCM05 ;BRANCH IF NO NU. PRESENT MOV A, D ;ELSE GET TERMINATOR CPI CR ;SEE IF CARRIAGE RETURN JNZ ERROR ;ERROR IF NOT PROPERLY TERMINATED LXI H, PSAV ;WANT NU. TO REPLACE SAVE 1/4 PGM COUNTER MOV M, C INX H MOV M, B JMP GCM10 GCM05 MOV A, D ;IF NO STARTING ADDRESS MAKE SURE THATCR TERMINATED COMMAND CPI CR JNZ ERROR ;ERROR IF NOT GCM10 JMP RSTOR ;RESTORE REG. AND BEGIN EXECUTION (RSTOR IS IN KEYBOARD MONITOR)
***************************************************** FUNCTION : ICMD INPUTS : NONE OUTPUTS : NONE CALLS : ERROR, ECHO, GETCH, VALDL, VALDG, CNVBN, STHLF, GETNM, GROUT DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION : ICMD IMPLEMENTS THE INSERT MODE INTO MEMORY (I) COMMAND 0468 0E01 ICMD 0488 CD5B06 048B 3EFF 048D 32FDFF 0490 D1 0491 CD1F06 0494 4F 0495 CDF805 0498 79 0499 FE1B 049B CAC704 049E CD7907
04A1 DA9104 04A4 CD5E07
MVI C, 1 CALL GETNM
;GET SINGLE NU. FROM INPUT STREAM
MVI A, UPPER STA TEMP ;TEMP WILL HOLD THE UPPER/LOWER HALF BYTE FLAG POP D ICM05 CALL GETCH ;GET A CHAR. FROM INPUT STREAM MOV C, A CALL ECHO ;ECHO IT MOV A, C ;PUT CAHR. BACK INTO A CPI TERM ;SEE IF CHAR.IS A TERMINATING CHARACTER JZ ICM25 ;IF SO ALL DONE ENTERING CHARACTERS. CALL VALDL ;ELSE CHECK TO SEE IF VALID DELIMITER TRUE ICM05 ;IF SO SIMPLY IGNORE THIS CHARACTER JC ICM05 CALL VALDG ;ELSE CHECK TO SEE IF VALID HEX DIGIT FALSE ICM20 ;IF NOT, BRANCH TO HANDLE ERROR CONDITION
D-47 04A7 04AA 04AD 04AE
D-48
D2C104 CD100A 4F CD3F07
JNC ICM20 CALL CNVBN ;CONVERT DIGIT TO BINARY MOV C, A ;MOVE RESULT TO C CALL STHLF ;STORE IN APPROPRIATE HALF WORD 04B1 3AFDFF LDA TEMP ;GET HALF BYTE FLAG 04B4 B7 ORA A ;SET F/F'S 04B5 C2B904 JNZ ICM10 ;BRANCH IF FLAG SET FOR UPPER 04B8 13 INX D ;IF LOWER ,INC ADDRESS OF BYTE TO STORE IN 04B9 EEFF ICM10 XRI INVERT ;TOGGLE STATE OF FLAG 04BB 32FDFF STA TEMP ;PUT NEW VALUE OF FLAG BACK 04BE C39104 JMP ICM05 ;PROCESS NEXT DIGIT 04C1 CD3407 ICM20 CALL STHFO ;ILLEGAL CHARACTER 04C4 C31106 JMP ERROR ;MAKE SURE ENTIRE BYTE FILLED THEN ERROR 04C7 CD3407 ICM25 CALL STHF0 ;HERE FOR ESCAPE CHARACTER I/P IS DONE 04CA CDEB05 CALL CROUT ;ADD CARRIAGE RETURN 04CD C30804 JMP GETCM **************************************************** FUNCTION : MCMD INPUTS : NONE OUTPUTS : NONE CALLS : GETCM, HILO, GETNM DESTROYS : A, B, C, D, E, H, L, F/F'S DECRIPTION : MCMD IMPLEMENTS THE MOVE DATA IN MEMORY(M) COMMAND
MCMD 04D0 0E03 MVI C, 3 04D2 CD5B06 CALL GETNM ;GET 3 NUMBERS FROM INPUT STREAM 04D5 C1 POP B ;DESTINATION ADDR. TO BC 04D6 E1 POP H ;ENDING ADDR. TO HL 04D7 D1 POP D ;STARTING ADDR TO DE 04D8 E5 MCM05 PUSH H ;SAVE ENDING ADDRESS 04D9 62 MOV H, D 04DA 6B MOV L, E ;SOURCE ADDR. TO HL 04DB 7E MOV A, M ;GET SOURCE BYTE 04DC 60 MOV H, B 04DD 69 MOV L, C ;DESTINATION ADDR. TO HL 04DE 77 MOV M, A ;MOVE BYTE TO DESTINATION 04DF 03 INX B ;INR. DESTINATION ADDRESS 04E0 78 MOV A, B 04E1 B1 ORA C ;TEST FOR DESTINATION ADDR 04E2 CA0804 JZ GETCM ;IF SO CAN TERMINATE CMD. 04E5 13 INX D ;INCREMENT SIURCE ADDRESS 04E6 E1 POP H ;ELSE GET BACKENDING ADDR 04E7 CDA006 CALL HILO ;SEE IF ENDING ADDR=SOURCE ADDR FALSE GETCM ;IF NOT COMMAND IS DONE 04EA D20804 JNC GETCM 04ED C3D804 JMP MCM05 ;MOVE ANOTHER BYTE
D-49
D-50 **************************************************** FUNCTION : SCMD INPUTS : NONE CALLS : GETHX, GETCM, NMOUT, ECHO DESTROYS : A, B, C, D, E, H, L, F/F/'S DESCRIPTION : SCMD IMPLEMENTS THE SUBSTITUTE INTO MEMORY (S) COMMAND
04F0 CD2606
SCMD CALL GETHX
04F3 C5 04F4 E1
PUSH B POP H
04F5 7A 04F6 FE20 04F8 CA0005
SCM05 MOV A, D CPI '.' JZ SCM10
04FB FE2C 04FD C20804 0500 7E
CPI '.' JNZ GWTCM SCM10 MOV A, M
0501 CDC706
CALL NMOUT
0504 0E2D 0506 CDF805 0509 CD2606
MVI C,'.' CALL ECHO CALL GETHX
050C D21005 050F 71 0510 23 0511 C3F504
;GET A NUMBER IF PRESENT, FROM INPUT ;GET NU. TO HL-DENOTES MEMORY LOCATION ;GET TERMINATOR ;SEWE IF SPACE ;YES CONTINUE PROCESSING ;ELSE SEE IF COMMA ;NO TERMINATE COMMAND ;GET CONTENTS OF SPECIFIED LOCATION TO A ;DISPLAY CONTENTS ON CONSOLE
;USE DASH FOR SEPARATOR ;USE NEW VALUE FOR MEMORY LOCATION IF ANY FALSE SCM15 ;IF NO VALUE PRESENT,BRANCH JNC SCM15 MOV M, C ;ELSE,STORE LOWER 8BIT OF NUMBER ENTERED SCM15 INX H ;INCREMENT ADDR. OF MEMORY LOCATION TO VIEW JMP SCM05
********************************************************* FUNCTION : XCMD INPUTS : NONE OUTPUTS : NONE CALLS : GETCH, ECHO, REGDS, GETCM, ERROR, RGADR, NMOUT, CROUT, GTHEX DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION : XCMD IMPLEMENTS THE REGISTER EXAMINE AND CHANGE (X) COMMAND. 0514 CD1F06 0517 0518 051B 051C 051E
4F CDF805 79 FE0D C22705
0521 CDEA06 0524 C30804 0527 4F 0528 CD1B07 052B C5 052C E1 052D 0E20 052F CDF805 0532 79 0533 32FDFF 0536 3AFDFF 0539 FE20 053B CA4305 053E FE2C
XCMD CALL GETCH ;GET REGISTER INDENTIFIER MOV C, A CALL ECHO ;ECHO IT MOV A, C CPI CP JNZ XCM05 ;BRANCH IF NOTCARRIAGE RET CALL REGDS ;ELSE,DISPLAY REG.CONTENTS JMP GETCM ;THEN TERMINATE COMMAND XCM05 MOV C, A ;GET REG.IDENTIFIER TO C CALL RGADR ;CONVERT IDENTIFIER INTO RTAB TABLE ADDR PUSH B POP H ;PUT POINTER TO REGISTER ENTRY INTO HL MVI C," CALL ECHO ;ECHO SPACE TO USER MOV A, C STA TEMP ;PUT SPACE INTO TEMP AS DELIMITER XCM10 LDA TEMP ;GET TERMINATOR CPI '.' ;SEE IF A BLANK JZ XCM15 ;YES-GO CHECK POINTER IN TABLE CPI '.' ;NO SEE IF COMMA
D-51
0540 C20804
D-52
JNZ GETCM
;NO-MUST BE CARRIAGE RETURN TO AN END COMMAND 0543 73 XCM15 MOV A, M 0544 B7 ORA A ;SET F/F'S 0545 C24E05 JNZ XCM16 ;BRANCH IF NOT AT END OF TABLE 0548 CDEB05 CALL CROUT ;ELSE O/P CARIAGE RETURN LINE FEED 054B C30804 JMP GETCM ;AND EXIT 054E E5 XCM18 PUSH H ;PUT POINTER ON STACK 054F 5E MOV E, M 0550 16FF MOV D, RAMST SHR 8 ;ADDRESS OF SAVE LOCATION FROM TABLE 0552 23 INX H 0553 46 MOV B, M ;FETCH LENGTH FLAG EROM TABLE 0554 D5 PUSHD ;SAVE ADDR.OF SAVE LOCATION 0555 D5 PUSH D 0556 E1 POP H ;MOVE ADDRESSS TO HL 0557 C5 PUSH B ;SAVE LENGTH FLAG 0558 7E MOV A, M ;GET 8 BITS OF REG FROM SAVED LOCATION 0559 CDC706 CALL NMOUT ;DISPLAY IT 055C F1 POP PSW ;GET BACK LENGTH FLAG 055D F5 PUSH PSW ;SAVE IT AGAIN 055E B7 ORA A ;SET F/F'S 055F CA6705 JZ XCM20 ;IF8BIT REG.NOTHING TO DISPLAY 0562 2B DCX H ;ELSE FOR 16 BIT REG.GET LOWER 8 BITS
0563 0564 0567 0569
7E CDC706 0E2D CDF805
056C CD2606
MOV A, M CALL NMOUT XCM20 MVI C,'-' CALL ECHO CALL GETHX FALSE XCM30
056F D28705 0572 7A 0573 32FDFF
JNC XCM30 MOV A, D STA TEMP
0576 F1
POP PSW
0577 E1
POPH
0578 B7 0579 CA7E05
ORA A JZ XCM25
057C 70 057D 2B
MOV M, B DCX H
057E 71
XCM25 MOV M, C
057F 110300 XCM27 LXI D, RTABS 0582 E1
POP H
;DISPLAY THEM ;USE DASH AS SEPARATOR ;SEE IF THERE IS A VALUE TO PUT INTO REGISTER ;NO GO CHECKFORNEXT REG. ;ELSE SAVE THE TERMINATOR FOR NOW ;GET BACK LENGTH FLAG ;PUT ADDR.OFSAVE LOCATION INTO HL ;SET F/F'S ;IF 8 BIT REG, BRANCH ;SAVE UPPER 8 BITS ;POINT TO SAVE LOCATION FOR LOWER 8 BITS ;STORE ALL OF 8 BIT OR LOWER 1/2 OF 16 BIT REG. ;SIZE OF ENTRY INRTAB TABLE ;POINTER INTO REG.TABLE RTAB
D-53 0583 0584 0587 0588 058B 058C 058D
D-54
19 C33605 7A 32FDFF D1 D1 C37F05
DAD D ;ADD ENTRY SIZE TO POINTER JMP XCM10 ;DO NEXT REGISTER XCM30 MOV A, D ;GET TERMINATOR STA TEMP ;SAVE IN MEMORY POP D ;CLEAR STACK OF LENGTH FLAG POP D & ADDR. OF SAVE LOCATION JMP XCM27 ;GO INCREMENT REG. TABLE POINTER
******************************************************** UTILITY ROUTINE
0590 0591 0592 0594 0595 0596 0599 059C 059D 05A0 05A1 05A4 05A7 05A8 05AB 05AC 05AF 05B0
******************************************************** FUNCTION : CI INPUTS : NONE OUTPUTS : A - CHARACTER FROM TTY CALLS : DELAY DESTROYS : A, F/F'S DESCRIPTION : CI WAITS UNTIL A CHAR. HAS BEEN ENTERED AT THE TTY AND THEN RETURNS THE CHAR. VIA THE A REG. TO THE CALLING ROUTINE. THIS ROUTINE IS CALLED BY THE USER VIA A JUMP TABLE IN RAM CI F3 DI E5 PUSH H 0609 MVI B, BITS 20 CI1 RIM B7 ORA A FA9405 JM CI1 2A9AFF CHLD HALFBIT 2D CI2 DCR L C29C05 JNZ CI2 25 DCR H C29C05 JNZ CI2 2AC0FF CI3 LHLD BITTIMC 2D CI4 DCR L C2A705 JNZ CI4 25 DCR H C2A705 JNZ CI4 20 RIM 17 RAL
05B1 05B2 05B5 05B6 05B7 05B8 05B9 05BC 05BD 05BE 05BF 05C2 05C3
05 CABC05 79 1F 4F 00 C3A405 E1 FB 79 C9FFFF FF FF
CI5
DCR B JZ CI5 MOV A, C RAR MOV C, A NOP JMP CI3 POP H EI MOV A, C JMP 3PASS BLANK BLANK
**************************************************** FUNCTION : CO INPUTS : C-CHARACTER TO OUTPUT TO TTY OUTPUTS : C-CHARACTER OUTPUT TO TTY CALLS : DELAY DESTROYS : A, F/F'S DESCRIPTION : CO-SENDS ITS INPUT ARGUMENT TO THE TTY. 05C4 05C5 05C6 05C7 05C9 05CA 05CC 05CD 05CE 05D1 05D2 05C5 05C6 05C9 05CA 05CB 05CC 05CD 05CE
C0 F3 C5 E5 060B AF 3E80 1F 30 2AC0FF 2D C2D105 25 C2D105 37 79 1F 4F 05 2CA05
CO1
CO2
DI PUSH B PUSH H MVI B, BITS0 XRA A MVI A, 80H RAR SIM LHLD BITTIME DCR L JNZ CO2 DCR H JNZ CO2 STC MOV A, C RAR MOV C, A DCR B JNZ CO1
D-55
D-56
05E1 05E2 05E3 05E4 05E5 05E6 05E7 05E8 05E9 05EA
E1 C1 FB C9 FF FF FF FF FF FF
POP H POP B EI RET BLANK BLANK BLANK BLANK BLANK BLANK
******************************************************** FUNCTION : DELAY INPUTS : DE - 16BIT INT.DENOTING NUMBER OF TIMES TO LOOP. OUTPUTS : NOTHING DESTROYS : A, D, E, F/F'S DESCRIPTION : DELAY DOES NOT RETURN TO CALLER UNTIL INPUT ARGUMENT IS COUNTED DOWN TO 0. DELAY
******************************************************** FUNCTION : CROUT INPUTS : NONE OUTPUTS : NONE CALLS : ECHO DESTROYS : A, B, C, F/F'S DESCRIPTION : CROUT SENDS A CARRIAGE RETURN AND HENCE A LINE FEED TO THE CONSOLE. 05EB 0E0D 05ED CDF805 05F0 C9
CROUT MVI C, CR CALL ECHO RET
05F1 05F2 05F3 05F4
1B 7A B3 C2F105
DCX D ;DECREMENT INPUT ARG. MOV A, D ORA E JNZ DELAY ;IF ARG NOT 0,KEEP GOING RET
05F7 C9
******************************************************** FUNCTION : ECHO INPUTS : C - CHARACTER TO ECHO TO TERMINAL OUTPPUTS : C - CHARACTER ECHOED TO TERMINAL CALLS : CO DESTROYS : A, B, F/F'S DESCRIPTION : ECHO TAKES A SINGLE CHARACTER INPUT AND VIA THE MONITOR SENDS THAT CHARACTER TO THE USER TERMINAL. A CARRIAGE IS ECHOED AS A CARRIAGE RETURN LINE FEED, AND AN ESCAPE CHARACTER IS ECHOED AS $. ECHO 05F8 41 05F9 3E1B
MOV B, C MVI A, ESC
;SAVE ARGUMENT
D-57
D-58
05FB B8 05FC C20106 05FF 0E24 0601 CDC405 0604 0606
3E0D B8
0607
C20F06
060A 0E0A 060C CDC405 060F 48 0610
0611 0613 0616 0619
C9
CMP B
;SEE IF ECHOING AN ESCAPE CHARACTER JNZ ECHO5 ;NO BRANCH MVI C, '$' ;YES ECHO AS $ ECHO5 CALL CO ;DO OUTPUT THRO' MONITOR MVI A, CR CMP B ;SEE IF CHAR. ECHOED WAS A CARRIAGE RETURN JNZ ECH10 ;NO-NO NEED TO TAKE SPECIAL ACTION MVI C, LF ;YES-WANT TO ECHO LINEFEED CALL CO ECH10 MOV C, B ;RESTORE ARGUMENT RET
******************************************************** FUNCTION : ERROR INPUTS : NONE OUTPUTS : NONE CALLS : ECHO, CROUT, GETCM DESTROYS : A, B, C, F/F'S DESCRIPTION : ERROR PRINTS THE ERRORCHARACTER (CURRENTLY AN ASTERISK) ON THE CONSOLE FOLLOWED BY A CR LF, AND THEN RETURNS CONTROL TO THE COMMAND RECOGNISER. ERROR OE2A MVI C,'*' CDF805 CALL ECHO ;SEND '*' TO CONSOLE CDEB05 CALL CROUT ;SKIP TO BEGINING OR NEXT LINE C30804 JMP GETCM ;TRY AGAIN FOR ANOTHER COMMAND
******************************************************** FUNCTION : FRET INPUTS : NONE OUTPUTS : CARRY-ALWAYS 0 CALLS : NOTHING DESTROYS : CARRY DESCRIPTION : FRET IS JUMPED TO BY ANY ROUTINE THET WISHES TO INDICATE FAILURE ON RETURN. FRET SETS THE CARRY FALSE DENOTING FAILURE & THEN RETURN TO THE CALLER OF THE ROUTINE INVOKINK FRET. FRET 061C 37 STC ;SET CARRY TRUE 061D 3F CMC ;THEN COMPLEMENT TO MAKE IT FALSE 061E C9 RET ;RETURN APPROPRIATLY ******************************************************** FUNCTION : GETCH INPUTS : NONE OUTPUTS : C - NEXT CHAR. IN INPUT STREAM CALLS : CI DESTROYS : A, C, F/F'S DESCRIPTION : GETCH RETURNS THE NEXT CHAR. IN THE INPUT STREAM TO THE CALLING PROGRAM. GETCH 061F CD9005 CALL CI ;GET CHAR. FROM TERMINAL 0622 E67F ANI PRTY0 ;TURN OFF PARITY BIT IN CASE SET BY CONSOLE 0624 4F MOV C, A ;PUT VALUE IN C REG.FOR 0625 C9 RET ;RETURN
D-59
D-60 ******************************************************** FUNCTION : GETHX INPUTS : NONE OUTPUT : SBC - 16 BIT INTEGER D - CHAR. WHICH TERMINATED THE INTEGER CARRY - 1 IF FIRST CHAR NOT DELIMITER - 0 IF FIRST CHAR. IS DELIMITER CALLS : GETCH, ECHO, VALDL, VALDG, CNVBN, ERROR DESTROYS : A, B, C, D, E, F/F'S DESCRIPTION : GETHX ACCEPTS A STRING OF HEX DIGITS FROM THE INPUT STREAM & RETURNS THEIR VALUE AS A 16 BIT BINARY INTEGER.IF MORE THAN 4 HEX DIGITS ARE ENTERED, ONLY THE LAST 4 ARE USED THE NUM. TERMINATES WHEN A VALID DELIMITER IS ENCOUNTERED. THE DELIMITER IS ALSO RETURNED AS AN OUTPUT OF THE FUNCTION.ILLEGAL CHAR. (NOT HEX DIGITS OR DELIMITERS) CAUSE AN ERROR INDICATION. IF THE FIRST (VALID)CHARACTER ENCOUNTERED IN THE INPUT STREAM IS NOT A DELIMITER, GETHX WILL RETURN WITH THE CARRY BIT SET TO 1;OTHERWISE THE CARRY BIT IS SET TO 0 AND THE CONTENTS OF BC ARE UNDEFINED.
0626 E5 0627 210000
GETHX PUSH H LXI H, 0
;SAVE HL ;INITIALIZE RESULT
062A 1E00 062C 062F 0630 0633
CD1F06 4F CDF805 CD7907
0636 D24506 0639 51 063A 063B 063C 063D 063E 063F
E5 C1 E1 7B B7 C23207
0642 CA1C06 0645 CD5E07
0648 D21106 064B CD100A 064E 0650 0651 0652 0653 0654
1EFF 29 29 29 29 0600
0656 4F
MVI E, 0
;INITIALIZE DIGIT FLAG TO FALSE GTH05 CALL GETCH ;GET A CHARACTER MOV C, A CALL ECHO ;ECHO THE CHARACTER CALL VALDL ;SEE IF DELIMITER FALSE GHX10 ;NO BRANCH JNC GTX10 MOV D, C ;YES-ALL DONE,BUT WANT TO RETURN DELIMITER PUSH H POP B ;MOVE RESULT TO BC POP H ;RESTORE HL MOV A, E ;GET FLAG ORA A ;SET F/F'S JNZ SRET ;IF FLAG NONE-0ANUM.HAS BEEN FOUND JZ FRET ;ELSE DELIMITER WAS FIRST CHARACTER GHX10 CALL VALDG ;IF NOT DELIMITER SEE IF DIGIT FALSE ERROR ;ERROR, IF NOT A VALID DIGIT JNC ERROR CALL CNVBN ;CONVERT DIGIT TO ITS BINARY VALUE MVI E, 0FFH ;SET DIGIT FLAG NON-0 DAD H ;*2 DAD H ;*4 DAD H ;*8 DAD H ;*16 MVI B, 0 ;CLEAR UPPER 8 BITS OF BC PAIR MOV C, A ;BINARY VALUE OF CHARACTER INTO C
D-63
06A0 06A1 06A2 06A3 06A4 06A5 06A8 06A9 06AA 06AB 06AE 06AF 06B0 06B2 06B3 06B4 06B6 06B7
D-64 ******************************************************** FUNCTION : HILO INPUTS : DE - 16 BIT INTEGER HL - 16 BIT INTEGER OUTPUTS : CARRY - 0 IF HL < DE 1 IF HL => DE CALLS : NOTHING DESTROYS : F/F'S DESCRIPTION : HILO COMPARES THE 2 16 BIT INTEGERS IN BL AND DE. THE INTEGERS ARE TREATED AS UNSIGNED NUMBERS.THE CARRY BIT IS SET ACCORDING TO THE RESULT OF THE COMPARISON. HILO C5 PUSH B ;SAVE BC 47 MOV B, A ;SAVE A IN B REGISTER E5 PUSH H ;SAVE HL PAIR 7A MOV A, D ;CHECK FOR DE=0000H B3 ORA E CAC106 JZ HILO5 ;WE'RE AUTOMATICALLY DONE 23 INX H IF HL IS INCREMENTED BY 1 7C MOV A, H ;WANT TO TEST FOR 0 B5 ORA L RESULT AFTER INCREMENTING CAC106 JZ HILO5 ;IF SOHL MUST HAVE CONTAINED 0FFFFH E1 POP H ;IF NOT RESTORE ORIGINAL HL D5 PUSH D ;SAVE DE 3EFF MVI A, 0FFH ;WANT TO TAKE 2'S COMPLEMENT OF DE CONTENTS AA XRA D 57 MOV D, A 3EFF MVI A, 0FFH AB XRA E 5F MOV E, A
06B8 06B9 06BA 06BB 06BC 06BD 06BE 06BF 06C0 06C1 06C2 06C3 06C4
13 7D 83 7C 8A
INX D MOV A, L ADD E MOV A, H ADC D
;2'S COMPLEMENT OF DE TO DE ;ADD HL AND DE
;THIS OPERATION SETS CARRY PROPERLY D1 POP D ;RESTORE ORIGINAL DE CONT. 78 MOV A, B ;RESTORE ORIGINAL CONT.OF A C1 POP B ;RESTORE ORIGINALCONT.OF BC C9 RET ;RETURN WITH CARRY SET AS REQUIRED E1 HILO5 POP H ;IF HL CONTENTS 0FFFFH,THEN 78 MOV A, B CARRY CAN ONLY BE SET TO 1 C1 POP B ;RESTORE ORIGINAL CONTENTS OF REGISTERS C33207 JMP SRET ;SET CARRY AND RETURN
******************************************************** FUNCTION : NMOUT INPUTS : A - 8 BIT INTEGER OUTPUTS : NONE CALLS : ECHO, PRVAL DESTROYS : A, B, C, F/F'S DESCRIPTION : NMOUT CONVERTS THE 8 BIT,UNSIGNED INTEGER THE A REGISTER INTO 2 ASCII CHARACTERS. THE ASCII CHARACTER ARE THE ONES REPRESENTING THE 8 BITS. THESE TWO CHARACTERS ARE SENT TO THE CONSOLE AT THE CURRENT PRINT POSITION OF THE CONSOLE.
D-65
D-66
06C7 E5 06C8 06C9 06CA 06CB 06CC
NMOUT PUSH H
F5 0F 0F 0F 0F
PUSH PSW RRC RRC RRC RRC
06CD E60F
ANI HCHAR
06CF 4F 06D0 CDE206
MOV C, A CALL PRVAL
06D3 CDF805 06D6 F1 06D7 E60F
CALL ECHO POP PSW ANI HCHAR
06D9 06DA 06DD 06E0
MOV C, A CALL PRVAL CALL ECHO POP H
4F CDE206 CDF805 E1
06E1 C9
;SAVE HL DESTROYS PREVAL ;SAVE ARGUMENT
06E7 09
DAD B
06E8 4E 06E9 C9
MOV C, M RET
******************************************************** FUNCTION : REGDS INPUTS : NONE OUTPUTS : NONE CALLS : ECHO, NMOUT, ERROR, CROUT DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION : REGDS DISPLAYS THE CONTENTS OF THE REGISTER SAVE LOCATIONS,IN FORMATTED FORM,ON THE CONSOLE. THE DISPLAY IS DRIVAN FROM A TABLE, RTAB,WHICH CONTAINS THE REGISTERS'S PRINT SYMBOL, SAVE LOCATION ADDRESS,AND LENGTH (8 OR 16 BITS).
;GET UPPER 4 BITS TO LOW 4 BIT POSITION ;MASK OUT UPPER 4 BITSWANT 1 HEX CHAR ;CONVERT LOWER 4 BITSTO ASCII ;SEND TO TERMINAL ;GET BACK ARGUMENT ;MASK OUT UPPER 4 BITSWANT 1 HEX CHAR
;RESTORE SAVED VALUE OF HL
RET
******************************************************** FUNCTION : PRVAL INPUTS : C - INTEGER RANGE 0 TO F OUTPUTS : C - ASCII CHARACTER CALLS : NOTHING DESTROYS : B, C, H, L, F/F'S DESCRIPTION : PRVAL CONVERTS A NUM. IN THE RANGE 0 TO F HEX TO THE CORROSPONDING ASCII CHARACTER,0-9, A-F.PRVAL DOES NOT CHECK THE VALIDITY OF ITS INPUT ARGUMENT.
06EA 21C407 06ED 4E 06EE 06EF 06F0 06F3
79 B7 C2F706 CDEB05
06F6 06F7 06FA 06FC 06FF
C9 CDF805 0E3D CDF805 23
PRVAL 06E2 21B407 06E5 0600
LXI H, DIGTB ;ADDRESS OF TABLE MVI B, 0 ;CLEAR HIGH ORDER BITS OF BC
;ADD DIGIT VALUE TO HL ADDRESS ;GET CHAR.FROM MEMORY
0700 5E
REGDS LXI H, RTAB
;LOAD HL WITH ADDRESS OF START OF TABLE REG05 MOV C, M ;GET PRINT SYMBOL OF REG. MOV A, C ORA A ;TEST FOR 0 END OF TABLE JNZ REG10 ;IF NOT END,BRANCH CALL CROUT ;ELSE CARRIAGE RETURN/LINE FEED TO END DISPLAY RET REG10 CALL ECHO ;ECHO CHARACTER MVI C,'=' CALL ECHO ;O/P EQUAL SIGN i.e. A = INX H ;POINT TO START OF SAVE LOCATION ADDRESS MOV E, M ;GET LSP OF SAVE LOCATION ADDRESS TO E
D-67
D-68
0701 16FF 0703 0704 0705 0708 0709 070A 070D 070E 070F 0712 0714 0717 0718
MVI D, RAMST SHR 8 ;PUT MSO OF SAVE LOC ADDRESS TO E 23 INX H ;POINT TO LENGTH FLAG 1A LDAX D ;GET CONTENTS OF SAVE LOC. CDC706 CALL NMOUT ;DISPLAY ON CONSOLE 7E MOV A, M ;GET LENGTH FLAG B7 ORA A ;SET SIGN F/F CA1207 JZ REG15 ;IF 0,REG. IS 8 BITS 1B DCX D ;ELSE 16 BIT REGISTER SO MORE TO DISPLAY 1A LDAX D ;GET LOWER 8 BITS CDC706 CALL NMOUT ;DISPLAY THEM 0E20 REG15 MVI C,' ' CDF805 CALL ECHO 23 INX H ;POINT TO START OF NEXT TABLE ENTRY C3ED06 JP REG05 ;DO NEXT REGISTER
RTAB. IF NO MATCH OCCURS, THEN CONTROL IS PASSED TO THE ERROR ROUTINE. 071B 21C407 RGADR 071E 110300 0721 7E
RGA05
0722 B7
ORA A
0723 CA1106 0726 B9 0727 CA2E07
******************************************************************* FUNCTION : RGADR INPUTS : C - CHARACTER DENOTING REGISTER OUTPUTS : BC - ADDRESS OF ENTRY IN RTAB CORROSPONDING TO REG CALLS : ERROR DESTROYS : A, B, C, D, E, H, L, F/F'S DESCRIPTION :RGADR TAKES A SINGLE CHARACTER AS INPUT.THIS CHARACTER DENOTES A REGISTER. RGADR SEARCHES THE TABLE RTAB FOR A MATCH ON THE I/P ARGUMENT.IF ONE OCCURS,RGADR RETURNS THE ADDR OF THE SAVED LOCATION CORRESPONDING TO THE REGISTER. THIS ADDRESS POINTS INTO
072A 19 072B C32107 072E 23 RGA10 072F 44 0730 4D 0731 C9
LXI H, RTAB
;HL GETS ADDR. OF TABLE START LXI D, RTAB5 ;DE GET SIZE OF A TABLE ENTRY MOV A, M ;GET REG. IDENTIFIER ;CHECK FOR TABLE END (IDENTIFIER IS 0) JZ ERROR ;IF AT END OF TABLE,ARG.IS ILLEGAL CMP C ;ELSE, COMPARE TABLE ENTRY & ARGUMENT JZ RGA10 ;IFEQUAL,WE'VE FOUND WHAT WE'RE LOOKING FOR DAD D ;ELSE INCREMENT TABLE POINTER TO NEXT ENTRY JMP RGA05 ;TRY AGAIN INX H ;IF A MATCH INR. TABLE MOV B, H ;POINTER TO SAVE LOC.ADDR. MOV C, L ;RETURN THIS VALUE RET
D-69
D-70 ******************************************************** FUNCTION : SRET INPUTS : NONE OUTPUTS : CARRY = 1 CALLS : NOTHING DESTROYS : CARRY DESCRIPTION : SRET IS JUMPED TO BY RIUTINES WISHING TO RETURN SUCCESS.SRET SETS THE CARRY TRUE & THEN RETURNS TO THE CALLER OF THE ROUTINE INVOKING SRET.
0732 0733
37 C9
SRET STC RET
SET CARRY TRUE RETURN APPROPRIATELY
******************************************************** FUNCTION : STHFO INPUTS : DE - 16BIT ADDRESS OF BYTE TO BE STORED INTO OUTPUTS : NONE CALLS : STHLF DESTROYS : A, B, C, H, L, F/F'S DESCRIPTION : STHFO CHECKS THE HALF BYTE FLAG IN TEMP TO SEE IF IT SET TO LOWER. IF SO, STFHO STORES A 0 TO PAD OUT THE LOWER HALF OF THE ADDRESSED BYTE : OTHERWISE,THE ROUTINE TAKES NO ACTION. 0734 0737 0738
STHFO 3AFDFF LDA TEMP B7 ORA A C0 RNZ
0739
0E00
073B CD3F07 073E C9
******************************************************** FUNCTION : STHLF INPUTS : C - 4 BIT VALUE TO BE STORED IN HALF BYTE DE - 16 BIT ADDR. OF BYTE TO BE STORED INTO OUTPUTS : NONE CALLS : NOTHING DESTROYS : A, B, C, H, L, F/F'S DESCRIPTION : STHLF TAKES THE 4 BIT VALUE IN C AND STORES IT IN HALF OF THE BYTE ADDRESSED BY REGISTER DE. THE HALF BYTE USED(EITHER UPPER OR LOWER) IS DENOTED BY THE VALUE OF THE FLAG IS TEMP. STHLF ASSUMES THAT THIS FLAG HAS BEEN PREVIOUSLY SET (NORMALLY BY ICMD)
MVI C, 0 CALL STHLF RET
;GET HALF BYTE FLAG ;SET F/F'S ;IF SET TO UPPER DO NOT DO ANYTHING ;ELSE WANT TO STORE THE VALUE 0 ;DO IT
073F 0740 0741 0742 0744 0745 0748 0749 074C 074D 074F 0750 0751 0752 0753 0755 0756 0757 0758 0759 075A 075B 075C 075D
STHLF D5 PUSH D E1 POP H ;MOVE ADDR. OF BYTE IN HL 79 MOV A, C ;GET VALUE E60F ANI 0FH ;FORCE TO 4 BIT LENGTH 4F MOV C, A ;PUT VALUE BACK 3AFDFF LDA TEMP ;GET HALF BYTE FLAG B7 ORA A ;CHECK FOR LOWER HALF C25207 JNZ STH05 ;BRANCH IF NOT 7E MOV A, M ;ELSE GET BYTE E6F0 ANI 0F0H ;CLEAR LOWER 4 BITS B1 ORA C ;OR IN VALUE 77 MOV M, A ;PUT BYTE BACK C9 RET 7E STH05 MOV A, M ;IF UPPER HALF,GET BYTE E60F ANI 0FH ;CLEAR UPPER 4 BITS 47 MOV B, A ;SAVE BYTE IN B 79 MOV A, C ;GET VALUE 0F RRC 0F RRC 0F RRC 0F RRC ;ALIGN TO UPPER 4 BITS B0 ORA B ;OR IN ORIGINAL LOWER 4 BITS 77 MOV M, A ;PUT NEW CONFGURATION BACK C9 RET
D-71
D-72 ******************************************************** FUNCTION : VALDG INPUTS : C - 1 ASCII CHARACTER OUTPUTS : CARRY - 1 IF CHAR. REPRESENTS VALID HEX DIGIT 0 OTHERWISE CALLS : NOTHING DESTROYS : A, F/F'S DESCRIPTION : VALDG RETURNS SUCCESS IF ITS INPUT ARGUMENT IS IN ASCII CHAR. REPRESENTING A VALID HEX HEX DIGIT (0-9, A-F) AND FAILURE OTHERWISE.
VALDG 075E 79 MOV A, C 075F FE30 CPI 'C' 0761 FA1C06 JM FRET 0764 0766 0769 076C
FE39 FA3207 CA3207 FE41
CPI '9' JM SRET JM SRET CPI 'A'
076E 0771 0773 0776
FA1C06 FE47 F21C06 C33207
JM FRET CPI 'G' JP FRET JMP SRET
;TEST CHAR. AGAINST '0' ;IF ASCII CODE IS LESS,CANNOT BE VALID DIGIT ;ELSE SEE IF IN RANGE '0'-'9' ;CODE BET' '0' - '9' ;CODE EQUAL '9' ;NOT A DIGIT-TRY FOR A LETTER ;NO CODE BET' '9'-'A' ;NO CODE THAN 'F' ;OKAY CODE IS 'A' TO 'F'
0779 077A 077C 077F 0781 0784 0786 0769
******************************************************** FUNCTION : VALDL INPUTS : C - CHARACTER OUTPUTS : CARRY - 1 IF INPUT ARGUMENT VALID DELIMITER - 0 OTHERWISE CALLS : NOTHING DESTROYS : A, F/F'S DESCRIPTION : VALDL RETURNS SUCCESS IF ITS INPUT ARGUMENT IS A VALID DELIMITER CHARACTER (SPACE, COMMA, CR)AND FAILURE OTHERWISE. VALDL 79 MOV A,C FE2C CPI ',' ;CHECK FOR COMMA CA3207 JZ SRET FE0D CPI CR ;CHECK FOR CARRIAGE RETURN CA3207 JZ SRET FE20 CPI ' ' ;CHECK FOR SPACE CA3207 JZ SRET C31C06 JMP FRET ;ERROR IF NONEOF ABOVE ******************************************************** MONITOR TABLES ********************************************************
078C 0D 078D 078E 0792 0796 079A
SGNON
0A 4D494352 4F465249 454E442D 4920200D
DB CR, LF, 'MICROFRIEND-I' CR, LF EOT.
D-73
D-74
079E 0A 079F 00 LSGNON EQU S-SGNON CADR
07A0 07A2 07A4 07A6 07A8 07AA 07AC
0000 1405 F004 D004 8604 6804 3704
DW DW DW DW DW DW DW CTAB
07AE 07AE 07AE 07AE 07AE 07AE 0006
44 47 49 4D 53 58 NCMDS DIGTB
07B4 07B5 07B6 07B7 07B8 07B9 07BA 07BB 07BC 07BD 07BE 07BF 07C0 07C1 07C2
30 31 32 33 34 35 36 37 38 39 41 42 43 44 45
07C3 46 ;LENGTH OF SIGNON MESSAGE ;TABLE OF ADDRESSES OF COMNMAND ROUTINES
0 XCMD SCMD MCMD ICMD GCMD DCMD
07C4 41
DB
07C5 EE
DB
07C6 00
DB0
0003 ;TABLE OF VALID COMMAND CHARACTERS
DB 'D' DB 'G' DB 'I' DB 'M' DB 'S' DB 'X' EQU $-CTAB ;NUM. OF VALID COMMANDS ;NUM. OF PRINT VALUE OF HEX DIGITS DB '0' DB '1' DB '2' DB '3' DB '4' DB '5' DB '6' DB '7' DB '8' DB '9' DB 'A' DB 'B' DB 'C' DB 'D' DB 'E'
DB RTAB
07C7 07C8 07C9 07CA 07CB 07CC 07CD 07CE 07CF 07D0 07D1 07D2 07D3 07D4 07D5 07D6 07D7 07D8 07D9 07DA 07DB 07DC 07DD 07DE 07DF 07E0 07E1 07E2 07E3 07E4
RTABS 42 EC 00 43 EB 00 44 EA 00 45 E9 00 46 ED 00 49 F1 00 48 F0 00 4C EF 00 4D FD 01 53 F5 01
EQU DB DB DB DB DB DB DB DBD DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB DB
'F' ;TABLE OF REGISTER INFORMATION 'A' ;REGISTER IDENTIFIER ASAV AND 0FFH ;ADDRESS OF REGISTER SAVE LOCATION ;LENGTH FLAG 0=8 BITS 1=16 BITS $-RTAB ;SIZE OF AN ENTRY IN THIS TABLE 'B' BSAV AND 0FFH 0 'C' CSAV AND 0FFH 0 'D' SAV AND 0FFH 0 'E' ESAV AND 0FFH 0 'F' FSAV AND 0FFH 0 'I' ISAV AND 0FFH 0 'H' HSAV AND 0FFH 0 'L' LSAV AND 0FFH 0 'M' MSAV AND 0FFH 1 'S' SSAV AND 0FFH 1
D-75 07E5 07E6 07E7 07E8
D-76 50 F3 01 00
DB DB DB DB
07E9 000B79 07EC BOC2C2
DB JMP
07EF 07F2 07F5 07F8 07FA 07FD 07F0 07F3 07F5 07F7 0395 0397 0399 0800 0801 0802 0803 0804 0805 0806 0807 0808 0809 080A 080B 080D 080F
JMP
0CC3CA 0C3E95 D305C3 9503 C3C405 C39005 C3CA0C 3E95 CODE0 D305 C39503 3EF7 CODE1 D305 C9 08 CMDTB 00 03 02 0B 01 0A 0C 0D 0E 0F A5FF CMDAD A2FF 9FFF
'P' PSAV+1 AND 0FFH 1 0 ;END OF TABLE MARK 0 CO ;TTY CONSOLE OUTPUT CI ;TTY CONSOLE INPUT
MVI A, 95 OUT CNTRL JMP CODE1 MVI A, BLANK DOT OUT DATA RET GO SET REG STEP SAVE CODE LOAD U1 U2 U3 U4 U4RAM U3RAM U2RAM
0811 0813 0815 0817 0819 081B 081D 081E 0821 0823 0825 0827 0829 082B 082D 082F 0831 0833 0835 0837 0839 083B 083D
9CFF AE0E 4108 B70C FD00 5109 8B01 CB00 5C08 COD-A E50B DD08 2909 BD08 5109 9F09 F10B A70B 1502 1502 E60A 650B 1502 A608
083F 0841 0843 0846 0849 084A 084B 084E 0850 0851 0853
5B0E 0600 CODE CDD701 CDF307 06 01 CD2B02 1600 7B FE11 D21502
U1RAM LOAD CODE SAVE STEP REG SET RUN 00 MOVE BLOCK 01 FILL BLOCK 02 INSERT BYTE 03 DELETE BYTE 04 BLOCK SEARCH 05 HEX TO DECIMAL 06 DECIMAL TO HEX 07 PROGRAMMING 08 VERIFY 09 FERR 0A BLANK CHECK 0B BLANK CHECK 0C CHKSUM 0D FERR 0E COMPLEMENT BLOCK 0F ROLLING DISPLAY MVI B, NODOT CALL CLEAR MVI B, DTFLD CALL GTHEX JNC ERR MVI D, 00 MOV A, E CPI 10 JNC ERR
D-77 0856 0859 085C 085E 0861 0864 0867 0868 086B 086E 0870 0873 0874 0877 087A 087B 087C 087D 087E 087F 0822 0823 0824 0825 0828 0829 088C 088D 088F 0892 0895 0896 0897 0898 0899 089A 089D 089E 089F 08A2 08A5 08A6 08A9
D-78 212108 LXI H, CODEA C3A40C JMP RMNCOD 3EFF MOVEBLK MVI A, 0FF 32BFFF STA COPYTEST CD780A BLMOV CALL LDAIL 2AB9FF LHLD DSSAVE EB XCHG 2ABDFF LHLD SSAVE 3ADFFF MB1 LDA COPYTEST FE00 CPI L CA7708 JZ MB2 7E MOV A, M C37A08 JMP MB3 CDD60B MB2 CALL READ 47 MB3 MOV B, A EB XCHG 77 MOV M, A 7E MOV A, M B8 CMP B C21502 JNZ ERR 13 IND X 23 INX H E5 PUSH H CD6F0A CALL D1 POP D D26B08 JNC MB1 CF RST 1 CD46 2ABDFF FILL BLK LHLD SSAVE 3AB8FF LDA SRSAVE 47 MOV B, A 00 NOP 77 MOV M, A 7E MOV A, M B8 CMP B C21502 JNZ ERR 23 INX H EB XCHG CD6F08 CALL S-E D29208 JNC FB1 CF RST 1 CD930A COMPLEMENT CALL LDSSE 2ABDFF LHLD SSAVE
08AC 08AD 08AE 08AF 08B0 08B1 08B4 08B5 08B6 08B9 08BC 08BD 08C0 08C3 08C4 08C7 08C8 08CB 08CC 08CD 08D0 08D3 08D4 08D5 08D6 08D7 08DA 08DD 08E0 08E2 08E5 08E7 08EA 08EB 08ED 08F0 08F3 08F4 08F7 08FA 08FD 08FE 08FF
7E CM1 2F 77 00 BE C21502 23 EB CD6F0A D2AC08 CF CD460C 2ABDFF 46 BZI 3AB8FF B8 CCD408 23 EB CD6F0A D2C308 CF E5 DISPLY D5 F5 CD6203 C3910D CDAA0A INSERT 0601 CDD701 0E03 CDC20A 00 0600 CD2B02 D21502 EB 22B6FF CD490C INS1 2ABBFF 54 5D 13
MOV A, M CMA MOV M, A NOP CMP M JNZ ERROR INX H XCHG CALL S-E JNC CM1 RST 1 BLOCKSEARCH CALL SRLD LHLD SSAVE MOV B, M LDA SERSAVE CMP B CZ DISPLY INX H XCHG CALL S-E JNC BS1 RST 1 PUSH HL PUSH DE PUSH PSW CALL UPDAD1 JMP DISP1 CALL SEDI ;LOAD DE MVI B, 01 CALL CLEAR ;DOT IN ADDR. FIELD MVI A, 03 CALL DTDISP NOP MVI B, 00 CALL GTHEX ;IA JNC ERROR XCHG SHLD IASAVE ;IA CALL SRL1 ;LOAD SR LHLD SESAVE MOV D, H ;HL:SS-SE MOV E, L INX D ;DE:DS(SE+1)
D-79 0900 0901 0902 0903 0904 0905 0906 0909 090A 090B 090C 090D 090E 0911 0912 0913 0914 0915 0916 0917 0918 091B 091E 0921 0922 0923 0924 0925 0929 092C 092E 0931 0933 0936 0937
D-80 7E INSZ 47 EB 77 7E B8 C21502 1B 2B EB D5 E5 2AB6FF EB E1 7D 93 7C 9A D1 D20009 2AB6FF 3AB8FF 77 47 7E B8 C2150A CF CDAA0A DELETE 0601 CDD701 0E04 CDC20A 00 0600
MOV MOV XCHG MOV MOV CMP JNZ DCX DCX ECHG PUSH PUSH LHLD ECHG POP MOV SUB MOV SUB POP JNC LHLD LDA MOV MOV MOV CMP JNZ CALL MVI CALL MVI CALL NOP MVI
A, M B, A
;DATA AT SS
M, A A, M B ERR DE HL DE HL IASAVE HL A, L E A, H D DE INS2 TASAVE SRSAVE M, A B, A A, M B ERROR SED1 B, 01 CLEAR C, 04 DTDISP B, 00
0939 093C 093F 0940 0943 0946 0947 0948 0949 094B 094E 0951 0953 0956 0958 095B 095E 095F 0962 0963 0966 0969
CD2B02 D21502 EB 22B4FF 000000 E5 D1 23 3EFF 32BFFF C36B08 0E05 CDC20A 0600 CD2B02 D21502 EB 22B1FF AF 32B1FF 010000 7C HD0
096A B5 096B CA8909 DISPLAY BC 096E 2B 096F 0970 0971 0972 0973
AF 79 3C 37 4F
CALL GTHEX JNC ERR XCHG SHLD DASAVE NOPS PUSH H POP D INX H MVI A, FF STA COPYTEST JMP MB1 HEX-DEMVI C, 05 CALL DTDISP MVI B, 00 CALL GTHEX JNC ERROR XCHG SHLD HESAVE RAA STA CARRY LOC LXI B, 00 MOV A, H ;SEE HL=HEX COUNT 00 ORA L JZ HD3 ;OVER DCX
HL
XRA MOV INR DAA MOV
A A, C A C, A
;DECIMAL CARRY CLEAR ;INCREMENT C ;DECIMALLY
D-81
D-82
0974 0977 0978 0979 097A 097B 097C 097F 0982 0983
D26909 AF 78 3C 27 47 D26909 3AB1FF 3C 32B1FF
0986 0989 098C 098D 098E 098F
C36909 3AB1FF HD3 67 68 C5 CD6203
0992
C1
0993 79 0994 CD6E03 0997 76 0998 TO 099E IS BLANK. 099F 0E06 DEC-HEX 09A1 CDC20A 09A4 0600 09A6 CD2B02 09A9 D21502 09AC D5 09AD C1 09AE 219999 09B1 110000
JNC XRA MOV INR DAA MOV JNC LDA INR STA
;IF NO CARRY
B, A HD0 ;IF NO CARRY CHECK CARRY LOC A CARRY LOC ;CARRY AFTER JMP HD0 ;EACH BC LDA CARRY LOC ;DECIMAL MOV H, A MOV L, B ;IN ADDRESS PUSH BC ;CARRY & CALL MODI DAD1 ;HIGHER BYTE OF POP BC ;BCD COUNTER DATES MOV A, C ;SHOWN OVER BYTE CALL MODIDTA HLT MVI CALL MVI CALL JNC PUSH POP LXI LXI
09B4 AF 09B5 00 09B6 08
XRA NOP DSUB
09B7 09B9 09BA 09BD 09BE
MVI CMP JNZ CMP JNZ
3E99 DH2 BD C2C509 BC C2C509
HD0 A A, B A
C, 06 ;DISPLAY DE DTDISP B, 00 ;GET IN DE GTHEX ERR ;DECIMAL DE ;NUMBER BC ;BC:NUMBER H, 9999 ;HL:9999 D, 0000 ;DE:00 HEX CNTR ;CLEAR CARRY
A, 99 L DH0 P DH0
;UNSPECIFIED LODE HL-BC INTO HL ;9999-NUMBER ;IS HL 9999? ;IF NO LOOP
09C1 D5 09C2 C3640C
PUSH DE JP DH2
09C5 09C6 09C7 09C8
AF 13 7D 3C
DH0
XRA A INX DE MOV A, L INR A
09C9 09CA 09CB 09CE 09CF
27 6F D2B709 AF 7C
DAA MOV L, A
09D0 09D1 09D2 09D3 09D6 09D7 09DA 09DD 09E0 09E3 09E4 09E5 09E8 09E9 09EA 09ED 09F0 09F2 09F3 09F6 09F7 09F8 09F9 09FC 09FD 09FE 09FF 0A02 0A03
3C 27 67 C3B709 FF C30F0E SERIAL CDE309 CDFA03 C30804 20 BRI0 B7 FAE809 20 BRI1 B7 FAE809 21FAFF 1E04 BRI3 1D BRI4 C2F209 23 20 B7 F2F009 E5 24 2C 22C0FF E1 B7
INR A DAA MOV H, A JMP DH1
XRA A MOV A, H
JMP SRL1 CALL BRID CALL SIGNON JMP GETCM RIM ORA Z JP BRID RIM ORA Z JM BRI1 LXI H, -6 MVI E, 04 DCR E JM BRI1 INX H RIM ORA A JP BRI3 PUSH H INR H INR L SHLD BIT TIME POP H ORA A
;SAVE HEX COUNT ;DISPLAY HEX COUNT ;CLEAR CARRY ;INCREMENT HEX ;DECIMAL ADJUST & INCREMENT H1
;DECIMALLY INCREMENT ;H AND ;CONTINUE
D-83 0A04 0A05 0A06 0A07 0A08 0A09 0A0A 0A0B 0A0D 0A10 0A11 0A13 0A15 0A16 0A18 0A19 0A1B 0A1E 0A20 0A23 0A26 0A29 0A2C 0A2D 0A30 0A33 0A34 0A35 0A38 0A3A 0A3B 0A3E 0A41
D-84 7C 1F 67 7D 1F 6F 24 0606 C3080E 79 CNVBN D630 FE0A F8 D607 C9 0601 CDD701 0E07 CDC20A 000600 CD2B02 D21502 EB 22ADFF 21E20A AF 47 CDB702 3E01 47 21310B CDB702 0601
0A43 CD2B02
MOV RAR MOV MOV RAR MOV INR MVI JMP MOV SUI CPI RM SUI RET MVI CALL MVI CALL CALL INC XCHG SHLD LXI XRA MOV CALL MVI MOV LXI CALL MVI
A, H H, A A, L L, A H B, 06 6PASS A, C '0' 10 7 B, 01 C, 07 GTHEX ERROR
BRASAVE H, CnADR A B, A OUTOUT A, 01 B, A H, 0B31 ;BLANK OUTPUT B, 01 ;USE ADDRESS FIELD OF DISPLAY & DOT CALL GTHEX
0A46 0A47 0A4A 0A4B 0A4E 0A50 0A53 0A56 0A57 0A5A 0A5B 0A5C 0A5F 0A60 0A61 0A64 0A67 0A68 0A6B 0A6F 0A72 0A73 0A74 0A75 0A76 0A77 0A78 0A7B 0A7D 0A80 0A82 0A85 0A88 0A8B 0A8E
7B 32ACFF C9 3AACFF SSTCP FE00 CAFD00 2AF2FF EB 2AADFF 7D BB C22601 7C BA C22601 3AACFF 3D 32ACFF C3AB0C 2ABBFF 7D 93 7C 9A EB C9 CD930A 0601 CDD701 0E02 CDC20A 000600 CD2B02 D21502 EB
MOV STA RET LDA CPI JZ LHLD XCHG LHLD MOV CMP JNZ MOV CMP JNZ LDA DCR STA JMP LHLD MOV SUB MOV SBB XCHG RET LDALL MVI CALL MVI CALL
A, E CnSAVE CnSAVE 00 STEP PCSAVE BrSAVE A, L E STP20 A, H D STP20 CnSAVE A CnSAVE SST0 SESAVE A, L E A, H D CALL LDSSE B, 01 C, 02
CALL GTHEX JNC ERR XCHG
D-85
D-86
0A8F 0A92 0A93 0A95 0A98 0A9B 0A9D 0A9E 0AA0 0AA3 0AA6 0AA7 0AAA 0AAC 0AAF
22B9FF C9 0601 CDD701 0E00 CDC20A 00 0600 CD2B02 D21502 EB 22BDFF 0601 CDD701 0E01
SHLD DSSAVE RET LDSSE MVI C, 01 CALL DIDISP LHLD SSAVE CALL UPDAD1 NOP MVI B, 0 CALL GTHEX JNC ERROR XCHG SHLD SSAVE MVI B, 01 CALL MCI C, 01
0AB1 0AB4 0AB7 0ABA 0ABD 0ABE 0AC1 0AC2 0AC4 0AC7 0AC8 0AC9 0ACB 0ACE 0AD0 0AD1 0AD2 0AD3 0AD4 0AD5 0AD6 0AD7 0AD8 0AD9 0ADA 0ADB
CDD20A 000600 CD2B02 D21502 EB 22BBFF C9 0600 21CE0A 09 09 3E01 C3B702 0505 SSADR 05 0E 0D 05 13 0A 0D 0A 10 0E 0D 0E
CALL CALL GTHEX JNC ERROR XCHG SHLD SESAVE RET DIDISP MVI B, 00 LXI H, SSADR DTDO DAD BC DAD BC MVI 01 JMP OUTPUT DCR B DCR B
0ADC 0ADD 0ADE 0ADF 0AE0 0AE1 0AE2 0AE3 0AE4 0AE5 0AE6 0AE9 0AEC 0AEF 0AF1 0AF4 0AF5 0AF8 0AF9 0AFA 0AFD 0AFE 0B00 0B03 0B06 0B09 0B0B 0B0C 0B0D 0B0E 0B0F 0B10 0B13 0B14 0B15 0B16 0B19 0B1A 0B1B 0B1E 0B20 0B21
0B 14 15 15 05 14 15 15 0C 16 CD160B 210080 000000 06FF 7E0000 B8 C4D408 23 EB CDD60B 67 2EFF 000000 000000 000000 0000 7D 93 7C 9A EB D2EF0A CF EF FF 21310B AF 47 CDB702 3E01 47 21310B
SRADR
CnADR
BLANCKCHK BC1
BC3
PrLOAD
CALL LXI NOPs MVI MOV CMP CMZ INX XCHG CALL MOV MVI NOP NOP NOP
PrLOAD H, 8000 B, FF A, M NOP NOP B DISPLAY H CALC H, L L, FF
MOV SUB MOV SBB XCHG JNC
A, L E A, H D
LXI XRA MOV CALL MVI MOV LXI
H, PrADR A B, A OUTPUT A, 01 B, A H, 0B ;BLANK OF DISPLAY DOT
BC1
D-87
D-88
0B24 CDB702 0B27 0601 0B29 CD2B02
CALL OUTPUT MVI B, 01 CALL GTHEX
0B2C 0B2D 0B30 0B31 0B32 0B33 0B34 0B35 0B38 0B3B 0B3D 0B40 0B43 0B46 0B49 0B4C 0B4D 0B50 0B51 0B54 0B56 0B59 0B5A 0B5B 0B5E 0B5F 0B62 0B65 0B68 0B6B 0B6C
MOV STA RET b b p R CALL LDA CPI JZ LXI JMP LXI LXI DAD SHLD XCHG SHLD MVI JMP
7B 32A7FF C9 15 PRADR 15 12 14 CD900C DUPL 3AA9FF FE01 CA460B 21FF07 C3490B 21FF0F DUP1 110030 DUP2 19 22BBFF EB 22BDFF 2600 C3B10C F7 0B CD880C AF 32BFFF CHKSUM C36108 CD160B CDD60B 57 1EFF
COPY XRA STA JMP CALL CALL MOV MOV
A, E PrSAVE
DDISP PRSAVE 01 DUP1 H, 07FF DUP2 H, 0FFF D, 3000 DE SESAVE SSAVE H, 00 DUP3 CALL CDISP A COPYTEST BLMOV PrLOAD CALC D, A E, FF
;GET HEX IN ADDR.
0B6E 0B70 0B73 0B74 0B75 0B76 0B77 0B78 0B79 0B7A 0B7B 0B7E 0B7F 0B81 0B84 0B86 0B88 0B8B 0B8E 0B8F 0B91 0B92 0B93 0B94 0B95 0B96 0B99 0B9C 0B9E 0BA1 0BA4 0BA5 0BA6 0BA7 0BA9
0E00 210080 7E CH0 81 4F 23 7B 95 7A 9C D2730B 69 2600 CD620B 3E01 0600 21A50B CDB702 76 0000 7B CH2 95 7A 9C E1 D2710B CD6203 3E01 21A50B CDB702 76 0C CHADR 00 0000 VERIFY CD800C
MOV LXI MOV POP ADD INX MOV SUB MOV SBB JNC MOV MVI LXI MVI MVI LXI CALL HALT NOPs MOV SUB MOV SBB POP JNC CALL MVI LXI CALL HALT INR NOP NOP CALL
C, 00 H, 8000 A, M D C H A, E L A, D H CH0 L, C H, 00 H, CHADR A,01 B,00 H, CHADR OUTPUT A, E L A, D H H CH0 UPDAD1 A, 01 H, CHADR GTHEX C VDISP
D-89 0BAC 0BAF 0BB0 0BB3 0BB4 0BB5 0BB6 0BB7 0BB8 0BB9 0BBA 0BBD 0BBE 0BBF 0BC0 0BC3 0BC4 0BC5 0BC6 0BC7 0BC8 0BC9 0BCC 0BCD 0BCE 0BD1 0BD2 0BD5 0BD6 0BD9 0BDA 0BDC 0BDD 0BDE 0BDF 0BE2 0BE4 0BE5 0BE8 0BEB 0BEE 0BF0 0BF1
D-90 2AB9FF EB 2ABDFF EB 46 VFY1 EB 7E EB B8 78 C4D408 23 13 E5 2ABBFF 7D 93 7C 9A E1 00 D2B40B CF E5 CD6E03 F1 CD6E06 76 3AA9FF CALC 47 3E03 37 17 05 F2DC0B C680 C9 CD460C CD8F08 000000 0000 00 PROGRAM CD780A
LHLD XCHG LHLD XCHG MOV XCHG MOV XCHG MOV XCHG CMP INX INX PUSH LHLD MOV SUB MOV SBB POP NOP JNC RST
LDA MOV MVI STC RAL DCR JP ADI RET CALL JMP NOPs NOPs NOP CALL
DSSAVE SSAVE B, M A, M A, M B H D HL SESAVE A, L E A, H D H VFY1 1
$20A9 B, A A, 03 B 0BDC 80 SRKD 088F
0A78
0BF4 0BF7 0BF8 0BFB 0BFC 0BFD 0BFE 0BFF 0C00 0C01 0C02 0C03 0C05 0C08 0C09 0C0A 0C0B 0C0D 0C0E 0C11 0C12 0C13 0C14 0C15 0C16 0C17 0C1A 0C1B 0C1C 0C1D 0C20 0C21 0C24 0C25 0C26 0C27 0C2A 0C2D 0C2E 0C2F 0C31 0C33 0C34
2AB9FF EB 2ABDFF 7E 47 EB 77 E5 C5 F5 D5 0600 CD6203 D1 D5 EB 0600 7E CD6E03 D1 F1 C1 E1 7E B8 C21502 13 23 E5 CD6F0A D1 D2FB0B CF 00 D5 11FF19 CDF105 D1 7A F660 D302 13 23
LHLD XCHG LHLD MOV MOV XCHG MOV PUSH PUSH PUSH PUSH MVI CALL POP PUSH XCHG MVI MOV CALL POP POP POP POP MOV CMP JNZ LDAX INX XCHG CALL POP JNC RST NOP PUSH LXI CALL POP MOV ORI OUT INX INX
FF89 FFBD A, M B, A M, A H B PSW D B, 00 0362 D D B, 00 A, M 036E D PSW B H A, M B 0215 D H 0A6F E 0BFB 7.5 DE D, 19FF DELAY DE A, D 60 02 D H
D-91 0C35 0C36 0C37 0C3A 0C3B 0C3C 0C3D 0C3E 0C3F 0C40 0C43 0C46 0C49 0C4C 0C4D 0C4E 0C51 0C53 0C54 0C57 0C59 0C5C 0C5F 0C60 0C63 0C64 0C67 0C68 0C6B 0C6C 0C6F 0C70 0C72 0C75 0C78
D-92 EB E5 2ABBFF 7D 93 7C 9A E1 EB D20E0C C3360E CD830A 21DE0A AF 47 CDB702 3E01 47 CDB702 0601 CD2B02 D21502 7B 32B8FF C9 CDD701 E1 C38D0D C5 CDD701 C1 0600 21980C C3C70A CD780A
XCHG PUSH LHLD MOV SUB MOV SBB POP XCHG JNX JMP SRKD CALL LXI XRA MOV CALL MVI MOV CALL MVI CALL INC MOV STA RET DH2 CALL POP JMP MESG PUSH CALL POP MVI LXI JMP PDISP CALL
H SESAVE A, L E A, H D H PRO PR1 LDSSE H, SRADR A B, A OUTPUT A, 01 B, A OUTPUT B, 01 GTHEX ERR A, E SRSAVE CLEAR HL DH3 BC CLEAR BC B, 00 H, PADR DIDO LDALL
0C7B 0C7D 0C80 0C83 0C85 0C88 0C8B 0C8D 0C90 0C93 0C95 0C98 0C99 0C9A 0C9B 0C9C 0C9D 0C9E 0C9F 0CA0 0CA1 0CA2 0CA3 0CA4 0CA5 0CA6 0CA7 0CA8 0CA9 0CAA 0CAB 0CAE 0CB1 0CB4
b p b V h r b D B S b L
0E00 MVI C36B0C JMP CD780A VDISP CALL 0E01 MVI C36B0C JMP CD160B CDISP CALL 0E02 MVI C36B0C JMP CD160B DDISP CALL 0E03 MVI C36B0C 15 BLANK 12 P 15 BLANK 17 U 15 BLANK OR 0C C 15 BLANK 0D D 15 BLANK 05 S 15 BLANK 11 L 19 RMNC0D DAD 19 DAD 7E MOV 23 INX 66 MOV 6F MOV E9 PCHL C22601 SST0 JNZ C3FD00 JMP 22B9FF DUP3 SHLD C3F70B JMP
C, 00 MESG LDALL C, 01 MESG PRLOAD C, 02 MESG PRLOAD C, 03
D D A, M H A, M L, A STP20 STEP SSAVE PROG
D-93
D-94
0CB7 CD930A SAVE CALL LDSSE 0CBA 0CBD 0CC0 0CC3 0CC5 0CC8 0CCB 0CCE 0CD1 0CD4
21550D CD190B 32BAFF 0E04 CD6B0C CD040D 32BFFF 21A00F DA1502 CD590D
LXI CALL STA MVI CALL CALL STA LXI JC CALL
H, FnSAVE PrLOAD FnSAVE C, 04 MESG CHKSUM1 (CHSAVE) H, 4000D ERROR 1KOUT
0CD7 21BAFF
LXI
H, BUSTADR
0CDA 010600 0CDD CD150D
LXI B, 0006 CALL TAPEOUT
0CE0 21A00F 0CE3 CD5E0D 0CE6 CDF50C 0CE9 0CEC 0CEF 0CF2 0CF5 0CF8 0CF9 0CFC 0CFD 0CFE 0CFF 0D00 0D01 0D02 0D03 0D04 0D07 0D08 0D09
;GET SS AND SE BLOCK LIMIT ;DISPLAY Fn
;SAME FILE NAME ;SAVE CHECKSUM ;MISMATCH ERROR ;1KHz LEADER FOR 4 SEC. ;BUFFER START ADDRESS ;6 PARAMETER OIP ;SEND Fn,SE,SS & CHECKSUM
LXI H, 4000 CALL 2KOUT ;O/P 2KHz MIDSYNC. CALL GETPARA ;SET SS AND BLOCK COUNT CD150D CALL TAPEOUT 21A00F LXI H, 4000D CD5E0D CALL 2KOUT ;2KHz END SYNC. C34E00 JMP SIGNON ;FrIEnd 2ABBFF GETPARA LHLD SESAVE EB XCHG 2ABDFF LHLD SSAVE ;THIS RETURN SS IN HL 7B MOV A, E ;AND BYTE COUNT IN BC 95 SUB L 4F MOV C, A 7A MOV A, D ;BC=DE-HL=SE-SS 9C SBB H 47 MOV B, A 03 INX B ;BC=BYTE COUNT HL:SS C9 RET CDF50 CHKSUM CALL GETPARA ;GET PARAMETER D8 RET AF XRA A 86 SUM0 ADD A, HL
0D0A 0D0B 0D0C 0D0D 0D0E 0D0F 0D10 0D13 0D14 0D15
57 23 0B 78 B1 7A C2090D B7 C9 5E TAPEOUT
0D16 CD210D 0D19 23 0D1A 0B 0D1B 78 0D1C B1 0D1D C2150D 0D20 C9 0D21 1608 OUTBYTE 0D23 B7 0D24 CD350D 0D27 7B 0D28 0F 0D29 CD690F 0D2C 15 0D2D C2270D 0D30 37 0D31 CD350D 0D34 C9 0D35 E5 OUTBIT 0D36 D5 0D37 C5 0D38 2600 0D3A DA470D 0D3D 2E08 0D3F CD5E0D 0D42 2E02 0D44 C34E0D 0D47 2E04 0D49 CD5E0D 0D4C 2E04 0D4E CD590D 0D51C1
MOV INX DCX MOV ORA MOV JNZ ORA RET MOV
D, A HL BC A, B C A, D SUM0 A E, M
;OUTPUT A MEMORY BLOCK TO CALL OUTBYTE ;TAPE INX HL DCX BC MOV A, B ORA C JNZ TAPEOUT RET MVI D, 08 ORA A CALL OUTBIT MOV A, E RRC CALL OUTBIT DCR D ;8 BIT DATA JNZ 0B STC CALL OUTBIT ;STOP BIT RET PUSH H PUSH D PUSH B MVI H, 00 JC OUT1 MVI L, 08 CALL 2KOYT MVI L, 02 JMP OUT2 MVI L, 04 CALL 2KOUT MVI L, 04 CALL 1KOUT POP B
D-95 0D52 0D53 0D54 0D55 0D56 0D57 0D58 0D59 0D5B 0D5E 0D60 0D61 0D63 0D64 0D65 0D66 0D69 0D6B 0D6C 0D6D 0D6E 0D6F 0D70 0D73 0D76 0D78 0D7B 0D7C 0D7D 0D7E 0D7F 0D82 0D85 0D86 0D87
D-96 D1 POP D E1 POP H C9 RET 15 FnADR BLANK 15 BLANK 0F F 16 n 0E61 1KOUT MVI C, F1K C3600D JMP TONE 0E2E 2KOUT MVI C, F2K 29 TONE DAD HL 3EC0 MVI A, C0 C5 SQW PUSH B 30 SIM 0D TP DCR C C2650D JNZ TP EF80 XRI 80 47 MOV B, A 2B DCX H 7C MOV A, H B5 ORA L 78 MOV A, B C3640F JMP EXT CD170F GETBYTE CALL GETBIT ;OIP DATA IN E 1608 MVI D, 08 CD170F GET0 CALL GETBIT 7B MOV A, E 1F RAR 5F MOV E, A 15 DCR D C2780D JNZ GET0 CD170F CALL GETBIT ;STOP BIT BYPASSED C9 RET 1D BT1 DCR E C2860D JNZ BT1
0D8A 0D8B 0D8C 0D8D 0D90 0D91 0D92 0D95 0D98 0D9A 0D9D 0D9E 0D9F 0DA0 0DA3 0DA6 0DA8 0DAB 0DAE 0DB0 0DB3 0DB4 0DB7 0DBA 0DBC 0DBD 0DBF 0DC2 0DC3 0DC4 0DC7 0DC9 0DCC 0DCD 0DD0
20 17 C9 CD6203 DH3 76 F1 DISP1 CD6E03 CDE702 DISP2 FE10 C2950D D1 E1 C9 C2490D LOAD3 C34500 FE12 C21502 3AFDFF PRVRG FE00 CAF702 3D 32FDFF C3FA02 FE10 CHK C8 FE12 C2CF01 C9 F1 INRDCR 2AF6FF FE10 C2D00D 23 C3C701 FE12 DCR
RIM RAL RET CALL HLT POP CALL CALL CPI INZ POP POP RET INZ JMP LDA CPI JZ DCR STA JMP CPI RZ CPI JNZ RET POP LHLD CPI JNZ INX JMP CPI
UPDAD1 PSW UPDAD1 RDKBD 11 DISP2 DE HL LOAD2 CMMND RGPTR 00 RETF A RGPTR RETT INR DCR SUB15 PSW CURAD INR DCR H SUB 20 DCR
D-97 0DD2 C2CF01 0DD5 2B 0DD6 C3C701 0DD9 FE10 VALCH 0DDB CA6702 0DDE FE12 0DE0 CA6702 0DE3 C3C500 0DE6 FE12 PRRG 0DE8 C21502 0DEB CDAB0D 0DEE C3C500 0DF1 0603 3PASS 0DF3 C3F80D 0DF6 0606 0DF8 2AC0FF BITSPAS 0DFB 2D BP 0DFC C2FB0D 0DFF 25 0E00 C2FB0D 0E03 05 0E04 C2F80D 0E07 C9 0E08 2C 6PASS 0E09 229AFF 0E0C C3F80D 0E0F 21250E SRL1 0E12 AF 0E13 47 0E14 CDB702 0E17 21290E 0E1A 3E01 0E1C CDB702 0E1F 3E0C 0E21 30 0E22 C2DA09 0E25 S 05 0E26 E 0E 0E27 r 14 0E28 I 13 0E29 A 0A 0E2A L 11
D-98 JNZ DCX JMP CPI JZ CPI JZ JMP CPI JNZ CALL JMP MVI JMP
SUB15 H SUB20 INR GTH25 DCR GTH25 GTH30 DCR ERR PRVRG 00C5 B, 03 BITSPAS
LHLD DCR JNZ DCR JNZ DCR JNZ RET INR SHLD JMP LXI XRA MOV CALL LXI MVI CALL MVI SIM JMP
BITTIME L BP H BP B BITSPAS L HALFBIT BITSPAS H, SERIADR A B, A OUTPT H, ALADR A, 01 OUTPT A, 0C
0E2B 0E2D 0E2F 0E31 0E33 0E36 0E38 0E3A 0E3C 0E3E 0E41 0E44 0E46 0E49 0E4C 0E4D 0E4E 0E50 0E52 0E53 0E55 0E5B
3E82 0000 3EF0 D302 C30800 3E82 D303 3EF0 D302 C3AD0B 3AA9FF FEFF CA4C0E C3D60B 7E C9 FFFF 3E08 30 3EFF 32A9FF 217C0E
CLD0
PR1
READ1
READ2 COMPARE
ROLLING
0E5E E5
DISP
0E5F AF
ROLL1
0E60 47 0E61 CDB702 0E64 3E01 0E66 0600 0E68 CDB702 0E6B 11FFFF
SRL2 0E6E CDF105 0E71 7E 0E72 FEFF 0E74 E1
MVI OUT MVI OUT JMP MVI OUT MVI OUT JMP LDA CPI JZ JMP MOV RET
A, 82 03 A, F0 02 CLDBK A, 82 03 A, F0 02 VFY0 PrLOAD FF READ2 READ A, M
MVI SIM MVI STA LXI
A, 08
A, FF PrLOAD H, STRING ;HL:STRING ADDRESS PUSH HL ;HL:SAVE ADDRESS XRA A ;A=0 ADDRESS MOV B, A ;NO DOT CALL OUTPT MVI A, 01 ;USE DATA FIELD MVI B, 00 ;NO DOT CALL OUTPT LXI H, FFFF ;FULL DELAY CALL DELAY MOV A, M ;FF IS END OF STRING CPI EOS ;GET BACK START POP H ;ADDRESS INCREMENT
D-99
D-100
0E75 23 0E76 C25E0E 0E79 C35B0E THE STRING: 0E7C 15 0E7D 15 0E7E 15 0E7F 15 0E80 15 0E81 0D 0E82 1B 0E83 16 0E84 0A 0E85 11 0E86 1C 0E87 19 0E88 15 0E89 18 0E8A 0E 0E8B 11 0E8C 12 0E8D 05 0E8E 15 0E8F 1B 0E90 1C 0E91 17 0E92 15 0E93 13 0E94 16 0E95 15 0E96 11 0E97 0E 0E98 0A 0E99 14 0E9A 16
INX JNZ JMP BLANK BLANK BLANK BLANK BLANK d y n A L o G BLANK h E L P S BLANK y o U BLANK I n BLANK L E A r n
H ROLL1 ROLLING
;IF NOT AT EOS ;IF NOT AT EOS
0E9B 0E9C 0E9D 0E9E 0E9F 0EA0 0EA1
13 16 19 15 17 12 FF
I n G BLANK U P EOS
MEMORY LOACTION USED : 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 208A 208B 208C 208D 208E 208F 2090 0EA2 0EA5 0EA6 0EA7 0EA8
15 15 X Y CD(GENERATED) AB(GUESSED) 0D D0 C0 0C A0 B0
CMTR (RANDOM IN BETWEEN) CD730D PAPEIN 73 23 0B 78
CALL GETBYTE
MOV INX DCX MOV
M, E HL BC A, B
;MEMORY BLOCK FROM HL ;COUNT IN BC
D-101 0EA9 0EAA 0EAD 0EAE 0EB1 0EB4 0EB6 0EB9 0EBC 0EBF
D-102 B1 C3490F FF 21550D CD190B 0E05 CD6B0C 21E803 CD410F DAB90E
ORA JMP
C TAPEIN
LXI CALL MVI CALL LXI CALL JC
HL, (FnADR) PrLOAD C, 05 MESG HL, 1000D PERIOD LOAD0
0EC2 2B 0EC3 7C
DCX MOV
HL A, H
0EC4 0EC5 0EC8 0ECB 0ECE 0ED1 0ED4 0ED7 0EDA 0EDD 0EDE 0EE1
B5 C2BC0E CD510E D2C80E 21BAFF 010600 CDA20E DAB90E 3ABAFF F5 CD6E03 CD0A0F
ORA JNZ CALL JNC LXI LXI CALL JC LDA PUSH CALL CALL
L LOAD1 PERIOD LOAD2 HL, BUFFST B, 0006 TAPEIN LOAD0 (TAPEF n) PSW MODIDT1 1.5 SEC
0EE4 0EE5 0EE6 0EE9 0EED 0EF0 0EF3 0EF6
F1 47 DA1502 B8 CDF50C DA1502 CDA20E DA1502
POP MOV LDA CMP CALL JC CALL JC
PSW B, A Fn A, B GETPARA ERROR TAPEIN ERROR
0EF9 CD040D 0EFC 21BFFF 0EFF FE
CALL CHKSUM1 LXI H, CHSAVE CMP A, M
0F00 C21502 0F03 2ABDF
JNZ ERROR LHLD SSAVE
0F06 CD6203
CALL
;GET Fn
0F09 76
HALT
;L DISPLAY
0F0A 0603 1.5 SEC 0F0C 11FFFF LOOP0 0F0F CDF105
MVI B, 03 LXI D, FFFF CALL DELAY
0F12 0F13 0F16 0F17 0F18 0F19 0F1A 0FAB 0F1E 0F21 0F24
DCR JNZ RET PUSH PUSH PUSH XRA STA LXI CALL INR
;NC:1KHz ;LOOP UNTIL SYNC 1KHz DOT ;LEADING SYNC 1000?
;GET Fn SE SS & CHK
;Fn IS DATA FIELD ;PASS OUT 2KHz SYNC.
;FILE NOT FOUND ;ILLEGAL PARAMETER ;COMPARE DATA SUMWITHTAPE SUM
05 C20C0F C9 C5 GETBIT D5 E5 AF 32FFFF 210000 CD510F GB0 14
0F25 15 0F26 C2400F
DCR JNZ
0F29 DA330F 0F2C 2D
JC DCR
0F2D 2D 0F2E 26FF
DCR MVI
0F30 0F33 0F34 0F35
C3210F 2C 7C FE00
JMP INR MOV CPI
0F37 0F3A 0F3B 0F3C 0F3D
CA210F 7D 17 E1 D1
JZ MOV RAL POP POP
MODIAD1
;DISPLAY START ADDRESS ON ;ADDRESS FIELD FOR YOUR REF. ;5 X 3 = 1.5 SEC. DELAY
B LOOP0 B D H A CARRY TEMP. H, 0000 PERIOD D ;NON DESTRUCTIV E TESTING D TOOMUCH ;D 0 LONG PERIOD 2KP L ;FOR 1KHz DECREMENT BY 2 L H, FF ;1KHz END OF THIS BIT GB0 L A, H 00 ;H=00 2KHz IS FIRST GB0 A, L H D
;L=(=/2KHz PERIOD)-2
D-103
D-104
0F3E C1 0F3F C9 0F40 3EFF
POP RET TOOMUCH
MVI
B
;(=/ 1KHz PERIOD) ;L+CARRY=0 8(2K),2(1K) A, FF ;L-CARRY=1 4(2K),4(2K) CARRY TEMP ;ERROR WHILE READING H D B
0F68 0F69 0F6A 0F6D 0F6F 0F71 0F72 0F74 0F76
C9 RET 5F NOB C3350D JMP 3E60 BYTER MVI D302 OUT 60 NOP 3E30 MVI D302 OUT 11FF68 LXI
1KHz = 114 MOV C, A OUTBIT A, 60 02
TAPEIN
0F79 0F7C 0F7E 0F80 0F82 0F84 0F86 0F88 0F8B 0F8F
CDF105 3E60 D302 0000 3EF0 D302 3E00 32A7FF C3E900 FF
DELAY A, 60 02
0F42 32FFFF
STA
0F45 0F46 0F47 0F48 0E49
E1 D1 C1 C9 C2A20E TAPEINO
POP POP POP RET JNZ
0F4C 0F4F 0F50 0F51 0F54 0F55 0F56 0F57
32FFFF 17 C9 110000 PERIOD 20 13 17 DA540F
LDA CARRY TEMP RAL RET LXI D, 0000 RIM ;GET IN SID BIT INX D RAL ;CARRY = BIT JC PH ;10+7 IF CARRY PASS HIGH BIT RIM INX D RAL ;IF NO BIT 0 PASS LOW BIT JNC OF5A MOV A, E CMP A, THRSn ;IF E TRESHOLD 1 KHz RET ;IF E TRESHOLD 2 KHz POP B ;D 0 TOO MUCH JNZ SOW ;LOOP COUNT 2KHz = 57
0F5A 20 0F5B 13 0F5C 17 0F5D D25A0F 0F60 7B 0F61 FE55 0F63 C9 0F64 C1 0F65 C2630D
;CARRY = 1 IF ERROR 0 NO ERROR
CALL MVI OUT NOPs MVI OUT MVI STA JMP
A, 30 02 D, 200ms
;PREPARE FOR 200ms PHASE
A, 60 02 A, 00 PrSAVE BC0
0F90 TO 0FFF IS UNUSED ROM. IT IS AVAILABLE FOR THE USER. 1000 TO 11FF IS USED FOR UPLOADING & DOWNLOADING MON SOFTWARE (APPENDIX F) 1200 TO 1FFF IS UNUSED ROM & IS AVAILABLE FOR THE USER
D-105
APPENDIX E
PRODEDURE FOR UPLOADING AND DOWNLOADING Uploading Operating Instructions
For Uploading DYNA-85 kit should be in serial mode. 1.
Short P13 and P14 for serial mode.
2.
Connect serial cable between the serial port of PC and serial connector J6 of DYNA-85 kit.
3.
Run tange on PC.
4.
Press F9 and wordsize 7 bit.
5.
Press reser of DYNA-85. Then press space key of terminal keyboard. Message MICROFRIEND-1 and “.” Prompt is displayed in the screen. Note : If wordsize is 8 message displayed is “CaSRhj4RQ4YV” and “.” Prompt. Just Ignore this message and do the following for uploading.
6.
For Uploading (from kit to PC) a. b. c. d. e. f. g. h.
Type G1100 (ENTER) Specify SS (source start) on prompt “SOURCE START”. Press Enter. Specify SE (source end) on prompt “SOURCE END”. Press F9. Press L to capture file. After specifying the file name press enter. Message “Capturing file” is displayed at the top of the screen.