8085 Kit Manual
User Manual:
Open the PDF directly: View PDF .
Page Count: 117
Download | |
Open PDF In Browser | View PDF |
8085 Microprocessor Kit User's Manual Rev1.0, December, 2016 Contents Overview……………………………………………………..………………….3 Hardware Features – Software Features Getting Started…..………………………………………………………………5 AC Adapter – LED Display and Keypad – RESET – ADDR – DATA – INC – DEC – HOME – ALT – GO – STEP – MOD – Program 1 – Program 2 – Program 3 Connecting Terminal..……………………………………….…………………18 Command ‘A’ – Command ‘C’ – Command ‘D’ – Command ‘E’ – Command ‘F’ – Command ‘H’ – Command ‘I’ – Command ‘J’ – Command ‘K’ – Command ‘L’ – Command ‘M’ – Command ‘N’ – Command ‘Q’ – Command ‘R’ – Command ‘S’ – Command ‘W’ – Command ‘SPACE BAR’ Hardware……………………………………………………………………….27 CPU – Memory – GPIO – Programmable Port 8255 – Programmable Counter 8254 – Headers and Connectors – Interrupt Test Button – Technical Specifications – Monitor Call Number-NVRAM Bootable Appendix A Appendix B Appendix C Appendix D Appendix E Appendix F Appendix G LCD Driver Routines SCAN Keyboard and Display Subroutines UART Driver Routines Using NVRAM Bootable Machine Code and 8085 Instructions Hardware Schematic Monitor source code listing 2 Overview The 8085 Microprocessor kit is a low-cost single board computer designed for self-learning the popular 8085 Microprocessor. The kit enables studying from low level programming with direct machine code entering to high level programming with PC tools easily. A nice feature, single-step running, helps students learn the operation of microprocessor instructions quickly and clearly. The user registers provide simple means to verify the code execution. Using a PC as the terminal, the kit can receive the Intel hex file and disassemble the machine code into 8085 instructions. Figure 1: Components layout. 3 Hardware Features: • • • • • • CPU: Mitsubishi M5M80C85AP-2 @4MHz Memory: 32kB Monitor ROM and 32kB SRAM Simple I/O Port: 8-bit GPIO Programmable Ports: 8255 chips Programmable Counter: 8254 UART: NS8250 UART chip Onboard I/O devices: • • • • • • • • • • • • 6-digit seven segment super bright LED 28-keypad 8-bit dot LED indicates status of GPIO1 Speaker Direct BUS interface text LCD Serial Interface: RS232C 9600bit/s 8-data bit no parity one stop bit +5V Power Supply: voltage regulator with input protection 40-pin header for CPU bus Counter timer 8254 onboard logic probe power supply Test button for single pulse generation to the interrupt pins Brown-out Protection Software Features: • • • • • • • • • Enter the machine code in hexadecimal Single-step execution Examine and modify user registers Run user code with software break-point Insert and Delete byte Built-in LCD drivers Download Intel Hex file Disassemble machine code into 8085 instructions Display user registers and disassemble the instruction after single-stepping 4 Getting Started AC Adapter The kit requires DC power input to operate. The input voltage accepts from +7.5V to +12V. You may find any AC-to-DC adapter having DC jack with polarity as shown in Figure 2. The board has protection diode to prevent wrong polarity. If your adapter’s jack has different polarity, when plug it to the board, no power will be supplied. The center pin is positive. - + Figure 2: Polarity of DC jack. When power up the board, the 8085 fetches the instruction from the memory at location 0000H. The location from 0000H to 7FFFH or 32kB is ROM space. It contains the monitor program. The monitor program enables us to enter 8085 instruction using HEX digit into the RAM. We can let the 8085 RUN our program easily using monitor key GO. When the board was powered up, the cold message running text 8085 will show on 7-segment LED and the onboard dot LED will turn on and the speaker will sound beep. The HOME location is pointed to RAM at address 8100H. The data LED will display the content at 8100H. 5 LED Display and Keypad The kit has 6 digits 7-segment LED and 28 tact switches keypad. Four digits is used for displaying the memory address and user registers contents. Two digits “DATA” is for displaying the 8-bit data byte at address shown in the left-hand. The dot indicator indicates the current mode of HEX digit entering. Figure 3 shows the memory location 8100 has an 8-bit data, 1E. The dot indicates the current mode is data entry. Typing Hex key will insert hex digit into data memory. 8100 1E. Figure 3: ADDRESS and DATA fields. Keypad has two groups: the left-hand is 16-hex key 0-F and the right-hand is 10function key. The hex key also has alternate functions when used with ALT key. Figure 3: Keyboard layout, HEX and Function Keys. 6 The functions key are: RESETis hardware reset. Press reset will force the CPU begins execution the ROM monitor at address 0000H. (The reset out signal which is active high also feed to reset pins of the UART and the 8255 PPI). ADDR changes current mode to ADDRESS entry mode. The dot indicator will move to ADDRESS filed. DATA changes current mode to DATA entry mode. The dot indicator will move to DATA filed. Key + increments current address by one. The content of new address will show in data field LED. Key - decrements current address by one. The content of new address will show in data field LED. HOME brings home address back to current display. The home address is 8100H. ALT enables alternate functions that used with HEX key. We can press ALT followed with HEX key. The Alternate functions are described below. ALT 0 displays user register AF. The Accumulator and Flag registers. Contents of accumulator is high byte and Flag is low byte. ALT 1 displays user register BC. ALT 2 displays user register DE. ALT 3 displays user register HL. ALT 4 displays user register SP. ALT 5 displays user register PC. ALT 6 displays CARRY flag. ALT 7 displays ZERO flag. ALT 8 displays SIGN flag. 7 ALT 9 displays HALF CARRY flag. ALT A displays PARITY flag. ALT B sets break address. ALT C clears break address. ALT D deletes one of the current location and shifts the next byte UP. ALT E inserts one byte and shifts the next byte DOWN. ALT F Toggle beep ON/OFF. GO forces CPU to jump from monitor program to user program at current address. STEP executes one instruction at address shown in current display. MOD modifies the user registers. It was used together with ALT 0-5. User registers are memory spaces in RAM prepared for saving and loading to the CPU registers when the CPU jump from monitor program to user program and back to the monitor program. It is useful for program debugging. We will learn how to use them easily in the program testing section. Entering the program into RAM and Run it Test Program 1 Let us learn how to use hex keypad to help enter the computer code to memory and test run it. Suppose we want to write the program that displays the content of the accumulator using onboard gpio LED. The kit has 8-bit dot LED tied to the 8bit output port. Logic ‘1’ presents at a given bit will make the LED ON. Logic ‘0’ makes the LED OFF. We will write the small program that shows the accumulator content. 8 1010 1010 Accumulator 1010 1010 GPIO port 8-bit DOT LED Figure 4: Writing the Accumulator content to gpio PORT at location 0. Our program is, main: inr a ; increment accumulator out 0 ; write to port 00 jmp main ; jump back to main We see that the program has only three instructions, i.e., inr a, out 0 and jmp main. The program was written using 8085 instructions. To test our program, we must translate above program into the 8085 hex code. This can be done easily with hand-code assembly. See Appendix E for machine code of the instructions. Since we will write the machine code to the memory for testing, so the space must be RAM. We must know the memory allocation. Figure 5 shows the memory space allocation. We see that the board provides begin address for user program at 8100H. Some of the locations from 8000H to 803CH are reserved for interrupts vectors. The RAM locations from F000H to FFFFH are used by monitor program. 9 Figure 5: Memory space allocation. Thus we can place our machine code started at location 8100. After translation we get the code for each instruction as shown below. 8100 3C 8101 D300 8103 C30081 main: inr a out 0 jmp main The 1st instruction, inr a, increments the accumulator by one. It has one byte machine code 3C. This byte will be placed at location 8100. The 2nd instruction, out 0, write accumulator content to the gpio port at location 00 has two bytes machine code, D3, 00. D3 is the instruction OUT and 00 is port location. 10 Figure 6: I/O space allocation, User PPI is not available for this version. The 3rd instruction, jmp main, jump back to location 8100 has three bytes machine code, C3,00,81. C3 is the JMP, and 8100 is location to be jump (Intel places low byte to low address and high byte to high address). Above program has only 6 bytes. We can enter such code into RAM easily using HEX key. Here is the byte sequence from address 8100 to 8105. ADDRESS 8100 8101 8102 8103 8104 8105 DATA 3C D3 00 C3 00 81 Now enter the code into memory address 8100. Step 1 Press RESET, the address display will show 8100 and the data LED will show its contents. 11 The current mode will be data entry. We can swap entry mode for hex key between address and data by pressing key ADDR or DATA. The DOT indicator will swap between ADDR mode and DATA mode. To enter a byte to this location, press HEX key 3 and key C. The 3C byte will enter to address 8100. 8100 3C. Step 2 Press key + to increment address. The address display will show 8101. Then repeat step1 until 81 byte was entered to address 8105. 8100 d3. You can use key + or key - to check the hex code, you can modify it easily in DATA entry mode. We will begin set the value to user Accumulator beforehand. It will clear the user register A to zero. Press key ALT, 0/AF, display will show the content of user Accumulator and Flag register. Press key MOD, then key 0,0,0,0. The AF will be 0000. Press key HOME, this brings current location to 8100. Press key STEP, the display will show next instruction to be executed at address 8101. We can examine the content of AF by key ALT, 0/AF. We see that now Accumulator is 01. Press key STEP again, the 01 will send to LED onboard GPIO. This is the content of the accumulator after increment instruction. The next instruction, JMP 8100 will be executed. 12 We can keep press key STEP, we will see every time the instruction out 0 was executed, the value of accumulator will write to the GPIO LED. It works! This demonstration how STEP key helps running the program single instruction. Instead of execution one instruction using single step, we can run the program without stopping for each instruction. We will try with key GO. Now press HOME to bring current location to 8100, press RUN. What happen to the LED? Did you see the LED counting? Should it be counting up? There are two methods of program running. First is to use single stepping. This kind executes only one instruction at a time when we press STEP key. We can learn the operation easily with user registers. The monitor program loads the contents of user registers to the CPU registers beforehand, after the instruction has been executed, the contents of CPU registers will then be saved back to the user registers. Thus we can examine the result after the instruction has been executed. But above program, when we try with key GO, the CPU will jump from monitor program to user program and never get back to monitor program. Since the instruction JMP 8100 will jump back to 8100 forever. We see that the number incrementing in the accumulator will be very fast. 13 How can we make the speed of counting slower? We can just simply add the job that uses CPU time. See below program. main: org 8100h ; begin of code inr a ; increment accumulator out 0 ; write to port 00 ; add the simple delay using register pair DE delay: lxi dcr jnz dcr jnz d,1050h ; load 16-bit constant to DE e ; decrement E delay ; jump to delay location if E != 0 d ; decrement D delay ; jump to delay location if D != 0 jmp main ; done, jump back to main again I suppose now you can translate the instruction into the machine code. The first mnemonic, ORG is not 8085 instruction. It is the assembler directive that tells the assembler program to place the hex code begins at location 8100. We will learn using assembler when using PC tools on later. The portion of inserted code is bolded letters. We see that the method of time delay is just to let the CPU counts the value in register D and register E. Counting is done by instruction DCR E, decrement register by one for register E and D. The JNZ, jump to specified location when ZERO flag is not set. That means if the content of register E or D is not ZERO, it will jump back to decrement again. Until both are ZERO, the CPU will continue execute the next instruction. 14 Here is the translation from instructions to machine code. 8100 3C 8101 D300 main: org 8100h ; begin of code inr a ; increment accumulator out 0 ; write to port 00 ; add the simple delay using register pair DE 8103 8106 8107 810A 810B 115010 lxi d,1050h ; load 16-bit constant to DE 1D delay: dcr e ; decrement E C20681 jnz delay ; jump to 81060 if E != 0 15 dcr d ; decrement D C20681 jnz delay ; jump to 8106 if D != 0 810E C30081 jmp main again ; jump back to main This program has 17 bytes . We can enter the code into RAM from 8100 to 8110 easily. ADDRESS 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 810A 810B 810C 810D 810E 810F 8110 DATA 3C D3 00 11 50 10 1D C2 06 81 15 C2 06 81 C3 00 81 15 After finished entering the code, press HOME to bring current RAM location to 8100. Then press key GO. What happen to the onboard LED? Can we change the speed of counting? How? To stop running, press RESET key. You can modify the initial value of register DE, 1050 to whatever you want to speed up or slow down. Test Program 2 This program shows how to use key GO to force CPU jump from monitor program to user program. 8100 1E02 8102 CF 8103 C30081 main: mvi e,2 rst 1 jmp main This program has only 6 bytes i.e., 1E, 02, CF, C3, 00, 81. Enter the code, and press key HOME, GO. We will see the cold message repeat running on the display. RST 1 having machine code CF is the method that used to call built-in monitor functions. Register E is monitor call number. To stop program 2 running, we must press RESET key. Test Program 3 We can test the program with software breakpoint. The instruction RTS 7 having machine code FF returns control back to monitor program and saves the contents of CPU registers to user registers. We can check the result in user registers easily. Here is the program that adds two BCD numbers 19H and 02H. The result will be 21H. 8100 8102 8104 8105 3E19 0602 80 27 mvi mvi add daa a,19h ; load accumulator with 19h b,2 ; load register B with 02 b ; add register B to accumulator ; adjust result to BCD 16 8106 FF rst 7 ; jump back to monitor After enter the code, you can run it with key GO. Check the result in Accumulator with ALT 0. For small program, we can place the RST 7 to the end of the program. However for long program, sometime we may need to check at a given location, the board also provides tool that helps inserting the RST 7 instruction to the specified location. This tool is called set break point. Suppose we want to verify the result after add b instruction. We can set break point at location 8105 by setting the address to 8105 with key ADDR 8,1,0,5. Then press ALT B, the display will show this address was set breakpoint. Press HOME and GO, check user AF with ALT 0, we see that after addition, the result in Accumulator is 1B. To clear this break address, press ALT C. The display will show current address 8105. The code 27 will be restored back to address 8105. We can continue execution, press GO, and check result in AF again, we will get 21. This the correct BCD number from the addition of 19+02=21. 17 Connecting Terminal The kit provides RS232 port for connecting the terminal. The ROM monitor contains ASCII commands when using UART to connect a terminal. The UART drivers and serial commands are automatically configured when UART chip was inserted. Communication format is 9600 bit/sec, 8 data bit, no parity and one stop bit. We can use PC running VT100 terminal emulation. You may download free terminal program, teraterm from this URL, http://ttssh2.sourceforge.jp/index.html.en RS232C cable Figure 7: Connecting PC running teraterm and kit with RS232 cross cable. There is no need to switch between standalone mode and terminal mode. Both commands using keypad or terminal commands are working concurrently. When press reset the prompt appears on screen. MTK-85 8085 MICROPROCESSOR TRAINING KIT (? HELP) 8100> Type ? for help menu listing. 18 MTK-85 8085 MICROPROCESSOR TRAINING KIT (? HELP) A - ASCII code C - clear watch variables D - disassemble E - edit memory F - fill constant H - hex dump I - i/o address map J - jump to user program K - display user STACK L - load Intel hex file M - monitor call number N - new location pointer Q - quick home location R - user register display S - set value to user register W - watch variables SPACE BAR - single step ? - help menu 8100> Command ‘A’ prints the hexadecimal code for printable ASCII characters. Command ‘C’ clears the 16-byte watch variables. The monitor provides quick access to a16-byte RAM for program testing. The watch variables use RAM space from F000-F00F. Command 'W' prints such memory on screen. 8100> F000 AD FD FC 15 8E 9C DB 4D 4F 19 5F FD EB 3E 8A F5 8100> Command ‘D’ disassembles the machine code into 8085 instructions. 8100>disassemble... 8100 3E19 8102 0602 8104 80 MVI MVI ADD A,19 B,02 B 19 8105 8106 8107 810A 810B 810E 8111 8112 8115 8116 8119 811A 811C 27 FF C20681 15 C20681 C30081 62 CDF862 80 DC1642 A5 D3C1 68 DAA RST JNZ DCR JNZ JMP MOV CALL ADD CC ANA OUT MOV 7 8106 D 8106 8100 H,D 62F8 B 4216 L C1 L,B 811D> Command ‘E’ examines and modify the data in memory. We can use this command to enter machine code. To view the content, uses Space key and to enter byte, press two digits. To quit just press ENTER. 8100>edit memory location = 8100 Enter to quit, SPACE key to view content ADDR 8100 8101 8102 8103 8104 8105 8106 8107 8108 DATA [3E] [19] 01 [06] [02] [80] d3 [27] 00 [FF] [C2] [06] 8108> Command ‘F’ fills 8-bit constant to memory. The example shows filling byte 00 to address 9010-9020. 9016>Begin address = 9010 End address = 9020 Data = 00 9016> 20 Command ‘H’ dumps memory. The content of memory from current pointer 9010 to 908F will display in hexadecimal. The ASCII code for each byte will be displayed also. The dot will be displayed for nonprintable ASCII code. 9010> 9010 9020 9030 9040 9050 9060 9070 9080 00 4D 97 F0 A8 8A A9 41 00 C2 47 36 E2 13 31 00 00 97 81 B2 30 8C CD 89 00 CB CE 69 84 FD B7 F3 00 DA C1 CF 76 4A BB 54 00 DF 99 1D AA 82 4E BF 00 A0 98 90 C5 B9 8D EC 00 BE CB 90 18 99 BE BF 00 9E 14 70 A7 4E FF E0 00 73 ED F1 84 24 5B 9F 00 1A 45 73 C5 33 3C 72 00 34 DE D8 32 9E 8D CB 00 E3 35 C1 81 EB EA 7D 00 A6 6A 4F BF 16 5E E8 00 83 7C DF B9 A8 4F 34 00 4E F1 56 03 0D 7F 7A ................ M........s.4...N .G........E.5j|. .6.i....p.s..O.V ..0.v......2.... ....J...N$3..... .1...N...[<..^O A...T.....r.}.4z 9090> Command ‘I’ displays onboard I/O address. 9090> 00H-0FH onboard 4-bit GPIO, D0-D3=output port D4-D7=input port 10H-13H 8255 system PPI, 10H=PORTA, 11H=PORTB, 12H=PORTC, 13H=CONTROL 20H-23H 8254 programmable counter, 20H=counter0, 21H= counter1 22H=counter2, 23H control register 30H-33H 8255 user PPI, 30H=PORTA, 31H=PORTB, 32H=PORTC, 33H=CONTROL 40H-47H C16550 UART registers 9090> Command ‘J’ jumps from monitor program to user program. The example shows jump to address 9000. The user register displays results after running the code. The RST 7 returns control back to monitor program. 9090>jump to address [9006] = 9000 AF=5800 BC=19F4 DE=C256 HL=9504 SP=F098 PC=9007 S=0 Z=0 AC=0 P=0 CY=0 9090> Command ‘K’ displays user STACK memory. The example below shows running instruction PUSH H. 21 We first check the user register with command ‘r’. We see that TOP of STACK is F098. After pressing SPACE BAR for single step, the SP is now F096. We can see the contents of STACK memory with command k. The contents of HL was saved in STACK. 9000>press r for user register display AF=5800 BC=19F4 DE=C256 HL=9504 SP=F098 PC=9000 S=0 Z=0 AC=0 P=0 CY=0 9000>press SPACE bar for single step 9000 E5 PUSH H AF=5800 BC=19F4 DE=C256 HL=9504 SP=F096 PC=9001 S=0 Z=0 AC=0 P=0 CY=0 9000>press k for STACK display ADDR F096 F097 F098 DATA [04] [95] [C0] 9000> Command ‘L’ loads Intel Hex file to memory. The Assembler and C compiler for 8085 CPU produce standard Intel Hex file. The hex file contains machine code represented by ASCII letters. The example below uses Teraterm to download the hex file. The hex file is ASCII text file. So with the teraterm, we can go to Send File. We can let it show only file with .hex extension by typing *.hex. Then double clicks at the hex file. The onboard dot LED will indicate downloading is on going. When completed, the report will show number of byte received and print checksum error. If no error it will show 0 errors. 9080>load Intel hex file...000005 bytes loaded 0 errors 9080> Command ‘M’ shows monitor call number. Some of common subroutines can be called through RST 1 with function number preloaded in register E. 9080> see input parameters in user manual 1Enn MVI E,function_number CF RST 1 00 - demo 22 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D - delay cold_boot scan cin cout put_str init_lcd lcd_ready clear_lcd goto_xy put_str_lcd put_ch_lcd demo2 9080> Command ‘N’ sets new location pointer at prompt. The example sets new pointer to E000 and press ‘d’ to disassemble. 9080>new location = e000 E000>disassemble... E000 E001 E004 E005 E006 E007 E008 E009 E00C E00E E00F E010 E011 E013 E014 E015 53 32DE2A 62 25 C9 1C 43 CC4A05 2655 67 04 F3 0E25 54 AF C3F0C3 MOV STA MOV DCR RET INR MOV CZ MVI MOV INR DI MVI MOV XRA JMP D,E 2ADE H,D H E B,E 054A H,55 H,A B C,25 D,H A C3F0 E018> Command ‘Q’ sets location pointer at prompt to 9000 and sets user PC to 9000. 9000> AF=5800 BC=19F4 DE=C256 HL=9504 SP=F096 PC=9000 S=0 Z=0 AC=0 P=0 CY=0 23 9000> Command ‘R’ displays user registers contents. 9000> AF=5800 BC=19F4 DE=C256 HL=9504 SP=F098 PC=9000 S=0 Z=0 AC=0 P=0 CY=0 9000> Command ‘S’ sets value to user registers. 9013>set value to user register (enter A for AF) ? AF=0404 ff00 9013> AF=FF00 BC=19F4 DE=0434 HL=0534 SP=F096 PC=9006 S=0 Z=0 AC=0 P=0 CY=0 9013> Command ‘W’ prints watch variables. 9013> F000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Command ‘SPACEBAR’ executes the instruction at address in user PC. The instruction will show on screen with user registers result after execution. Suppose we write a program as shown below. org 9000h xra a loop: out 0 mov h,a inr h push h pop d mov a,d jmp loop end Then translate it to machine code file using the Assembler program. Download hex file. 9000>load Intel hex file...000011 bytes loaded 0 errors 24 9000>disassemble... 9000 9001 9003 9004 9005 9006 9007 9008 900B 900C 900D 900E 900F 9010 9011 9012 AF D300 67 24 E5 D1 7A C30190 00 00 00 00 00 00 00 00 XRA OUT MOV INR PUSH POP MOV JMP NOP NOP NOP NOP NOP NOP NOP NOP A 00 H,A H H D A,D 9001 9013>print user register with command r AF=5800 BC=19F4 DE=C256 HL=1234 SP=F098 PC=9000 S=0 Z=0 AC=0 P=0 CY=0 9013>press SPACE key to execute instruction at 9000, we see A=00 9000 AF XRA A AF=0044 BC=19F4 DE=C256 HL=1234 SP=F098 PC=9001 S=0 Z=1 AC=0 P=1 CY=0 9013>press SPACE key, the content of A will send to GPIO 9001 D300 OUT 00 AF=0044 BC=19F4 DE=C256 HL=1234 SP=F098 PC=9003 S=0 Z=1 AC=0 P=1 CY=0 9013>press SPACE key, the content of A will copy to H 9003 67 MOV H,A AF=0044 BC=19F4 DE=C256 HL=0034 SP=F098 PC=9004 S=0 Z=1 AC=0 P=1 CY=0 9013> press SPACE key, the content of H will increment by 1 9004 24 INR H AF=0000 BC=19F4 DE=C256 HL=0134 SP=F098 PC=9005 S=0 Z=0 AC=0 P=0 CY=0 9013> press SPACE key, the content SP will decrement by 2 9005 E5 PUSH H AF=0000 BC=19F4 DE=C256 HL=0134 SP=F096 PC=9006 S=0 Z=0 AC=0 P=0 CY=0 9013> press K, to see the content of STACK memory ADDR F096 F097 F098 DATA [34] [01] [C0] 9013> press SPACE key, DE will be loaded with top of STACK 9006 D1 POP D AF=0000 BC=19F4 DE=0134 HL=0134 SP=F098 PC=9007 S=0 Z=0 AC=0 P=0 CY=0 9013> press SPACE key, the content of D will copy to A 25 9007 7A MOV A,D AF=0100 BC=19F4 DE=0134 HL=0134 SP=F098 PC=9008 S=0 Z=0 AC=0 P=0 CY=0 9013> press SPACE key, PC will be loaded with 9001 9008 C30190 JMP 9001 AF=0100 BC=19F4 DE=0134 HL=0134 SP=F098 PC=9001 S=0 Z=0 AC=0 P=0 CY=0 9013> press SPACE key, the content of A will send to GPIO, see LED! 9001 D300 OUT 00 AF=0100 BC=19F4 DE=0134 HL=0134 SP=F098 PC=9003 S=0 Z=0 AC=0 P=0 CY=0 26 Hardware A block diagram of the 8085 kit is shown below. For complete hardware schematic, see Appendix D. CPU The CPU is the 8-bit Microprocessor, 80C85. The XTAL frequency is 4MHz. The reset signal is generated by RC circuit. The CPU is reset by brownout circuit. In case of power supply is dipped caused by AC supply voltage dropped. The brownout circuit detects VCC, if it is below threshold level, it will reset the CPU. The brownout condition can be tested by using a variable power supply. To test it, adjust the board VIN from 0-12V slowly and see the CPU can start operating properly. Memory The onboard has 64kB memory. The 32kB ROM monitor 27C256 is placed at address 0000-7FFFH. And the 32kB SRAM 62256, is placed at address 8000HFFFFH. 27 Some of interrupt vectors are relocated to RAM, so user can write the jump instruction to the location of such interrupt service routine easily. Here is the list of location of interrupts. 8010H 8018H 8020H 8028H 802CH 8030H 8034H 803CH Note: 1. 2. 3. 4. 5. RST 2 RST 3 RST 4 RST 5 RST 5.5 RST 6 RST 6.5 RST 7.5 RST 7 is used for software breakpoint. RST 1 is used for monitor function call. TRAP is used for hardware single-step. RST 7.5 is tied to OUT0 of 8254 programmable counter. Monitor program uses last page of RAM for data storage, STACK area, and monitor control functions. The space is from F000H to F098H. GPIO1 GPIO1 provides 8-bit output port. The I/O address is 00. The output drives 8-dot LED. We can use it for program testing easily. System Programmable Port 8255 The I/O addresses of system port, 8255 are PORTA=10H, PORTB=11H, PORTC=12H and Control Port = 13H. Buzzer control pin is PORT C bit 7. To enable buzzer, write 7FH to PORTC. Programmable Counter 8254 The programmable counter, 8254 was supplied with clock signal from CLOCKOUT or 2MHz for counter0 and counter1. The internal registers of 8254 are mapped to I/O space from 20H to 23H. 20H 21H 22H 23H COUNTER0 COUNTER1 COUNTER2 CONTROL REGISTER 28 Headers and Connectors CPU Header JP1 29 Onboard LCD Header JR1 30 RS232C DB9 male connector VB1 Interrupts Test Button The interrupt test button provides a single positive pulse that tied to CPU hardware interrupt pins, RST5.5, RST6.5 and INTR. User can select the pulse to be triggered for each pin by dip switch SW1. The onboard LED, D10 indicates the pulse is activated when press Test button. Technical Specifications CPU: CMOS 80C85 @4MHz Memory: 64kB, 32kB 27C256, 32kB 62256 I/O port: Programmable Parallel port 8255, 8-bit GPIO Counter: Programmable Counter 8254 UART: NS8250 Brownout Reset: KIA7042 Board Size: 170 x 170 mm Weight: 320g (complete components except LCD) DC Power Supply: AC-to-DC adapter +7.5V-12V 400mA Power consumption: (350mA @12VDC) 31 Monitor Call Number 00 - demo Scan 7-segment display with buffer display pointed by HL Entry: HL Exit: none 01 - delay Delay subroutine using register pair DE, D is outer loop delay, E is inner loop. Entry: DE Exit: none 02 - cold_boot Display cold-boot message on 7-segment LED. Entry: none 03 - scan Scan keyboard and display one cycle. Entry: HL points the display buffer Exit: key = scan code –1 no key pressed 04 - cin Get character from console Entry: none Exit: A = character received 05 - cout Send character to console Entry: A = character to be sent Exit: none 06 - put_str Print string to console, string is terminated by 0. Entry: HL Exit: none 07 - init_lcd Initialize LCD module Entry: none Exit: none 08 - lcd_ready 32 Wait until LCD module is ready. Entry: none Exit: none 09 - clear_lcd Clear LCD display Entry: none Exit: none 0A - goto_xy Set cursor position of LCD Entry: HL, H = x, L = y Exit: none 0B - put_str_lcd Print string to LCD, string is terminated by 0 Entry: HL Exit: none 0C - put_ch_lcd Print character to LCD at current cursor position Entry: A Exit: none 0D - demo2 Running GPIO LED Entry: none Exit: none NVRAM Bootable (available for special kit only) User can replace U2, SRAM with a Nonvolatile RAM for program storage, when the board is powered off. A JMP instruction placed at 8000H will enable NVRAM bootable. The monitor program checks the location 8000H. If it has C3 (opcode of JMP instruction), it will jump to address 8000H. The feature allows application code to run easily. The monitor subroutines are available for the application program. To get back to monitor mode, user can press USER key while press RESET. The byte C3 at location 8000H will be changed to 00, thus get back to normal RESET. The sample code that demonstrates NVRAM Bootable is shown in Appendix D. 33 Appendix A Onboard LCD Driver Routines ;------------------- onboard LCD registers ----------------command_write equ 50h command_read equ 52h data_write equ 51h data_read equ 53h busy equ 80h ;--------------------- LCD driver routines ----------------lcd_ready: push psw lcd_ready1: in command_read ani busy jnz lcd_ready1 pop psw ; wait until lcd ready ret clear_lcd: call lcd_ready mvi a,1 out command_write exit_clear: ret init_lcd: call lcd_ready mvi a,38h out command_write call lcd_ready mvi a, 0ch out command_write call clear_lcd ret ; print ASCII text on LCD ; entry: HL pointer with 0 for end of string put_str_lcd: mov a,m ; get A from [HL] cpi 0 jnz put_str_lcd1 ret put_str_lcd1: call lcd_ready 34 out data_write inx h jp put_str_lcd ; goto_xy set cursor location on lcd ; entry: HL: H = x, L = y goto_xy: call lcd_ready mov a,l cpi 0 jnz goto_xy1 mov a,h adi 80h out command_write ret goto_xy1: cpi jnz mov adi out ret 1 goto_xy2 a,h 0c0h command_write goto_xy2: cpi jnz mov adi out ret 2 goto_xy3 a,h 094h command_write goto_xy3: cpi jnz mov adi out ret 3 goto_xy4 a,h 0d4h command_write goto_xy4: ret ; put_ch_lcd put character to lcd ; entry: A put_ch_lcd: call lcd_ready out data_write ret 35 Appendix B Subroutine Scan keyboard and Display ; subroutine scan keyboard and display ; entry: hl pointer to display buffer ; exit: key = scan code ; -1 no key pressed ; scan: push h push b push d mvi c,6 mvi e,0 ; for 6-digit LED ; digit scan code appears at 4-to-10 decoder mvi d,0 ; key position mvi a,0ffh ; put -1 to key sta key ; key = -1 scan1: wait1: mov ori out mov out a,e 0f0h ; high nibble must be 1111 system_port_c ; active digit first a,m ; load a with [hl] system_port_b ; then turn segment on mvi b,0 dcr b jnz wait1 in ; delay for electron transition process system_port_a mvi b,8 shift_key: rar jc next_key push psw mov a,d sta key pop psw ; read input port ; check all 8-row ; rotate right through carry ; if carry = 1 then no key pressed ; save key position next_key: inr d ; next key position dcr b jnz shift_key ; until 8-bit was shifted 36 mvi a,0 out system_port_b ; clear a ; turn off led inr e inx h ; next digit scan code ; next location dcr c jnz scan1 ; next column pop d pop b pop h ret ;---------- 8255 PPI system port I/O address --------------system_port_a: equ 10h system_port_b: equ 11h system_port_c: equ 12h system_port_control: equ 13h 37 Appendix C UART Driver Routines ;---------- 16C550 compatible UART I/O address -----------; e.g. UM8250B, 16C450, 16C550 uart_buffer: equ 40h uart_line_status: equ uart_fifo: equ uart_lcr: equ uart_divisor_lsb: equ uart_divisor_msb: equ uart_scr: equ 45h 42h 43h 40h 41h 47h ; initialize 16C550 uart to 9600 8n1 with 2MHz clock ; 2MHz/13 = 153846Hz init_uart: mvi a,83h out uart_lcr mvi out mvi out mvi out mvi out ; set DLAB bit to access divider a,13 uart_divisor_lsb a,0 uart_divisor_msb ; 2MHz/13 = 153846 Hz ; 153846Hz/16 = 9615Hz a,7 uart_fifo ; init fifo and clear all buffers a,03h uart_lcr ; clar DLAB ; check uart line status, if the byte is FF then no uart ; ; xra a out uart_scr ; check if there is uart in uart_scr cpi 0 jz found xra a sta uart_found ret found mvi a,1 sta uart_found ret 38 cout: mov b,a cout1: in uart_line_status ani 20h jz cout1 mov a,b out uart_buffer ret cin: ; save a ; transmitter ready? ; restore a in uart_line_status ani 1 jz cin in uart_buffer ret ; data available? ; print string terminated by 0 ; input: HL put_str: mov a,m ; get A from [HL] cpi 0 jnz put_str1 ret put_str1: call cout inx h jp put_str 39 40 Appendix D Using NVRAM Bootable ; ; ; ; ; ; ; MTK-85 8085 Microprocessor Training Kit exp1.asm Using 8254 to produce 30.52Hz interrupt signal at RST7.5 The 8254 counter0 was loaded with 0000 by system monitor. The input clock to the 8254 is 2MHz, the OUT0 then produces ; 2MHz/65536 = 30.52Hz interrupt at RST7.5! ; CPU "8085.TBL" ;CPU TABLE HOF "INT8" ;HEX FORMAT gpio equ 0 ; enable NVRAM boot running org 8000h jmp start ; put instruction JMP to boot from RAM org 803ch ; interrupt vector of RST7.5 (relocated from 003CH) jmp service_rst7.5 org 8100h start: mvi a,11111011b ; enable rst7.5 sim ; set interrupt mask register ei ; enable interrupt jmp $ ; jump here service_rst7.5: lda inr sta out ei ret count a count gpio ; increment count ; write to onboard LED org 0e000h 41 count dfs 1 ; use RAM one byte for count variable end 42 Appendix E Machine code and 8085 Instructions 43 !""#$%&'()(*+,-&$#(./%#(+$%(*$#0/$&,(/1(2324(5$6789,7&/$6 MOVE, LOAD and STORE 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV B,B B,C B,D B,E B,H B,L B,M B,A C,B C,C C,D C,E C,H C,L C,M C,A D,B D,C D,D D,E D,H D,L D,M D,A E,B E,C E,D E,E E,H E,L E,M E,A H,B H,C H,D H,E H,H H,L H,M H,A L,B L,C L,D L,E L,H L,L 6E 6F 70 71 72 73 74 75 77 78 79 7A 7B 7C 7D 7E 7F 3E 06 0E 16 1E 26 2E 36 nn nn nn nn nn nn nn nn 01 11 21 31 nnnn nnnn nnnn nnnn 02 12 0A 1A 32 3A 22 2A EB nnnn nnnn nnnn nnnn MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV MOV L,M L,A M,B M,C M,D M,E M,H M,L M,A A,B A,C A,D A,E A,H A,L A,M A,A MVI MVI MVI MVI MVI MVI MVI MVI A,byte B,byte C,byte D,byte E,byte H,byte L,byte M,byte LXI LXI LXI LXI B,dble D,dble H,dble SP,dble STAX STAX LDAX LDAX STA LDA SHLD LHLD XCHG B D B D adr adr adr adr PUSH PUSH PUSH PUSH B D H PSW STACK C5 D5 E5 F5 C1 D1 E1 F1 E3 F9 33 3B POP POP POP POP XTHL SPHL INX DCX B D H PSW C6 nn CE nn ADI ACI byte byte 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F ADD ADD ADD ADD ADD ADD ADD ADD ADC ADC ADC ADC ADC ADC ADC ADC B C D E H L M A B C D E H L M A D6 nn DE nn SUI SBI byte byte 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F SUB SUB SUB SUB SUB SUB SUB SUB SBB SBB SBB SBB SBB SBB SBB SBB B C D E H L M A B C D E H L M A 09 19 29 39 DAD DAD DAD DAD B D H SP ANI XRI ORI ANA ANA ANA ANA ANA ANA ANA ANA XRA XRA XRA XRA XRA XRA XRA XRA ORA ORA ORA ORA ORA ORA ORA ORA byte byte byte B C D E H L M A B C D E H L M A B C D E H L M A CPI CMP CMP CMP CMP CMP CMP CMP CMP byte B C D E H L M A LOGICAL SP SP ARITHEMATICS E6 nn EE nn F6 nn A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 COMPARE FE nn B8 B9 BA BB BC BD BE BF ROTATE 07! 17 0F 1F F7 FF RLC RAL RRC RAR nnnn nnnn nnnn nnnn nnnn nnnn nnnn nnnn nnnn DB nn D3 nn JMP JC JNC JZ JNZ JP JM JPE JPO PCHL adr adr adr adr adr adr adr adr adr CALL CD DC D4 CC C4 F4 FC EC E4 nnnn nnnn nnnn nnnn nnnn nnnn nnnn nnnn nnnn CALL CC CNC CZ CNZ CP CM CPE CPO adr adr adr adr adr adr adr adr adr RETURN C9 D8 D0 C8 C0 F0 F8 E8 E0 RET RC RNC RZ RNZ RP RM RPE RPO IN OUT 04 0C 14 1C 24 2C 34 3C 03 13 23 05 0D 15 1D 25 2D 35 3D 0B 1B 2B INR INR INR INR INR INR INR INR INX INX INX DCR DCR DCR DCR DCR DCR DCR DCR DCX DCX DCX 2F 37 3F 27 CMA STC CMC DAA CONTROL RST RST RST RST RST RST 0 1 2 3 4 5 byte byte INCREMENT/DECREMENT SPECIALS RESTART C7 CF D7 DF E7 EF 6 7 INPUT/OUTPUT JUMP C3 DA D2 CA C2 F2 FA EA E2 E9 RST RST 00! F3 FB 76 20 30 NOP DI EI HLT RIM SIM B C D E H L M A B D H B C D E H L M A B D H Appendix F Hardware schematic, Parts list 44 5 4 3 2 1 D[0..7] A[0..7] 0x0000-0x7FFF 32kB ROM D0 D1 D2 D3 D4 D5 D6 D7 D 2 3 4 5 6 7 8 9 ALE 1D 2D 3D 4D 5D 6D 7D 8D 11 1 1Q 2Q 3Q 4Q 5Q 6Q 7Q 8Q 10 9 8 7 6 5 4 3 25 24 21 23 2 26 27 A8 A9 A10 A11 A12 A13 A14 LE OE 20 +5V A0 A1 A2 A3 A4 A5 A6 A7 19 18 17 16 15 14 13 12 U1 A0 A1 A2 A3 A4 A5 A6 A7 U4 VCC ROM_CE /RD 74HC573 20 22 1 +5V A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 O0 O1 O2 O3 O4 O5 O6 O7 11 12 13 15 16 17 18 19 0x8000-0xFFFF 32kB SRAM D0 D1 D2 D3 D4 D5 D6 D7 U2 A0 A1 A2 A3 A4 A5 A6 A7 10 9 8 7 6 5 4 3 25 24 21 23 2 26 1 A8 A9 A10 A11 A12 A13 A14 RAM_CE /RD /WR CE OE VPP 20 22 27 27C256 A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 A11 A12 A13 A14 D0 D1 D2 D3 D4 D5 D6 D7 11 12 13 15 16 17 18 19 U3 D0 D1 D2 D3 D4 D5 D6 D7 D0 D1 D2 D3 D4 D5 D6 D7 2 3 4 5 6 7 8 9 GPIO1 11 1 +5V 20 1D 2D 3D 4D 5D 6D 7D 8D 19 18 17 16 15 14 13 12 1Q 2Q 3Q 4Q 5Q 6Q 7Q 8Q D LE OE VCC D1 D2 D3 D4 D5 D6 D7 74HC573 CE OE WE 1N5237A U6 1 C2 4MHz Q1 2 SID +5V 30pF R1 10k S1 RESET TRAP 5 6 RST5.5 RST6.5 RST7.5 9 8 7 INTR R2 100 10 INTA + C3 10uF +5V 3 B X1 11 S0 29 S1 33 39 R4 10k READY KIA7042 2 Q2 35 X2 SID TRAP RST 5.5 RST 6.5 RST 7.5 INTR AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 A8 A9 A10 A11 A12 A13 A14 A15 INTA S0 S1 HOLD READY ALE WR RD IO/M RST-OT CLKO SOD HLDA 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 S0 S1 D0 D1 D2 D3 D4 D5 D6 D7 A15 2 3 4 5 6 7 8 9 /RD /WR 1 11 A4 A5 A6 A7 IO/M A8 A9 A10 A11 A12 A13 A14 A15 I I I I I I I I I/O/Q I/O/Q I/O/Q I/O/Q I/O/Q I/O/Q I/O/Q I/O/Q SYSTEM_PPI GPIO1 CTC USER_PPI UART LCD_E U7A D0 D1 D2 D3 D4 D5 D6 D7 /RD /WR IO/M SID ALE SOD S0 S1 CLKOUT READY RESET_OUT 1 SID +5V U9 1 2 ALE 8 A 9 A B CLK CLR QA QB QC QD QE QF QG QH 3 4 5 6 10 11 12 13 +5V TRAP R8 10k 74HC164 U8F 12 13 TRACE VCC 5 3 4 2 4001 4001 ALE 30 31 32 34 3 37 4 38 U8A WR RD RESET_OUT CLKOUT CLKOUT +5V reset SW1 1 2 3 4 R3 10k SOD HLDA U7C *RST5.5 *RST6.5 8 7 6 5 1 RST5.5 2 JP1 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 U8B 3 4 RST6.5 6 RST7.5 8 INTR 9 A0 A1 A2 A3 A4 A5 A6 A7 SW2 4001 74LS14 U8C 2 1 3 5 SW SPDT U7D 12 OUT1 *RST5.5 OUT2 *RST6.5 *RST7.5 *INTR INTA 74LS14 U8D *RST7.5 11 *INTR 13 9 4001 R6 10k 74LS14 U8E D10 +5V HOLD HLDA B 74LS14 SW DIP-4 11 R7 330 +5V A 10 +5V 74LS14 LED Title 8085 Microprocesor Kit HEADER 20X2 Size B Designed by Wichit Sirichote, wichit.sirichote@gmail.com 4 VSS 6 74LS14 5 VCC U7B 1 GAL16V8B 10 10k +5V 8 R5 C A2 A2 RAM_CE ROM_CE 12 13 14 15 16 17 18 19 I/CLK I/OE MSM80C85A +5V A1 A1 U5 RST-IN A0 A0 memory & i/o decoder C 36 D0 D1 D2 D3 D4 D5 D6 D7 D9 LED 3mm HM62256B A[8..14] 30pF C1 D0 D1 D2 D3 D4 D5 D6 D7 D8 3 2 Date: Document NumberFriday, April 15, 2016 Rev 2 Sheet 1 1 of 3 4 3 2 1 U10 U11 LTC-4727JR DIGIT4 4 L1L2L3 4 8 2 1 LTC-4727JR L1L2L3 DIGIT3 74LS244 D 6 R-PACK 1G 2G A B C D E F G DP DIGIT1 A B C D E F G DP 14 16 13 3 5 11 15 7 DIGIT2 A B C D E F G DP 1 14 16 13 3 5 11 15 7 DIGIT4 A B C D E F G DP 8 1Y1 1Y2 1Y3 1Y4 2Y1 2Y2 2Y3 2Y4 16 15 14 13 12 11 10 9 DIGIT3 1A1 1A2 1A3 1A4 2A1 2A2 2A3 2A4 1 2 3 4 5 6 7 8 6 1 19 R9 18 16 14 12 9 7 5 3 DIGIT1 D 2 4 6 8 11 13 15 17 DIGIT2 U12 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7 2 5 U13 PC0 PC1 PC2 PC3 15 14 13 12 A B C D 0 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 9 10 11 C SPEAKER 74LS145 SW3 TRACE SW4 D0 D1 D2 D3 D4 D5 D6 D7 8255 PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0 B 6 35 8 9 36 5 SYSTEM_PPI A1 A0 reset WR RD D7 D6 D5 D4 D3 D2 D1 D0 27 28 29 30 31 32 33 34 CS RESET A1 A0 WR RD D7 D6 D5 D4 D3 D2 D1 D0 U14 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 25 24 23 22 21 20 19 18 PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0 10 11 12 13 17 16 15 14 PC7 PC6 PC5 PC4 PC3 PC2 PC1 PC0 37 38 39 40 1 2 3 4 PA7 PA6 PA5 PA4 PA3 PA2 PA1 PA0 1 SW5 2 1 C SW9 SW6 2 1 SW7 2 1 1 D E F SW10 SW11 SW12 2 USER OPTION 2 R10 SPEAKER SW8 1 2 1 2 1 8 2 1 9 SW14 1 1 2 1 A SW15 2 SW16 2 1 2 4.7k 1 1 6 7 SW18 SW19 SW20 SW21 D11 2 PA7 330 TONE USER1 2 5 R11 LS1 B SW13 SW17 2 VCC MODE B 4 R12 SPEAKER +5V 10 1 2 1 0 1 SW26 1 2 GO 1 2 1 2 SW23 2 INC A 2 1 SW22 1 3 SW24 2 1 SW25 2 1 STEP HOME SW27 SW28 SW29 2 1 ALT 2 ADDR 10k RESISTOR SIP 9 2 3 4 5 6 7 8 9 1 3 +5V VCC VCC VSS A A1 A1 A2 A2 Title 8085 Microprocesssor Kit Date: 4 VCC 1 A0 A0 2 DATA R13 C 2 DEC 1 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 2 Size B 5 Q3 BC557 2 PA6 3 D0 D1 D2 D3 D4 D5 D6 D7 1 C 2 Document Number Friday, April 15, 2016 Rev 2 Sheet 1 2 of 3 5 4 3 2 1 D[0..7] 16x2 text LCD interface +5V CLKOUT D D JR1 U15 8 7 6 5 4 3 2 1 22 23 19 20 A0 A1 21 CTC D0 D1 D2 D3 D4 D5 D6 D7 WR A0 A1 A2 OUT1 18 16 17 CLK2 G2 OUT2 21 18 22 19 RD 15 14 13 CLK1 G1 OUT1 RD WR A0 A1 UART 9 11 10 CLK0 G0 OUT0 12 13 14 D0 D1 D2 D3 D4 D5 D6 D7 OUT2 CS 8254 C +5V 28 27 26 1 2 3 4 5 6 7 8 VCC 25 35 reset 16 17 VCC D0 D1 D2 D3 D4 D5 D6 D7 VSS A0 A0 D0 D1 D2 D3 D4 D5 D6 D7 A1 A1 9 CS0 CS1 CS2 OUT1 OUT2 INT RD WR RD WR TXD RTS DTR A0 A1 A2 RXD DCD DSR CTS RI D0 D1 D2 D3 D4 D5 D6 D7 34 31 30 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 TXD RTS 11 32 33 RXD DCD 10 38 37 36 39 5 D7 D6 D5 D4 D3 D2 D1 D0 R/W RS CONN RECT 16 LCD_E A1 A0 +5V 1 CSOUT DDIS NC ADS RESET 24 23 29 3 C R15 10K XTAL1/CLK XTAL2 RCLK BAUDOUT 15 8250 +5V A2 10uF C5 10uF 10V C4 + A2 +5V R14 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 + D0 D1 D2 D3 D4 D5 D6 D7 RD WR +5V U16 2 *RST7.5 U17 C9 100nF + C10 10uF + C11 10uF 6 C6 R16 C+ C1C2+ C2- V- 1 3 4 5 10uF C7 10uF B 14 7 13 8 T1OUT T2OUT R1IN R2IN T1IN T2IN R1OUT R2OUT 11 10 12 9 TXD RTS RXD DCD MAX232A SUB-D 9, Male (cross cable) D12 V+ + 5 9 4 8 3 7 2 6 1 B C8 100nF 2 VB1 +5V + +5V 2k POWER +5V U18 LM7805/TO VCC 3 1 C14 10uF 16V C15 0.1uF C17 0.1uF C18 0.1uF + C12 C19 0.1uF VIN J1 D13 1 2 + C20 0.1uF 1 1N4007 DC input 1 C13 1000uF 16V 2 TP2 C16 0.1uF VOUT GND +5V 2 TP1 A GND DC2 1 A 0.1uF Title 8085 Microprocessor Kit Size B Date: 5 4 3 2 Document Number Friday, April 15, 2016 Rev 2 Sheet 1 3 of 3 PARTS LIST Resistors (all resistors are 1/8W +/-5%) Semiconductors U1 27C256, 32kM EPROM U2 HM62256B, 32kB SRAM U4,U3 74HC573, 8-bit LATCH U5 GAL16V8B, PLD U6 MSM80C85A, Microprocessor U7 4001, Nor gate U8 74LS14, hex inverter U9 74HC164, shift register U11,U10 LTC-4727JR, 7-segment LED U12 74LS244, tri-state driver U13 74LS145, BCD to decimal U14 8255, PPI U15 8250, UART U16 8254, CTC U17 MAX232A U18 LM7805/TO, voltage regulator D1,D2,D4,D5,D6,D7,D8,D10 LED D3 LED 3mm D9 1N5227A D11 TONE LED D12 POWER LED D13 1N4007 Q2 KIA7042 Q3 BC557 Capacitors C1,C2 30pF, ceramic cap C3,C5,C6,C7,C10,C11 10uF C4 10uF 10V C8,C9 100nF C12 10uF 16V, electrolytic C13 1000uF 16V, electrolytic C14,C15,C16,C17,C18 0.1uF C19,C20 0.1uF R1,R3,R4,R5,R6,R8,R15 10K R2 100 Ohms R11,R7 330 Ohms R9 100x8 R10 4.7k R12 10 R13 10k RESISTOR SIP 9 R14 5 Ohms R16 1k Additional parts JP1 JR1 J1 LS1 Q1 HEADER 20X2 CONN RECT 16 DC input SPEAKER 4MHz SW1 SW DIP-4, DIP switch SW2 SW SPDT SW3,SW4,SW5,SW6,SW7,SW8,SW PUSHBUTTONSPST,SW9,SW10,SW11,SW12,SW13, SW14,SW15,SW16,SW17,SW18, SW19,SW20,SW21,SW22,SW23, SW24,SW25,SW26,SW27,SW28, SW29 S1 RESET TP1 +5V TP2 GND VB1 SUB-D 9, Male (cross cable) PCB double side plate through hole LED cover Clear RED color 0.8mm acrylic plastic Keyboard sticker printable SVG file 45 46 Appendix G Monitor source code listing 47 B8085.LST 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 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 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 29/12/2559 12:32 ;----------------------------------------------------------------; B8085.ASM ; monitor program for MTK-85 8085 MICROPROCESSOT TRAINING KIT ; COPYTIGHT (C) 2007-2015 BY WICHIT SIRICHOTE, kswichit@kmitl.ac.th ; ; source file was assembled with C32 Cross Assembler V3.0 ; ; 18 May 2007 add insert byte, ALT E ; delete byte, ALT D ; click sound when key pressed ; ; 8 March 2015 remove repeat key ; modified address and data entry mode ; 3 April 2016 replace buzzer with small speaker for tone experiment ; add beep/no beep with ALT F press ; 16 April 2016 add delay after no beep ; ;----------------------------------------------------------------- 0000 0000 CPU HOF "8085.TBL" "INT8" ;CPU TABLE ;HEX FORMAT ; ---------- onboard GPIO -------------------------------------0000 = gpio equ 0 ; D0-D3 is 4-bit output port, D4-D7 is 4-bit input port ;---------- 8255 PPI system port I/O address ---------------------0010 0011 0012 0013 = = = = system_port_a: equ 10h system_port_b: equ 11h system_port_c: equ 12h system_port_control: equ 13h ;-------------------- 8254 counter/timer -------------------------- 0020 0021 0022 0023 = = = = 0034 = counter0_8254 equ 20h counter1_8254 equ 21h counter2_8254 equ 22h control_8254 equ 23h control_word_8254 equ 00110100B ; mode 0, counter0 ;---------- 8255 PPI user port I/O address -----------------------0030 0031 0032 0033 = = = = user_port_a: equ 30h user_port_b: equ 31h user_port_c: equ 32h user_port_control: equ 33h ;---------- 16C550 compatible UART I/O address -------------------; e.g., UM8250B, 16C450, 16C550 0040 0045 0042 0043 0040 0041 0047 = = = = = = = uart_buffer: equ 40h uart_line_status: equ uart_fifo: equ uart_lcr: equ uart_divisor_lsb: equ uart_divisor_msb: equ uart_scr: equ 45h 42h 43h 40h 41h 47h ;------------------- onboard LCD registers -----------------------0050 0052 0051 0053 0080 = = = = = command_write command_read data_write data_read busy equ equ equ equ equ 0009 = 0000 = TAB RS 9 0 000D = cr: equ 0dh EQU EQU 50h 52h 51h 53h 80h ; ASCII TAB ; terminator Page 1 of 64 B8085.LST 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 29/12/2559 12:32 000A = 0020 = lf: equ 0ah sp: equ 20h F000 = system_ram equ 0f000h ;system_stack equ 0ffffh 8100 = home_address equ 8100h 0000 = rom equ 0 ;8000h 8000 = my_rom equ 8000h ; change to 8000 for testing under RAM ; change to 0000 for rom programming 0000 0000 C30001 ORG rom JMP START 0008 0008 C36102 ORG rom+8 jmp monitor_call ; RST 1 opcode is CF ORG rom+10h jmp service_rst2 ; RST 2 used for testing RST 7 0010 ; 0010 C31080 ; reset vector jmp my_rom+10h 0018 0018 C31880 ORG rom+18h jmp my_rom+18h ; DF RST 3 for testing monitor call function ; jmp monitor_call 0020 0020 C32080 ORG rom+20h jmp my_rom+20h 0024 ORG rom+24h ; jmp my_rom+24h jmp service_trap 0024 C3DD02 ; RST 4 ; sing step running service routine 0028 0028 C32880 ORG rom+28h jmp my_rom+28h ; RST 5 002C 002C C32C80 ORG rom+2ch jmp my_rom+2ch ; relocate RST5.5 to external ram 0030 0030 C33080 ORG rom+30h jmp my_rom+30h ; relocate RST 6 0034 0034 C33480 ORG rom+34h jmp my_rom+34h ; relocate RST6.5 to external ram 0038 0038 C39302 ORG ROM+38H jmp service_rst7 003C 003C C33C80 ORG rom+3ch jmp my_rom+3ch 0100 ORG rom+100h 0100 0101 0104 0107 F3 3179F0 2199F0 2234F0 START ; RST 7 service jump back to monitor ; relocate RST7.5 to external ram di lxi sp,system_stack+32 lxi h,user_stack+32 shld user_SP ; point to top of system stack ; point to top of user stack 010A 3E90 010C D313 MVI A,90H OUT system_port_control 010E 3EF0 0110 D312 mvi a,0f0h ; disable trap out system_port_c 0112 CD0612 call init_uart 0115 CD0802 0118 21A41D call init_lcd lxi h,prompt2 Page 2 of 64 B8085.LST 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 011B 011E 0121 0124 0127 29/12/2559 12:32 CD1A02 210100 CD2A02 21B91D CD1A02 call put_str_lcd lxi h,01 call goto_xy lxi h,text3 call put_str_lcd 012A CD8F01 call init_8254 ; NVRAM booting ; if location 8000H has C3 opcode then jump to 8000H ; if user press USER1 with RESET put 00 to 8000H ; ans skip booting 012D DB10 012F E680 0131 CA4101 in system_port_a ani 80h jz skip_boot 0134 0137 0139 013C 013F 0140 lda 8000H cpi 0c3h jnz skip_boot lxi h,8000h push h ret ; jump to NVRAM 3A0080 FEC3 C24101 210080 E5 C9 0141 AF 0142 320080 0145 3227F0 0148 014B 014D 0150 0152 skip_boot: xra a ; write 00 to 8000H sta 8000H sta counter1 ; clear counter1 3A29F0 FE24 CA6401 3E24 3229F0 lda cpi jz mvi sta warm_code "$" skip_cold_boot a,"$" warm_code 0155 CD2D06 call test_buzzer 0158 3EFF 015A D300 mvi a,0ffh out gpio 015C CD760B call cold_boot 015F 3E00 0161 3224F0 0164 ; make GPIO LED on mvi a, 0 sta beep_flag skip_cold_boot: 0164 210081 0167 222AF0 016A 223CF0 lxi h,home_address shld user_PC shld pointer 016D 3A25F0 0170 FE00 0172 CA7B01 lda uart_found cpi 0 jz skip_send_prompt 0175 CDB312 call send_prompt3 0178 CD3A0D call send_prompt 017B skip_send_prompt: 017B AF 017C D300 xra a out gpio 017E 3E00 0180 3226F0 0183 CDBE0A mvi a,0 sta entry_mode call read_memory 0186 CD7E0C 0189 CD8105 018C F28601 main: ; turn LED off call scan_key call key_execute jp main Page 3 of 64 ; set data entry mode B8085.LST 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 29/12/2559 12:32 ;---------------- initialize counter0 for RST7.5 interrupt ---------------- 018F 0191 0193 0194 0196 0198 3E34 D323 AF D320 D320 C9 init_8254: mvi out xra out out ret a, control_word_8254 control_8254 a counter0_8254 counter0_8254 ; convert 8-bit unsigned in A to ASCII string in line_buffer ; entry: A 0199 0199 1E00 bin2ascii: 019B 019D 01A0 01A2 01A3 FE64 DAA601 D664 1C C39B01 bin1 cpi jc sui inr jmp 100 bin2 100 e bin1 01A6 01A7 01A8 01AA 01AD 01AE 57 7B C630 3247F0 7A 1E00 bin2: mov mov adi sta mov mvi d,a a,e "0" line_buffer a,d e,0 01B0 01B2 01B5 01B7 01B8 FE0A DABB01 D60A 1C C3B001 bin3: cpi jc sui inr jmp 10 bin4 10 e bin3 01BB 01BC 01BD 01BF 01C2 01C3 01C5 01C8 57 7B C630 3248F0 7A C630 3249F0 C9 bin4: mov mov adi sta mov adi sta ret d,a a,e "0" line_buffer+1 a,d "0" line_buffer+2 mvi e,0 ; print 8-bit unsigned decimal to terminal ; entry: A 01C9 01CC 01CF 01D1 01D4 01D7 01DA 01DD 01E0 01E3 CD9901 3A47F0 FE30 CAE401 CD2F12 3A48F0 CD2F12 3A49F0 CD2F12 C9 pint8u: call bin2ascii lda line_buffer cpi "0" jz pint1 call cout lda line_buffer+1 call cout lda line_buffer+2 call cout ret 01E4 01E7 01E9 01EC 3A48F0 FE30 CAEF01 CD2F12 pint1: lda line_buffer+1 cpi "0" jz pint2 call cout 01EF 3A49F0 01F2 CD2F12 01F5 C9 pint2: lda line_buffer+2 call cout ret ; convert 16-bit unsigned integer to ASCII code stored in line_buffer ; entry: HL Page 4 of 64 B8085.LST 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 29/12/2559 12:32 ;--------------------- LCD driver routines -------------------------------01F6 F5 lcd_ready: 01F7 01F9 01FB 01FE lcd_ready1: in command_read ani 80h jnz lcd_ready1 pop psw DB52 E680 C2F701 F1 01FF C9 push psw ; wait until lcd ready ret 0200 0203 0205 0207 CDF601 3E01 D350 C9 clear_lcd: call lcd_ready mvi a,1 out command_write exit_clear: ret 0208 020B 020D 020F 0212 0214 0216 CDF601 3E38 D350 CDF601 3E0C D350 CD0002 init_lcd: call lcd_ready mvi a,38h out command_write call lcd_ready mvi a, 0ch out command_write call clear_lcd 0219 C9 ret ; print ASCII text on LCD ; entry: HL pointer with 0 for end of string 021A 021B 021D 0220 7E FE00 C22102 C9 0221 0221 0224 0226 0227 put_str_lcd: mov a,m ; get A from [HL] cpi 0 jnz put_str_lcd1 ret put_str_lcd1: CDF601 D351 23 F21A02 call lcd_ready out data_write inx h jp put_str_lcd ; goto_xy set cursor location on lcd ; entry: HL: H = x, L = y 022A 022D 022E 0230 0233 0234 0236 0238 CDF601 7D FE00 C23902 7C C680 D350 C9 goto_xy: call lcd_ready mov a,l cpi 0 jnz goto_xy1 mov a,h adi 80h out command_write ret 0239 023B 023E 023F 0241 0243 FE01 C24402 7C C6C0 D350 C9 goto_xy1: cpi jnz mov adi out ret 1 goto_xy2 a,h 0c0h command_write 0244 0246 0249 024A 024C 024E FE02 C24F02 7C C694 D350 C9 goto_xy2: cpi jnz mov adi out ret 2 goto_xy3 a,h 094h command_write 024F 0251 0254 0255 0257 FE03 C25A02 7C C6D4 D350 goto_xy3: cpi jnz mov adi out 3 goto_xy4 a,h 0d4h command_write Page 5 of 64 B8085.LST 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 29/12/2559 12:32 0259 C9 ret 025A C9 goto_xy4: ret ; put_ch_lcd put character to lcd ; entry: A 025B CDF601 025E D351 0260 C9 put_ch_lcd: call lcd_ready out data_write ret ;-------------------------------------------------------------------; ; ; ; ; 0261 E5 0262 F5 0263 D5 monitor call entry entry: E = monitor call number 0-255 calling monitor function is made with RST 1 command after loading the regsiter E with call number destroy: BC user must save it in stack memory monitor_call: push h push psw push d 0264 7B 0265 07 0266 5F mov a,e rlc mov e,a 0267 026A 026C 026D 026E 026F lxi mvi dad mov inx mov 217502 1600 19 4E 23 46 h,vector_table d,0 d ; get location in jump table c,m h b,m 0270 D1 0271 F1 0272 E1 pop d pop psw pop h 0273 C5 push b 0274 C9 ret 0275 0275 0277 0279 027B 027D 027F 0281 0283 0285 0287 0289 028B 028D 028F 0291 ; get call number ; x2 ; put it back ; push address into top of stack ; jump to monitor call function vector_table: A00B 0006 760B AE0C 3B12 2F12 5812 0802 F601 0002 2A02 1A02 5B02 F205 C901 dwl dwl dwl dwl dwl dwl dwl dwl dwl dwl dwl dwl dwl dwl dwl demo ; #0 running LED with HL pointer delay ; #1 simple delay routine cold_boot ; #2 show 8085 running scan ; #3 scan display one cycle cin ; #4 get byte from console cout ; #5 print byte to console put_str ; #6 print string with 0 terminator to console init_lcd ; #7 initialize lcd lcd_ready ; #8 wait until lcd is ready clear_lcd ; #9 clear lcd display goto_xy ; #10 set lcd cursor position put_str_lcd ; #11 print ASCII string on lcd put_ch_lcd ; #12 print ASCII letter on lcd test_led ; #13 run LED onboard pint8u ; #14 print 8-bit unsigned to terminal ; save CPU registers to stack and write them to user registers ; 0293 0293 F5 0294 C5 0295 D5 0296 0297 029A 029B 029E 029F 02A2 E1 2230F0 E1 222EF0 E1 222CF0 E1 service_rst7: push psw push b push d pop h shld user_DE pop h shld user_BC pop h shld user_AF pop h Page 6 of 64 B8085.LST 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 29/12/2559 12:32 02A3 222AF0 shld user_PC ; store next PC 02A6 210000 02A9 39 02AA 2234F0 lxi h,0000h dad sp shld user_SP 02AD CDBE0A 02B0 CD540F call read_memory call register_display1 02B3 2A57F0 lhld save_stack 02B6 F9 sphl 02B7 C9 ret ; get SP ; save user SP ; restore system stack ; test diplay register after break ; RST 2 opcode is D7 ; later will be changed to RST 7 02B8 02B8 F5 02B9 C5 02BA D5 02BB 02BC 02BF 02C0 02C3 02C4 02C7 service_rst2: push psw push b push d E1 2230F0 E1 222EF0 E1 222CF0 E1 pop h shld user_DE pop h shld user_BC pop h shld user_AF pop h 02C8 222AF0 shld user_PC 02CB 210000 02CE 39 lxi h,0000h dad sp 02CF 2234F0 shld user_SP 02D2 CDBE0A 02D5 CD540F call read_memory call register_display1 02D8 2A57F0 lhld save_stack 02DB F9 sphl 02DC C9 ret ; store next PC ; get content of SP ; save user SP ; restore system stack ; service trap for single step running ; disable trap input by setting system port c.6 ; save CPU registers to user registers 02DD 02DD F5 service_trap: push psw ; save A and Flag 02DE 3EFF 02E0 D312 mvi a,0ffh out system_port_c ; turn trap off by clearing shift register 02E2 C5 02E3 D5 02E4 E5 push b push d push h 02E5 02E6 02E9 02EA 02ED 02EE 02F1 02F2 pop h shld user_HL pop h shld user_DE pop h shld user_BC pop h shld user_AF E1 2232F0 E1 2230F0 E1 222EF0 E1 222CF0 ; save HL Page 7 of 64 B8085.LST 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 29/12/2559 12:32 02F5 E1 02F6 222AF0 pop h shld user_PC 02F9 210000 02FC 39 02FD 2234F0 lxi h,0 dad sp shld user_SP 0300 CDBE0A call read_memory 0303 0306 0308 030B lda uart_found cpi 0 jz skip1 call register_display1 3A25F0 FE00 CA0E03 CD540F 030E 030E 2A57F0 ; store next PC ; save user SP skip1: lhld save_stack 0311 F9 sphl ; restore system stack 0312 C9 ret ; jump back to main body ; disassemble machine code into mnemonic 0313 0313 3A22F0 0316 FE64 0318 C23903 disassemble1: lda command cpi "d" jnz exit_disassemble 031B 21A11E 031E CD5812 lxi h,disassemble_text call put_str 0321 CDDA12 0324 0E10 call new_line mvi c,16 0326 C5 dis2: ; 16 lines push b 0327 CDDA12 call new_line 032A CDB003 call d_disassemble 032D C1 032E 0D 032F C22603 pop b dcr c jnz dis2 0332 CDDA12 0335 CD3A0D 0338 C9 call new_Line call send_prompt ret 0339 C9 exit_disassemble: ret ; disassemble opcode to mnemonic ; entry: user_PC ; exit: user_PC = next address 033A 2A2AF0 disassemble: lhld user_PC 033D E5 push h 033E 033F 0342 0343 0346 mov a,h call out2x mov a,l call out2x call space 7C CDCB12 7D CDCB12 CDE512 0349 7E 034A CD2604 034D 4F 034E 034F 0352 0353 7E CDCB12 23 0D mov a,m ; get opcode call get_number_of_byte mov c,a disassem3: mov a,m call out2x inx h dcr c Page 8 of 64 B8085.LST 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 29/12/2559 12:32 0354 C24E03 jnz disassem3 0357 E1 pop h 0358 0359 035C 035E mov a,m call get_number_of_byte cpi 1 jnz one_tab 7E CD2604 FE01 C26603 0361 3E09 0363 CD2F12 0366 3E09 0368 CD2F12 one_tab: mvi a,tab call cout ; print two tabs for one byte opcode mvi a,tab call cout ; else only one tab 036B E5 push h 036C 7E mov a,m 036D F5 push psw 036E 210000 0371 6F lxi h,0000h mov l,a 0372 29 dad h 0373 5D 0374 54 mov e,l mov d,h 0375 0378 0379 037A 037B lxi dad mov inx mov 210B15 19 5E 23 56 ; get opcode ; clear HL ; HL = HLx2 h,ins_table d e,m h d,m ; ADD HL,DE 037C 6B 037D 62 mov l,e mov h,d 037E CD5812 call put_str 0381 F1 0382 E1 pop psw pop h 0383 0386 0388 038B 038C 038F CD2604 FE01 C29003 23 222AF0 C9 call get_number_of_byte cpi 1 jnz disassem1 inx h shld user_PC ret 0390 0392 0395 0396 0397 039A 039B 039E FE02 C29F03 23 7E CDCB12 23 222AF0 C9 disassem1: cpi 2 jnz disassem2 inx h mov a,m call out2x inx h shld user_PC ret 039F 03A0 03A1 03A2 03A5 03A6 03A7 03AA 03AB 03AC 03AF 23 23 7E CDCB12 2B 7E CDCB12 23 23 222AF0 C9 disassem2: inx h inx h mov a,m call out2x dcx h mov a,m call out2x inx h inx h shld user_PC ret ; disassemble opcode to mnemonic with command 'd' ; entry: pointer ; exit: pointer = next address 03B0 2A3CF0 d_disassemble: lhld pointer Page 9 of 64 B8085.LST 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 29/12/2559 12:32 03B3 E5 push h 03B4 03B5 03B8 03B9 03BC mov a,h call out2x mov a,l call out2x call space 7C CDCB12 7D CDCB12 CDE512 03BF 7E 03C0 CD2604 03C3 4F 03C4 03C5 03C8 03C9 03CA 7E CDCB12 23 0D C2C403 mov a,m ; get opcode call get_number_of_byte mov c,a d_disassem3: mov a,m call out2x inx h dcr c jnz d_disassem3 03CD E1 pop h 03CE 03CF 03D2 03D4 mov a,m call get_number_of_byte cpi 1 jnz d_one_tab 7E CD2604 FE01 C2DC03 03D7 3E09 03D9 CD2F12 03DC 3E09 03DE CD2F12 mvi a,tab call cout d_one_tab: mvi a,tab call cout 03E1 E5 push h 03E2 7E mov a,m 03E3 F5 push psw 03E4 210000 03E7 6F lxi h,0000h mov l,a 03E8 29 dad h 03E9 5D 03EA 54 mov e,l mov d,h 03EB 03EE 03EF 03F0 03F1 lxi dad mov inx mov 210B15 19 5E 23 56 ; print two tabs for one byte opcode h,ins_table d e,m h d,m ; else only one tab ; get opcode ; clear HL ; HL = HLx2 ; ADD HL,DE 03F2 6B 03F3 62 mov l,e mov h,d 03F4 CD5812 call put_str 03F7 F1 03F8 E1 pop psw pop h 03F9 03FC 03FE 0401 0402 0405 CD2604 FE01 C20604 23 223CF0 C9 call get_number_of_byte cpi 1 jnz d_disassem1 inx h shld pointer ret 0406 0408 040B 040C 040D 0410 0411 0414 FE02 C21504 23 7E CDCB12 23 223CF0 C9 d_disassem1: cpi 2 jnz d_disassem2 inx h mov a,m call out2x inx h shld pointer ret Page 10 of 64 B8085.LST 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 0415 0416 0417 0418 041B 041C 041D 0420 0421 0422 0425 29/12/2559 12:32 23 23 7E CDCB12 2B 7E CDCB12 23 23 223CF0 C9 d_disassem2: inx h inx h mov a,m call out2x dcx h mov a,m call out2x inx h inx h shld pointer ret ; get number of byte ; entry: A = OPCODE ; exit: A = number of byte, 1,2,3 ; 0 = undefined opcode 0426 get_number_of_byte: 0426 0428 042B 042D FE01 C22E04 3E03 C9 042E 0430 0433 0435 FE06 C23604 3E02 C9 number1: cpi 6 jnz number2 mvi a,2 ret 0436 0438 043B 043D FE0E C23E04 3E02 C9 number2: cpi 0eh jnz number3 mvi a,2 ret 043E 0440 0443 0445 FE11 C24604 3E03 C9 number3: cpi 11h jnz number4 mvi a,3 ret 0446 0448 044B 044D FE16 C24E04 3E02 C9 number4: cpi 16h jnz number5 mvi a,2 ret 044E 0450 0453 0455 FE1E C25604 3E02 C9 number5: cpi 1eh jnz number6 mvi a,2 ret 0456 0458 045B 045D FE21 C25E04 3E03 C9 number6: cpi 21h jnz number7 mvi a,3 ret 045E 0460 0463 0465 FE22 C26604 3E03 C9 number7: cpi 22h jnz number8 mvi a,3 ret 0466 0468 046B 046D FE26 C26E04 3E02 C9 number8: cpi 26h jnz number9 mvi a,2 ret 046E 0470 0473 0475 FE2A C27604 3E03 C9 number9: cpi 2ah jnz number10 mvi a,3 ret 0476 0478 047B 047D FE2E C27E04 3E02 C9 number10: cpi 2eh jnz number11 mvi a,2 ret number11: cpi 31h 047E FE31 cpi 01 jnz number1 mvi a,3 ret Page 11 of 64 B8085.LST 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 29/12/2559 12:32 0480 C28604 0483 3E03 0485 C9 jnz number12 mvi a,3 ret 0486 0488 048B 048D FE32 C28E04 3E03 C9 number12: cpi 32h jnz number13 mvi a,3 ret 048E 0490 0493 0495 FE36 C29604 3E03 C9 number13: cpi 36h jnz number14 mvi a,3 ret 0496 0498 049B 049D FE3A C29E04 3E03 C9 number14: cpi 3ah jnz number15 mvi a,3 ret 049E 04A0 04A3 04A5 FE3E C2A604 3E02 C9 number15: cpi 3eh jnz number16 mvi a,2 ret 04A6 04A8 04AB 04AD FEC2 C2AE04 3E03 C9 number16: cpi 0c2h jnz number17 mvi a,3 ret 04AE 04B0 04B3 04B5 FEC3 C2B604 3E03 C9 number17: cpi 0c3h jnz number18 mvi a,3 ret 04B6 04B8 04BB 04BD FEC4 C2BE04 3E03 C9 number18: cpi 0c4h jnz number19 mvi a,3 ret 04BE 04C0 04C3 04C5 FEC6 C2C604 3E02 C9 number19: cpi 0c6h jnz number20 mvi a,2 ret 04C6 04C8 04CB 04CD FECA C2CE04 3E03 C9 number20: cpi 0cah jnz number21 mvi a,3 ret 04CE 04D0 04D3 04D5 FECC C2D604 3E03 C9 number21: cpi 0cch jnz number22 mvi a,3 ret 04D6 04D8 04DB 04DD FECD C2DE04 3E03 C9 number22: cpi 0cdh jnz number23 mvi a,3 ret 04DE 04E0 04E3 04E5 FECE C2E604 3E02 C9 number23: cpi 0ceh jnz number24 mvi a,2 ret 04E6 04E8 04EB 04ED FED2 C2EE04 3E03 C9 number24: cpi 0d2h jnz number25 mvi a,3 ret 04EE 04F0 04F3 04F5 FED3 C2F604 3E02 C9 number25: cpi 0d3h jnz number26 mvi a,2 ret 04F6 FED4 04F8 C2FE04 number26: cpi 0d4h jnz number27 Page 12 of 64 B8085.LST 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 29/12/2559 12:32 04FB 3E03 04FD C9 mvi a,3 ret 04FE 0500 0503 0505 FED6 C20605 3E02 C9 number27: cpi 0d6h jnz number28 mvi a,2 ret 0506 0508 050B 050D FEDA C20E05 3E03 C9 number28: cpi 0dah jnz number29 mvi a,3 ret 050E 0510 0513 0515 FEDB C21605 3E02 C9 number29: cpi 0dbh jnz number30 mvi a,2 ret 0516 0518 051B 051D FEDC C21E05 3E03 C9 number30: cpi 0dch jnz number31 mvi a,3 ret 051E 0520 0523 0525 FEE2 C22605 3E03 C9 number31: cpi 0e2h jnz number32 mvi a,3 ret 0526 0528 052B 052D FEE4 C22E05 3E03 C9 number32: cpi 0e4h jnz number33 mvi a,3 ret 052E 0530 0533 0535 FEE6 C23605 3E02 C9 number33: cpi 0e6h jnz number34 mvi a,2 ret 0536 0538 053B 053D FEEA C23E05 3E03 C9 number34: cpi 0eah jnz number35 mvi a,3 ret 053E 0540 0543 0545 FEEC C24605 3E03 C9 number35: cpi 0ech jnz number36 mvi a,3 ret 0546 0548 054B 054D FEEE C24E05 3E02 C9 number36: cpi 0eeh jnz number37 mvi a,2 ret 054E 0550 0553 0555 FEF2 C25605 3E03 C9 number37: cpi 0f2h jnz number38 mvi a,3 ret 0556 0558 055B 055D FEF4 C25E05 3E03 C9 number38: cpi 0f4h jnz number39 mvi a,3 ret 055E 0560 0563 0565 FEF6 C26605 3E02 C9 number39: cpi 0f6h jnz number40 mvi a,2 ret 0566 0568 056B 056D FEFA C26E05 3E03 C9 number40: cpi 0fah jnz number41 mvi a,3 ret 056E FEFC 0570 C27605 0573 3E03 number41: cpi 0fch jnz number42 mvi a,3 Page 13 of 64 B8085.LST 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 29/12/2559 12:32 0575 C9 0576 0578 057B 057D FEFE C27E05 3E02 C9 057E 3E01 0580 C9 ret number42: cpi 0feh jnz number43 mvi a,2 ret number43: mvi a,1 ret ; execute key 0-F or 10H-19H 0581 0583 0586 0587 058A FE10 D28D05 57 CD3106 F20906 key_execute: cpi 10h jnc function_key mov d,a call buzzer jp data_key 058D 058F 0592 0595 FE12 C29805 CD3106 F2650A function_key: cpi 12h jnz function1 call buzzer jp increment 0598 059A 059D 05A0 FE15 C2A305 CD3106 F2780A function1: cpi 15h jnz function2 call buzzer jp decrement 05A3 05A5 05A8 05AB FE10 C2AE05 CD3106 F2010A function2: cpi 10h jnz function3 call buzzer jp address_mode 05AE 05B0 05B3 05B6 FE11 C2B905 CD3106 F20E0A function3: cpi 11h jnz function4 call buzzer jp data_mode 05B9 05BB 05BE 05C1 05C4 FE13 C2C505 CD3106 F29B09 C9 function4: cpi 13h jnz function5 call buzzer jp go ret 05C5 05C7 05CA 05CD FE14 C2D005 CD3106 F2190A function5: cpi 14h jnz function6 call buzzer jp function_2nd 05D0 05D2 05D5 05D8 FE16 C2DB05 CD3106 F2BF09 function6: cpi 16h jnz function7 call buzzer jp single_step 05DB 05DD 05E0 05E3 FE17 C2E605 CD3106 F28109 function7: cpi 17h jnz function8 call buzzer jp home 05E6 05E8 05EB 05EE FE18 C2F105 CD3106 F23D0A function8: cpi 18h jnz function9 call buzzer jp modify_register function9: ret 05F1 C9 ; test running onboard led Page 14 of 64 ; 0-9 jump to data key B8085.LST 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 29/12/2559 12:32 05F2 3E01 test_led: 05F4 05F6 05F9 05FC 05FD test_led1: out gpio lxi d,1050h call delay rlc jmp test_led1 D300 115010 CD0006 07 C3F405 mvi a,1 ; delay subroutine ; entry: D= outer loop E=inner loop (should be 0 for long delay) ; exit: none 0600 0601 0604 0605 0608 1D C20006 15 C20006 C9 delay: dcr jnz dcr jnz ret 0609 060C 060E 0611 3A26F0 FE00 C21406 F2CF06 data_key: lda cpi jnz jp 0614 FE01 0616 C21C06 0619 F20907 data_key1: cpi 1 jnz data_key2 jp enter_address 061C FE02 061E C22406 0621 F24307 data_key2: cpi 2 jnz data_key3 jp select_register 0624 FE03 0626 C22C06 0629 F26F06 data_key3: cpi 3 jnz data_key4 jp enter_register 062C data_key4: 062C C9 062D CD4006 0630 C9 e delay d delay entry_mode 0 data_key1 enter_data ret test_buzzer: ret call beep_on ;mvi a,7fh ;out system_port_c ;lxi d,1000h ;call delay ;mvi a,0ffh ;out system_port_c ;ret ; produce beep output at system port c.7 ; click when key pressed 0631 3A24F0 0634 E601 0636 CA4006 buzzer: 0639 063B 063C 063F 0640 0640 0600 05 C23B06 C9 mvi b,0 delay_nobeep: dcr b jnz delay_nobeep ret beep_on: mvi c,20h 0642 0644 0646 0649 064B 064D 3E7F D312 CD5906 3EFF D312 CD5906 0E20 0650 0D jz lda beep_flag ani 1 beep_on buzzer1: mvi a,7fh out system_port_c call delay_us mvi a,0ffh out system_port_c call delay_us dcr c Page 15 of 64 ;nop ;out system_port_c ;nop ;out system_port_c B8085.LST 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 29/12/2559 12:32 0651 C24206 jnz buzzer1 0654 3EFF 0656 D312 mvi a,0ffh out system_port_c 0658 C9 ret 0659 065B 065C 065F 0660 05 C25B06 C9 delay_us: delay_us1: ;----; 0660 0663 0666 0669 066B 066E 219E1D CDAE0C 3A21F0 FEFF C26306 C9 mvi b,60h dcr b jnz delay_us1 ret turn display off while key has been pressing -----------------useful for no function accepted display_off: lxi h,off_display off_display1: call scan lda key cpi 0ffh jnz off_display1 ret ; loop if key still pressed ;************* modify current displayed register ********************** ; entry: current user register displayed ; 066F enter_register: 066F 2A38F0 lhld current_register 0672 0673 0674 0675 mov inx mov lxi 4E 23 46 210000 c,m h b,m h,0 0678 09 dad b ; MOV HL,BC 0679 5A mov e,d ; save key code to E 067A 067A 067B 067C 067D 067E 067F 7D 07 6F 7C 17 67 shift_register: mov rlc mov mov ral mov a,l 0680 0681 0682 0683 0684 0685 7D 07 6F 7C 17 67 mov rlc mov mov ral mov a,l 0686 0687 0688 0689 068A 068B 7D 07 6F 7C 17 67 mov rlc mov mov ral mov a,l 068C 068D 068E 068F 0690 0691 7D 07 6F 7C 17 67 mov rlc mov mov ral mov a,l l,a a,h h,a l,a a,h h,a l,a a,h h,a l,a a,h h,a 0692 7D mov a,l 0693 E6F0 0695 82 0696 6F ani 0f0h add d mov l,a Page 16 of 64 B8085.LST 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 29/12/2559 12:32 0697 44 0698 4D mov b,h mov c,l 0699 069C 069D 069E lhld current_register mov m,c inx h mov m,b 2A38F0 71 23 70 069F 2A38F0 lhld current_register 06A2 06A3 06A4 06A5 mov inx mov lxi 4E 23 46 210000 c,m h b,m h,0 06A8 09 dad b 06A9 CD930A call read_register 06AC F5 ; MOV HL,BC push psw 06AD 3A13F0 06B0 F680 06B2 3213F0 lda buffer+3 ori 80h sta buffer+3 06B5 3A12F0 06B8 F680 06BA 3212F0 lda buffer+2 ori 80h sta buffer+2 06BD 3A11F0 06C0 F680 06C2 3211F0 lda buffer+1 ori 80h sta buffer+1 06C5 3A10F0 06C8 F680 06CA 3210F0 lda buffer ori 80h sta buffer 06CD F1 pop psw 06CE C9 ret ; enter nibble into current location 06CF 2A2AF0 enter_data: lhld user_PC 06D2 5A mov e,d 06D3 06D6 06D8 06DB 06DC 06DF 06E1 lda cpi jnz inr sta mvi mov 3A27F0 FE00 C2E206 3C 3227F0 3E00 77 06E2 7E 06E3 06E4 06E5 06E6 06E7 06E9 06EA 06EB 06EC 06ED 06EE 07 07 07 07 E6F0 83 77 57 7E BA CA0507 shift_data: ; save key code to E counter1 0 shift_data a counter1 a,0 m,a mov a,m rlc rlc rlc rlc ani add mov mov mov cmp jz 0f0h e m,a d,a a,m d it_is_ram ; make low nibble to 0 before insert ; insert low nibble to A ; check if the space is ram or rom ; if it was rom them turn of led while key has been pressed 06F1 219E1D lxi h,off_display Page 17 of 64 B8085.LST 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 06F4 06F7 06FA 06FC 29/12/2559 12:32 CDAE0C 3A21F0 FEFF C2F406 call scan lda key cpi 0ffh jnz enter_data1 ; loop if key still pressed 06FF CDA70C call debounce ; debounce after key was released 0702 2110F0 lxi h,buffer ; back to show display again 0705 0705 CDBE0A 0708 C9 enter_data1: it_is_ram: call read_memory ret ; enter nibble into current pointer 0709 2A2AF0 070C 5A enter_address: lhld user_PC mov e,d 070D 0710 0712 0715 0716 0719 071C 3A28F0 FE00 C21F07 3C 3228F0 210000 222AF0 071F 071F 0720 0721 0722 0723 0724 7D 07 6F 7C 17 67 mov rlc mov mov ral mov a,l 0725 0726 0727 0728 0729 072A 7D 07 6F 7C 17 67 mov rlc mov mov ral mov a,l 072B 072C 072D 072E 072F 0730 7D 07 6F 7C 17 67 mov rlc mov mov ral mov a,l 0731 0732 0733 0734 0735 0736 7D 07 6F 7C 17 67 mov rlc mov mov ral mov a,l ; save key code to E lda counter2 cpi 0 jnz shift_address inr a sta counter2 lxi h,0 shld user_PC shift_address: l,a a,h h,a l,a a,h h,a l,a a,h h,a l,a a,h h,a 0737 7D mov a,l 0738 E6F0 073A 82 073B 6F ani 0f0h add d mov l,a 073C 222AF0 shld user_PC 073F CDBE0A call read_memory 0742 C9 ret ; store new pointer ;****************** ALT register display ****************************** 0743 5A 0744 7A 0745 FE00 0747 C26107 select_register: mov e,d ; save key for selecting user register mov a,d cpi 0 jnz register1 Page 18 of 64 B8085.LST 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 074A 074C 074F 0751 29/12/2559 12:32 3E77 3214F0 3E71 3215F0 mvi sta mvi sta a,77h buffer+4 a,71h buffer+5 ; AF register pair 0754 212CF0 0757 2238F0 lxi h,user_AF shld current_register 075A 2A2CF0 075D CD930A 0760 C9 lhld user_AF call read_register ret 0761 0761 FE01 0763 C27D07 0766 0768 076B 076D register1: cpi 1 jnz register2 3E7C 3214F0 3E39 3215F0 mvi sta mvi sta a,7ch buffer+4 a,39h buffer+5 ; BC register pair 0770 212EF0 0773 2238F0 lxi h,user_BC shld current_register 0776 2A2EF0 0779 CD930A lhld user_BC call read_register 077C C9 ret 077D 077D FE02 077F C29907 0782 0784 0787 0789 register2: cpi 2 jnz register3 3E5E 3214F0 3E79 3215F0 mvi sta mvi sta a,5eh buffer+4 a,79h buffer+5 ; DE register pair 078C 2130F0 078F 2238F0 lxi h,user_DE shld current_register 0792 2A30F0 0795 CD930A lhld user_DE call read_register 0798 C9 ret 0799 0799 FE03 079B C2B507 079E 07A0 07A3 07A5 register3: cpi 3 jnz register4 3E76 3214F0 3E38 3215F0 mvi sta mvi sta a,76h buffer+4 a,38h buffer+5 ; HL register pair 07A8 2132F0 07AB 2238F0 lxi h,user_HL shld current_register 07AE 2A32F0 07B1 CD930A lhld user_HL call read_register 07B4 C9 07B5 07B5 FE04 07B7 C2D107 07BA 07BC 07BF 07C1 3E6D 3214F0 3E73 3215F0 ret register4: cpi 4 jnz register5 mvi sta mvi sta a,6dh buffer+4 a,73h buffer+5 ; user SP 07C4 2134F0 07C7 2238F0 lxi h,user_SP shld current_register 07CA 2A34F0 lhld user_SP Page 19 of 64 B8085.LST 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 29/12/2559 12:32 07CD CD930A call read_register 07D0 C9 ret 07D1 07D1 FE05 07D3 C2F807 07D6 07D8 07DB 07DD register5: cpi 5 jnz register6 3E73 3214F0 3E39 3215F0 mvi sta mvi sta a,73h buffer+4 a,39h buffer+5 ; user PC 07E0 212AF0 07E3 2238F0 lxi h,user_PC shld current_register 07E6 2A2AF0 07E9 CD930A lhld user_PC call read_register 07EC C9 ret ;---- display carry flag ------------------------------------------------- 07ED C2F507 07F0 3E3F 07F2 C3F707 put_flag: jnz put_high1 mvi a,3fh jmp skip_put_high1 07F5 3E06 put_high1: mvi a,06h 07F7 07F7 C9 skip_put_high1: ret 07F8 07F8 FE06 07FA C22008 register6: 07FD 07FF 0802 0804 0807 0809 cpi 6 jnz register7 3E39 3210F0 3E6E 3211F0 3E48 3212F0 mvi sta mvi sta mvi sta a,39h buffer a,6eh buffer+1 a,48h buffer+2 080C 2A2CF0 080F 7D lhld user_AF mov a,l 0810 E601 0812 CDED07 0815 3213F0 ani 1 call put_flag sta buffer+3 0818 AF 0819 3214F0 081C 3215F0 xra a sta buffer+4 sta buffer+5 081F C9 ret 0820 0820 FE07 0822 C24B08 0825 0827 082A 082C 082F 0831 0834 0836 0839 083B 3E49 3210F0 3E79 3211F0 3E50 3212F0 3E5C 3213F0 3E48 3214F0 ; carry flag register7: cpi 7 jnz register8 mvi sta mvi sta mvi sta mvi sta mvi sta a,49h buffer a,79h buffer+1 a,50h buffer+2 a,5ch buffer+3 a,48h buffer+4 083E 2A2CF0 0841 7D lhld user_AF mov a,l 0842 E640 ani 40h ; zero flag Page 20 of 64 B8085.LST 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 29/12/2559 12:32 0844 CDED07 0847 3215F0 call put_flag sta buffer+5 084A C9 ret 084B 084B FE08 084D C27C08 0850 0852 0855 0857 085A 085C 085F 0861 0864 0866 register8: cpi 8 jnz register9 3E6D 3210F0 3E11 3211F0 3E6F 3212F0 3E54 3213F0 3E48 3214F0 mvi sta mvi sta mvi sta mvi sta mvi sta a,6dh buffer a,11h buffer+1 a,6fh buffer+2 a,54h buffer+3 a,48h buffer+4 ; sign flag 0869 2A2CF0 086C 7D lhld user_AF mov a,l 086D 086E 0871 0873 ral jc put_high2 mvi a,3fh jmp skip_put_high2 17 DA7608 3E3F C37808 0876 3E06 0878 0878 3215F0 put_high2: mvi a,06h skip_put_high2: sta buffer+5 087B C9 087C 087C FE09 087E C2A408 0881 0883 0886 0888 088B 088D ret register9: cpi 9 jnz register10 3E77 3210F0 3E39 3211F0 3E48 3212F0 mvi sta mvi sta mvi sta a,77h buffer a,39h buffer+1 a,48h buffer+2 0890 2A2CF0 0893 7D lhld user_AF mov a,l 0894 0896 0899 089C 089D 08A0 ani 10h call put_flag sta buffer+3 xra a sta buffer+4 sta buffer+5 E610 CDED07 3213F0 AF 3214F0 3215F0 08A3 C9 08A4 08A4 FE0A 08A6 C2CA08 08A9 08AB 08AE 08B0 3E73 3210F0 3E48 3211F0 ret register10: cpi 10 jnz break mvi sta mvi sta a,73h buffer a,48h buffer+1 08B3 2A2CF0 08B6 7D lhld user_AF mov a,l 08B7 08B9 08BC 08BF ani 4 call put_flag sta buffer+2 xra a E604 CDED07 3212F0 AF ; AC flag ; Parity flag Page 21 of 64 B8085.LST 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 08C0 08C3 08C6 08C9 29/12/2559 12:32 3213F0 3214F0 3215F0 C9 08CA FE0B 08CC C20409 sta buffer+3 sta buffer+4 sta buffer+5 ret ; ------------------ ALT B SET BREAK POINT --------------------------break: cpi 11 jnz clear_break 08CF 2A2AF0 08D2 223EF0 lhld user_PC ; save user PC shld break_address 08D5 7E 08D6 3240F0 mov a,m ; get user code sta break_opcode ; save it 08D9 08DA 08DD 08DE 08E0 push h call read_memory pop h mvi a,0FFh ; RST 7 opcode mov m,a ; replace user code with RST 7 E5 CDBE0A E1 3EFF 77 08E1 F5 push psw 08E2 3A10F0 08E5 F680 08E7 3210F0 lda buffer ori 80h sta buffer 08EA 3A11F0 08ED F680 08EF 3211F0 lda buffer+1 ori 80h sta buffer+1 08F2 3A12F0 08F5 F680 08F7 3212F0 lda buffer+2 ori 80h sta buffer+2 08FA 08FD 08FF 0902 lda ori sta pop 3A13F0 F680 3213F0 F1 0903 C9 buffer+3 80h buffer+3 psw ret ;----------------- ALT C CLEAR BREAK POINT --------------------------- 0904 FE0C 0906 C21F09 clear_break: cpi 12 jnz insert_byte 0909 2140F0 090C 7E lxi h,break_opcode ; restore user code mov a,m 090D 0910 0911 0914 0917 0918 091B lhld break_address mov m,a shld user_PC call read_memory xra a sta entry_mode call mode_indicator 2A3EF0 77 222AF0 CDBE0A AF 3226F0 CD020B 091E C9 ret ;--------------- ALT E insert byte --------------------------------; insert byte within 512 bytes from current location 091F FE0E 0921 C24A09 insert_byte: cpi 14 ; test with key E jnz delete_byte 0924 2A2AF0 0927 E5 push h 0928 092B 092C 092D 092E dad d push h pop b dcx b 110002 19 E5 C1 0B lhld user_PC ; save PC to stack lxi d,512 ; copy HL to BC Page 22 of 64 B8085.LST 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 29/12/2559 12:32 092F 110002 0932 0932 0933 0934 0935 0936 0937 0938 0939 0A 77 2B 0B 1B 7B B2 C23209 093C 093D 093E 093F 0942 0943 0946 E1 AF 77 CDBE0A AF 3226F0 CD020B lxi d,512 ; load counter with 512 bytes insert_byte1: ldax b mov m,a dcx h dcx b dcx d mov a,e ora d ; check DE ==0 jnz insert_byte1 pop h ; restore user PC xra a mov m,a ; store 00 at insert byte call read_memory xra a sta entry_mode call mode_indicator 0949 C9 ret ;--------------- ALT D delete byte --------------------------------; delete byte within 512 bytes 094A FE0D 094C C26F09 094F 0952 0953 0954 delete_byte: cpi 13 jnz beep_chk 2A2AF0 E5 E5 C1 lhld user_PC push h push h pop b 0955 03 0956 110002 0959 0959 095A 095B 095C 095D 095E 095F 0960 0A 77 23 03 1B 7B B2 C25909 0963 0964 0967 0968 096B E1 CDBE0A AF 3226F0 CD020B inx b lxi d,512 delete_byte1: ldax b mov m,a inx h inx b dcx d mov a,e ora d ; check if DE ==0 jnz delete_byte1 pop h call read_memory xra a sta entry_mode call mode_indicator 096E C9 096F FE0F 0971 C27D09 0974 0977 0979 097C ret ;--------------- ALT F BEEP/NO BEEP beep_chk: cpi 15 jnz option1 3A24F0 EE01 3224F0 C9 lda beep_flag xri 1 sta beep_flag ret 097D 097D CD6006 0980 C9 option1: 0981 0984 0987 098A 098D home: 210081 222AF0 2110F0 CDBE0A AF --------------------------------- call display_off ; no service key ret lxi h,home_address shld user_PC lxi h,buffer call read_memory xra a Page 23 of 64 B8085.LST 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 29/12/2559 12:32 098E 3226F0 0991 CD020B 0994 C9 0995 3E2A 0997 CD2F12 099A C9 sta entry_mode call mode_indicator ret debug: mvi a,"*" call cout ret ; go function, jump from monitor program to user program ; save system stack and load user stack ; load CPU registers with user registers before jump 099B 099B 210000 go: lxi h,0 099E 39 099F 2257F0 dad sp ; save system stack shld save_stack 09A2 2A34F0 09A5 F9 lhld user_SP sphl 09A6 09A9 09AA 09AD 09AE 09B1 09B2 09B5 09B6 09B9 2A2AF0 E5 2A2CF0 E5 2A2EF0 E5 2A30F0 E5 2A32F0 E5 lhld push lhld push lhld push lhld push lhld push 09BA 09BB 09BC 09BD E1 D1 C1 F1 pop pop pop pop 09BE C9 ret ; ; ; ; 09BF 09BF 210000 ; get user stack ; load user stack user_PC h user_AF h user_BC h user_DE h user_HL h h d b psw ; jump to user program single step load CPU registers with user registers, enable trap signal then jump to program disassemble line to be executed single_step: lxi h,0 09C2 39 09C3 2257F0 dad sp ; save system stack shld save_stack 09C6 2A34F0 09C9 F9 lhld user_SP sphl 09CA 2A2AF0 09CD E5 lhld user_PC push h 09CE 3A25F0 09D1 FE00 09D3 CADF09 lda uart_found cpi 0 jz skip2 ; if no uart, skip disassemble 09D6 CDDA12 09D9 CDEB12 09DC CD3A03 call new_line call send_tab call disassemble 09DF ; load user stack ; get address to be executed ; save to stack skip2: 09DF E1 09E0 222AF0 pop h shld user_PC 09E3 09E6 09E7 09EA lhld push lhld push 2A2AF0 E5 2A2CF0 E5 user_PC h user_AF h Page 24 of 64 B8085.LST 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 09EB 09EE 09EF 09F2 09F3 09F6 29/12/2559 12:32 2A2EF0 E5 2A30F0 E5 2A32F0 E5 lhld push lhld push lhld push user_BC h user_DE h user_HL h 09F7 E1 09F8 D1 09F9 C1 pop h pop d pop b 09FA 3EBF 09FC D312 mvi a,0bfh out system_port_c ; make port_c.6 low to enable trap ; ; now the shift register 74LS164 is running ; within 8 ALE, trap will be high, trap will be recorgnized after instruction ; followed RET was executed 09FE 00 09FF F1 0A00 C9 nop pop psw ret ; 1 cycles ; 5 cycles ; 3 cycles ; set mode to 1 0A01 0A03 0A06 0A09 0A0A 0A0D 3E01 3226F0 CDBE0A AF 3228F0 C9 address_mode: mvi a,1 sta entry_mode call read_memory xra a sta counter2 ret 0A0E 0A0F 0A12 0A15 0A18 AF 3226F0 3227F0 CDBE0A C9 data_mode: 0A19 0A1B 0A1E 0A20 0A23 0A25 0A28 0A2A 0A2D 0A2F 0A32 0A34 0A37 0A39 0A3C 3E02 3226F0 3E77 3210F0 3E38 3211F0 3E78 3212F0 3E00 3213F0 3E00 3214F0 3E00 3215F0 C9 function_2nd: mvi sta mvi sta mvi sta mvi sta mvi sta mvi sta mvi sta ret xra a sta entry_mode sta counter1 call read_memory ret a,2 entry_mode a,77h buffer a,38h buffer+1 a,78h buffer+2 a,0 buffer+3 a,0 buffer+4 a,0 buffer+5 ; set entry mode to 3 ; hex data will be used for register modifying 0A3D modify_register: 0A3D F5 push psw 0A3E 3E03 0A40 3226F0 mvi a,3 sta entry_mode 0A43 3A13F0 0A46 F680 0A48 3213F0 lda buffer+3 ori 80h sta buffer+3 0A4B 3A12F0 0A4E F680 0A50 3212F0 lda buffer+2 ori 80h sta buffer+2 0A53 3A11F0 0A56 F680 0A58 3211F0 lda buffer+1 ori 80h sta buffer+1 Page 25 of 64 B8085.LST 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 29/12/2559 12:32 0A5B 3A10F0 0A5E F680 0A60 3210F0 lda buffer ori 80h sta buffer 0A63 F1 pop psw 0A64 C9 ret ; increment key works with mode0 or mode1 display 0A65 3E00 0A67 3226F0 0A6A 3227F0 0A6D 0A70 0A71 0A74 0A77 increment: 2A2AF0 23 222AF0 CDBE0A C9 mvi a,0 sta entry_mode sta counter1 lhld inx shld call ret ; switch to data mode ; clear event counter1 user_PC h user_PC read_memory ; decrement key works with mode0 or mode1 display 0A78 0A7A 0A7D 0A80 0A81 0A84 0A87 3E00 3226F0 2A2AF0 2B 222AF0 CDBE0A C9 decrement: mvi a,0 sta entry_mode ; switch to data mode lhld user_PC dcx h shld user_PC call read_memory ret ; convert nibble 0-F to 8-bit seven segment code ; entry: A ; exit: A 0A88 0A88 0A8A 0A8D 0A8E 0A90 0A91 0A92 to_seven_segment: E60F 218E1D 5F 1600 19 7E C9 ani lxi mov mvi dad mov ret 0fh ; get only low nibble as the index h,convert e,a d,0 d a,m ; get code ; convert [HL] to display buffer 0-3 ; for register display ; entry: HL 0A93 0A93 0A94 0A95 0A96 0A97 0A98 0A99 0A9A 0A9D E5 7C F5 0F 0F 0F 0F CD880A 3210F0 read_register: push h mov a,h push psw rrc rrc rrc rrc call to_seven_segment sta buffer 0AA0 F1 0AA1 CD880A 0AA4 3211F0 pop psw call to_seven_segment sta buffer+1 0AA7 E1 pop h 0AA8 E5 push h Page 26 of 64 B8085.LST 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 0AA9 0AAA 0AAB 0AAC 0AAD 0AAE 0AAF 0AB2 0AB5 0AB6 0AB9 29/12/2559 12:32 7D F5 0F 0F 0F 0F CD880A 3212F0 F1 CD880A 3213F0 0ABC E1 0ABD C9 mov a,l push psw rrc rrc rrc rrc call to_seven_segment sta buffer+2 pop psw call to_seven_segment sta buffer+3 pop h ret ; convert current address and data to display buffer ; 0ABE 0AC1 0AC2 0AC3 0AC4 0AC5 0AC6 0AC7 0AC8 0ACB 2A2AF0 E5 7C F5 0F 0F 0F 0F CD880A 3210F0 read_memory: lhld user_PC push h mov a,h push psw rrc rrc rrc rrc call to_seven_segment sta buffer 0ACE F1 0ACF CD880A 0AD2 3211F0 pop psw call to_seven_segment sta buffer+1 0AD5 E1 pop h 0AD6 E5 push h 0AD7 0AD8 0AD9 0ADA 0ADB 0ADC 0ADD 0AE0 0AE3 0AE4 0AE7 mov a,l push psw rrc rrc rrc rrc call to_seven_segment sta buffer+2 pop psw call to_seven_segment sta buffer+3 7D F5 0F 0F 0F 0F CD880A 3212F0 F1 CD880A 3213F0 0AEA E1 0AEB 7E pop h mov a,m 0AEC 0AED 0AEE 0AEF 0AF0 0AF1 0AF4 0AF7 F5 0F 0F 0F 0F CD880A 3214F0 F1 push psw rrc rrc rrc rrc call to_seven_segment sta buffer+4 pop psw 0AF8 CD880A 0AFB 3215F0 call to_seven_segment sta buffer+5 0AFE CD020B call mode_indicator 0B01 C9 ret 0B02 ; read from memory mode_indicator: 0B02 F5 push psw 0B03 3A26F0 lda entry_mode Page 27 of 64 B8085.LST 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 29/12/2559 12:32 0B06 FE00 0B08 C23D0B cpi 0 jnz mode1 0B0B 3A15F0 0B0E F680 0B10 3215F0 lda buffer+5 ori 80h sta buffer+5 0B13 3A14F0 0B16 F680 0B18 3214F0 lda buffer+4 ori 80h sta buffer+4 0B1B 3A13F0 0B1E E67F 0B20 3213F0 lda buffer+3 ani 7fh sta buffer+3 0B23 3A12F0 0B26 E67F 0B28 3212F0 lda buffer+2 ani 7fh sta buffer+2 0B2B 3A11F0 0B2E E67F 0B30 3211F0 lda buffer+1 ani 7fh sta buffer+1 0B33 3A10F0 0B36 E67F 0B38 3210F0 lda buffer ani 7fh sta buffer 0B3B F1 0B3C C9 0B3D FE01 0B3F C2740B ; mode 0 indicator pop psw ret mode1: 0B42 3A15F0 0B45 E67F 0B47 3215F0 cpi 1 jnz mode2 lda buffer+5 ani 7fh sta buffer+5 0B4A 3A14F0 0B4D E67F 0B4F 3214F0 ; mode 1 indicator lda buffer+4 ani 7fh sta buffer+4 0B52 3A13F0 0B55 F680 0B57 3213F0 lda buffer+3 ori 80h sta buffer+3 0B5A 3A12F0 0B5D F680 0B5F 3212F0 lda buffer+2 ori 80h sta buffer+2 0B62 3A11F0 0B65 F680 0B67 3211F0 lda buffer+1 ori 80h sta buffer+1 0B6A 3A10F0 0B6D F680 0B6F 3210F0 lda buffer ori 80h sta buffer 0B72 F1 0B73 C9 pop psw ret 0B74 F1 0B75 C9 mode2: pop psw ret 0B76 0E07 0B78 21940B cold_boot: mvi c,7 lxi h,title 0B7B 1650 cold2: mvi d,50h Page 28 of 64 B8085.LST 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 29/12/2559 12:32 0B7D CDAE0C 0B80 15 0B81 C27D0B cold1: call scan dcr d jnz cold1 0B84 23 0B85 0D 0B86 C27B0B inx h dcr c jnz cold2 0B89 2B dcx h 0B8A 0B8C 0B8F 0B90 0E00 CDAE0C 0D C28C0B cold3: 0B93 C9 mvi c,0 call scan dcr c jnz cold3 ret 0B94 0000000000title: dfb 0,0,0,0,0,0,7fh,3fh,7fh,6dh,0,0 ; display data read from memory pointed to by HL on LED ; entry: HL ; 0BA0 1605 demo: mvi d,5 0BA2 0BA5 0BA6 0BA9 0BAA demo1_2: call scan dcr d jnz demo1_2 inx h ret CDAE0C 15 C2A20B 23 C9 ; ; ; ; convert position key to internal key code 0-F for data entry and 10-19H function keys entry: A = scan code exit: A = internal code 0BAB 0BAD 0BB0 0BB2 FE02 C2B30B 3E00 C9 get_key_code: cpi 2 jnz code1 mvi a,0 ret 0BB3 0BB5 0BB8 0BBA FE0A C2BB0B 3E01 C9 code1: cpi 0ah jnz code2 mvi a,1 ret 0BBB 0BBD 0BC0 0BC2 FE12 C2C30B 3E02 C9 code2: cpi 12h jnz code3 mvi a,2 ret 0BC3 0BC5 0BC8 0BCA FE1A C2CB0B 3E03 C9 code3: cpi 1ah jnz code4 mvi a,3 ret 0BCB 0BCD 0BD0 0BD2 FE03 C2D30B 3E04 C9 code4: cpi 3 jnz code5 mvi a,4 ret 0BD3 0BD5 0BD8 0BDA FE0B C2DB0B 3E05 C9 code5: cpi 0bh jnz code6 mvi a,5 ret 0BDB 0BDD 0BE0 0BE2 FE13 C2E30B 3E06 C9 code6: cpi 13h jnz code7 mvi a,6 ret 0BE3 FE1B 0BE5 C2EB0B code7: cpi 1bh jnz code8 Page 29 of 64 B8085.LST 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 29/12/2559 12:32 0BE8 3E07 0BEA C9 mvi a,7 ret 0BEB 0BED 0BF0 0BF2 FE04 C2F30B 3E08 C9 code8: cpi 4 jnz code9 mvi a,8 ret 0BF3 0BF5 0BF8 0BFA FE0C C2FB0B 3E09 C9 code9: cpi 0ch jnz code10 mvi a,9 ret 0BFB 0BFD 0C00 0C02 FE14 C2030C 3E0A C9 code10: cpi 14h jnz code11 mvi a,0ah ret 0C03 0C05 0C08 0C0A FE1C C20B0C 3E0B C9 code11: cpi 1ch jnz code12 mvi a,0bh ret 0C0B 0C0D 0C10 0C12 FE05 C2130C 3E0C C9 code12: cpi 5 jnz code13 mvi a,0ch ret 0C13 0C15 0C18 0C1A FE0D C21B0C 3E0D C9 code13: cpi 0dh jnz code14 mvi a,0dh ret 0C1B 0C1D 0C20 0C22 FE15 C2230C 3E0E C9 code14: cpi 15h jnz code15 mvi a,0eh ret 0C23 0C25 0C28 0C2A FE1D C22B0C 3E0F C9 code15: cpi 1dh jnz code16 mvi a,0fh ret 0C2B 0C2D 0C30 0C32 FE10 C2330C 3E10 C9 code16: cpi 10h jnz code17 mvi a,10h ret 0C33 0C35 0C38 0C3A FE18 C23B0C 3E11 C9 code17: cpi 18h jnz code18 mvi a,11h ret 0C3B 0C3D 0C40 0C42 FE01 C2430C 3E12 C9 code18: cpi 1 jnz code19 mvi a,12h ret 0C43 0C45 0C48 0C4A FE00 C24B0C 3E13 C9 code19: cpi 0 jnz code20 mvi a,13h ret 0C4B 0C4D 0C50 0C52 FE08 C2530C 3E14 C9 code20: cpi 8 jnz code21 mvi a,14h ret 0C53 0C55 0C58 0C5A FE09 C25B0C 3E15 C9 code21: cpi 9 jnz code22 mvi a,15h ret 0C5B FE11 0C5D C2630C 0C60 3E16 code22: cpi 11h jnz code23 mvi a,16h Page 30 of 64 B8085.LST 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 29/12/2559 12:32 0C62 C9 ret 0C63 0C65 0C68 0C6A FE19 C26B0C 3E17 C9 code23: cpi 19h jnz code24 mvi a,17h ret 0C6B 0C6D 0C70 0C72 FE2E C2730C 3E18 C9 code24: cpi 2eh jnz code25 mvi a,18h ret 0C73 0C75 0C78 0C7A FE2F C27B0C 3E19 C9 code25: cpi 2fh jnz code26 mvi a,19h ret code26: mvi a,0ffh ret 0C7B 3EFF 0C7D C9 ; scan display and keyboard unitl key was pressed 0C7E scan_key: 0C7E scan_key4: 0C7E 0C81 0C84 0C87 0C89 ; mvi d,50 2110F0 CDAE0C 3A21F0 FEFF C27E0C ;push d ; save d lxi h,buffer call scan lda key cpi 0ffh jnz scan_key4 ;pop d 0C8C F28F0C 0C8F ; number of loop for timeout if key still pressed jp ; loop if key still pressed scan_key3 scan_key2: ;pop d ; dcr d ; jp scan_key4 ; no repeat function ; repeat if still pressed when timeout 0C8F CDA70C 0C92 0C95 0C98 0C9B 0C9D 2110F0 CDAE0C 3A21F0 FEFF CA950C scan_key3: scan_key1: call debounce ; debounce after released lxi h,buffer call scan lda key cpi 0ffh jz scan_key1 ; loop until key will be pressed 0CA0 CDA70C call debounce 0CA3 CDAB0B call get_key_code ; call out2x ret debounce: debounce1: mvi b,20 dcr b jnz debounce1 ret 0CA6 C9 0CA7 0CA9 0CAA 0CAD 0614 05 C2A90C C9 ; subroutine scan keyboard and display ; input: hl pointer to buffer ; exit: key = scan code ; -1 no key pressed ; 0CAE E5 0CAF C5 0CB0 D5 scan: push h push b push d Page 31 of 64 B8085.LST 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 29/12/2559 12:32 0CB1 0CB3 0CB5 0CB7 0CB9 0E06 1E00 1600 3EFF 3221F0 0CBC 0CBD 0CBF 0CC1 0CC2 7B F6F0 D312 7E D311 0CC4 060A 0CC6 05 0CC7 C2C60C 0CCA AF 0CCB D311 scan1: 0CD5 0CD6 0CD7 0CDA 0CDC 05 0CDD C2D10C ; ; ; ; ; for 6-digit LED digit scan code appears at 4-to-10 decoder key position put -1 to key key = -1 mov ori out mov out a,e 0f0h ; high nibble must be 1111 system_port_c ; active digit first a,m ; load a with [hl] system_port_b ; then turn segment on ; delay for transition process xra a out system_port_b ; turn off segment in system_port_a mvi b,8 shift_key: rar jc next_key F5 7A 3221F0 F1 0CDB 0CDB 14 c,6 e,0 d,0 a,0ffh key mvi b,10 dcr b jnz wait1 wait1: 0CCD DB10 0CCF 0608 0CD1 1F 0CD2 DADB0C mvi mvi mvi mvi sta push psw mov a,d sta key pop psw ; read input port ; check all 8-row ; rotate right through carry ; if carry = 1 then no key pressed ; save key position next_key: inr d ; next key position dcr b jnz shift_key ; until 8-bit was shifted ; mvi a,0 ; out system_port_b ; clear a ; turn off led 0CE0 1C 0CE1 23 inr e inx h ; next digit scan code ; next location 0CE2 0D 0CE3 C2BC0C dcr c jnz scan1 ; next column 0CE6 CDED0C call serial_command 0CE9 0CEA 0CEB 0CEC pop d pop b pop h ret D1 C1 E1 C9 ;----------- serial commands with 9600 8n1 terminal -------------------; check if serial buffer has command ; 0CED 0CED 3A25F0 0CF0 FE00 0CF2 CA310D 0CF5 0CF8 0CFB 0CFE 0D01 0D04 0D07 0D0A 0D0D 0D10 CD4512 CD500D CD320D CDF112 CDEE11 CDC711 CDDC11 CDAA11 CD2711 CDDD10 serial_command: lda uart_found cpi 0 jz skip_serial call call call call call call call call call call get_command download prompting hex_dump help quick_home io_address new_location edit_location jump_to_user_pgm Page 32 of 64 B8085.LST 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 0D13 0D16 0D19 0D1C 0D1F 0D22 0D25 0D28 0D2B 0D2E 29/12/2559 12:32 CDC410 CD720D CD8010 CD4C0F CD0C0F CD1303 CD000F CDF10E CDD60E CDA40D 0D31 call call call call call call call call call call monitor_function ascii_print fill_memory register_display stack_display disassemble1 single_step_ print_watch clear_watch set_user_register skip_serial: 0D31 C9 ret 0D32 3A22F0 0D35 FE0D 0D37 C24F0D prompting: lda command cpi cr jnz exit_prompting 0D3A send_prompt: 0D3A 0D3D 0D40 0D41 0D44 0D45 0D48 0D4B 0D4E CDDA12 2A3CF0 7C CDCB12 7D CDCB12 21E41D CD5812 C9 0D4F C9 call new_line lhld pointer mov a,h call out2x mov a,l call out2x lxi h,prompt_text call put_str ret ; user_PC exit_prompting: ret ; command execute ; get command from serial port 0D50 3A22F0 0D53 FE6C 0D55 C2710D download: lda command cpi "l" jnz exit_download 0D58 CDD514 0D5B 3E01 0D5D 323AF0 call clear_bcd1 mvi a,1 sta temp 0D60 AF 0D61 3220F0 xra a sta bcs 0D64 0D67 0D6A 0D6D 0D70 lxi h,download_text call put_str call get_record call send_prompt ret 21CD1D CD5812 CD0314 CD3A0D C9 0D71 C9 ; reset bcd counter1 ; clear byte chekc sum error exit_download ret ; display printable ASCII code, 20H-7FH 0D72 3A22F0 0D75 FE61 0D77 C2A30D ascii_print: lda command cpi "a" jnz exit_ascii_print 0D7A 215E1E 0D7D CD5812 lxi h, ascii_text call put_str 0D80 CDDA12 0D83 CDDA12 call new_line call new_line 0D86 2E20 0D88 0E60 mvi l,20h mvi c,96 0D8A ascii_print1: Page 33 of 64 B8085.LST 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 29/12/2559 12:32 0D8A 7D 0D8B CD2F12 mov a,l call cout 0D8E 0D90 0D93 0D94 0D97 0D9A 0D9B 0D9C 3E3D CD2F12 7D CDCB12 CDE512 2C 0D C28A0D mvi a,"=" call cout mov a,l call out2x call space inr l dcr c jnz ascii_print1 0D9F CD3A0D 0DA2 C9 call send_prompt ret 0DA3 exit_ascii_print: 0DA3 C9 ret ;------------------- set value to user registers --------------------; set value to user register AF, BC, DE, HL, SP, PC 0DA4 set_user_register: 0DA4 3A22F0 0DA7 FE73 0DA9 C2B80E lda command cpi "s" jnz exit_set_user 0DAC 210C1F 0DAF CD5812 lxi h, set_register_text call put_str 0DB2 CD3B12 0DB5 FE61 0DB7 C2E00D call cin cpi "a" jnz set_user1 0DBA 0DBD 0DC0 0DC3 0DC6 0DC7 0DCA 0DCB 0DCE 0DD1 0DD4 0DD5 0DD8 0DD9 call new_line lxi h,af_text call put_str lhld user_AF mov a,h call out2x mov a,l call out2x call send_tab call get_hex2 mov h,a call get_hex2 mov l,a shld user_AF CDDA12 21B01E CD5812 2A2CF0 7C CDCB12 7D CDCB12 CDEB12 CD9E13 67 CD9E13 6F 222CF0 0DDC CD3A0D 0DDF C9 0DE0 0DE0 FE62 0DE2 C20B0E 0DE5 0DE8 0DEB 0DEE 0DF1 0DF2 0DF5 0DF6 0DF9 0DFC 0DFF 0E00 0E03 0E04 CDDA12 21B41E CD5812 2A2EF0 7C CDCB12 7D CDCB12 CDEB12 CD9E13 67 CD9E13 6F 222EF0 0E07 CD3A0D 0E0A C9 call send_prompt ret set_user1: cpi "b" jnz set_user2 call new_line lxi h,bc_text call put_str lhld user_BC mov a,h call out2x mov a,l call out2x call send_tab call get_hex2 mov h,a call get_hex2 mov l,a shld user_BC call send_prompt ret Page 34 of 64 B8085.LST 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 29/12/2559 12:32 0E0B 0E0B FE64 0E0D C2360E 0E10 0E13 0E16 0E19 0E1C 0E1D 0E20 0E21 0E24 0E27 0E2A 0E2B 0E2E 0E2F set_user2: cpi "d" jnz set_user3 CDDA12 21B81E CD5812 2A30F0 7C CDCB12 7D CDCB12 CDEB12 CD9E13 67 CD9E13 6F 2230F0 call new_line lxi h,de_text call put_str lhld user_DE mov a,h call out2x mov a,l call out2x call send_tab call get_hex2 mov h,a call get_hex2 mov l,a shld user_DE 0E32 CD3A0D 0E35 C9 0E36 0E36 FE68 0E38 C2610E 0E3B 0E3E 0E41 0E44 0E47 0E48 0E4B 0E4C 0E4F 0E52 0E55 0E56 0E59 0E5A call send_prompt ret set_user3: cpi "h" jnz set_user4 CDDA12 21BC1E CD5812 2A32F0 7C CDCB12 7D CDCB12 CDEB12 CD9E13 67 CD9E13 6F 2232F0 call new_line lxi h,hl_text call put_str lhld user_HL mov a,h call out2x mov a,l call out2x call send_tab call get_hex2 mov h,a call get_hex2 mov l,a shld user_HL 0E5D CD3A0D 0E60 C9 0E61 0E61 FE73 0E63 C28C0E 0E66 0E69 0E6C 0E6F 0E72 0E73 0E76 0E77 0E7A 0E7D 0E80 0E81 0E84 0E85 call send_prompt ret set_user4: cpi "s" jnz set_user5 CDDA12 21C01E CD5812 2A34F0 7C CDCB12 7D CDCB12 CDEB12 CD9E13 67 CD9E13 6F 2234F0 call new_line lxi h,sp_text call put_str lhld user_SP mov a,h call out2x mov a,l call out2x call send_tab call get_hex2 mov h,a call get_hex2 mov l,a shld user_SP 0E88 CD3A0D 0E8B C9 0E8C 0E8C FE70 0E8E C2B70E 0E91 0E94 0E97 0E9A 0E9D 0E9E CDDA12 21C91E CD5812 2A2AF0 7C CDCB12 call send_prompt ret set_user5: cpi "p" jnz set_user6 call new_line lxi h,pc_text call put_str lhld user_PC mov a,h call out2x Page 35 of 64 B8085.LST 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 0EA1 0EA2 0EA5 0EA8 0EAB 0EAC 0EAF 0EB0 29/12/2559 12:32 7D CDCB12 CDEB12 CD9E13 67 CD9E13 6F 222AF0 mov a,l call out2x call send_tab call get_hex2 mov h,a call get_hex2 mov l,a shld user_PC 0EB3 CD3A0D 0EB6 C9 call send_prompt ret 0EB7 C9 set_user6: ret 0EB8 exit_set_user: 0EB8 C9 0EB9 0EB9 0EBC 0EBF 0EC1 0EC2 0EC5 0EC6 0EC9 0EC9 0ECC 0ECD 0ED0 0ED1 0ED2 0ED5 ret print_watch_ram: CDDA12 2100F0 0E10 7C CDCB12 7D CDCB12 call new_line lxi h, watch_ram mvi c,16 mov a,h call out2x mov a,l call out2x watch1: CDE512 7E CDCB12 23 0D C2C90E C9 call space mov a,m call out2x inx h dcr c jnz watch1 ret ;----------- clear watch variables-----------------------------------0ED6 0ED9 0EDB 0EDE 0EE1 3A22F0 FE63 C2F00E 2100F0 0E10 clear_watch: lda cpi jnz lxi mvi command "c" exit_clear_watch h, watch_ram c,16 0EE3 0EE4 0EE5 0EE6 0EE7 AF 77 23 0D C2E30E clear1: a m,a h c clear1 xra mov inx dcr jnz 0EEA CDB90E 0EED CD3A0D 0EF0 C9 call print_watch_ram call send_prompt exit_clear_watch: ret ;----------- print watch variables -----------------------------------0EF1 0EF1 3A22F0 print_watch: lda command Page 36 of 64 B8085.LST 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 29/12/2559 12:32 0EF4 FE77 0EF6 C2FF0E cpi "w" jnz exit_watch 0EF9 CDB90E 0EFC CD3A0D call print_watch_ram call send_prompt 0EFF C9 exit_watch: ret 0F00 ;---------- single step running with key space ----------------------single_step_: 0F00 0F03 0F05 0F08 3A22F0 FE20 C20B0F CDBF09 0F0B 0F0B C9 lda command cpi " " jnz exit_step call single_step exit_step: ret ;------- display stack area from top of stack to initial ------------- 0F0C 0F0C 3A22F0 0F0F FE6B 0F11 C24B0F stack_display: lda command cpi "k" jnz exit_stack ; ; lxi h,stack_text call put_str 0F14 21391E 0F17 CD5812 0F1A CDDA12 lxi h,edit_text2 call put_str call new_line 0F1D 2A34F0 lhld user_SP 0F20 stack_display1: 0F20 0F21 0F24 0F25 7C CDCB12 7D CDCB12 mov a,h call out2x mov a,l call out2x 0F28 0F2B 0F2E 0F30 CDE512 CDE512 3E5B CD2F12 call space call space mvi a,"[" call cout 0F33 7E 0F34 CDCB12 mov a,m call out2x 0F37 3E5D 0F39 CD2F12 mvi a,"]" call cout 0F3C CDDA12 call new_line 0F3F 23 inx h 0F40 119AF0 lxi d, user_stack+32+1 0F43 7D 0F44 AB 0F45 C2200F mov a,l xra e jnz stack_display1 0F48 CD3A0D call send_prompt 0F4B 0F4B C9 ; load base of user stack exit_stack: ret ;---------------- registers display ---------------------------------0F4C 0F4C 3A22F0 register_display: lda command Page 37 of 64 B8085.LST 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 29/12/2559 12:32 0F4F FE72 0F51 C27110 0F54 cpi "r" jnz exit_register register_display1: ; ; ; lda uart_found cpi 0 jz exit_register ; exit of no uart 0F54 CDDA12 call new_line 0F57 0F57 CDDA12 register_display2: call new_line 0F5A 0F5D 0F60 0F63 0F64 0F67 0F68 0F6B 21B01E CD5812 2A2CF0 7C CDCB12 7D CDCB12 CDE512 lxi h,af_text call put_str lhld user_AF mov a,h call out2x mov a,l call out2x call space 0F6E 0F71 0F74 0F77 0F78 0F7B 0F7C 21B41E CD5812 2A2EF0 7C CDCB12 7D CDCB12 lxi h,bc_text call put_str lhld user_BC mov a,h call out2x mov a,l call out2x 0F7F CDE512 call space 0F82 0F85 0F88 0F8B 0F8C 0F8F 0F90 0F93 21B81E CD5812 2A30F0 7C CDCB12 7D CDCB12 CDE512 lxi h,de_text call put_str lhld user_DE mov a,h call out2x mov a,l call out2x call space 0F96 0F99 0F9C 0F9F 0FA0 0FA3 0FA4 21BC1E CD5812 2A32F0 7C CDCB12 7D CDCB12 lxi h,hl_text call put_str lhld user_HL mov a,h call out2x mov a,l call out2x 0FA7 CDE512 call space 0FAA 0FAD 0FB0 0FB3 0FB4 0FB7 0FB8 lxi h,sp_text call put_str lhld user_SP mov a,h call out2x mov a,l call out2x 21C01E CD5812 2A34F0 7C CDCB12 7D CDCB12 0FBB CDE512 call space ; ; ; ; ; ; ; ; 0FBE 0FC1 0FC4 0FC7 21C91E CD5812 2A2AF0 7C lxi h,tos_text call put_str lhld tos mov a,h call out2x mov a,l call out2x call space lxi h,pc_text call put_str lhld user_PC mov a,h Page 38 of 64 B8085.LST 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 29/12/2559 12:32 0FC8 CDCB12 0FCB 7D 0FCC CDCB12 call out2x mov a,l call out2x 0FCF CDE512 call space 0FD2 0FD5 0FD8 0FDB 0FDC 0FDE 0FE1 0FE3 0FE6 lxi h,sign_text call put_str lhld user_AF mov a,l ani 80h jnz register_flag1 mvi a,"0" call cout jmp register_flag2 21E31E CD5812 2A2CF0 7D E680 C2E90F 3E30 CD2F12 C3EE0F 0FE9 0FE9 3E31 0FEB CD2F12 register_flag1: mvi a,"1" call cout 0FEE 0FEE CDE512 register_flag2: call space 0FF1 0FF4 0FF7 0FFA 0FFB 0FFD 1000 1002 1005 217210 CD5812 2A2CF0 7D E640 C20810 3E30 CD2F12 C30D10 lxi h,zero_text call put_str lhld user_AF mov a,l ani 40h jnz register_flag3 mvi a,"0" call cout jmp register_flag4 1008 1008 3E31 100A CD2F12 register_flag3: mvi a,"1" call cout 100D 100D CDE512 register_flag4: call space 1010 1013 1016 1019 101A 101C 101F 1021 1024 217510 CD5812 2A2CF0 7D E610 C22710 3E30 CD2F12 C32C10 lxi h,AC_text call put_str lhld user_AF mov a,l ani 10h jnz register_flag5 mvi a,"0" call cout jmp register_flag6 1027 1027 3E31 1029 CD2F12 register_flag5: mvi a,"1" call cout 102C 102C CDE512 register_flag6: call space 102F 1032 1035 1038 1039 103B 103E 1040 1043 217910 CD5812 2A2CF0 7D E604 C24610 3E30 CD2F12 C34B10 lxi h,P_text call put_str lhld user_AF mov a,l ani 4 jnz register_flag7 mvi a,"0" call cout jmp register_flag8 1046 1046 3E31 1048 CD2F12 register_flag7: mvi a,"1" call cout 104B 104B CDE512 register_flag8: call space 104E 217C10 1051 CD5812 lxi h,CY_text call put_str Page 39 of 64 B8085.LST 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 1054 1057 1058 105A 105D 105F 1062 29/12/2559 12:32 2A2CF0 7D E601 C26510 3E30 CD2F12 C36A10 lhld user_AF mov a,l ani 1 jnz register_flag9 mvi a,"0" call cout jmp register_flag10 1065 1065 3E31 1067 CD2F12 register_flag9: mvi a,"1" call cout 106A 106A CDE512 register_flag10: call space 106D CD3A0D 1070 C9 call send_prompt ret 1071 1071 C9 exit_register: ret 1072 1075 1079 107C zero_text AC_text P_text CY_text 5A3D00 41433D00 503D00 43593D00 dfb dfb dfb dfb "Z=",0 "AC=",0 "P=",0 "CY=",0 ;----------------- fill constant to memory --------------------------1080 fill_memory: 1080 1083 1085 1088 108B 3A22F0 FE66 C2C310 216F1E CD5812 lda command cpi "f" jnz exit_fill lxi h,fill_text1 call put_str 108E 1091 1092 1095 1096 CD8513 67 CD8513 6F E5 call get_hex1 mov h,a call get_hex1 mov l,a push h ; save begin address to stack 1097 21801E 109A CD5812 lxi h,fill_text2 call put_str 109D 10A0 10A1 10A4 10A5 call get_hex1 mov h,a call get_hex1 mov l,a push h ; save end address to stack CD8513 67 CD8513 6F E5 10A6 21901E 10A9 CD5812 10AC CD8513 lxi h,fill_text3 call put_str call get_hex1 10AF 47 mov b,a ; byte save to B 10B0 D1 pop d ; end address in DE 10B1 E1 pop h ; begin address in HL 10B2 fill_memory1: 10B2 78 10B3 77 10B4 23 mov a,b mov m,a inx h 10B5 7D 10B6 BB 10B7 C2B210 mov a,l cmp e jnz fill_memory1 10BA 7C 10BB BA 10BC C2B210 mov a,h cmp d jnz fill_memory1 Page 40 of 64 B8085.LST 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 29/12/2559 12:32 10BF CD3A0D 10C2 C9 10C3 call send_prompt ret exit_fill: 10C3 C9 ret ;---------------- monitor function list ------------------------------10C4 monitor_function: 10C4 3A22F0 10C7 FE6D 10C9 C2DC10 lda command cpi "m" jnz exit_monitor 10CC 10CF 10D2 10D5 10D8 10DB call new_line lxi h,monitor_text call put_str call new_line call send_prompt ret CDDA12 216C22 CD5812 CDDA12 CD3A0D C9 10DC 10DC C9 exit_monitor: ret ;----------------------- jump to user program -------------------- 10DD 3A22F0 10E0 FE6A 10E2 C22611 jump_to_user_pgm: lda command cpi "j" jnz exit_jump 10E5 21471E 10E8 CD5812 lxi h, jump_text1 call put_str 10EB 10EE 10EF 10F2 10F3 lhld user_PC mov a,h call out2x mov a,l call out2x 2A2AF0 7C CDCB12 7D CDCB12 10F6 21591E 10F9 CD5812 lxi h,jump_text2 call put_str 10FC CD9E13 call get_hex2 10FF F5 push psw 1100 3A23F0 1103 E601 1105 C21711 lda flag1 ani 1 jnz skip_load_PC 1108 F1 pop psw 1109 110A 110D 110E 1111 1114 67 CD9E13 6F 222AF0 CDDA12 C39B09 mov h,a call get_hex2 mov l,a shld user_PC call new_line jmp go 1117 1117 1118 111B 111D 1120 1123 F1 3A23F0 E6FE 3223F0 CDDA12 C39B09 skip_load_PC: 1126 C9 pop psw lda flag1 ani 0feh sta flag1 call new_line jmp go exit_jump: ret ;------------ edit memory ----------------------------------------Page 41 of 64 B8085.LST 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 29/12/2559 12:32 1127 3A22F0 112A FE65 112C C2A911 112F 1132 1135 1138 1139 113C 113D edit_location: lda command cpi "e" jnz exit_edit 21F61D CD5812 CD8513 67 CD8513 6F 223CF0 lxi h, edit_text call put_str call get_hex1 mov h,a call get_hex1 mov l,a shld pointer ;user_PC 1140 210E1E 1143 CD5812 lxi h, edit_text1 call put_str 1146 21391E 1149 CD5812 lxi h, edit_text2 call put_str 114C CDDA12 114F 1152 1153 1156 1157 115A 115D 1160 1162 1165 1166 1169 116B edit1: 2A3CF0 7C CDCB12 7D CDCB12 CDE512 CDE512 3E5B CD2F12 7E CDCB12 3E5D CD2F12 call new_line lhld pointer mov a,h call out2x mov a,l call out2x call space call space mvi a,"[" call cout mov a,m call out2x mvi a,"]" call cout ;user_PC 116E CDE512 call space 1171 CD9E13 call get_hex2 1174 F5 push psw 1175 3A23F0 1178 E601 117A C29A11 lda flag1 ani 1 jnz exit_edit1 ; Enter key? 117D 3A23F0 1180 E602 1182 C28A11 lda flag1 ani 2 jnz skip_edit1 ; SPACE key? 1185 F1 pop psw 1186 77 1187 C39311 mov m,a jmp skip_edit2 118A F1 skip_edit1: pop psw 118B 3A23F0 118E E6FD 1190 3223F0 lda flag1 ani 0fdh sta flag1 1193 1193 23 1194 223CF0 1197 C34C11 skip_edit2: 119A F1 exit_edit1: pop psw inx h shld pointer jmp edit1 119B 3A23F0 119E E6FE 11A0 3223F0 lda flag1 ani 0feh sta flag1 11A3 CDDA12 11A6 CD3A0D call new_line call send_prompt 11A9 C9 exit_edit: ;user_PC ret Page 42 of 64 B8085.LST 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 11AA 11AD 11AF 11B2 11B5 11B8 11BB 11BC 11BF 11C0 11C3 29/12/2559 12:32 3A22F0 FE6E C2C611 21E61D CD5812 CD8513 67 CD8513 6F 223CF0 CD3A0D 11C6 new_location: lda command cpi "n" jnz exit_new_location lxi h,new_text call put_str call get_hex1 mov h,a call get_hex1 mov l,a shld pointer ; user_PC call send_prompt exit_new_location: 11C6 C9 11C7 11C7 3A22F0 11CA FE71 11CC C2DB11 11CF 11D2 11D5 11D8 ret quick_home: lda command cpi "q" jnz exit_quick_home 210081 222AF0 223CF0 CD3A0D 11DB 11DB C9 lxi h,home_address shld user_PC shld pointer call send_prompt exit_quick_home: ret ; i/o address map 11DC 3A22F0 11DF FE69 11E1 C2ED11 io_address: lda command cpi "i" jnz exit_io 11E4 210321 11E7 CD5812 11EA CD3A0D 11ED C9 lxi h,io_text call put_str call send_prompt exit_io: ret ; help listing 11EE 3A22F0 11F1 FE3F 11F3 C20512 11F6 11F9 11FC 11FF 1202 216F12 CD6612 216E1F CD5812 CD3A0D 1205 C9 help: lda command cpi "?" jnz exit_help lxi h,prompt3 call alt_put_str lxi h,help_text1 call put_str call send_prompt exit_help: ret ; initialize 16C550 uart to 9600 8n1 with 2MHz clock ; 2MHz/13 = 153846Hz 1206 init_uart: 1206 3E83 1208 D343 mvi a,83h out uart_lcr 120A 120C 120E 1210 mvi out mvi out 3E0D D340 3E00 D341 1212 3E07 1214 D342 ; set DLAB bit to access divider a,13 uart_divisor_lsb a,0 uart_divisor_msb ; 2MHz/13 = 153846 Hz ; 153846Hz/16 = 9615Hz mvi a,7 out uart_fifo ; init fifo and clear all buffers Page 43 of 64 B8085.LST 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 29/12/2559 12:32 1216 3E03 1218 D343 121A 121B 121D 121F 1221 1224 1225 1228 AF D347 DB47 FE00 CA2912 AF 3225F0 C9 mvi a,03h out uart_lcr ; clar DLAB ; check uart line status, if the byte is FF then no uart ; ; xra a out uart_scr ; check if there is uart in uart_scr cpi 0 jz found xra a sta uart_found ret 1229 3E01 122B 3225F0 122E C9 found mvi a,1 sta uart_found ret 122F 47 cout: mov b,a 1230 DB45 1232 E620 1234 CA3012 cout1: in uart_line_status ani 20h jz cout1 1237 78 1238 D340 123A C9 ; save a mov a,b out uart_buffer ret ; transmitter ready? ; restore a 123B 123D 123F 1242 1244 DB45 E601 CA3B12 DB40 C9 cin: 1245 1247 1249 124C 124E 1251 DB45 E601 CA5212 DB40 3222F0 C9 get_command: in uart_line_status ani 1 jz no_data in uart_buffer sta command ; command = ASCII code ret 1252 3EFF 1254 3222F0 1257 C9 in uart_line_status ani 1 jz cin in uart_buffer ret no_data: mvi a,0ffh sta command ret ; data available? ; command == -1 ; print string terminated by 0 ; input: HL 1258 1259 125B 125E 7E FE00 C25F12 C9 put_str: mov a,m ; get A from [HL] cpi 0 jnz put_str1 ret 125F CD2F12 1262 23 1263 F25812 put_str1: call cout inx h jp put_str 1266 1267 1269 126B 126E 7E EEAA FE00 C2A512 C9 alt_put_str: xri cpi jnz ret 126F 127F 128F 129F A7A0A0E7FEprompt3: E3E9F8E5FA EBE3E4E3E4 E6FA83A7A0 12A5 CD2F12 12A8 23 12A9 F26612 mov a,m 0aah 0 put_str2 dfb dfb dfb dfb ; get A from [HL] 0A7h,0A0h,0A0h,0E7h,0FEh,0E1h,087h,092h,09Fh,08Ah,092h,09 0E3h,0E9h,0F8h,0E5h,0FAh,0F8h,0E5h,0E9h,0EFh,0F9h,0F9h,0E 0EBh,0E3h,0E4h,0E3h,0E4h,0EDh,08Ah,0E1h,0E3h,0FEh,08Ah,082 0E6h,0FAh,083h,0A7h,0a0h,0aah put_str2: call cout inx h jp alt_put_str Page 44 of 64 B8085.LST 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 29/12/2559 12:32 12AC 21581D 12AF CD5812 12B2 C9 send_prompt1: lxi h,prompt1 call put_str ret 12B3 216F12 12B6 CD6612 12B9 C9 send_prompt3: lxi h,prompt3 call alt_put_str ret 12BA 12BB 12BD 12BF 12C1 12C4 out1x: push psw ani 0fh adi "0" cpi 3Ah jc out1x1 adi 7 12C6 CD2F12 12C9 F1 12CA C9 out1x1: call cout pop psw 12CB 12CB 12CC 12CD 12CE 12CF 12D2 12D3 12D4 12D5 12D6 12D9 out2x: F5 E60F C630 FE3A DAC612 C607 ret 0F 0F 0F 0F CDBA12 07 07 07 07 CDBA12 C9 rrc rrc rrc rrc call out1x rlc rlc rlc rlc call out1x ret ; new_line 12DA 12DC 12DF 12E1 12E4 3E0D CD2F12 3E0A CD2F12 C9 new_line: mvi a,cr call cout mvi a,lf call cout ret 12E5 3E20 12E7 CD2F12 12EA C9 space: mvi a," " call cout ret 12EB 3E09 12ED CD2F12 12F0 C9 send_tab: mvi a,9 call cout ret 12F1 3A22F0 12F4 FE68 12F6 C25013 hex_dump: lda command cpi "h" jnz exit_hex_dump 12F9 CDDA12 call new_line 12FC 0E08 mvi c,8 12FE 12FF 1302 1305 1306 1309 130A 130D C5 CDDA12 2A3CF0 7C CDCB12 7D CDCB12 CDE512 hex_dump2: 1310 0E10 1312 1315 1316 1319 CDE512 7E CDCB12 23 ; 8 lines push b call new_line lhld pointer mov a,h call out2x mov a,l call out2x call space ;user_PC mvi c,16 hex_dump1: call space mov a,m call out2x inx h Page 45 of 64 B8085.LST 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488 3489 3490 3491 3492 3493 3494 3495 3496 29/12/2559 12:32 131A 0D 131B C21213 dcr c jnz hex_dump1 131E CDE512 1321 CDE512 1324 CDE512 call space call space call space ; print ASCII representation 20H-7FH ; outside such range, print . instead 1327 11F0FF 132A 19 lxi d,0FFF0h dad d 132B 0E10 mvi c,16 132D 7E hex_dump5: mov a,m 132E 1330 1333 1335 1338 133A cpi 20h jc hex_dump3 cpi 80h jc hex_dump4 hex_dump3: mvi a,"." hex_dump4: call cout FE20 DA3813 FE80 DA3A13 3E2E CD2F12 ; load DE with -16 ; ADD HL,DE ; <20H? 133D 23 133E 0D 133F C22D13 inx h dcr c jnz hex_dump5 1342 223CF0 shld pointer 1345 C1 1346 0D 1347 C2FE12 pop b dcr c jnz hex_dump2 134A CDDA12 134D CD3A0D call new_line call send_prompt ;user_PC 1350 C9 exit_hex_dump: 1351 210081 1354 0E64 dump_memory: lxi h,8100h mvi c,100 ; 100 bytes display 1356 1359 135A 135D 1360 1361 1362 1365 CDDA12 7E CDCB12 CDE512 23 0D C25913 C9 dump1: ; ; ; ; ; 1366 1368 136A 136D 136F 1371 D630 FE0A DA7113 E6DF D607 1371 C9 ret call new_line mov a,m call out2x call space inx h dcr c jnz dump1 ret convert ASCII letter to one nibble 0-F 0-9 -> al-30 A-F -> al-7 entry: A exit: A to_hex: sui "0" cpi 10 jc zero_nine ani 11011111b sui 7 ; convert to A-F zero_nine: ret ; read two ASCII bytes and convert them to one bye 8-bit data ; exit: A ; used: A, E 1372 1375 1378 1379 137A CD3B12 CD6613 0F 0F 0F get_hex: call cin call to_hex rrc rrc rrc Page 46 of 64 B8085.LST 3497 3498 3499 3500 3501 3502 3503 3504 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568 3569 3570 3571 3572 137B 137C 137D 1380 1383 1384 29/12/2559 12:32 0F 5F CD3B12 CD6613 83 C9 rrc mov e,a call cin call to_hex add e ret ; read two ASCII bytes echo to screen and convert them to one bye 8-bit data ; exit: A 1385 1388 138B 138E 138F 1390 1391 1392 1393 1396 1399 139C 139D CD3B12 CD2F12 CD6613 0F 0F 0F 0F 5F CD3B12 CD2F12 CD6613 83 C9 get_hex1: call cin call cout call to_hex rrc rrc rrc rrc mov e,a call cin call cout call to_hex add e ret ; read two ASCII bytes echo to screen and convert them to one bye 8-bit data ; exit: A 139E 3A23F0 13A1 E6FC 13A3 3223F0 get_hex2: lda flag1 ani 0fch sta flag1 ; clear flag1.1 and flag1.0 13A6 CD3B12 13A9 FE0D 13AB CAF113 call cin cpi cr jz exit_get_hex2 13AE FE20 13B0 CAFA13 cpi " " jz exit_get_hex3 13B3 FE30 13B5 DA9E13 cpi 30h jc get_hex2 13B8 FE40 13BA DAC713 cpi 40h jc ascii_0_9 13BD FE61 13BF DA9E13 cpi 97 jc get_hex2 ; < 97? 13C2 FE67 13C4 D29E13 cpi 103 jnc get_hex2 ; >= 103? 13C7 13C7 13CA 13CD 13CE 13CF 13D0 13D1 ; hex must be 0-9 and A-F ascii_0_9: CD2F12 CD6613 0F 0F 0F 0F 5F 13D2 call cout call to_hex rrc rrc rrc rrc mov e,a get_2nd_hex: 13D2 CD3B12 call cin 13D5 FE30 13D7 DAD213 cpi 30h ; hex must be 0-9 and A-F jc get_2nd_hex 13DA FE40 13DC DAE913 cpi 40h jc ok_0_9 13DF FE61 13E1 DAD213 cpi 97 ; < 97? jc get_2nd_hex 13E4 FE67 13E6 D2D213 cpi 103 ; >= 103? jnc get_2nd_hex Page 47 of 64 B8085.LST 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 13E9 13E9 13EC 13EF 13F0 29/12/2559 12:32 ok_0_9: CD2F12 CD6613 83 C9 13F1 13F1 13F4 13F6 13F9 ret exit_get_hex2: 3A23F0 F601 3223F0 C9 13FA 13FA 13FD 13FF 1402 call cout call to_hex add e lda flag1 ori 1 sta flag1 ret ; Q key has been pressed exit_get_hex3: 3A23F0 F602 3223F0 C9 lda flag1 ori 2 sta flag1 ; SPACE key has been pressed ret ; add check sum ; get record, write to SRAM and jump to 8000h ; entry: A= byte received, B= byte check sum add_bcs: macro ; add accumulator with byte check sum stored in B push psw add b mov b,a pop psw endm 001B = esc equ 1bh 1403 CD3B12 1406 FE1B 1408 CA5A14 get_record: call cin cpi 27 jz esc_quit 140B FE3A 140D C20314 cpi ":" jnz get_record ; wait until begin of record found 1410 0600 mvi b,0 ; byte check sum 1412 CD7213 1415 4F 1416 1416 1417 1418 1419 141A F5 80 47 F1 141A CD7213 141D 67 141E 141E 141F 1420 1421 1422 F5 80 47 F1 call get_hex ; get number of byte mov c,a ; put to c add_bcs push psw add b mov b,a pop psw endm call get_hex ; get destination address, put to bx register mov h,a ; save high byte add_bcs push psw add b mov b,a pop psw endm 1422 CD7213 1425 6F call get_hex mov l,a 1426 1426 1427 1428 1429 142A add_bcs push psw add b mov b,a pop psw endm F5 80 47 F1 142A CD7213 call get_hex Page 48 of 64 ; and low byte B8085.LST 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 142D 142D 142E 142F 1430 1431 29/12/2559 12:32 add_bcs push psw add b mov b,a pop psw endm F5 80 47 F1 1431 FE01 1433 C25B14 1436 CD3B12 1439 FE0D 143B C23614 cpi jnz wait_cr: 1 data_record call cin cpi cr jnz wait_cr ; until end of record sending! with cr detection 143E 1440 1442 1443 3EFF D312 AF D300 mvi out xra out 1445 1448 144B 144E 1451 1454 1457 CDB914 CDE512 3A20F0 CDC901 21991E CD5812 CDDA12 call print_bcd1 call space lda bcs call pint8u lxi h,error_text call put_str call new_line a, 0ffh ; turn speaker off system_port_c a 0 ; turn off GPIO 145A C9 esc_quit: 145B CD7213 145E 77 data_record: call get_hex mov m,a 145F 145F 1460 1461 1462 1463 ; end of record type is 01 ? ; jump if not 01 ret ; get data byte ; save to SRAM at [HL] add_bcs push psw add b mov b,a pop psw endm F5 80 47 F1 1463 CD8914 call inc_bcd1 ; ; ori 7fh out system_port_c ; make buzzer sound 1466 23 inx h ; next location 1467 0D 1468 C25B14 dcr c jnz data_record ; until c = 0 146B 146C 146D 146E mov a,b cma mov b,a inr b ; compute two's complement 146F CD7213 call get_hex ; get check sum 1472 B8 1473 CA7D14 cmp b jz skip_error 1476 3A20F0 1479 3C 147A 3220F0 lda bcs inr a sta bcs 147D 147D 1480 1481 1484 78 2F 47 04 skip_error: 3A3AF0 07 323AF0 D300 1486 C30314 lda temp rlc sta temp out 0 jmp get_record ; then shift into temp8 ; send to GPIO ; back to next record ;---------------- increment BCD counter1 ------------------------Page 49 of 64 B8085.LST 3725 3726 3727 3728 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792 3793 3794 3795 3796 3797 3798 3799 3800 29/12/2559 12:32 1489 E5 inc_bcd1: push h 148A 2141F0 148D AF lxi h,bcd_counter1 xra a 148E 148F 1491 1492 1493 7E C601 27 77 23 mov adi daa mov inx a,m 1 1494 1495 1497 1498 1499 149A 149B 149D 149E 7E CE00 27 77 23 7E CE00 27 77 mov aci daa mov inx mov aci daa mov a,m 0 m,a h m,a h a,m 0 m,a 149F E1 pop h 14A0 C9 ret 14A1 E5 inc_bcd2: push h 14A2 2144F0 14A5 AF lxi h,bcd_counter2 xra a 14A6 14A7 14A9 14AA 14AB 7E C601 27 77 23 mov adi daa mov inx a,m 1 14AC 14AD 14AF 14B0 14B1 14B2 14B3 14B5 14B6 7E CE00 27 77 23 7E CE00 27 77 mov aci daa mov inx mov aci daa mov a,m 0 m,a h m,a h a,m 0 m,a 14B7 E1 pop h 14B8 C9 ret 14B9 14B9 14BC 14BD 14C0 14C3 14C4 14C7 14CA 14CB 14CE 14D1 14D4 2143F0 7E CDCB12 2142F0 7E CDCB12 2141F0 7E CDCB12 21E61E CD5812 C9 print_bcd1: 14D5 14D8 14DB 14DE 14E1 210000 2241F0 2242F0 2243F0 C9 clear_bcd1: 14E2 14E2 2146F0 14E5 7E 14E6 CDCB12 print_bcd2: lxi h,bcd_counter1+2 mov a,m call out2x lxi h,bcd_counter1+1 mov a,m call out2x lxi h,bcd_counter1 mov a,m call out2x lxi h,byte_text call put_str ret lxi h,0 shld bcd_counter1 shld bcd_counter1+1 shld bcd_counter1+2 ret lxi h,bcd_counter2+2 mov a,m call out2x Page 50 of 64 B8085.LST 3801 3802 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872 3873 3874 3875 3876 29/12/2559 12:32 14E9 14EC 14ED 14F0 14F3 14F4 14F7 14FA 14FD 2145F0 7E CDCB12 2144F0 7E CDCB12 21E61E CD5812 C9 14FE 1501 1504 1507 150A 210000 2244F0 2245F0 2246F0 C9 lxi h,bcd_counter2+1 mov a,m call out2x lxi h,bcd_counter2 mov a,m call out2x lxi h,byte_text call put_str ret clear_bcd2: lxi h,0 shld bcd_counter2 shld bcd_counter2+1 shld bcd_counter2+2 ret ; constants 150B 150B 150D 150F 1511 1513 1515 1517 1519 151B 151D 151F 1521 1523 1525 1527 1529 152B 152D 152F 1531 1533 1535 1537 1539 153B 153D 153F 1541 1543 1545 1547 1549 154B 154D 154F 1551 1553 1555 1557 1559 155B 155D 155F 1561 1563 1565 1567 1569 156B 156D 156F 1571 1573 1575 1577 1579 INS_TABLE: 0B17 1017 1717 1E17 2417 2A17 3017 3717 3C17 4117 4717 4E17 5417 5A17 6017 6717 6C17 7117 7817 7F17 8517 8B17 9117 9817 9D17 A217 A817 AF17 B517 BB17 C117 C817 CD17 D217 D917 DF17 E517 EB17 F117 F817 FD17 0218 0818 0E18 1418 1A18 2018 2718 2C18 3118 3918 3E18 4518 4B18 5118 5818 DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL C0 ; C1 ; C2 ; C3 ; C4 ; C5 ; C6 ; C7 ; C8 ; C9 ; CA ; CB ; CC ; CD ; CE ; CF ; C10 ; C11 ; C12 ; C13 ; C14 ; C15 ; C16 ; C17 ; C18 ; C19 ; C1A ; C1B ; C1C ; C1D ; C1E ; C1F ; C20 ; C21 ; C22 ; C23 ; C24 ; C25 ; C26 ; C27 ; C28 ; C29 ; C2A ; C2B ; C2C ; C2D ; C2E ; C2F ; C30 ; C31 ; C32 ; C33 ; C34 ; C35 ; C36 ; C37 ; "NOP",TAB,RS "LXI",TAB,"B,",RS "STAX",TAB,"B",RS "INX",TAB,"B",RS "INR",TAB,"B",RS "DCR",TAB,"B",RS "MVI",TAB,"B,",RS "RLC",TAB,RS "DFB",TAB,RS "DAD",TAB,"B",RS "LDAX",TAB,"B",RS "DCX",TAB,"B",RS "INR",TAB,"C",RS "DCR",TAB,"C",RS "MVI",TAB,"C,",RS "RRC",TAB,RS "DFB",TAB,RS "LXI",TAB,"D,",RS "STAX",TAB,"D",RS "INX",TAB,"D",RS "INR",TAB,"D",RS "DCR",TAB,"D",RS "MVI",TAB,"D,",RS "RAL",TAB,RS "DFB",TAB,RS "DAD",TAB,"D",RS "LDAX",TAB,"D",RS "DCX",TAB,"D",RS "INR",TAB,"E",RS "DCR",TAB,"E",RS "MVI",TAB,"E,",RS "RAR",TAB,RS "RIM",TAB,RS "LXI",TAB,"H,",RS "SHLD",TAB,RS "INX",TAB,"H",RS "INR",TAB,"H",RS "DCR",TAB,"H",RS "MVI",TAB,"H,",RS "DAA",TAB,RS "DFB",TAB,RS "DAD",TAB,"H",RS "LHLD",TAB,RS "DCX",TAB,"H",RS "INR",TAB,"L",RS "DCR",TAB,"L",RS "MVI",TAB,"L,",RS "CMA",TAB,RS "SIM",TAB,RS "LXI",TAB,"SP,",RS "STA",TAB,RS "INX",TAB,"SP",RS "INR",TAB,"M",RS "DCR",TAB,"M",RS "MVI",TAB,"M,",RS "STC",TAB,RS Page 51 of 64 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 16 17 ; 18 ; 19 ; 1A ; 1B ; 1C ; 1D ; 1E ; 1F ; 20 ; 21 ; 22 ; 23 ; 24 ; 25 ; 26 ; 27 ; 28 ; 29 ; 2A ; 2B ; 2C ; 2D ; 2E ; 2F ; 30 ; 31 ; 32 ; 33 ; 34 ; 35 ; 36 ; 37 B8085.LST 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952 157B 157D 157F 1581 1583 1585 1587 1589 158B 158D 158F 1591 1593 1595 1597 1599 159B 159D 159F 15A1 15A3 15A5 15A7 15A9 15AB 15AD 15AF 15B1 15B3 15B5 15B7 15B9 15BB 15BD 15BF 15C1 15C3 15C5 15C7 15C9 15CB 15CD 15CF 15D1 15D3 15D5 15D7 15D9 15DB 15DD 15DF 15E1 15E3 15E5 15E7 15E9 15EB 15ED 15EF 15F1 15F3 15F5 15F7 15F9 15FB 15FD 15FF 1601 1603 1605 1607 1609 160B 160D 160F 1611 29/12/2559 12:32 5D18 6218 6918 6E18 7518 7B18 8118 8818 8D18 9518 9D18 A518 AD18 B518 BD18 C518 CD18 D518 DD18 E518 ED18 F518 FD18 0519 0D19 1519 1D19 2519 2D19 3519 3D19 4519 4D19 5519 5D19 6519 6D19 7519 7D19 8519 8D19 9519 9D19 A519 AD19 B519 BD19 C519 CD19 D519 DD19 E519 ED19 F519 FD19 051A 0D1A 151A 1D1A 251A 2D1A 351A 3D1A 421A 4A1A 521A 5A1A 621A 6A1A 721A 7A1A 821A 8A1A 901A 961A 9C1A DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL C38 C39 C3A C3B C3C C3D C3E C3F C40 C41 C42 C43 C44 C45 C46 C47 C48 C49 C4A C4B C4C C4D C4E C4F C50 C51 C52 C53 C54 C55 C56 C57 C58 C59 C5A C5B C5C C5D C5E C5F C60 C61 C62 C63 C64 C65 C66 C67 C68 C69 C6A C6B C6C C6D C6E C6F C70 C71 C72 C73 C74 C75 C76 C77 C78 C79 C7A C7B C7C C7D C7E C7F C80 C81 C82 C83 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; "DFB",TAB,RS "DAD",TAB,"SP",RS "LDA",TAB,RS "DCX",TAB,"SP",RS "INR",TAB,"A",RS "DCR",TAB,"A",RS "MVI",TAB,"A,",RS "CMC",TAB,RS "MOV",TAB,"B,B",RS "MOV",TAB,"B,C",RS "MOV",TAB,"B,D",RS "MOV",TAB,"B,E",RS "MOV",TAB,"B,H",RS "MOV",TAB,"B,L",RS "MOV",TAB,"B,M",RS "MOV",TAB,"B,A",RS "MOV",TAB,"C,B",RS "MOV",TAB,"C,C",RS "MOV",TAB,"C,D",RS "MOV",TAB,"C,E",RS "MOV",TAB,"C,H",RS "MOV",TAB,"C,L",RS "MOV",TAB,"C,M",RS "MOV",TAB,"C,A",RS "MOV",TAB,"D,B",RS "MOV",TAB,"D,C",RS "MOV",TAB,"D,D",RS "MOV",TAB,"D,E",RS "MOV",TAB,"D,H",RS "MOV",TAB,"D,L",RS "MOV",TAB,"D,M",RS "MOV",TAB,"D,A",RS "MOV",TAB,"E,B",RS "MOV",TAB,"E,C",RS "MOV",TAB,"E,D",RS "MOV",TAB,"E,E",RS "MOV",TAB,"E,H",RS "MOV",TAB,"E,L",RS "MOV",TAB,"E,M",RS "MOV",TAB,"E,A",RS "MOV",TAB,"H,B",RS "MOV",TAB,"H,C",RS "MOV",TAB,"H,D",RS "MOV",TAB,"H,E",RS "MOV",TAB,"H,H",RS "MOV",TAB,"H,L",RS "MOV",TAB,"H,M",RS "MOV",TAB,"H,A",RS "MOV",TAB,"L,B",RS "MOV",TAB,"L,C",RS "MOV",TAB,"L,D",RS "MOV",TAB,"L,E",RS "MOV",TAB,"L,H",RS "MOV",TAB,"L,L",RS "MOV",TAB,"L,M",RS "MOV",TAB,"L,A",RS "MOV",TAB,"M,B",RS "MOV",TAB,"M,C",RS "MOV",TAB,"M,D",RS "MOV",TAB,"M,E",RS "MOV",TAB,"M,H",RS "MOV",TAB,"M,L",RS "HLT",TAB,RS "MOV",TAB,"M,A",RS "MOV",TAB,"A,B",RS "MOV",TAB,"A,C",RS "MOV",TAB,"A,D",RS "MOV",TAB,"A,E",RS "MOV",TAB,"A,H",RS "MOV",TAB,"A,L",RS "MOV",TAB,"A,M",RS "MOV",TAB,"A,A",RS "ADD",TAB,"B",RS "ADD",TAB,"C",RS "ADD",TAB,"D",RS "ADD",TAB,"E",RS Page 52 of 64 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; 38 39 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 B8085.LST 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 1613 1615 1617 1619 161B 161D 161F 1621 1623 1625 1627 1629 162B 162D 162F 1631 1633 1635 1637 1639 163B 163D 163F 1641 1643 1645 1647 1649 164B 164D 164F 1651 1653 1655 1657 1659 165B 165D 165F 1661 1663 1665 1667 1669 166B 166D 166F 1671 1673 1675 1677 1679 167B 167D 167F 1681 1683 1685 1687 1689 168B 168D 168F 1691 1693 1695 1697 1699 169B 169D 169F 16A1 16A3 16A5 16A7 16A9 29/12/2559 12:32 A21A A81A AE1A B41A BA1A C01A C61A CC1A D21A D81A DE1A E41A EA1A F01A F61A FC1A 021B 081B 0E1B 141B 1A1B 201B 261B 2C1B 321B 381B 3E1B 441B 4A1B 501B 561B 5C1B 621B 681B 6E1B 741B 7A1B 801B 861B 8C1B 921B 981B 9E1B A41B AA1B B01B B61B BC1B C21B C81B CE1B D41B DA1B E01B E61B EC1B F21B F81B FE1B 041C 0A1C 0F1C 151C 1A1C 1F1C 241C 2B1C 301C 361C 3A1C 3F1C 431C 481C 4C1C 521C 571C DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL C84 C85 C86 C87 C88 C89 C8A C8B C8C C8D C8E C8F C90 C91 C92 C93 C94 C95 C96 C97 C98 C99 C9A C9B C9C C9D C9E C9F CA0 CA1 CA2 CA3 CA4 CA5 CA6 CA7 CA8 CA9 CAA CAB CAC CAD CAE CAF CB0 CB1 CB2 CB3 CB4 CB5 CB6 CB7 CB8 CB9 CBA CBB CBC CBD CBE CBF CC0 CC1 CC2 CC3 CC4 CC5 CC6 CC7 CC8 CC9 CCA CCB CCC CCD CCE CCF ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; "ADD",TAB,"H",RS "ADD",TAB,"L",RS "ADD",TAB,"M",RS "ADD",TAB,"A",RS "ADC",TAB,"B",RS "ADC",TAB,"C",RS "ADC",TAB,"D",RS "ADC",TAB,"E",RS "ADC",TAB,"H",RS "ADC",TAB,"L",RS "ADC",TAB,"M",RS "ADC",TAB,"A",RS "SUB",TAB,"B",RS "SUB",TAB,"C",RS "SUB",TAB,"D",RS "SUB",TAB,"E",RS "SUB",TAB,"H",RS "SUB",TAB,"L",RS "SUB",TAB,"M",RS "SUB",TAB,"A",RS "SBB",TAB,"B",RS "SBB",TAB,"C",RS "SBB",TAB,"D",RS "SBB",TAB,"E",RS "SBB",TAB,"H",RS "SBB",TAB,"L",RS "SBB",TAB,"M",RS "SBB",TAB,"A",RS "ANA",TAB,"B",RS "ANA",TAB,"C",RS "ANA",TAB,"D",RS "ANA",TAB,"E",RS "ANA",TAB,"H",RS "ANA",TAB,"L",RS "ANA",TAB,"M",RS "ANA",TAB,"A",RS "XRA",TAB,"B",RS "XRA",TAB,"C",RS "XRA",TAB,"D",RS "XRA",TAB,"E",RS "XRA",TAB,"H",RS "XRA",TAB,"L",RS "XRA",TAB,"M",RS "XRA",TAB,"A",RS "ORA",TAB,"B",RS "ORA",TAB,"C",RS "ORA",TAB,"D",RS "ORA",TAB,"E",RS "ORA",TAB,"H",RS "ORA",TAB,"L",RS "ORA",TAB,"M",RS "ORA",TAB,"A",RS "CMP",TAB,"B",RS "CMP",TAB,"C",RS "CMP",TAB,"D",RS "CMP",TAB,"E",RS "CMP",TAB,"H",RS "CMP",TAB,"L",RS "CMP",TAB,"M",RS "CMP",TAB,"A",RS "RNZ",TAB,RS "POP",TAB,"B",RS "JNZ",TAB,RS "JMP",TAB,RS "CNZ",TAB,RS "PUSH",TAB,"B",RS "ADI",TAB,RS "RST",TAB,"0",RS "RZ",TAB,RS "RET",TAB,RS "JZ",TAB,RS "DFB",TAB,RS "CZ",TAB,RS "CALL",TAB,RS "ACI",TAB,RS "RST",TAB,"1",RS Page 53 of 64 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA ; CB ; CC ; CD ; CE ; CF B8085.LST 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 16AB 16AD 16AF 16B1 16B3 16B5 16B7 16B9 16BB 16BD 16BF 16C1 16C3 16C5 16C7 16C9 16CB 16CD 16CF 16D1 16D3 16D5 16D7 16D9 16DB 16DD 16DF 16E1 16E3 16E5 16E7 16E9 16EB 16ED 16EF 16F1 16F3 16F5 16F7 16F9 16FB 16FD 16FF 1701 1703 1705 1707 1709 29/12/2559 12:32 5D1C 621C 681C 6D1C 721C 771C 7E1C 831C 891C 8D1C 921C 961C 9A1C 9E1C A31C A81C AE1C B31C B91C BE1C C41C C91C D01C D51C DB1C E01C E61C EB1C F11C F61C FB1C 001D 061D 0A1D 121D 161D 1A1D 1E1D 271D 2C1D 321D 361D 3C1D 401D 441D 481D 4D1D 521D DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL DWL CD0 CD1 CD2 CD3 CD4 CD5 CD6 CD7 CD8 CD9 CDA CDB CDC CDD CDE CDF CE0 CE1 CE2 CE3 CE4 CE5 CE6 CE7 CE8 CE9 CEA CEB CEC CED CEE CEF CF0 CF1 CF2 CF3 CF4 CF5 CF6 CF7 CF8 CF9 CFA CFB CFC CFD CFE CFF ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; "RNC",TAB,RS "POP",TAB,"D",RS "JNC",TAB,RS "OUT",TAB,RS "CNC",TAB,RS "PUSH",TAB,"D",RS "SUI",TAB,RS "RST",TAB,"2",RS "RC",TAB,RS "DFB",TAB,RS "JC",TAB,RS "IN",TAB,RS "CC",TAB,RS "DFB",TAB,RS "SBI",TAB,RS "RST",TAB,"3",RS "RPO",TAB,RS "POP",TAB,"H",RS "JPO",TAB,RS "XTHL",TAB,RS "CPO",TAB,RS "PUSH",TAB,"H",RS "ANI",TAB,RS "RST",TAB,"4",RS "RPE",TAB,RS "PCHL",TAB,RS "JPE",TAB,RS "XCHG",TAB,RS "CPE",TAB,RS "DFB",TAB,RS "XRI",TAB,RS "RST",TAB,"5",RS "RP",TAB,RS "POP",TAB,"PSW",RS "JP",TAB,RS "DI",TAB,RS "CP",TAB,RS "PUSH",TAB,"PSW",RS "ORI",TAB,RS "RST",TAB,"6",RS "RM",TAB,RS "SPHL",TAB,RS "JM",TAB,RS "EI",TAB,RS "CM",TAB,RS "DFB",TAB,RS "CPI",TAB,RS "RST",TAB,"7",RS, ; ; ; ; ; ; ; ; ; D0 D1 D2 D3 D4 D5 D6 D7 D8 ; D9 ; DA ; DFB ; DC ; DD ; DE ; DF ; E0 ; E1 ; E2 ; E3 ; E4 ; E5 ; E6 ; E7 ; E8 ; E9 ; EA ; EB ; EC ; ED ; EE ; EF ; F0 ; F1 ; F2 ; F3 ; F4 ; F5 ; F6 ; F7 ; F8 ; F9 ; FA ; FB ; FC ; FD ; FE ; FF ; --------- mnemonic table --------------------------------------170B 170B 1710 1717 171E 1724 172A 1730 1737 173C 1741 1747 174E 1754 175A 1760 1767 176C 1771 1778 177F 1785 178B 1791 MNEM 4E4F500900C0 4C58490942C1 5354415809C2 494E580942C3 494E520942C4 4443520942C5 4D56490942C6 524C430900C7 4446420900C8 4441440942C9 4C44415809CA 4443580942CB 494E520943CC 4443520943CD 4D56490943CE 5252430900CF 4446420900C10 4C58490944C11 5354415809C12 494E580944C13 494E520944C14 4443520944C15 4D56490944C16 DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB "NOP",TAB,RS "LXI",TAB,"B,",RS "STAX",TAB,"B",RS "INX",TAB,"B",RS "INR",TAB,"B",RS "DCR",TAB,"B",RS "MVI",TAB,"B,",RS "RLC",TAB,RS "DFB",TAB,RS "DAD",TAB,"B",RS "LDAX",TAB,"B",RS "DCX",TAB,"B",RS "INR",TAB,"C",RS "DCR",TAB,"C",RS "MVI",TAB,"C,",RS "RRC",TAB,RS "DFB",TAB,RS "LXI",TAB,"D,",RS "STAX",TAB,"D",RS "INX",TAB,"D",RS "INR",TAB,"D",RS "DCR",TAB,"D",RS "MVI",TAB,"D,",RS Page 54 of 64 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ; 10 ; 11 ; 12 ; 13 ; 14 ; 15 ; 16 B8085.LST 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 1798 179D 17A2 17A8 17AF 17B5 17BB 17C1 17C8 17CD 17D2 17D9 17DF 17E5 17EB 17F1 17F8 17FD 1802 1808 180E 1814 181A 1820 1827 182C 1831 1839 183E 1845 184B 1851 1858 185D 1862 1869 186E 1875 187B 1881 1888 188D 1895 189D 18A5 18AD 18B5 18BD 18C5 18CD 18D5 18DD 18E5 18ED 18F5 18FD 1905 190D 1915 191D 1925 192D 1935 193D 1945 194D 1955 195D 1965 196D 1975 197D 1985 198D 1995 199D 29/12/2559 12:32 52414C0900C17 4446420900C18 4441440944C19 4C44415809C1A 4443580944C1B 494E520945C1C 4443520945C1D 4D56490945C1E 5241520900C1F 52494D0900C20 4C58490948C21 53484C4409C22 494E580948C23 494E520948C24 4443520948C25 4D56490948C26 4441410900C27 4446420900C28 4441440948C29 4C484C4409C2A 4443580948C2B 494E52094CC2C 444352094CC2D 4D5649094CC2E 434D410900C2F 53494D0900C30 4C58490953C31 5354410900C32 494E580953C33 494E52094DC34 444352094DC35 4D5649094DC36 5354430900C37 4446420900C38 4441440953C39 4C44410900C3A 4443580953C3B 494E520941C3C 4443520941C3D 4D56490941C3E 434D430900C3F 4D4F560942C40 4D4F560942C41 4D4F560942C42 4D4F560942C43 4D4F560942C44 4D4F560942C45 4D4F560942C46 4D4F560942C47 4D4F560943C48 4D4F560943C49 4D4F560943C4A 4D4F560943C4B 4D4F560943C4C 4D4F560943C4D 4D4F560943C4E 4D4F560943C4F 4D4F560944C50 4D4F560944C51 4D4F560944C52 4D4F560944C53 4D4F560944C54 4D4F560944C55 4D4F560944C56 4D4F560944C57 4D4F560945C58 4D4F560945C59 4D4F560945C5A 4D4F560945C5B 4D4F560945C5C 4D4F560945C5D 4D4F560945C5E 4D4F560945C5F 4D4F560948C60 4D4F560948C61 4D4F560948C62 DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB "RAL",TAB,RS "DFB",TAB,RS "DAD",TAB,"D",RS "LDAX",TAB,"D",RS "DCX",TAB,"D",RS "INR",TAB,"E",RS "DCR",TAB,"E",RS "MVI",TAB,"E,",RS "RAR",TAB,RS "RIM",TAB,RS "LXI",TAB,"H,",RS "SHLD",TAB,RS "INX",TAB,"H",RS "INR",TAB,"H",RS "DCR",TAB,"H",RS "MVI",TAB,"H,",RS "DAA",TAB,RS "DFB",TAB,RS "DAD",TAB,"H",RS "LHLD",TAB,RS "DCX",TAB,"H",RS "INR",TAB,"L",RS "DCR",TAB,"L",RS "MVI",TAB,"L,",RS "CMA",TAB,RS "SIM",TAB,RS "LXI",TAB,"SP,",RS "STA",TAB,RS "INX",TAB,"SP",RS "INR",TAB,"M",RS "DCR",TAB,"M",RS "MVI",TAB,"M,",RS "STC",TAB,RS "DFB",TAB,RS "DAD",TAB,"SP",RS "LDA",TAB,RS "DCX",TAB,"SP",RS "INR",TAB,"A",RS "DCR",TAB,"A",RS "MVI",TAB,"A,",RS "CMC",TAB,RS "MOV",TAB,"B,B",RS "MOV",TAB,"B,C",RS "MOV",TAB,"B,D",RS "MOV",TAB,"B,E",RS "MOV",TAB,"B,H",RS "MOV",TAB,"B,L",RS "MOV",TAB,"B,M",RS "MOV",TAB,"B,A",RS "MOV",TAB,"C,B",RS "MOV",TAB,"C,C",RS "MOV",TAB,"C,D",RS "MOV",TAB,"C,E",RS "MOV",TAB,"C,H",RS "MOV",TAB,"C,L",RS "MOV",TAB,"C,M",RS "MOV",TAB,"C,A",RS "MOV",TAB,"D,B",RS "MOV",TAB,"D,C",RS "MOV",TAB,"D,D",RS "MOV",TAB,"D,E",RS "MOV",TAB,"D,H",RS "MOV",TAB,"D,L",RS "MOV",TAB,"D,M",RS "MOV",TAB,"D,A",RS "MOV",TAB,"E,B",RS "MOV",TAB,"E,C",RS "MOV",TAB,"E,D",RS "MOV",TAB,"E,E",RS "MOV",TAB,"E,H",RS "MOV",TAB,"E,L",RS "MOV",TAB,"E,M",RS "MOV",TAB,"E,A",RS "MOV",TAB,"H,B",RS "MOV",TAB,"H,C",RS "MOV",TAB,"H,D",RS Page 55 of 64 ; 17 ; 18 ; 19 ; 1A ; 1B ; 1C ; 1D ; 1E ; 1F ; 20 ; 21 ; 22 ; 23 ; 24 ; 25 ; 26 ; 27 ; 28 ; 29 ; 2A ; 2B ; 2C ; 2D ; 2E ; 2F ; 30 ; 31 ; 32 ; 33 ; 34 ; 35 ; 36 ; 37 ; 38 ; 39 ; 3A ; 3B ; 3C ; 3D ; 3E ; 3F ; 40 ; 41 ; 42 ; 43 ; 44 ; 45 ; 46 ; 47 ; 48 ; 49 ; 4A ; 4B ; 4C ; 4D ; 4E ; 4F ; 50 ; 51 ; 52 ; 53 ; 54 ; 55 ; 56 ; 57 ; 58 ; 59 ; 5A ; 5B ; 5C ; 5D ; 5E ; 5F ; 60 ; 61 ; 62 B8085.LST 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 19A5 19AD 19B5 19BD 19C5 19CD 19D5 19DD 19E5 19ED 19F5 19FD 1A05 1A0D 1A15 1A1D 1A25 1A2D 1A35 1A3D 1A42 1A4A 1A52 1A5A 1A62 1A6A 1A72 1A7A 1A82 1A8A 1A90 1A96 1A9C 1AA2 1AA8 1AAE 1AB4 1ABA 1AC0 1AC6 1ACC 1AD2 1AD8 1ADE 1AE4 1AEA 1AF0 1AF6 1AFC 1B02 1B08 1B0E 1B14 1B1A 1B20 1B26 1B2C 1B32 1B38 1B3E 1B44 1B4A 1B50 1B56 1B5C 1B62 1B68 1B6E 1B74 1B7A 1B80 1B86 1B8C 1B92 1B98 1B9E 29/12/2559 12:32 4D4F560948C63 4D4F560948C64 4D4F560948C65 4D4F560948C66 4D4F560948C67 4D4F56094CC68 4D4F56094CC69 4D4F56094CC6A 4D4F56094CC6B 4D4F56094CC6C 4D4F56094CC6D 4D4F56094CC6E 4D4F56094CC6F 4D4F56094DC70 4D4F56094DC71 4D4F56094DC72 4D4F56094DC73 4D4F56094DC74 4D4F56094DC75 484C540900C76 4D4F56094DC77 4D4F560941C78 4D4F560941C79 4D4F560941C7A 4D4F560941C7B 4D4F560941C7C 4D4F560941C7D 4D4F560941C7E 4D4F560941C7F 4144440942C80 4144440943C81 4144440944C82 4144440945C83 4144440948C84 414444094CC85 414444094DC86 4144440941C87 4144430942C88 4144430943C89 4144430944C8A 4144430945C8B 4144430948C8C 414443094CC8D 414443094DC8E 4144430941C8F 5355420942C90 5355420943C91 5355420944C92 5355420945C93 5355420948C94 535542094CC95 535542094DC96 5355420941C97 5342420942C98 5342420943C99 5342420944C9A 5342420945C9B 5342420948C9C 534242094CC9D 534242094DC9E 5342420941C9F 414E410942CA0 414E410943CA1 414E410944CA2 414E410945CA3 414E410948CA4 414E41094CCA5 414E41094DCA6 414E410941CA7 5852410942CA8 5852410943CA9 5852410944CAA 5852410945CAB 5852410948CAC 585241094CCAD 585241094DCAE DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB "MOV",TAB,"H,E",RS "MOV",TAB,"H,H",RS "MOV",TAB,"H,L",RS "MOV",TAB,"H,M",RS "MOV",TAB,"H,A",RS "MOV",TAB,"L,B",RS "MOV",TAB,"L,C",RS "MOV",TAB,"L,D",RS "MOV",TAB,"L,E",RS "MOV",TAB,"L,H",RS "MOV",TAB,"L,L",RS "MOV",TAB,"L,M",RS "MOV",TAB,"L,A",RS "MOV",TAB,"M,B",RS "MOV",TAB,"M,C",RS "MOV",TAB,"M,D",RS "MOV",TAB,"M,E",RS "MOV",TAB,"M,H",RS "MOV",TAB,"M,L",RS "HLT",TAB,RS "MOV",TAB,"M,A",RS "MOV",TAB,"A,B",RS "MOV",TAB,"A,C",RS "MOV",TAB,"A,D",RS "MOV",TAB,"A,E",RS "MOV",TAB,"A,H",RS "MOV",TAB,"A,L",RS "MOV",TAB,"A,M",RS "MOV",TAB,"A,A",RS "ADD",TAB,"B",RS "ADD",TAB,"C",RS "ADD",TAB,"D",RS "ADD",TAB,"E",RS "ADD",TAB,"H",RS "ADD",TAB,"L",RS "ADD",TAB,"M",RS "ADD",TAB,"A",RS "ADC",TAB,"B",RS "ADC",TAB,"C",RS "ADC",TAB,"D",RS "ADC",TAB,"E",RS "ADC",TAB,"H",RS "ADC",TAB,"L",RS "ADC",TAB,"M",RS "ADC",TAB,"A",RS "SUB",TAB,"B",RS "SUB",TAB,"C",RS "SUB",TAB,"D",RS "SUB",TAB,"E",RS "SUB",TAB,"H",RS "SUB",TAB,"L",RS "SUB",TAB,"M",RS "SUB",TAB,"A",RS "SBB",TAB,"B",RS "SBB",TAB,"C",RS "SBB",TAB,"D",RS "SBB",TAB,"E",RS "SBB",TAB,"H",RS "SBB",TAB,"L",RS "SBB",TAB,"M",RS "SBB",TAB,"A",RS "ANA",TAB,"B",RS "ANA",TAB,"C",RS "ANA",TAB,"D",RS "ANA",TAB,"E",RS "ANA",TAB,"H",RS "ANA",TAB,"L",RS "ANA",TAB,"M",RS "ANA",TAB,"A",RS "XRA",TAB,"B",RS "XRA",TAB,"C",RS "XRA",TAB,"D",RS "XRA",TAB,"E",RS "XRA",TAB,"H",RS "XRA",TAB,"L",RS "XRA",TAB,"M",RS Page 56 of 64 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; 63 64 65 66 67 68 69 6A 6B 6C 6D 6E 6F 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 8A 8B 8C 8D 8E 8F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE B8085.LST 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 1BA4 1BAA 1BB0 1BB6 1BBC 1BC2 1BC8 1BCE 1BD4 1BDA 1BE0 1BE6 1BEC 1BF2 1BF8 1BFE 1C04 1C0A 1C0F 1C15 1C1A 1C1F 1C24 1C2B 1C30 1C36 1C3A 1C3F 1C43 1C48 1C4C 1C52 1C57 1C5D 1C62 1C68 1C6D 1C72 1C77 1C7E 1C83 1C89 1C8D 1C92 1C96 1C9A 1C9E 1CA3 1CA8 1CAE 1CB3 1CB9 1CBE 1CC4 1CC9 1CD0 1CD5 1CDB 1CE0 1CE6 1CEB 1CF1 1CF6 1CFB 1D00 1D06 1D0A 1D12 1D16 1D1A 1D1E 1D27 1D2C 1D32 1D36 1D3C 29/12/2559 12:32 5852410941CAF 4F52410942CB0 4F52410943CB1 4F52410944CB2 4F52410945CB3 4F52410948CB4 4F5241094CCB5 4F5241094DCB6 4F52410941CB7 434D500942CB8 434D500943CB9 434D500944CBA 434D500945CBB 434D500948CBC 434D50094CCBD 434D50094DCBE 434D500941CBF 524E5A0900CC0 504F500942CC1 4A4E5A0900CC2 4A4D500900CC3 434E5A0900CC4 5055534809CC5 4144490900CC6 5253540930CC7 525A0900 CC8 5245540900CC9 4A5A0900 CCA 4446420900CCB 435A0900 CCC 43414C4C09CCD 4143490900CCE 5253540931CCF 524E430900CD0 504F500944CD1 4A4E430900CD2 4F55540900CD3 434E430900CD4 5055534809CD5 5355490900CD6 5253540932CD7 52430900 CD8 4446420900CD9 4A430900 CDA 494E0900 CDB 43430900 CDC 4446420900CDD 5342490900CDE 5253540933CDF 52504F0900CE0 504F500948CE1 4A504F0900CE2 5854484C09CE3 43504F0900CE4 5055534809CE5 414E490900CE6 5253540934CE7 5250450900CE8 5043484C09CE9 4A50450900CEA 5843484709CEB 4350450900CEC 4446420900CED 5852490900CEE 5253540935CEF 52500900 CF0 504F500950CF1 4A500900 CF2 44490900 CF3 43500900 CF4 5055534809CF5 4F52490900CF6 5253540936CF7 524D0900 CF8 5350484C09CF9 4A4D0900 CFA DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB DFB "XRA",TAB,"A",RS "ORA",TAB,"B",RS "ORA",TAB,"C",RS "ORA",TAB,"D",RS "ORA",TAB,"E",RS "ORA",TAB,"H",RS "ORA",TAB,"L",RS "ORA",TAB,"M",RS "ORA",TAB,"A",RS "CMP",TAB,"B",RS "CMP",TAB,"C",RS "CMP",TAB,"D",RS "CMP",TAB,"E",RS "CMP",TAB,"H",RS "CMP",TAB,"L",RS "CMP",TAB,"M",RS "CMP",TAB,"A",RS "RNZ",TAB,RS "POP",TAB,"B",RS "JNZ",TAB,RS "JMP",TAB,RS "CNZ",TAB,RS "PUSH",TAB,"B",RS "ADI",TAB,RS "RST",TAB,"0",RS "RZ",TAB,RS "RET",TAB,RS "JZ",TAB,RS "DFB",TAB,RS "CZ",TAB,RS "CALL",TAB,RS "ACI",TAB,RS "RST",TAB,"1",RS "RNC",TAB,RS "POP",TAB,"D",RS "JNC",TAB,RS "OUT",TAB,RS "CNC",TAB,RS "PUSH",TAB,"D",RS "SUI",TAB,RS "RST",TAB,"2",RS "RC",TAB,RS "DFB",TAB,RS "JC",TAB,RS "IN",TAB,RS "CC",TAB,RS "DFB",TAB,RS "SBI",TAB,RS "RST",TAB,"3",RS "RPO",TAB,RS "POP",TAB,"H",RS "JPO",TAB,RS "XTHL",TAB,RS "CPO",TAB,RS "PUSH",TAB,"H",RS "ANI",TAB,RS "RST",TAB,"4",RS "RPE",TAB,RS "PCHL",TAB,RS "JPE",TAB,RS "XCHG",TAB,RS "CPE",TAB,RS "DFB",TAB,RS "XRI",TAB,RS "RST",TAB,"5",RS "RP",TAB,RS "POP",TAB,"PSW",RS "JP",TAB,RS "DI",TAB,RS "CP",TAB,RS "PUSH",TAB,"PSW",RS "ORI",TAB,RS "RST",TAB,"6",RS "RM",TAB,RS "SPHL",TAB,RS "JM",TAB,RS Page 57 of 64 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; AF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA ; CB ; CC ; CD ; CE ; CF ; D0 ; D1 ; D2 ; D3 ; D4 ; D5 ; D6 ; D7 ; D8 ; D9 ; DA ; DFB ; DC ; DD ; DE ; DF ; E0 ; E1 ; E2 ; E3 ; E4 ; E5 ; E6 ; E7 ; E8 ; E9 ; EA ; EB ; EC ; ED ; EE ; EF ; F0 ; F1 ; F2 ; F3 ; F4 ; F5 ; F6 ; F7 ; F8 ; F9 ; FA B8085.LST 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 1D40 1D44 1D48 1D4D 1D52 29/12/2559 12:32 45490900 CFB 434D0900 CFC 4446420900CFD 4350490900CFE 5253540937CFF DFB DFB DFB DFB DFB 1D58 0D0A0A4D54prompt1: 1D8E 3F065B4F66convert "EI",TAB,RS "CM",TAB,RS "DFB",TAB,RS "CPI",TAB,RS "RST",TAB,"7",RS, ; FB ; FC ; FD ; FE ; FF dfb cr,lf,lf,"MTK-85 8085 MICROPROCESSOR TRAINING KIT (? HELP dfb 3fh,06h,5bh,4fh,66h,6dh,7dh,07h,7fh,6fh,77h,7ch,39h,5eh,79h, 1D9E 0000000000off_display: dfb 0,0,0,0,0,0 ; lcd message |--- 20 letters ---| 1DA4 4D544B2D38prompt2: dfb "MTK-85 8085 MICROPRO",0 1DB9 434553534Ftext3: dfb "CESSOR TRAINING KIT",0 1DCD 1DE4 1DE6 1DF6 1E0E 1E39 6C6F616420download_text: dfb "load Intel hex file...",0 3E00 prompt_text: dfb ">",0 6E6577206Cnew_text: dfb "new location = ",0 6564697420edit_text: dfb "edit memory location = ",0 0D0A456E74edit_text1: dfb cr,lf,"Enter to quit, SPACE key to view content",0 0D0A0A4144edit_text2: dfb cr,lf,lf,"ADDR DATA",0 1E47 6A756D7020jump_text1: 1E59 5D203D2000jump_text2: 1E5E 7072696E74ascii_text: dfb "jump to address [",0 dfb "] = ",0 dfb "print ASCII code",0 1E6F 426567696Efill_text1: 1E80 20456E6420fill_text2: 1E90 2044617461fill_text3: dfb "Begin address = ",0 dfb " End address = ",0 dfb " Data = ",0 1E99 206572726Ferror_text: dfb " errors",0 1EA1 6469736173disassemble_text: dfb "disassemble...",0 0000 = 1EB0 1EB4 1EB8 1EBC 1EC0 1EC4 eos 41463D00 af_text: 42433D00 bc_text: 44453D00 de_text: 484C3D00 hl_text: 53503D00 sp_text: 544F533D00tos_text: equ 0 dfb dfb dfb dfb dfb dfb "AF=",eos "BC=",eos "DE=",eos "HL=",eos "SP=",eos "TOS=",eos 1EC9 50433D00 pc_text: dfb "PC=",eos 1ECD 5B53205A20flag_text: dfb "[S Z - AC 1EE3 533D00 - P - CY]=",eos sign_text: dfb "S=",0 1EE6 2062797465byte_text: dfb " bytes loaded",0 1EF4 535441434Bstack_text: dfb "STACK Memory Contents..",0 1F0C 7365742076set_register_text: dfb "set value to user register (enter A for AF) ? ",0 1F3B 1F6E 1F7E 1F99 1FAA 1FBB 1FCE 1FDC 1FF1 200B 2023 203C 2055 206F 2088 20A3 20C3 0D0A0A4D54help_text: 0D0A41202Dhelp_text1: 0D0A43202D 0D0A44202D 0D0A45202D 0D0A46202D 0D0A48202D 0D0A49202D 0D0A4A202D 0D0A4B202D 0D0A4C202D 0D0A4D202D 0D0A4E202D 0D0A51202D 0D0A52202D 0D0A53202D 0D0A57202D dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb cr,lf,lf,"MTK-85 8085 MICROPROCESSOR TRAINING KIT (? HELP cr,lf, "A - ASCII code" cr,lf, "C - clear watch variables" cr,lf, "D - disassemble" cr,lf, "E - edit memory" cr,lf, "F - fill constant" cr,lf, "H - hex dump" cr,lf, "I - i/o address map" cr,lf, "J - jump to user program" cr,lf, "K - display user STACK" cr,lf, "L - load Intel hex file" cr,lf, "M - monitor call number" cr,lf, "N - new location pointer" cr,lf, "Q - quick home location" cr,lf, "R - user register display" cr,lf, "S - set value to user register" cr,lf, "W - watch variables" Page 58 of 64 B8085.LST 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 29/12/2559 12:32 20D8 0D0A535041 20F1 0D0A3F202D dfb cr,lf, dfb cr,lf, 2103 2132 214C 214E 2195 2197 21D7 2203 2205 224A 224C dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb 0D0A303048io_text 0D0A202020 0D0A 0D0A313048 0D0A 0D0A323048 0D0A202020 0D0A 0D0A333048 0D0A 0D0A343048 226C 226C 2291 22AD 22B9 22BB 22C6 22D2 22E2 22ED 22F7 2302 2310 231F 232F 233F 234D 235F 2370 237D "SPACE BAR - single step" "? - help menu",cr,lf,0 cr,lf,"00H-0FH cr,lf," cr,lf cr,lf,"10H-13H cr,lf cr,lf,"20H-23H cr,lf," cr,lf cr,lf,"30H-33H cr,lf cr,lf,"40H-47H onboard 4-bit GPIO, D0-D3=output port" D4-D7=input port" 8255 system PPI, 10H=PORTA, 11H=PORTB, 12H 8254 programmable counter, 20H=counter0, 21 22H=counter2, 23H control register" 8255 user PPI, 30H=PORTA, 31H=PORTB, 32H=PORTC C16550 UART registers",0 monitor_text: 7365652069 0D0A31456E 0D0A434620 0D0A 0D0A303020 0D0A303120 0D0A303220 0D0A303320 0D0A303420 0D0A303520 0D0A303620 0D0A303720 0D0A303820 0D0A303920 0D0A304120 0D0A304220 0D0A304320 0D0A304420 0D0A304520 dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb dfb ; F000 "see input parameters in user manual",cr,lf cr,lf,"1Enn MVI E,function_number" cr,lf,"CF RST 1" cr,lf cr,lf,"00 - demo" ; #0 running LED with HL pointer cr,lf,"01 - delay" ; #1 simple delay routine cr,lf,"02 - cold_boot" ; #2 show 8085 running cr,lf,"03 - scan" ; #3 scan display one cycle cr,lf,"04 - cin" ; #4 get byte from console cr,lf,"05 - cout" ; #5 print byte to console cr,lf,"06 - put_str" ; #6 print string with 0 terminator cr,lf,"07 - init_lcd" ; #7 initialize lcd cr,lf,"08 - lcd_ready" ; #8 wait until lcd is ready cr,lf,"09 - clear_lcd" ; #9 clear lcd display cr,lf,"0A - goto_xy" ; #10 set lcd cursor position cr,lf,"0B - put_str_lcd" ; #11 print ASCII string on lcd cr,lf,"0C - put_ch_lcd" ; #12 print ASCII letter on lcd cr,lf,"0D - demo2",0 ; #13 run GPIO LED cr,lf,"0E - pint16u",0 ;#14 print 16-bit unsigned data segment org system_ram F000 F010 F020 F021 F022 F023 watch_ram dfs 16 buffer dfs 16 bcs dfs 1 key dfs 1 command dfs 1 flag1 dfs 1 F024 beep_flag dfs 1 ; ; ; ; ; ; ; ; ; F025 uart_found dfs 1 ; 0 = no uart, 1 uart found F026 entry_mode dfs 1 F027 F028 F029 counter1 counter2 warm_code ; ; ; ; ; ; 0 for data mode 1 for address mode 2 register display event counter1 for data entry event counter2 for address entry warm boot code F02A F02C F02E F030 F032 F034 F036 F038 user_PC dfs 2 user_AF dfs 2 user_BC dfs 2 user_DE dfs 2 user_HL dfs 2 user_SP dfs 2 tos dfs 2 current_register dfs 2 ; ; ; ; ; ; ; ; user PC user AF user BC user DE user HL user SP Top of STACK stores current displayed register F03A temp dfs 2 ; temporary 16-bit storage F03C pointer dfs 2 ; for hex dump dfs 1 dfs 1 dfs 1 watch variable F000-F00F buffer display byte checksum key position serial command user flag flag1.0 Space key was pressed flag1.1 Enter key was pressed beep/no beep Page 59 of 64 B8085.LST 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496 4497 4498 4499 4500 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 4501 29/12/2559 12:32 F03E F040 break_address dfs 2 break_opcode dfs 1 ; break address ; opcode that saved F041 F044 bcd_counter1 bcd_counter2 dfs 3 dfs 3 ; 6-digit BCD counter1 ; 6-digit BCD counter2 F047 line_buffer dfs 16 ; reserved for terminal printing F057 F059 F079 save_stack system_stack user_stack dfs 2 dfs 32 dfs 32 ; for saving system stack 0000 END Page 60 of 64 B8085.LST 4501 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 1075 1266 0D8A F044 096F 019B 01B0 F03E 0080 1EE6 176C 177F 1791 17A2 17B5 17C8 17D2 17E5 17F8 1808 181A 171E 1839 184B 185D 186E 1881 188D 18A5 18BD 18D5 18ED 1905 1915 192D 1945 195D 1975 1730 199D 19B5 19CD 19E5 19FD 1A0D 1A25 1A3D 1A52 1A6A 1A82 1A90 1AA2 1AB4 1AC6 1AD8 1741 1AF6 1B08 1B1A 1B2C 1B3E 1B4A 1B5C 1B6E 1B80 1B92 1BA4 1BB0 1BC2 1BD4 1BE6 1BF8 1754 1C15 1C24 29/12/2559 12:32 AC_TEXT ALT_PUT_STR ASCII_PRINT1 BCD_COUNTER2 BEEP_CHK BIN1 BIN3 BREAK_ADDRESS BUSY BYTE_TEXT C10 C13 C16 C19 C1C C1F C21 C24 C27 C2A C2D C3 C32 C35 C38 C3B C3E C40 C43 C46 C49 C4C C4F C51 C54 C57 C5A C5D C6 C62 C65 C68 C6B C6E C70 C73 C76 C79 C7C C7F C81 C84 C87 C8A C8D C9 C92 C95 C98 C9B C9E CA0 CA3 CA6 CA9 CAC CAF CB1 CB4 CB7 CBA CBD CC CC2 CC5 0A01 13C7 1E5E F020 F024 01A6 01BB F040 0631 170B 1771 1785 1798 17A8 17BB 1717 17D9 17EB 17FD 180E 1820 182C 183E 1851 1862 1875 1888 1895 18AD 18C5 18DD 18F5 172A 191D 1935 194D 1965 197D 198D 19A5 19BD 19D5 19ED 1A05 1A15 1A2D 1A42 1A5A 1A72 173C 1A96 1AA8 1ABA 1ACC 1ADE 1AEA 1AFC 1B0E 1B20 1B32 1B44 1B50 1B62 1B74 1B86 1B98 174E 1BB6 1BC8 1BDA 1BEC 1BFE 1C0A 1C1A 1C2B ADDRESS_MODE ASCII_0_9 ASCII_TEXT BCS BEEP_FLAG BIN2 BIN4 BREAK_OPCODE BUZZER C0 C11 C14 C17 C1A C1D C2 C22 C25 C28 C2B C2E C30 C33 C36 C39 C3C C3F C41 C44 C47 C4A C4D C5 C52 C55 C58 C5B C5E C60 C63 C66 C69 C6C C6F C71 C74 C77 C7A C7D C8 C82 C85 C88 C8B C8E C90 C93 C96 C99 C9C C9F CA1 CA4 CA7 CAA CAD CB CB2 CB5 CB8 CBB CBE CC0 CC3 CC6 Page 61 of 64 1EB0 0D72 F041 1EB4 0640 0199 08CA F010 0642 1710 1778 178B 179D 17AF 17C1 17CD 17DF 17F1 1802 1814 1827 1831 1845 1858 1869 187B 1724 189D 18B5 18CD 18E5 18FD 190D 1925 193D 1955 196D 1985 1995 19AD 19C5 19DD 19F5 1737 1A1D 1A35 1A4A 1A62 1A7A 1A8A 1A9C 1AAE 1AC0 1AD2 1AE4 1AF0 1B02 1B14 1B26 1B38 1747 1B56 1B68 1B7A 1B8C 1B9E 1BAA 1BBC 1BCE 1BE0 1BF2 1C04 1C0F 1C1F 1C30 AF_TEXT ASCII_PRINT BCD_COUNTER1 BC_TEXT BEEP_ON BIN2ASCII BREAK BUFFER BUZZER1 C1 C12 C15 C18 C1B C1E C20 C23 C26 C29 C2C C2F C31 C34 C37 C3A C3D C4 C42 C45 C48 C4B C4E C50 C53 C56 C59 C5C C5F C61 C64 C67 C6A C6D C7 C72 C75 C78 C7B C7E C80 C83 C86 C89 C8C C8F C91 C94 C97 C9A C9D CA CA2 CA5 CA8 CAB CAE CB0 CB3 CB6 CB9 CBC CBF CC1 CC4 CC7 B8085.LST 4576 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592 4593 4594 4595 4596 4597 4598 4599 4600 4601 4602 4603 4604 4605 4606 4607 4608 4609 4610 4611 4612 4613 4614 4615 4616 4617 4618 4619 4620 4621 4622 4623 4624 4625 4626 4627 4628 4629 4630 4631 4632 4633 4634 4635 4636 4637 4638 4639 4640 4641 4642 4643 4644 4645 4646 4647 4648 4649 4650 4651 1C36 1C43 1C52 1C5D 1C6D 1C7E 1C8D 1C9A 1CA8 1CB3 1CC4 1CD5 1CE6 1CF6 1767 1D12 1D1E 1D32 1D40 1D4D 0EE3 0904 0BB3 0C0B 0C23 0C3B 0C4B 0C63 0C7B 0BD3 0BEB 0B7B F022 0023 0020 F028 1230 107C 061C 0A0E 0051 0995 063B 094A 0BA2 0390 033A 0660 1359 0415 03DC 1DF6 0709 066F 1E99 0DA3 0339 119A 13FA 11ED 11C6 1071 0F0B 10B2 1E90 1229 05AE 05D0 05F1 13D2 1385 0426 022A 024F 11EE 12F1 29/12/2559 12:32 CC8 CCB CCE CD0 CD3 CD6 CD9 CDC CDF CE1 CE4 CE7 CEA CED CF CF2 CF5 CF8 CFB CFE CLEAR1 CLEAR_BREAK CODE1 CODE12 CODE15 CODE18 CODE20 CODE23 CODE26 CODE5 CODE8 COLD2 COMMAND CONTROL_8254 COUNTER0_8254 COUNTER2 COUT1 CY_TEXT DATA_KEY2 DATA_MODE DATA_WRITE DEBUG DELAY_NOBEEP DELETE_BYTE DEMO1_2 DISASSEM1 DISASSEMBLE DISPLAY_OFF DUMP1 D_DISASSEM2 D_ONE_TAB EDIT_TEXT ENTER_ADDRESS ENTER_REGISTER ERROR_TEXT EXIT_ASCII_PRINT EXIT_DISASSEMBLE EXIT_EDIT1 EXIT_GET_HEX3 EXIT_IO EXIT_NEW_LOCATION EXIT_REGISTER EXIT_STEP FILL_MEMORY1 FILL_TEXT3 FOUND FUNCTION3 FUNCTION6 FUNCTION9 GET_2ND_HEX GET_HEX1 GET_NUMBER_OF_BYTE GOTO_XY GOTO_XY3 HELP HEX_DUMP 1C3A 1C48 1C57 1C62 1C72 1C83 1C92 1C9E 1760 1CB9 1CC9 1CDB 1CEB 1CFB 1D06 1D16 1D27 1D36 1D44 1D52 14D5 0200 0BFB 0C13 0C2B 0C43 0C53 0C6B 0BC3 0BDB 0BF3 0B8C 0052 0034 F027 0022 000D 0609 0624 0053 0CA7 0A78 0659 0959 1EB8 039F 0313 0D50 1351 03C4 114C 1E0E 06CF F026 001B 0207 0D71 10C3 1205 1126 0D4F 0EB8 0EFF 1E6F F023 0598 05B9 05DB 0A19 1245 139E 1403 0239 025A 1F3B 1312 CC9 CCC CCF CD1 CD4 CD7 CDA CDD CE CE2 CE5 CE8 CEB CEE CF0 CF3 CF6 CF9 CFC CFF CLEAR_BCD1 CLEAR_LCD CODE10 CODE13 CODE16 CODE19 CODE21 CODE24 CODE3 CODE6 CODE9 COLD3 COMMAND_READ CONTROL_WORD_8254 COUNTER1 COUNTER2_8254 CR DATA_KEY DATA_KEY3 DATA_READ DEBOUNCE DECREMENT DELAY_US DELETE_BYTE1 DE_TEXT DISASSEM2 DISASSEMBLE1 DOWNLOAD DUMP_MEMORY D_DISASSEM3 EDIT1 EDIT_TEXT1 ENTER_DATA ENTRY_MODE ESC EXIT_CLEAR EXIT_DOWNLOAD EXIT_FILL EXIT_HELP EXIT_JUMP EXIT_PROMPTING EXIT_SET_USER EXIT_WATCH FILL_TEXT1 FLAG1 FUNCTION1 FUNCTION4 FUNCTION7 FUNCTION_2ND GET_COMMAND GET_HEX2 GET_RECORD GOTO_XY1 GOTO_XY4 HELP_TEXT HEX_DUMP1 Page 62 of 64 1C3F 1C4C 175A 1C68 1C77 1C89 1C96 1CA3 1CAE 1CBE 1CD0 1CE0 1CF1 1D00 1D0A 1D1A 1D2C 1D3C 1D48 123B 14FE 0ED6 0C03 0C1B 0C33 0BBB 0C5B 0C73 0BCB 0BE3 0B7D 0B76 0050 1D8E 0021 122F F038 0614 062C 145B 0CA9 0600 065B 0BA0 0326 034E 1EA1 1DCD 0406 03B0 1127 1E39 06F4 0000 145A 0EF0 11A9 13F1 1350 10DC 11DB 0F4B 1080 1E80 1ECD 05A3 05C5 05E6 058D 1372 0BAB 099B 0244 0000 1F6E 12FE CCA CCD CD CD2 CD5 CD8 CDB CDE CE0 CE3 CE6 CE9 CEC CEF CF1 CF4 CF7 CFA CFD CIN CLEAR_BCD2 CLEAR_WATCH CODE11 CODE14 CODE17 CODE2 CODE22 CODE25 CODE4 CODE7 COLD1 COLD_BOOT COMMAND_WRITE CONVERT COUNTER1_8254 COUT CURRENT_REGISTER DATA_KEY1 DATA_KEY4 DATA_RECORD DEBOUNCE1 DELAY DELAY_US1 DEMO DIS2 DISASSEM3 DISASSEMBLE_TEXT DOWNLOAD_TEXT D_DISASSEM1 D_DISASSEMBLE EDIT_LOCATION EDIT_TEXT2 ENTER_DATA1 EOS ESC_QUIT EXIT_CLEAR_WATCH EXIT_EDIT EXIT_GET_HEX2 EXIT_HEX_DUMP EXIT_MONITOR EXIT_QUICK_HOME EXIT_STACK FILL_MEMORY FILL_TEXT2 FLAG_TEXT FUNCTION2 FUNCTION5 FUNCTION8 FUNCTION_KEY GET_HEX GET_KEY_CODE GO GOTO_XY2 GPIO HELP_TEXT1 HEX_DUMP2 B8085.LST 4652 4653 4654 4655 4656 4657 4658 4659 4660 4661 4662 4663 4664 4665 4666 4667 4668 4669 4670 4671 4672 4673 4674 4675 4676 4677 4678 4679 4680 4681 4682 4683 4684 4685 4686 4687 4688 4689 4690 4691 4692 4693 4694 4695 4696 4697 4698 4699 4700 4701 4702 4703 4704 4705 4706 4707 4708 4709 4710 4711 4712 4713 4714 4715 4716 4717 4718 4719 4720 4721 4722 4723 4724 4725 4726 4727 1338 1EBC 0A65 018F 091F 11DC 1E47 F021 01F7 0186 0B74 0261 8000 1DE6 042E 0486 049E 04B6 04C6 04DE 04F6 050E 051E 0536 054E 0446 0576 0456 046E 13E9 12BA 1EC9 01C9 14E2 1D58 0D32 07ED 1258 021A 11C7 0761 0799 07F8 087C 0F57 0FEE 1027 104B 0000 0CBC 0C8F 0743 12B3 02B8 1F0C 0E36 0EB7 06E2 1EE3 030E 0164 147D 0878 0020 0F0C 0100 0012 F059 062D 1DB9 1EC4 0040 0042 0045 F02E F02A 29/12/2559 12:32 HEX_DUMP3 HL_TEXT INCREMENT INIT_8254 INSERT_BYTE IO_ADDRESS JUMP_TEXT1 KEY LCD_READY1 MAIN MODE2 MONITOR_CALL MY_ROM NEW_TEXT NUMBER1 NUMBER12 NUMBER15 NUMBER18 NUMBER20 NUMBER23 NUMBER26 NUMBER29 NUMBER31 NUMBER34 NUMBER37 NUMBER4 NUMBER42 NUMBER6 NUMBER9 OK_0_9 OUT1X PC_TEXT PINT8U PRINT_BCD2 PROMPT1 PROMPTING PUT_FLAG PUT_STR PUT_STR_LCD QUICK_HOME REGISTER1 REGISTER3 REGISTER6 REGISTER9 REGISTER_DISPLAY2 REGISTER_FLAG2 REGISTER_FLAG5 REGISTER_FLAG8 RS SCAN1 SCAN_KEY2 SELECT_REGISTER SEND_PROMPT3 SERVICE_RST2 SET_REGISTER_TEXT SET_USER3 SET_USER6 SHIFT_DATA SIGN_TEXT SKIP1 SKIP_COLD_BOOT SKIP_ERROR SKIP_PUT_HIGH2 SP STACK_DISPLAY START SYSTEM_PORT_C SYSTEM_STACK TEST_BUZZER TEXT3 TOS_TEXT UART_BUFFER UART_FIFO UART_LINE_STATUS USER_BC USER_PC 133A 0981 1489 0208 0932 2103 1E59 0581 000A 170B 0B02 10C4 12DA 0CDB 0476 048E 04A6 04BE 04CE 04E6 04FE 043E 0526 053E 0556 0566 057E 045E 1D9E 0366 12C6 01E4 F03C 0EF1 1DA4 1DE4 07F5 125F 0221 0ABE 08A4 07B5 0820 0F4C 0FE9 1008 102C 1065 F057 0C7E 0C8F 0D3A 12EB 0293 0DE0 0E61 0DA4 0CD1 09BF 09DF 118A 1117 017B 12E5 0F20 0010 0013 0009 05F2 0B94 1366 0040 F025 0047 F030 0030 HEX_DUMP4 132D HEX_DUMP5 HOME 8100 HOME_ADDRESS INC_BCD1 14A1 INC_BCD2 INIT_LCD 1206 INIT_UART INSERT_BYTE1 150B INS_TABLE IO_TEXT 0705 IT_IS_RAM JUMP_TEXT2 10DD JUMP_TO_USER_PGM KEY_EXECUTE 01F6 LCD_READY LF F047 LINE_BUFFER MNEM 0B3D MODE1 MODE_INDICATOR 0A3D MODIFY_REGISTER MONITOR_FUNCTION 226C MONITOR_TEXT NEW_LINE 11AA NEW_LOCATION NEXT_KEY 1252 NO_DATA NUMBER10 047E NUMBER11 NUMBER13 0496 NUMBER14 NUMBER16 04AE NUMBER17 NUMBER19 0436 NUMBER2 NUMBER21 04D6 NUMBER22 NUMBER24 04EE NUMBER25 NUMBER27 0506 NUMBER28 NUMBER3 0516 NUMBER30 NUMBER32 052E NUMBER33 NUMBER35 0546 NUMBER36 NUMBER38 055E NUMBER39 NUMBER40 056E NUMBER41 NUMBER43 044E NUMBER5 NUMBER7 0466 NUMBER8 OFF_DISPLAY 0663 OFF_DISPLAY1 ONE_TAB 097D OPTION1 OUT1X1 12CB OUT2X PINT1 01EF PINT2 POINTER 14B9 PRINT_BCD1 PRINT_WATCH 0EB9 PRINT_WATCH_RAM PROMPT2 126F PROMPT3 PROMPT_TEXT 025B PUT_CH_LCD PUT_HIGH1 0876 PUT_HIGH2 PUT_STR1 12A5 PUT_STR2 PUT_STR_LCD1 1079 P_TEXT READ_MEMORY 0A93 READ_REGISTER REGISTER10 077D REGISTER2 REGISTER4 07D1 REGISTER5 REGISTER7 084B REGISTER8 REGISTER_DISPLAY 0F54 REGISTER_DISPLAY1 REGISTER_FLAG1 106A REGISTER_FLAG10 REGISTER_FLAG3 100D REGISTER_FLAG4 REGISTER_FLAG6 1046 REGISTER_FLAG7 REGISTER_FLAG9 0000 ROM SAVE_STACK 0CAE SCAN SCAN_KEY 0C95 SCAN_KEY1 SCAN_KEY3 0C7E SCAN_KEY4 SEND_PROMPT 12AC SEND_PROMPT1 SEND_TAB 0CED SERIAL_COMMAND SERVICE_RST7 02DD SERVICE_TRAP SET_USER1 0E0B SET_USER2 SET_USER4 0E8C SET_USER5 SET_USER_REGISTER 071F SHIFT_ADDRESS SHIFT_KEY 067A SHIFT_REGISTER SINGLE_STEP 0F00 SINGLE_STEP_ SKIP2 0141 SKIP_BOOT SKIP_EDIT1 1193 SKIP_EDIT2 SKIP_LOAD_PC 07F7 SKIP_PUT_HIGH1 SKIP_SEND_PROMPT 0D31 SKIP_SERIAL SPACE 1EC0 SP_TEXT STACK_DISPLAY1 1EF4 STACK_TEXT SYSTEM_PORT_A 0011 SYSTEM_PORT_B SYSTEM_PORT_CONTROL F000 SYSTEM_RAM TAB F03A TEMP TEST_LED 05F4 TEST_LED1 TITLE F036 TOS TO_HEX 0A88 TO_SEVEN_SEGMENT UART_DIVISOR_LSB 0041 UART_DIVISOR_MSB UART_FOUND 0043 UART_LCR UART_SCR F02C USER_AF USER_DE F032 USER_HL USER_PORT_A 0031 USER_PORT_B Page 63 of 64 B8085.LST 4728 4729 4730 4731 4732 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 4733 0032 F079 1436 F000 29/12/2559 12:32 USER_PORT_C USER_STACK WAIT_CR WATCH_RAM 0033 0275 F029 1371 USER_PORT_CONTROL VECTOR_TABLE WARM_CODE ZERO_NINE Page 64 of 64 F034 0CC6 0EC9 1072 USER_SP WAIT1 WATCH1 ZERO_TEXT
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : Yes Producer : doPDF Ver 7.3 Build 394 (Windows XP Professional Edition (SP 3) - Version: 5.1.2600 (x86)) Create Date : 2017:01:22 16:50:00+07:00 Modify Date : 2017:01:22 16:53:59+07:00 Page Count : 117 Page Layout : OneColumn Page Mode : UseNoneEXIF Metadata provided by EXIF.tools