DS>Bonjour All !
DS> Can someone help me understand how works the CPU generated interrupts
DS>06 & 07 (INVALID OPCODE & NO PROCESSOR EXTENSION AVAILIBLE), I heard that
DS>it is possible to emulate other instructions/processor using those
DS>interrupts, for example, when reprogramming int 06, it is possible, for
DS>example, to emulate pentium instructions on a 486, or even MMX
nstructions
DS>on a pentium processor. The int 07 can be used to emulate a math
DS>coprocessor when it is not present...
Yes... my "PC Interrupts" book agrees with that... The trick to doing such
interrupts is:
1. save all used registers, except those that are SUPPOSED to be changed by
the instruction.
2. use the address on the stack for reading the instruction, something like
this:
******
; start of interrupt
PUSH BP
MOV BP, SP
PUSH DS
PUSH BX
LDS BX, [BP+02]
; then do some compares or an address table to interpret and execute the
; instruction
; ...
; end the interrupt
POP BX
POP DS
POP BP
IRET
******
((Cloud))
MauveCloud@juno.com
* OLX 2.2 * "Graphic Artist seeks Boss with vision impairment."
--- PCBoard (R) v15.3/M 10
---------------
* Origin: Next time, Dial The Wrong Number! (209) 943-1880 (1:208/205)
|