home *** CD-ROM | disk | FTP | other *** search
- A general purpose assembly routine to execute any real mode interrupt.
-
- Warning: Be forewarned about the interrupt you are going to use.
-
- Note: Only real mode stuff.
-
-
- Contents:
-
- INTEXEC.ZIP contains four files:
- 1) INTEXEC.ASM
- 2) SAMPLE.CPP
- 3) SAMPLE.EXE
- 4) INTEXEC.DOC
-
- INTEXEC.ASM
-
- This file contains the assembly routine which takes the values for the
- interrupt number, ax,bx,cx,dx and register number as input parameters and
- executes the given interrupt.
-
- SAMPLE.CPP
-
- This file contains a probable situation where the above assembly
- routine may be used to execute the routine in the ASSEMBLY WAY.
-
- SAMPLE.EXE
-
- This file is the executable.
-
- INTEXEC.DOC
-
- This file contains a brief help.
-
-
- Brief Description:
-
- Everyone of us know about the assembly language instruction INT.
- For example if you need to call Interrupt 16H Service 00H (Wait for a key)
- your assembly code might show up something like this:
-
- .
- .
- .
- whatever
- .
- .
- mov ah,00h
- int 16H
- .
- .
- .
- whatever
- .
- .
-
- So far good. But what about if you do not know which interrupt to execute
- at assembly time ie Interrupt to execute is determined only at run time?
-
- mov ah,00h
- int intno
-
- is what comes to mind? But unfortunately most assemblers do not take this!
-
- So what is the way out?
-
- INTEXEC.ASM does exactly this in 'Assembly way'. There are C ways of doing
- this ie using int86 and it's variants.
-
- The basic concept of this is as follows:
-
- INT XX instruction is decoded by INTEL processors as follows:
-
- CD XX
-
- This is a very useful information.
-
- Just set up all your register values at run time and do a jmp to the above
- instruction. That's all it takes.
-
-
- To build the executable sample.exe:
-
- 1) cl -c sample.cpp
- 2) masm intexec.asm
- 3) link sample+intexec;
-
- I have used MASM 6.11, and LINK 5.60.399 to create the executable.
-
-
-
- Please feel free to contact me at:
-
- saxena@wipsys.soft.net
-