📄 highc.txt
字号:
Metaware High C CBIRD notes
The High C compiler is a protected mode compiler which is layered on top
of a DOS Extender. The CBIRD.exe software has be designed to be compatible
with the Pharlap DOS 386 Extender.
Notes:
1) In order for a HIGHC interrupt routine to be functional, an
intermediate ASSEMBLY routine (located HCINT.asm) has to be
used. The reason for this is that it is possible for an
interrupt to occur while executing a DOS command. The Phar Lap
Extender switches from Protected to Real mode when executing a
DOS call, but DOS switches the DS (data segment) to something other
then what was being used by the CBIRD protected mode application.
Therefore, when an interrupt occurs, the assembly routine must
set the DS to the application's DS and proceed to call the
interrupt service routine. Note that the interrupt service routine
is really just a function called by the assembly interrupt service
routine.
2) Since the DOS handles IRQ0, the PC timer interrupt, there would
be a large overhead to handle an IRQ0 Tick, which occurs 18.2
times per second. CBIRD circumvents this from occurring, by
taking over the IRQ0 interrupt and handling the interrupt in
protected mode. When data collection has been completed, CBIRD
restores DOS time via multiple call (software interrupts) to
the DOS IRQ0 interrupt.
3) Phar Lap handles normally intercepts all interrupts from vector
8 through F, which correspond to IRQ0 through IRQ7 given the
default programmable interrupt controller configuration. Phar Lap
does this because vectors 8 through F overlap CPU exceptions when
in protected mode. The Extender inserts an 'Umbrella' routine
into all vectors 8 through F and when an interrupt or exception
occurs, it determines the proper course of action. In the case
of CBIRD, we write the Interrupt Descriptor Table (IDT) directly
to remove the overhead of the 'Umbrella' routine on each serial
character received.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -