Download MCS-86 Assembly Language Converter Operating

Transcript
Editing Converter Output
CONV86
You can convert your 8080 interrupt service routines as follows:
1.
Insert, at a convenient place in your 8086 source code, the following calling
sequence, using your own label (be sure not to use a reserved name given in
Appendix D):
INTSEQ:
2.
PUSH
PUSH
PUSH
PUSH
PUSH
PUSH
PUSH
PUSH
CALL
POP
POP
POP
POP
POP
POP
POP
POP
IRET
01
INTER
;INTER used here for example in Figure 3-2.
01
SI
BX
OX
CX
AX
OS
ES
;Note that this is IRET, and not RET.
Insert the following initialization sequence for absolute location 4*N in the
ABS_O segment:
ORG 4*N
{
3.
ES
OS
AX
CX
OX
BX
SI
;N is the interrupt number on the 8086.
;INTSEQ used here for example above.
OD
CGROUP:INTSEQ
;If REL control was used. }
OD
INTSEQ
;If ABS control was used.
Sandwich the converted code from INTER (used here for example in Figure
3-2) between PROC and ENDP statements as follows:
INTER PROC NEAR
;Nothing special aboutthe word INTER.
[converted code]
INTER ENOP
;Nothing special about the word INTER.
While these steps are general enough to cover virtually any application, you
may find that as you become familiar with the 8086, you can recode your
interrupt service routines in MCS-86 Macro Assembly Language to obtain
optimal code more suited to your application.
3-5