1, the input and output of the I / O interface
Addressing method of I / O interface: Unified Address, independent addressing.
2, I / O interface input and output functions
INP (), inport (), inportb ()
OUTP (), OUTPORT (), OUTPORTB ()
3, interrupt service procedure
The so-called interrupt means that the CPU is normal, due to the pre-arrangement or external event of the program, causes the CPU interrupt that is running running, and goes to the program of the pre-scheduled event or the internal and external service. The event that causes the program interrupt is called an interrupt source. The signal requested the interrupt program is called the interrupt request signal.
Related Nouns: Interrupt, Interrupt Source, Interrupt Vector, Interrupt Request, Interrupt Service, Interrupt Return, Interrupt Priority, Interrupt Shield.
4, PC's interrupt type
The hard interrupt (external interrupt) caused by the soft interrupt (internal interrupt) that executes some instructions and the interface device.
DIV instructions, int instructions, INTO instructions, single-step execution caused soft interrupt
Non-mask interrupt NMI and maskable interrupt INTR line receives the interrupt request signal caused hard interruption
5, interrupt vector table
The first 1024 bytes of the 80x86 memory establishes the interrupt vector table, store 256 interrupt vectors, each interrupt vector occupies 4 bytes, the first two bytes are the entrance address offset of the interrupt service Chengdu, the last two bytes Put the section address. When used, load into IP and CS, to transfer the interrupt service program.
6, the filling of the interrupt vector table
7. Method for writing interrupt programs with Turbo C
Three steps: Write an interrupt service program, install the interrupt service, activate the interrupt service program.
Write an interrupt service program: Function Type Interrupt.
Installation Interrupt Service: The disable (), setVect (), and eNBale () function are called in the install function.
The activation of the interrupt service program: the activation of the hard interrupt and the activation of soft interrupts.
The hard interrupt can be sent through the Outport.
Soft interrupt: GenInterrupt () function, direct call, insert assembly.
8, BIOS and DOS call
INT86 function, int86x function, INTDOS function, INTDOSX function, INTR function
9. Design of resident procedures
10, system memory, expansion memory, expansion memory
11, Memory mode 6: Tiny, Small, Medium, Compact, Large, HUGE
12. Extend the memory and expansion of memory.