iiii
Users Manual Table of Contents Users Manual
INTRODUCTION .......................................................................................... 1
OPERATING COMMANDS .......................................................................... 3
COMMAND DESCRIPTION .......................................................................... 4
A - Assemble ......................................................................................... 4
D - Display or modify the RAM's Hexadecimal ....................................... 9
F - Fill data into the RAM ..................................................................... 11
G - Proceed to the address for execution ............................................. 12
I - Interrupt ............................................................................................ 13
Modify/Display Register ................................................................. 15
M - Moving Data ............................................................................. 16
P - Print ................................................................................................ 16
T - Trace Program (an N-step designed command) .............................. 19
U - Unassemble ................................................................................... 22
ADDRESS DIVISION ................................................................................. 28
MEMORY SECTION ............................................................................ 28
I/O ADDRESS ...................................................................................... 29
RAM MEMORY .................................................................................... 30
SYSTEM DATA OF RAM ..................................................................... 30
BIT .............................................................................................. .......30
CONTENTS OF ROM ........................................................................... 31
PRACTICAL USE OF SUBPROGRAM (ROM'S CONTENT) ................ 31
CODES TABLE .......................................................................................... 33
Character Code : (F000:FF60-FF83) .................................................... 33
Symbols Code : (F000:FF90-FFBF) ..................................................... 33
Functional key : (F000:FFBC-FF9B) .................................................... 34
Checking section of interrupt vector position ........................................ 34
DISPLAY .................................................................................................... 35
BUSY FLAG (B.F.) .............................................................................. 37
ADDRESS COUNTER (A.C.) ............................................................... 37
DISPLAY DATA RAM (D.D. RAM) ....................................................... 38
CHARACTER GENERATOR ROM (C.G. ROM) ................................... 38
CHARACTER GENERATOR RAM (C.G.RAM) ..................................... 38
TIMING GENERATOR .......................................................................... 38
FUNCTIONS OF RESET ............................................................................ 42
USING THE INTERNAL RESET CIRCUIT TO START ........................... 42
INITIALIZATION BY INSTRUCTIONS .................................................... 45
INSTRUCTION DESCRIPTION ............................................................. 46
i
Users Manual Users Manual
COMMAND DESCRIPTION
A - ASSEMBLE SYSTEM INTRODUCTION
This command is used to convert the input Assemble Language to the
Machine Language in the memory. Once under this command, first set the GENERAL DESCRIPTION
address which is similar to the command D followed by an Enter or an VMC-8609 is a single board MICROPROCESSOR TRAINING/DEVELOP-
Arrow Down key to go to a new step. However, only a maximum of 35 MENT KIT configured around the INTELs 16 bit Microprocessor 8086. This
words are allowed for input. kit can be used to train engineers, to control any industrial process and to
develop software for 8086 systems.
The following are some useful keys used to move the cursor around:
The kit has been designed to operate in the Max. or Min. mode. Co-
(Backspace)......Move one space to the left. processor 8087 and I/O Processor 8089 can be added (VMC-8609). The
8086 CPU can also be replaced by 8088 CPU.
The Kit communicates with the outside world through a IBM PC compatible
+ ... Delete the character at the cursor in Assemble mode. keyboard and LCD display.
VMC-8609 is packed up with powerful monitor in 32K Bytes of factory
+ ... Erase the content in Assemble mode. programmed EPROMS and 32K Bytes of RAM for user. These memory can
be expandable upto 256K Bytes each. The system has 72 programmable I/
O lines. The serial I/O Communication is made possible through 8251.
................ Leave a space at the cursor.
For control applications, three 16 bit Timer/Counters are available through
8253. For real time applications, the 8 level of interrupt are provided through
VMC - 8 6 0 9 . . 7 F F F 8259. VMC-8609 provides onboard battery back up for RAM. This saves the
users program in case of power failure.
>A . D . F . G . I . M . P . T . U .
The onboard resident system monitor software is very powerful. It provides
Simply Press the key A. After the command, an A will appear on the various software commands like BLOCK MOVE, INSERT, DELETE, FILL
screen: etc. Which are helpful in debugging/developing software. An onboard As-
VMC - 8 6 0 9 . . 7FFF sembler/Disassembler is also provided on VMC-8609AD. This kit also sup-
ports MASM.
A
VMC-8609 also has onboard buzzer for self testing of hardware and soft-
Assemble language can be input at this time. ware. This kit is provided with a Centronix Printer port to take out the prints
of the program written in the RAM of kit. A Real Time Clock is also provided
Only contains the Effective address but the Segment base in included A onbard for real time apllications (Optional).
400.
Input includes the segment base and the Effective address A 0000:400.
Totally depends on the built in Segment base and Effective address A.
4 1
Users Manual Users Manual
COMMAND DESCRIPTION
SPECIFICATIONS FOR VMC-8609
Processor : 8086, 16 bit Microprocessor operating in The operation of this device is similarly with the operation of IBM PCs
max. 8088, 8 bit Microprocessor. DEBUG system. For convenience, the operation instructions will be dis-
EPROM : 128K Bytes of EPROM Loaded with moni- played when the device is being Switched on or RESET.
tor This device also has memory ability to preserve data for future use. There
RAM : 64K Bytes expandable to 128K Bytes. is a memory indicator on the display once the data being kept after Reset.
Parallel I/O lines : 48 I/O lines using two nos. 8255 The system program starts from 0000:0000 after reset, in order to check the
Addtional I/O Lines : 24 I/O lines using 8255 (Optional) length of the RAM, there is a byte to be inverted and returned to the original
Serial communications : Through RS-232C port USING 8251. for every 4K in length, the verifying procedure will be repeated until none of
Interrupts : 8 different level interrupt through 8259. the byte can be inverted. During this period, avoid using the RESET to
Timer/Counter : Three 16 bit Timer/Counter through 8253. prevent the data from unable to return to the original setting. The RAM
Keyboard : IBM PC compatible ASCII keyboard. address is to be displayed by 4 positions and up to FFFFH, however, 5
Display : 20X2 Liquid Crystal Display(LCD) with back- positions will be used if it exceeds FFFFH.
light or 402 or 204.
Sound : Buzzer. Note :
Assembler/Disassembler : Provided onboard. KEY 1 (Reset Switch) is to be presses to initialize for ASCII
BUS : All address, data and control signals (TTL Keyboard, then it will accept following operating commands.
Compatible) available at FRC connector.
Power Requirement : 5V, 800mA
Operating Temp. : 0 to 50C. OPERATING COMMANDS:
VMC-8609AD After power ON the system, it will display as follows:
2 3
Users Manual Users Manual
3) Or user has entered the wrong instruction as follows: If one of the above is used, 0400 will appear on the screen and ready for
input data.
0400 OVM B L , C 0 A and U are the same commands, an ARROW UP sign can be used to
check the earlier procedure. F6 is used to delete the input and proceed to
U-Unassemble. F7 is used to proceed to another command.
As user press the Enter key, then above instruction will not be con-
verted into machine language. And the cursor will point left side of the Example
instruction as follows:
Clear second line, display DX value, and DX values are altered by key-in to
be displayed at LCD.
0400 OVM B L , C 0
0:0400 MOV BL,C0
0:0402 CALL F000:F078
Cursor position. 0:0407 MOV BX,00C2
And user want to write whole instruction again, then by using the 0:040A CALL F000:F068
SHIFT + F6 keys, the content at the location 400 will be erased as 0:040F CMP AL,0D
follows: 0:0411 JNZ 040A
0:0413 HLT
0400
Before entering the above program connect the system to the power supply
properly. Then the following menu will be displayed on LCD screen, if not,
Now enter the instruction again. switch off the power supply and re-check.
8 5
Users Manual Users Manual
3) Now press Enter key, the effective address will appear. Press Enter key, then this input assemble language will be converted
into machine language in the memory and jump to the next memory
0400 location.
2) Or user has entered the wrong instruction as follows:
From now onwards user can enter the program in assembly language. First 0400 MV B L , C 0
pick the first instruction.
0400 MOV B L , C 0 As user press the Enter key, then above instruction will not be con-
verted into machine language. And the cursor will point left side of the
instruction as follows:
While entering this instruction, the following mistakes may happen:
1) If user has entered the wrong instruction as follows: 0400 MV B L , C 0
0400 MOVC B L , C 0
Cursor position.
Now by using the Backspace key, user can move the cursor right side
As user press the Enter key, then above instruction will not be con- and indicate at the below of V.
verted into machine language. And the cursor will point left side of the
instruction as follows: 0400 MV B L , C 0
6 7
Users Manual Users Manual
The ending position has to be bigger than or equal to the starting position, In this way, user can enter the whole program, by pressing Enter key.
otherwise the smaller user will become the ending position and the bigger
user is the starting position. 0407 MOV BX , 0 0 C 2
G - PROCEED TO THE ADDRESS FOR EXECUTION
The GO command, which causes the machine language statements to be 0 4 0A CAL L F 0 0 0 : F 0 6 8
executed. This command executes the loaded program and allows the user
to specify the addresses at which program execution will stop. The syntax
is as followed:
040F CMP A L , 0 D
VMC - 8 6 0 9 . . 7 F F F
>A . D . F . G . I . M . P . T . U .
0411 JNZ 0 4 0A
Once the GO command has been executed, it will completely leave the
system and proceed to the users design.
0413 HL T
Flowchart of G-Command
12 9
Users Manual Users Manual
D 0:0400 (Specify both the Segment base and Effective address) 3) Press Enter key, then the following will be displayed:
If press the Enter or the ARROW DOWN key after specifying the address,
the memory will display the data. Press ARROW UP key will allowed the 0000 : 0400 B3 C0 9A
address to subtract 8 and store in the memory as a whole number. other- 7 8 F 0 0 0 F 0 BB
wise, an ARROW DOWN key indicates an addition of 8 in the address and
this changes in the memory (as a machine language).
Usekey for further view.
Syntax is as followed:
Segment Base
0000 : 0408 C2 00 9A
Effective Address
68 F0 00 F0 3C
Content of data total of
8 bytes
0000 : 0400 B3 C0 9A
7 8 F 0 0 0 F 0 BB 0000 : 0410 0D 7 5 F 7
F4 FF FF FF FF
If address is not a whole number 8, the following will show:
0000 : 0400 B3 C0 9A
7 8 F 0 0 0 F 0 BB
F - FILL DATA INTO THE RAM
The above datas shown at the location 400 are the arbitrary data.
By setting the starting, ending address and the details, an Enter key will
Example allow the data to enter the RAM.
If the user want to see the codes of the above program, the following steps Syntax
are to be taken:
1) Press F7 key, the menu will display.
VMC - 8 6 0 9 . . 7 F F F
>A . D . F . G . I . M . P . T . U .
VMC - 8 6 0 9 . . 7 F F F Once F is entered, the command can be proceeded.
>A . D . F . G . I . M . P . T . U .
VMC - 8 6 0 9 . . 7 F F F
2) Press D key, and enter the effective address. The following will be
displayed: F 0000 : 0400 0400 57
10 11
Users Manual Users Manual
VMC - 8 6 0 9 . . 7 F F F
VMC - 8 6 0 9 . . 7 F F F
>A . D . F . G . I . M . P . T . U .
>A . D . F . G . I . M . P . T . U .
The I key allows interruption to be shown on the screen.
Ending Address (Effective Address
Starting address (Effective Address)
VMC - 8 6 0 9 . . 7 F F F
Segment Base
Source
I NTP : 0 0 0 0 . 0 0 0 0 . 0 0 0 0
Third Interrupt Posi-
M S - 0000 : 0000 8088
tion (Effective Ad-
T - 0000 : 0000 dress)
The ending address must be greater than or equal to the starting address.
The sum of the starting address in plus the corrected ending address in the Notes :
target can not exceed FFFF. Otherwise, it will cause an input error and
1) During interrupt setting, the address alternation register has commands
have to redo the whole procedure.
like POP ES, MOV DS, AS, etc. to execute with the next command.
P - Print 2) The program will be delayed for due to the fact that CPU has to send
This command allows the printer to print the output Connect the printer with each command individually into the subprogram.
input/output system of 8255 (the connection is described at the back),
before turning on the printer. 3) During the interruption, the command GO would allow the program to
execute until the next INTERRUPT.
16 13
Users Manual Users Manual
14 15
Users Manual Users Manual
Only 0-9 numerical keys are allowed to use to operate for this command but
VMC - 8 6 0 9 . . 7 F F F
not any other keys.
>A . D . F . G . I . M . P . T . U .
By pressing P key will allow the following to show on the screen:
Example
Enter the following program using A 0000:0400 and press Enter key. PR E S S S / F F OR S P E ED
0 : 0400 MOV A L , 9 0
Here S/F indicates SLOW or FAST. Now according to the printer, press
S or F key, then following will be shown on the screen.
0 :: 0
0 0440
002 MOV
MOVBL,
A7L 5, 3 0 P R I N T ER ON !
>B . D . U .
00 :: 00 44 00 4
2 CMP
MOV A
BLL ,, B
2L0 Unassemble
Dump
0 : 0406 J NC 0 4 0 B Buffer
If the printer is not connected at this time, press key P so the LCD would
show PRINTER ERROR! on the second line.
0 : 0408 S UB A L , B L
D ........ command will allow the printer to print the machine code.
0 : 0 4 0A I NT 3 U ........ command will allow the printer to print the assembly program.
B ........ command sends data of RAM directly to the printer without going
through any modification.
0 : 0 4 0B ADD A L , B L
Example:
The address, 90, is used for printer code.
0 : 0 4 0D I NT 3
) Command B will send 90 directly to the printer.
) Command D will convert 90 into ASCII (39, 30) code before sending to
Now if user want to see the process of the above program, then the proce- the printer.
dure is as follows:
) Command U will unassemble 90 to NOP, then to ASCII code (4E, 4F,
1) After entering the above program, press F7 key, then the menu will be 50) before sending to the printer.
displayed as follows: The starting address and the ending address need to be entered first before
using commands B, D, U. Followed by an Enter or ARROW UP key in
order to print the output.
20 17
Users Manual Users Manual
Example Each time entering the command P, the CPU will send out 1B 40 as the
starting command. If the user doesnt change the model setting, the user
U F000:F750 E7FF Enter can use the usual model to print.
If input only the starting address, the UNASSEMBLE command is as fol- The command P will allow the 8255 to program as model 1 as the output.
lowed. The CPU will send the printed data into 8255s A-port, then the printer itself.
U 400 Enter only the UNASSEMBLE command. The connection between 8255 and the printer is:
Command B can be used to print data or program the printer, if the ASCII 8255 PRINTER
code is written into the printer and if the printer would allow the setting PA0 DATA1
instruction to alter the work model. However, the setting instruction model PA1 DATA2
can be assigned to the same address while the output in another address.
PA2 DATA3
The setting instruction should first be sent to the printer before the data is
DATA PA3 DATA4
send to the printer. The designed setting command of different printers can
BUS PA4 DATA5
be obtained from their handbook. The following is an example of Printer
PA5 DATA6
ESPON-800.
PA6 DATA7
When power on, the command D in the system will allow the model PA7 DATA8
setting of the printer to be saved as 0:0400
PC4 PE
0:0400 1B 40 1B 57 01
PC5 BUSY
Set for twice enlargement CONTROL PC6 ACKNLG
Starting command BUS PC7 STROBE
GND GND
Followed by storing the ASCII code of the printed data in 0:0600 starting
address:
The PC4 to PC6 of 8255 are connected to a 510 ohms resistor to prevent
0:0600 41 42 43 44 45 them from short circuit with the printer before the command P is used to
A B C D E output the program. Each time 8255 leaves the command P, the system
will return to its original stage.
Once the printer is connected, press the key P then B, followed by
the input of the starting address: T - TRACE PROGRAM (AN N-STEP DESIGNED COMMAND)
>B 0:400 0404 Enter This command is used for program execution. TRACE will enter the INTER-
RUPT subprogram every time the program execute. N has a decimal range
Use command B again to input the data address, then input the from 1-99 with 10 as the rounding off number, and only operate if N is not 0;
necessary data as followed: other-wise it will clear the function.
>B 0:600 603 Enter
Syntax :
Output will be as follows : T 00 - STEP
18 19
Users Manual Users Manual
to be modified. Press Enter key and write the correct instruction and again 2) Press the Key T. The screen displays as follows:
press Enter key. Press key F7 another time would bring the instruction
back to the Unassemble. 0 4 0E
The ARROW DOWN key is used to proceed to the next command after the >A . D . F . G . I . M . P . T . U .
U. The ARROW UP key can be used to examine the program but not
more than 127 instructions in forward direction. When the program reaches 3) Now the user can view the program after the one instruction, two in-
the end, the U command can be used to decode the program again or struction, and so on by defining the number which is to be entered
forward. through keyboard.
During input program, instruction can be inserted by entering the desired Example:
address, then press key F5. At this time, INS.....END ADDR: 0000" will 01 - The instruction pointer stops after every single instruction.
appear on the second line of the screen to allow the user to enter the ending
address. Press the F5 key again to return to the A command. The CPU 040E
will move the address content from the present address until the ending T 00-STEP
address, to a new instruction for each instruction entry. If leave the com-
mand A model, it will automatically clear the function. After completion, press F7 for a menu display.
Refer to the cursor operational keys in the DUMP command for the
UNASSEMBLE command.
0 4 0E
T 0 1 - STEP
4) Press the key G, the menu will appear.
Example 0 4 0E
The example entered earlier can be seen as follows: >A . D . F . G . I . M . P . R . T . U
.
VMC - 8 6 0 9 . . 7 F F F 5) Press Enter key.
>A . D . F . G . I . M . P . T . U . 6) Press F7 key, the single stepping will start and the following menu will
be displayed:
1) Press U key, and enter the starting address of the program. 1st
0 4 0E
instrcution is
G 0000 : 0400 executed.
VMC - 8 6 0 9 . . 7FFF
Press G key and next F7 key for further view, the following results will be
U 0400 displayed:
I NT 0402 2nd
2) Press Enter key, the following will be displayed: instrcution is
>A . D . F . G . I . M . P . R . T . U
executed.
24 21
Users Manual Users Manual
Press G key and next F7 key for further view, the following results will be
VMC - 8 6 0 9 . . 7FFF
displayed:
U 400
I NT 0404 3rd instrcution
or
> A . D . F . G . I . M . P . R . T . U is executed.
Press G key and next F7 key for further view, the following results will be
U 0 : 400
displayed:
I NT 0406 4th instrcution Starting address
> A . D . F . G . I . M . P . R . T . U is executed.
The content of the Unassemble 0400 will start if only the starting
Press G key and next F7 key for further view, the following results will be address is entered. The built-in segment base is used here if it is not
displayed: entered.
I NT 0 4 0B The content of the Unassemble 0000:0400 will start if only the starting
address is entered with segment address as 0000:0400.
>A . D . F . G . I . M . P . R . T . U
Press U key would enter the Unassemble design:
Here user can observe the process of program execution, because data 30
is greater than 20 so that carry will not generate and the program execution Segment Base
will jump to the desired label. Now again press G key and next F7
Effective Address
key
I NT 0 4 0D Machine Code
>A . D . F . G . I . M . P . R . T . U
Anywhere during trace command, one can examine/modify the registers
0000 : 0400 B0 30
using R command (refer Register Command Description). MOV AL , 3 0
NOTE : Refer to the INTERRUPT command for precaution.
Assembly Language
U - UNASSEMBLE
Display the address first, then display the machine code (if the machine
The UNASSEMBLE command decodes the value of a group memory loca- code is too long, they will be continued on the second line). The second
tion mnemonics, and display on the displayed. Once enter this command, line displays the assemble program and the process is completely done if
input the proper design address. The following is the correct way to input the cursor appears in the last address of second line. However, in case the
address: cursor doesnt show, that means there is another line. Press the Enter key
would display all the commands, then press ARROW UP/DOWN key would
VMC - 8 6 0 9 . . 7 F F F display the next line back to the original stage.
>A . D . F . G . I . M . P . T . U . If the user needs to modify the instruction, press key F7 will move to the
command Assemble (A). And write the address of the instruction which is
22 23
Users Manual Users Manual
If the single-step is changed during the Interrupt subprogram, the user must
follow step by step of single-step hardware to execute the Interrupt subpro- 0 0 0 0 : 0 4 0 0 B050
gram in order to go back the original stage (separate example to demon- MOV AL , BL
strate this feature is given in the next page).
The commands used for the Interrupt subprogram: Note: Use key to move upward, and key to move downward.
0000:FFFF (ODD & EVEN RAM) c) Press Enter key and write the instruction again.
d) Press Enter key so that the modifications has been taken place.
F000:0000 ROM 27256 EXTENSION SECTION THAT HAS NOTE : When commands A and U are executed, the system program
uses 0000:1E00-1FFF as the buffer, therefore during the execu-
tion of A and U, this segment cannot be used.
F000:FFFF (ODD & EVEN EPROM)
28 25
Users Manual Users Manual
26 27
Users Manual Users Manual
32 29
Users Manual Users Manual
30 31
Users Manual Users Manual
Fig.1 Functional Block Diagram F000:F098 CALL FD4A ; Read in 2 letters from BL designated posi-
tion, change to hexadecimal and store in AX
F000:F09B RETF
F000:F09C CALL FD7A ; Read in 4 letters from BL designated posi-
tion, change to hexadecimal and store in AX
F000:F09F RETF
F000:F0A0 CALL FE55 ; Beep......
F000:F0A3 RETF
F000:F0A4 CALL EFDA ; Extended subprogram can be planned. Plan
8253 #2 counter as the extended counting
and check key-in when leaving the subpro-
gram
F000:F0A7 RETF
CODES TABLE
The key-in code in transferred to ASCII and the ability to transfer the
address, FF means empty codes that have not been defined.
Character Code : (F000:FF60 - FF83)
F000:FF60 : ASCII 30 31 32 33 34 35 36 37 38 39 41
Number 0 1 2 3 4 5 6 7 8 9 A
:FF70 : ASCII 42 43 44 45 46 47 48 49 4A 4B 4C
Alphabet B C D E F G H I J K L
ASCII 4D 4E 4F 50 51 52 53 54 55 56 57
Alphabet M N O P Q R S T U V W
FF80 : ASCII 58 59 5A FF FF FF FF FF FF FF FF
Alphabet X Y Z
F000:FF90 : ASCII FF 3C 3E 3F
Symbols < > ?
:FFA0 : ASCII FF 3D 5F FF FF 2F 2D 7F 26 2A 2B 28
NOTE: Some models incorporate a temperature compensation circuit within
the bias voltage generator Symbols = ^ / - & * + (
36 33
Users Manual Users Manual
ASCII 29 7E 2C 2E DISPLAY
This display contains 2 lines and each line consists of 20 words (20x2).
Symbols ) , .
This is a cursor LCD display modular. The CPU receives each 8 bits letter
:FFB0 : ASCII FF FF 3B 3A 22 FF FF 5B 5D 7B 7D FF which is locked into the internal display data of RAM (data display of RAM
80 bytes (D.D.RAM) allows 80 characters to be stored), and transfer to 5x7
Symbols ; : " [ ] { }
dot of array word and appear on the displayed.
ASCII 21 23 24 25
This lcd modular contains the word generator ROM that will supply 160
Symbols ! # $ % different 5x7 dot of array word and also a 64 bytes word generator RAM.
Users can define 8 types 5x7 dot of array word.
Functional key : (F000:FFBC-FF9B) The position of word display goes into the LCD Modular through the data
bus in CPU. Next through the instruction register and finally write the words
2D 0D FF 94 into the data register to display on a specific location. The LCD Modular
SP FI DEL will automatically increase or decrease the words in order to move to differ-
ent addresses. The user can therefore continue sending in word code. The
93 90 91 92 20 0D FF D4 D3 D0 D1 D2 cursor as to moved around or moved in the right of left direction.
CLS GO - SP INS EDIT LIST Specification of display:
Display data RAM : 80x8 BLT (80 words)
NOTE :-
Character generator ROM : 160 of 5x7 dot of array word
1) CTRL ON conditions have not been defined. Character generator RAM : 8 different users programmed 5x7 dot
2) SP and area use under the key SHIFT ON and OFF. of array
Kinds of instructions : Clear the display, send cursor home
Checking section of interrupt vector position
(HOME), ON/OFF display. Cursor ON/
After RESET, the system program will allow the stored data to begin from OFF, character blinking cursor move to
0:0000 until Interrupt vector position. FF is the undefined interrupt that for another position, display change posi-
the user to decide. tion.
F000:FFC0 : FF FF FF FF CA F7 00 F0 When the internal power is on, the circuit is reset.
INT1 Internal circuit vibrator.
30 F7 00 F0 1A F7 00 F0
INT2 INT3
FFD0 : FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF
FFE0 : FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF
34 35
Users Manual Users Manual
TABLE-3 CHARACTER CODE The LCD modular has 2 8-bits register-one instruction register (IR) and one
data register (DR).
The instruction register stores the instruction code and address information,
0 @ P \ p - D p which contains display data RAM and address of character generator RAM.
However, the content of IR is only for read-in but not read-out.
! 1 A Q a q q
The data register can only temporary store data, the input data first goes
" 2 B R b r through LCD and is stored in the data register. It will then automatically be
E T transferred to display data RAM or character generator RAM. When the
# 3 C S c s CPU read the data from the displayed RAM or from the character generator
f RAM, it will also temporary store the data in the data register. When the
address information is input into the instruction register, the relative data will
$ 4 D T d t ` P : be moved from display register RAM or character generator RAM to the
data register. Then the data can be read from data register by using the
% 5 E U e u V output instruction of CPU. One way to select the two registers is to select
the register signal (RS) like follow:
& 6 F V f v U 6
RS R/W FUNCTION
7 G W g w - S 0 0 Data Bus > instruction Register
( 8 H X h x x 0 1 Read out busy flags (BUSY FLAG DB7) and address
counter (DB0-DB6)
) 9 I Y i y 1 y 1 0 Input into data register and execute the inner instruction
: (D.R.RAM> D.R. OR C.G.RAM D.R.)
* : J Z j z j
1 1 Get the data out form register, and execute the inner
+ ; K [ k { x instruction: (D.D.RAM> D.R. OR C.G.RAM> D.R.)
the character generator RAM, the address counter will automatically add or TABLE-2 CHARACTER CODES
subtract 1.
When the content of address counter is in RS = 0 and R/W = 1, the output
data line is DB0 DB6.
DISPLAY DATA RAM (D.D. RAM)
This is a 80x8 bit RAM, which can store 80 8-bit character code as the
display data, it can be sent to CPU as the RAM data section without going
through RAM section.
Address setting of data display RAM is as followed:
Second Line
: 40 41 42 43 44 45 46 47 48 49 4A ...... 56 57
(hexadecimal)
38 39
Users Manual Users Manual
0.2V
FUNCTIONS OF RESET 0.2V 0.2V
USING THE INTERNAL RESET CIRCUIT TO START
LCD Modular internal has an automatic power supply to be used to RESET Trcc Toff > 1ms.
when the power rises. During RESET, the busy flag is set. When the 0.1ms <Trcc <10ms.
voltage is raised to 4.5V in about 10ms, it is in the busy stage. The
following instructions are then used to set the beginning stage of LCD.
1. Clear display
2. Function set
DL = 1 ----------- 8-bit data length interface
N = 0 ----------- (single line display)
F = 0 ----------- The source of 5x7 dot of array character
3. Display ON/OFF control
D = 1 ----------- Display OFF
C = 0 ----------- Cursor OFF
B = 0 ----------- Character flashing function OFF
42 43
Users Manual Users Manual
binary code ADD from 00H until 27H as the first line of from 40H until 67H Initialization by Instructions
as the second line.
If the power conditions for the normal operation of the internal reset circuit
READ BUSY FLAG/ADDRESS COUNTER are not satisfied.
The busy flag (BF) in LCD can be read from the CPU, using the instruction LCD unit must be initialized by executing a sense of the instructions. The
of LCD modular is the execution of the internal instruction BF = 1 repre- procedure fro this initialization process is as follows.
sents the busy stage (execution of the internal instruction), it will not accept
any instruction at this time until BF = 0. Power ON
Content of address counter and the busy flag will be read out at the same
time, it is a 7-bit binary, the address counter will instruct one of the ad- Wait 15ms or more
dress, either the character generator RAM or display data RAM. This is after VDD reaches 4.5V
determined by the final input address set instruction.
SEND DATA INTO C.G. RAM/D.D. RAM RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Busy flag cannot be checked before
execution of this instruction.
Data with 8-bit in length can be sent into the character generator RAM or 0 0 0 0 1 1 * * * * Function Set (8-Bit Interface)
the display data RAM. The address of the input data is instructed by the
address counter, however, the address of address counter is influenced by
the final input address set instruction. Wait 4.1ms or more
After data input whether the address counter add 1 or minus 1 is deter-
mined by the design of the module. It can also be designed as location RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Busy flag cannot be checked before
execution of this instruction.
movement of the display. 0 0 0 0 1 1 * * * * Function Set (8-Bit Interface)
READ DATA OUT OF C.G. RAM/D.D. RAM
Character generator RAM with 8-bit in length or the display data RAM can Wait 100 Ps or more
be read by the CPU. The read out data address is instructed by the
address counter. The address counter is instructed by the final input
address set instruction. RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Busy flag cannot be checked before
execution of this instruction.
This instruction has to be set in C.G. RAM/D.D. RAM address, once shift 0 0 0 0 1 1 * * * * Function Set (8-Bit Interface)
cursor instruction of the C.G. RAM/D.D. RAM data is read out, no other
instruction can be read out.
Busy flag can be
RS R/W DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0
The address setting instruction will read the data address into address checked after these
counter. 0 0 0 0 1 1 N F * * Function Set instructions are
completed. If the
0 0 0 0 0 0 1 0 0 0 Display Off
Shift cursor command will allow the previous address setting to be used busy flag is not go-
0 0 0 0 0 0 0 0 0 1 Display Clear ing to be checked
again in order to read the D.D. RAM data. the data can be read from the then a wait tim e
C.G. RAM/D.D. RAM after the cursor shift. 0 0 0 0 0 0 0 0 I/D S Entry Mode Set longer than the to-
8-Bit Interface, tal execution time
After the execution of data address counter add 1 or minus 1 will be set in Single/Dual Line of these instruc-
the LCD modular. D isplay, Dis- tions is required.
play Font. (See Table 5)
After the execution of data read out, the display will not shift. Caution: Hereafter, the display format
End of Initialization
cannot be changed.
48 45
Users Manual Users Manual
INSTRUCTION DESCRIPTION When data enters the character generator RAM, the display will not move.
When the LCD is controlled by the CPU, only the instruction register (IR) DISPLAY ON/OFF
and the data register (DR) can be read directly by the CPU. The com-
D :D=1 - Display ON
mands from outside the modular can decide the internal operation of LCD.
These commands include the register selection (RS) signals, read/write (R/ D=0 - Display OFF
W) signals, and data buffering signals (DB0-DB6). C : C=1 - Cursor display on the display address of the display
Table 5 lists all the useful commands in the LCD modular and the execution counter
time, these commands are divided into the following group: C=0 - Cursor does not display
Commands of set LCD module B : B=1 - Character blinking of cursor position at feq or fosc=250KHz
freq, therefor all black points and character display will
Commands of internal set address RAM exchange with each other. Each character display and
Commands of data transfer in or out from the internal RAM overshadow 409.6ms.
Other commands DISPLAY/CURSOR SHIFT
When the LCD modular is executing a command it will reject other com- S/C R/L
mands. Except the busy flag/read address counter, the internal counting 0 0 - Cursor move to the left (AC <AC-1)
period of busy flag is set to as 1. If the CPU wants to send in other
commands it will have to check the busy flag first, until it is cleared to 0 0 0 - Cursor move to the right (AC <AC+1)
before it send in. The explanation is as followed: 1 0 - All the characters and cursor move to the left
1 1 - All the characters and cursor move to the right
DISPLAY CLEAR COMMAND
This command will put the display data into a empty space code (20H), Note : When the display moves, the address counter will not move.
address counter will be cleared to 0. When executing this command,
FUNCTION SET
display OFF, the cursor or the character blinking function will be moved to
the most left side if it is in the set condition. DL : Select data length for the interface circuit.
DL=1 - Using the 8 bits data length.
DISPLAY/CURSOR HOME
DL=0 - Using the 4 bits data length.
The address counter will be cleared to 0, content of D.D. RAM will not be
N : Select the display format (one or two lines)
influenced; but if the cursor or the character blinking function is in the set
condition, it will be moved to the most left side position. C.G. RAM ADDRESS SET
Address counter and character generator RAM have address which are
ENTRY MODE SET
driven by the binary 6-bit. when this instruction is driven in, data can be
I/D bit = 1, 1 is added in the address counter after each time it read/write sent into the CPU and character generator RAM.
a display data RAM character code, so that the cursor or the character
blinking function will move one place to the left and vise-versa when I/D=0. D.D. RAM ADDRESS SET
The read/write (R/W) character generator also has the same function. Address counter and display data RAM have addresses which are driven by
the binary 7-bit. When this instruction is driven in, data can be sent into the
S bit = 1, but each time it read/write a display data RAM code, it will move CPU and the display data RAM. When N=0 (a single line display), binary
to the display direction and move one space to the left (I/D=0) or one space code ADD between 00H and 4FH; when N=1 (a two lines display), the
to the right (I/D=1). When S=0, the display will not move.
46 47
Users Manual
SUB-PROGRAM
Input Parameter : DX : The first displayed number after the entry The 8086/8088 so-called subprogram has both the same segment calling
BL : The display location of word at the most left and the different segment calling. The different segment calling is used
side. towards the different. The different segment calling is used towards the
BH : Which location from BL the character starts. different segment of subprogram. The subprogram of this system program
has to be all in the same segment in order to call the same subprogram (the
Output Parameter : AL : The code used for storing functional key.
same segment and different segment subprogram are different from RET
DX : Store the displayed numbers. command). For user convenience, the system program will start from
F000:F040 as the catalog section of the subprogram. In the subprogram
F000:F06C CALL FAA0
catalog segment, if the same segment subprogram RET is changed to
The appointed location of BL and BH, the code of input section and effective different segment subprogram RET is changed to different segment subpro-
address are stored consequently in DX and DI (i.e. DX:DI). gram RETF. The user can therefore choose the different segment calling
from any segment to call one of the subprogram in the catalog segment.
The displayed location of most left side character is instructed by BL, BH
instructs the position from the first character onwards. If BH is smaller than Another method of using system subprogram is to use the M command to
9 but not equal to 4, BL add to BH will be the exact location of display move all the programs in the system into the users segment. This allows
location. direct access to the calling commands in the segment. Since there are
other subprogram that can be called from the subprogram, all the programs
The keys , have to be moved together in order to protect each other address (when
are used to operate the cursor while input numbers. It will every subprogram is being used in the catalog, it should start moving from
also allow the cursor to move between segment and effective address. F000:EA00-FF4F), it is therefore a waste of space.
Other than these three functional keys, the rest will transfer to code number
and jump out of subprogram. The user can add new program into the empty space of catalog section.
Input parameter : BL : Instruct the most left side word to display loca- OPERATION DESCRIPTION OF SUB-PROGRAM
tion. The rules is the same as (1). F000:F040 CALL SI
BH : Instruct the position starting from BL, first entry
The calling of the implied address will allow the subprogram address to be
into the subprogram is set to 0, program execu-
registered into the SI calling if a called program is not in the catalog section.
tion will follow the operation whether to add or
Input Parameter : The calling of subprogram address is instructed by SI.
subtract.
However, others depend on the needs of the subpro-
Output Parameter : Al stores the key-in code of functional keys. gram calling.
F000:F070 CALL FE15 Output Parameter : Depends on the execution of subprogram.
Transfer the numbers in AL from ASCII code to hexadecimal to be stored in F000:F044 CALL FEEO
lower 4 bits of AL , clear to C-Flag at the same time to 0. But set the C-
Flag of non-numerical ASCII code to 1, without changing the code of AL. Write all the commands in the AL into the LCD modular.
Input Parameter : ASCII code of numbers that are stored in AL. Input Parameter : AL stores the LCD modular orders that have been writ-
ten in .
Output Parameter : The ASCII code of the numbers in AL will be transferred
to hexadecimal to be stored in the lower 4 bit, clear the Output Parameter : None
C-flag to 0 otherwise set C-Flags to 1 with-out chang-
ing the AL code.
52 49
Users Manual Users Manual
50 51
Users Manual Users Manual
0:0409 CALL F000:F044 ;Call for write-in instruction sub- F000:F074 CALL FE30
program
After changing the hexadecimal in AL to ASCII code, the higher level is
0:040E CALL F000:F050 ;Call for the read key-in
stored in AH and the lower level is stored in AL.
0:0413 CALL F000:F058 ;Call the alphabetical key code
and transfer into the subpro- Input Parameter : AL stores the exchanged hexadecimal.
gram Output Parameter : AH stores the higher level ASCII, AL stores the lower
0:0418 JB 040E ;Ignore the alphabetical key-in, level ASCII.
return to original key-in; other-
wise execute the next instruc- F000:F078 CALL FF2B
tion.
Clear the first line display of the BL, display of D.D. RAM will be stored into
0:041A CALL F000:F048 ;Key-in code enter into LCD
modular the blank code 20, then the cursor will move back to the starting point.
0:041F JMP 040E BL = X0XX XXXX means clearing the first line.
0:0422 HLT BL = X1XX XXXX means clearing the second line.
Input parameter : BL indicates the number of cleared lines.
Program input starts executing from 400, the first word blinking can be seen
Output Parameter : BL stores 80 (first line) or CO (second line).
at this time, they can be input again in order to be displayed on LCD. 21st
to 41st word will exceed the first line display boundary, therefore they are F000:F07C CALL FCD5
stored in LCD modular but will not be shown. The 41st word will be the first
letter on the second line. Similarly, 61st to 80th word will not be shown. Clear display (blank code 20 is stored in the display)
Example-2 Input Parameter : None
Clear second line, display DX value, and DX values are altered by key-in to Output Parameter : None
be display at LCD.
F000:f080 CALL FD20
0:0400 MOV AL,01 ;Clear display commands to be
stored in AL The cursor blink, waiting for the key to jump out.
0:0402 MOV BL,C0 ;Write the set LCD address Input Parameter : None
counter commands into BL. Output Parameter : AL stores the key-in code.
CO=1100 0000 represent the
position of second line F000:F084 CALL FDC0
0:0404 CALL F000:F078 ;Clear second line Insert the AL lower 4 bit hexadecimal into the DX, the location is determined
0:0409 MOV BX,00C2 ;Input parameter of subprogram by BH. BH must be smaller than r, BH = 0 represents it is inserted into the
is stored in BX. most left-sided position of DX.
;B0-B5 set the word at the
most left side to display posi- Input Parameter : The AL lower 4 bit means an insert into hexadecimal.
tion, B6=1 represents the sec- DX - means inserted numbers.
ond line, B7 can be any num-
BH - indicates inserted location.
ber. After entering subprogram,
it is automatically set to 1 Output Parameter : Dx is the code after insertion.
(B=Bit).
56 53
Users Manual Users Manual
F000:F088 CALL FFOA Input Parameter : BL instructs the first word that is ready to read out from
Write the AL code into cursor location (inside the address of the address the most left side.
counter). Output Parameter : The number read will be transfer to hexadecimal to be
stored in AX, and clear the C-Flag to 0. Otherwise, the
Input Parameter : AL stores the code that is ready for input.
AL code will return and the C-Flag will be set to 1.
Output Parameter : None
F000:F0A0 CALL FE55
F000:F08C CALL FF20
Make a beep sound.
Write the AX code into the cursor location.
Input Parameter : None
Input Parameter : AX stores the code that is ready for input. Output Parameter : None
Output Parameter : None
F000:F0A4 CALL FEDA
F000:F094 CALL F39A Delay subprogram that can be designed, the delay is counted by the
Write the AX code into the BL indicated location of LCD, BL indicates the counter # 2 of 8253. It will check the key at the end, in order to jump out
first line or second line as in (11). the subprogram after it read.
Input Parameter : BL indicates the most left-sided location of the word. Input Parameter : Before input, counter # 2 of 8253 has to be programmed.
AX stores the codes that are ready for input. The subprogram will check counter # 2 and Jump out
once react the end.
Output parameter : None
Output Parameter : ALAL code 00 represents no key-in, otherwise AL
F000:F098 CALL FD4A code will be the key-in code. If AH is influenced, it will
change (indefinite value).
The LCD which instructed by BL read out 2-bit and change it to hexadeci-
mal to be stored in AL, also clear the C-Flag as 0. If it is a non-numerical
character, the C-Flag will be set to 1 and return once AL is back. the
instruction of BL location is the same as (11). Practical Examples of Subprogram:
Example-1
Input Parameter : BL indicates the read-in of the first word on the left.
Output Parameter : If read a number, then will transfer to hexadecimal to Input alphabetical key, and display at LCD
be stored in AL. The C-flag has to be cleared to 0, 0:0400 MOV AL,01 ;Clear display commands to be
otherwise it is taken back to AL, moreover the C-Flag stored in AL
is set to 1 in order to return. 0:0402 CALL F000:F044 ;Calling instruction is input into
F000:F09C CALL FD7A LCD subprogram
0:0407 MOV AL,0D ;Command that display ON/
The LCD which instructed by BL read out 4-bit, changes to hexadecimal to OFF is stored in AL
be stored in AX, and Clear the C-Flag to 0. If it is non-numerical code, the
0D = 0000 1101
C-Flag is set to 1 and is also taken back into AX before it returns. Bl
Letter blinking cursor OFF dis-
instructed the number on the most left, the rule ins the same as in (11).
play ON Display ON/OFF or-
der
54 55
Users Manual Users Manual
60 57
Users Manual Users Manual
58 59
Users Manual Users Manual
MASM MACRO-ASSEMBLER USES WITH VMC-8609 (Optional) Pin Assignment of CN9 Connector for LCD Display
To download a file assembled using MASM software in 8086/8088 kit. 2 4 6 8 10 12 14 16
1) Edit the assembly program using any text editor to generate any .ASM
file. For example DEMO.ASM. 1 3 5 7 9 11 13 15
2) Execute MASM DEMO <CR>. A message appears on screen:
PIN NO. SYMBOL DESCRIPTION PIN NO. SYMBOL DESCRIPTION
Object filename [filename .OBJ] :
1 BD7 DATA BUS BIT 7 9 E CHIP ENABLE
Press <CR> and again a message appears on screen:
2 BD6 DATA BUS BIT 6 10 R/W READ/WRITE
Source listing [NUL.LST]:
3 BD5 DATA BUS BIT 5 11 RS REGISTER SELECT
If no source listing is required, then press <CR>, otherwise enter requi-
site DEMO. Next message which appears on screen is: 4 BD4 DATA BUS BIT 4 12 VO CONTRAST CONTROL
Press Enter. If the assembly program does not contain any error, then 6 BD2 DATA BUS BIT 2 14 VSS GROUND
the following message appears: 7 BD1 DATA BUS BIT 1 15 N.C.
0 Warning Errors 8 BD0 DATA BUS BIT 0 16 N.C.
0 Severe Errors
8255 Connector CN3, CN4 & CN5 (26 Pin Connector) Detail
However if assembly program contain errors, then error messages with
line number is edited program will be displayed. At the end a file with 2 4 6 8 10 12 14 16 18 20 22 24 26
.OBJ extension will be created using MASM. For more details refer
MASM Manual.
3) Execute LINK DEMO <CR>. Following message appears: 1 3 5 7 9 11 13 15 17 19 21 23 25
Rune file [filename .EXE]: <CR> PIN SIGNAL PIN SIGNAL
List file [NUL.MAP]: <CR> 1 PC4 14 PB1
Libraries [.LIB]: <CR> 2 PC5 15 PA6
At the end a file with .EXE extension will be created. 3 PC2 16 PA7
4 PC3 17 PA4
4) Execute EXE2.BIN DEMO <CR> 5 PC0 18 PA5
A file with DEMO.BIN extension will be created. 6 PC1 19 PA2
5) Execute ASCBIN <DEMO.BIN> <CR> 7 PB6 20 PA3
8 PB7 21 PA0
Message which appears are:
9 PB4 22 PA1
Hex filename: <CR> 10 PB5 23 PC6
Start address: <CR> 11 PB2 24 PC7
12 PB3 25 GND
A file with .HEX extension will be made.
13 PB0 26 GND
64 61
Users Manual Users Manual
Timer/Interrupt Connector CN6 (26 Pin Connector) Detail SERIAL INTERFACE (Optional)
The Serial Interface is provided using 8251 USART whose transmit & receive
2 4 6 8 10 12 14 16 18 20 22 24 26 clock is generated by Timer-1 of 8253. The RS-232C signals are available
on 9-pin Female Connector CN5 and are as follows:
1 3 5 7 9 11 13 15 17 19 21 23 25 Pin No. Signals
PIN SIGNAL PIN SIGNAL
1 Not Connected
2 Receive Data (Rx)
1 CAS0 14 GATE0
2 CAS1 15 OUT0 3 Transmit Data (Tx)
3 CAS2 16 CLK1 4 Data Terminal Ready (DTR)
4 INTR 17 GATE1 5 Ground (GND)
5 IR0 18 OUT1 6 Data Set Ready (DSR)
6 IR1 19 CLK2 7 Request To Send (RTS)
7 IR2 20 GATE2 8 Clear To Send (CTS)
8 IR3 21 OUT2 9 Not Connected
9 IR4 22 NC
10 IR5 23 NC
To communicate VMC-8609 with the Computer, the IBM PC has to run any
11 IR6 24 NC
communication software like TANGO, XTALK, or any other software. The
12 IR7 25 GND
CN5 connector is to be connected to the COM Port 1 or 2 of the PC with
13 CLK0 26 GND
the cable having cross connections as follows:
To make our explanation easier, we will use XTALK software for communi-
cating from Computer to VMC-8609 or user can use Hyper Terminal utility of
WIN 95/98/XP software.
62 63
Users Manual Users Manual
PROGRAM - 2 The origin difined in the above line is the first origin defined in your ASM
To find the maximum no. in a given string (16 Bytes long) and store it in file. From this location onwards your file will be loaded while one is
location 0510. downloading this file to the VT-86/88. It is important to note this address
from the ASM file. In the above example, we have entered 200 which is
noted from DEMO.ASM file.
ADDRESS OP CODE MNEMONIC COMMENTS
After execution of the above file DEMO.ASC will be created which can
0400 BE 00 05 MOV SI, 0500 Load SI reg. with starting ad- be transmitted or downloaded to VMC-8609 kit.
dress of string.
0403 B9 10 00 MOV CX, 0010 Initialize Counter Reg. (with
the length of string i.e. no. of
bytes).
0406 B4 00 MOV AH, 00 Initialize the 8 bit Acc.
0408 3A 24 CMP AH,[SI] The 1st data byte of the
string with 00.
040A 73 02 JAE 040E If both bytes match (above is
equal) then branch to (l).
040C 8A 24 MOV AH,[SI] Else, move the contents of
(0500) into 8 bit ACC, i.e., a
real no. in AH.
040E 46 INC SI Point at the next address of
string.
040F E0 F7 LOOPNE 0408 Decrement the counter value,
if not zero, continue process-
ing (searching to the Max.
No. continued.)
0411 88 24 MOV[SI],AH Max. No. in 0510 address.
0513 F4 HLT Halt.
For Example
AFTER EXECUTION
0500 : 01 0508 : 12 0510 : 15
0501 : 02 0509 : 08
0502 : 03 050A : 09
0503 : 04 050B : 0A
0504 : 05 050C : 0B
0505 : 06 050D : 0E
0506 : 15 050E : 0C
0507 : 07 050F : 0D
68 65
Users Manual Users Manual
SAMPLE PROGRAMS
result of add. is to be started
INTRODUCTION storing). Also its the start-
The monitor software of VMC-8609 resides in 32K Byte of EPROM. The ing address of MSBs of ar-
system software has certain useful routines, which can be utilised by the ray.
user for developing his programs. The address of these routines are given in 040A 8B 04 MOV AX,[SI] Load Data bytes (which are
the appendix at the end of the manual. in location 0500 and 0501 in
16 bit ACC.
PROGRAMMING EXAMPLE i.e. (0500) - AH
The following sample programs are given here to make the user familiarise (0301) - AL
with the operation of VMC-8609.
040C 11 05 ADC [DI],AX Add the contents (MS Bytes)
1) Addition of two binary number of 8 byte length. of 0508, 0509 with the con-
2) Find the largest number in a given string. tents (LS Bytes) of 0500 +
0501 and store the result in
3) Sort a string of bytes in descending order.
location 0508 onwards.
4) ASCII multiplication. 040E 46 INC SI Point at 0502 LOCN (Next
5) Divide a string of unpacked ASCII digits. relevant source LOCN).
6) Calculate the no. of bytes in a string of data. 040F 46 INC SI Point at next relevant LOCN,
7) Convert the string of data to its compliment form. 0410 47 INC DI i.e. 0504.
0411 47 INC DI
0412 49 DEC CX Decrement the counter.
PROGRAM-1 0413 75 F5 JNE 040A If not zero (i.e. CX =0000)
TO ADD two Binary numbers each 8 Bytes long: then continue addition.
0415 F4 HLT Else, Halt.
ADDRESS OP CODE MNEMONIC COMMENTS
For example
0400 F8 CLC Clear Carry Flag.
0401 B9 04 00 MOV CX,0004 Load Counter register with no. AFTER EXECUTION
of times addition to be per- 0500 : 01 0508 : 0A 0508 : 0B
form ed (i.e. Initialize the 0501 : 02 0509 : 0b 0509 : 0D
counter register).
0502 : 03 050A : 0C 050A : 0F
0404 BE 00 05 MOV SI,0500 Load source Index Reg. with 0503 : 04 050B : 0E 050B : 12
starting address of Ist Binary 0504 : 05 050C : 0F 050C : 14
no. (LSBs array).
0505 : 06 050D : 10 050D : 16
0407 BF 08 05 MOV DI, 0508 Load Destination Index Reg. 0506 : 07 050E : 11 050E : 18
with Dest. Address (where the
0507 : 08 050F : 12 050F : 1A
66 67
Users Manual Users Manual
72 69
Users Manual Users Manual
continue processing till z=0) 0406 B2 34 MOV DL, 34 Load DL with the Multiplier
041B 4B DEC BX At this juncture, first sorting ASCII Digit.
will be over i.e. first no. is 0408 B9 08 00 MOV CX,0008 Load counter reg. with the no.
logically compared with the of bytes in the string.
041C BE 00 05 MOV SI,0500 rest of the nos. For the cor-
rect sorting, all the nos. must 040B C6 05 00 MOV [DI],00
be compared with each other 040E 80 E2 0F ANDL, 0F MS nibble of Multiplier is ze-
logically, i.e. above process- roed.
ing should be carried out no. 0411 8A 04 MOV AL, [SI] First ASCII no. of string in AL.
of bytes times.
0413 46 INC SI Point at the next LOCN in
041F 75 E5 JNZ 0406 string (of ASCII Nos.)
0421 F4 HLT Halt. 0414 80 E0 0F AND AL, 0F MS nibble at Multiplier no gap
and is also zeroed.
For Example
0417 F6 E2 MUI DL Perform the fn. AX = AL* DL
AFTER EXECUTION
0419 D4 0A AAM Perform the fn. AH=AL/0A,
0500 : 05 0502 : 28 AL=remainder.
0501 : 00 0503 : 25 041B 02 05 ADD AL,[DI] The contents of AL (remain-
0502 : 20 0504 : 20 der obtained by performing the
0503 : 25 0505 : 15 above operation)
0504 : 28 0506 : 07 041D 37 AAA Added with 00 which are in
0505 : 15 1st Dest. LOCN. The con-
0506 : 07 tents of AL are unpacked
Decimal no. and are stored in
1st Dest. LOCN (=0508).
PROGRAM - 4 041E 88 05 MOV [DI],AL
0420 47 INC DI Point at the next Dest. LOCN.
ASCII MULTIPLICATION
0421 88 25 MOV [DI],AH Contents of AH (Quotient got
To multiply an ASCII string of eight numbers by a single ASCII digit. The in AAM operation) are moved
result is a string of unpacked BCD digits. in next best. LOCN (0509).
0423 49 DEC CX Decrement the Counter reg.
ADDRESS OP CODE MNEMONIC COMMENTS
0424 75 EB JNZ 0411 If not zero, continue multiply
0400 BE 00 05 MOV SI, 0500 Load SI reg. with starting ad- and storing unpacked BCD
dress of string. digits, ELSE.
0403 BF 08 05 MOV DI, 0508 Load DI reg. with the starting 0426 F4 HLT HALT.
address of result LOCNS.
70 71
Users Manual Users Manual
(a) The program receives the character from PC and display it on LCD. For Example
0400 B0 B7 MOV AL,B7 ;control word format of AFTER EXECUTION
8253
0402 E6 06 OUT 06,AL 0500 : 31 0508 : 00
0404 B0 13 MOV AL,13 ;count is given to set the 0501 : 32 0509 : 02
baud rate at 4800 0502 : 33 050A : 00
0406 E6 04 OUT 04,AL 0503 : 34 050B : 05
0408 B0 00 MOV AL,00
0504 : 35 050C : 07
040A E6 04 OUT 04,AL
0505 : 36 050D : 06
040C B0 4E MOV AL,4E ;mode instruction format
040E E6 52 OUT 52,AL ;in asynchronous mode 0506 : 31 050E : 00
0410 B0 05 MOV AL,05 ;command instruction for- 0507 : 32 050F : 02
mat make transit enable
and receive enable high
0412 E6 52 OUT 52,AL PROGRAM - 6
0414 9A 7C F0 00 F0 LM: CALL F000:F07C ;clear the display
0419 B3 80 MOV BL,80 ;delete the first line To calculate the no. of bytes in a string starting from 0502 up to an identifier
041B 9A 78 F0 00 F0 CALL F000:F078 (data byte) placed in AL reg. The actual count will be in LOCN 0500 &
0420 B9 14 00 MOV CX,14 0501.
0423 E4 52 L1: IN AL,52 ;check for Rx RDY signal
0425 24 02 AND AL,02
76 73
Users Manual Users Manual
80 77
Users Manual Users Manual
041E 9A 78 F0 00 F0 CALL F000:F078 Note : Keep all DIP Switch position at ON Position (SW5) for following
0423 51 L2: PUSH CX program.
0424 9A 50 F0 00 F0 CALL F000:F050 ;call for the read key in
CALL F000:F058 8259 Interrupt Controller Program
;call the alphabetical key The 8259 used in our VMC-8609 is at I/O address 30 & 31.
code and transfer into
subprogram The following program illustrates the use of IRQ0 of 8259. Whenever user
0429 9A 58 F0 00 F0 CALL F000:F048 ;key in code enter into made 18th Pin of 8259 or 5 Pin of CN6 Connector is made low. The
LCD modulator. 0000:400 program branches to 2000 address.
042E 9A 48 F0 00 F0 CALL F000:F048 0400 B8 00 00 MOV AX,0000 ;data segment is initial-
0433 50 PUSH AX ize to zero
0434 E4 52 L1: IN AL,52 0403 8E D8 MOV DS,AX
0436 24 01 AND AL,01 ;check for TxRDY signal
0405 B8 00 20 MOV AX,2000 ;interrupt location is de-
0438 74 FA JE 0434 fined
043A 58 POP AX
0408 89 06 00 00 MOV [0000],AX
043B E6 50 OUT 50,AL ;trnsmit the character to
040C B8 00 00 MOV AX,0000
CRT terminal
043D 59 POP CX 040F 89 06 02 00 MOV [0002],AX
043E E2 E3 LOOP 0423 0413 B0 17 MOV AL,17 ;ICW1 Command
0440 B9 14 00 MOV CX,0014 0415 E6 30 OUT 30,AL
0443 B3 80 MOV BL,80 ;delete the first line 0417 B0 00 MOV AL,00 ;ICW2 Command
0445 9A 78 F0 00 F0 CALL F000:F078 0419 E6 32 OUT 32,AL
044A 51 L5: PUSH CX 041B B0 01 MOV AL,01 ;ICW4 Command
044B 9A 50 F0 00 F0 CALL F000:F050 ;call for the read key in 0413 E6 32 OUT 32,AL
0450 9A 58 F0 00 F0 CALL F000:F058 ;call the alphabetical key 041F B0 FE MOV AL,FE ;unmask IRQ0
code & transfer into sub- 0421 E6 32 OUT 32,AL
program 0423 9A 7C F0 00 F0 CALL F0000:F07C ;clear display
0455 9A 48 F0 00 F0 CALL F000:F048 ;key in code enter into 0428 B3 80 MOV BL,80 ;input parameter of sub-
LCD modulator
program is stored in BL,
045A 50 PUSH AX clear 1st line
045B E4 52 L4: IN AL,52 ;check for TxRDY signal
042A 9A 78 F0 00 F0 CALL F000:F078
045D 24 01 AND AL,01
042F B080 MOV AL,80 ;write all the commands
045F 74 FA JE 045B
in AL into LCD modula-
0461 58 POP AX tor
0462 E6 50 OUT 50,AL ;Transmit the character
0431 9A 44 F0 00 F0 CALL F000:F044
to CRT terminal
0436 0E PUSH CS
0464 59 POP CX
0465 E2 E3 LOOP 044A 0437 1F POP DS
0467 E9 AA FF JMP 0414 0438 B3 00 06 MOV SI,600 ;starting addr of table is
Execute using G command from 0000:0400 and press any key of the stored into SI
VMC-8609 keyboard, the same will be displayed on the LCD and on the 043B B9 0F 00 MOV CX,000F ;store table checking
screen of PC. length in CX
043E FC L1: CLD ;clear direction flag
78 79
Users Manual Users Manual
Hyper Terminal utility provides a feature by which the data stored in VMC-
8609 can be stored in the floppy diskette of PC/XT/AT. This can be achieved
by following the instructions given as below:
Example
We are storing the program/data of VMC-8609 from 0000:0400 (Starting
address) to 0000:04FF (End address) as an example to demonstrate the
UPLOADING & DOWNLOADING features.
81
Users Manual Users Manual
a) On VMC-8609, execute from F000:F003 using G command as follows: DOWNLOADING PROCEDURE FORM PC TO KIT FOR 8086 KIT
VMC - 8 6 0 9 . . 7FFF
a) On VMC-8609, execute from F000:F003 using G command as follows:
G F000 : F003
Press Enter key and the following will come on the display: VMC - 8 6 0 9 . . 7FFF
G F000 : F003
RS - 2 3 2 4 8 0 0 . BPS
IN F000 : 0400 Press Enter key and the following will come on the display:
82 83
BLCOK DIAGRAM OF VMC-8609 MICROPROCESSOR TRAINER KIT (BASED 8086/88)
CN7
MAINRS-232
CONTROLLER
INTERRUPT
INTERFACE
COUNTER
TIMER/
USART
U29
U30
U28
U27
U24 U25 U26
11.0592
REAL TIME
11.0592
MHz
MHz
CLOCK
BATTERY
BACKUP
1 BUZZER
2
MEMORY AREA 3
JP4 U11 U13
U7 U10 U12
U9 U8
U3 U2 U4
U17 U16
U5 U6 SELECTION MODE
12.000
MHz
U18 U19
U1
20 X 2 L CD DISPLA Y
8086 CPU
VMC-8609 MICROPROCESSOR TRAINING KIT (BASED-8086/88) IBMPC KEYBOARD