home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!Urmel.Informatik.RWTH-Aachen.DE!dfv.rwth-aachen.de!sungate.fido.de!p1.hippo.fido.de!freax.fido.de!Alexander_Bell
- Date: Wed, 2 Sep 92 01:12:58 +0200
- From: Alexander_Bell@freax.fido.de (Alexander Bell)
- Subject: Traps- what do they mean?
- Message-ID: <ef5be600@f9.n242.z2.fidonet.org>
- Newsgroups: comp.os.os2.misc
- X-Comment-To: (William Unruh)
- Organization: Why stop now, just when I'm hating it?
- Lines: 205
-
- WU> Is it possible for someone to publish all of the trap numbers and
- WU> what they mean? I just got a trap 000e at
- WU> 160:fff8ff5d-000d:a52b 60000,9084
- WU> What do all of those numbers mean?
-
- =======================================================================
- Segment Group:
-
- CS -- code segment
- -- current executing instructions
- SS -- stack segment
- -- used for accessing local program/function data
- -- temporary information storage
- -- used as segment register when BP is specified as a data
- address base
- DS -- data segment
- -- used for accessing global program data
- -- long-term information storage
- -- used when no segment is specified for instruction data
- ES -- extra segment
- -- used for moves or comparisons on memory more than 64K
- bytes apart
-
- IP -- instruction pointer
- -- next instruction to execute in the code segment (CS:IP)
-
- General Usage: Segment manipulation
-
- =======================================================================
- Data Group:
-
- AX -- accumulator register
- BX -- base register
- CX -- count register
- DX -- data register
-
- General Usage: Data manipulation
-
- =======================================================================
- Pointer Group:
-
- SP -- stack pointer
- -- points to the top of the stack
- -- automatically decremented by calls
- -- automatically incremented by returns
- BP -- base pointer
- -- points to the base of the stack
- -- used to access subroutine parameters
-
- General Usage: Stack manipulation
-
- =======================================================================
- Index Group:
-
- DI -- destination index
- -- destination of moves or comparisons
- -- used with the extra segment register for moves or
- comparisons on data more than 64K bytes apart (ES:DI)
- SI -- source index
- -- source of moves or comparisons
-
- General Usage: String operations
- ^L
- =======================================================================
- Miscellaneous:
-
- MSW -- machine status word
- -- controls processor mode (real/protect)
- -- allows emulation of coprocessors
-
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |x|x|x|x|x|x|x|x|x|x|x|x|t|e|m|p|
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- t = task switched (1 = next instruction using
- a processor extension will cause exception
- 7, allowing software to test the current
- processor extension context)
- e = emulate processor extension (1 = processor
- extension not-present exception (number 7)
- on ESC instructions will allow a processor
- extension to be emulated)
- m = monitor processor extension (1 = WAIT
- instructions cause a processor extension
- not-present exception (number 7) if 't'
- is also set)
- p = protected mode enable (1 = processor in
- protected mode, 0 = processor in real mode)
-
- FLG -- flags
-
- +-+--+--+--+--+--+--+--+--+--+-+--+-+--+-+--+
- |x|NT|IOPL |OF|DF|IF|TF|SF|ZF|x|AF|x|PF|x|CF|
- +-+--+--+--+--+--+--+--+--+--+-+--+-+--+-+--+
-
- NT = Nested Test Flag
- IOPL = Input/Output Privelege Level (2 bits)
- OF = Overflow Flag
- DF = Direction Flag
- IF = Interrupt Flag
- TF = Trace Flag
- SF = Sign Flag
- ZF = Zero Flag
- AF = Auxiliary Carry Flag
- PF = Parity Flag
- CF = Carry Flag
-
- =======================================================================
- Selectors:
-
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |i|i|i|i|i|i|i|i|i|i|i|i|i|t|p|p|
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- i = index into GDT/LDT
- t = table indicator (1 = LDT, 0 = GDT)
- p = requestor privelege level (0 - 3)
- Note: requestor privelege level can differ from the actual
- descriptor privelege level
- ^L
- =======================================================================
- CSLIM -- maximum offset allowed in the code (CS) segment
- SSLIM -- maximum offset allowed in the stack (SS) segment
- DSLIM -- maximum offset allowed in the data (DS) segment
- ESLIM -- maximum offset allowed in the extra (ES) segment
-
- =======================================================================
- CSACC -- access rights for the code (CS) segment
- SSACC -- access rights for the stack (SS) segment
- DSACC -- access rights for the data (DS) segment
- ESACC -- access rights for the extra (ES) segment
-
- +-+-+-+-+-+-+-+-+
- |p|l|l|s|t|t|t|a|
- +-+-+-+-+-+-+-+-+
-
- p = present (1 = present, 0 = swapped)
- l = descriptor privelege level (0 - 3)
- -- 00 = ring 0 (device drivers)
- -- 01 = ring 1 (not used)
- -- 10 = ring 2 (IOPL access)
- -- 11 = ring 3 (general access)
- s = segment descriptor (0 = system object,
- 1 = memory segment )
- t = segment type & access information
- -- 000 = data segment - R/O
- -- 001 = data segment - R/W
- -- 010 = unused
- -- 011 = data segment - R/W (expand down)
- -- 100 = code segment - E/O
- -- 101 = code segment - E/R
- -- 110 = code segment - E/O ("conforming")
- -- 111 = code segment - E/R ("conforming")
- *** R/O -- read-only
- *** R/W -- read/write
- *** E/O -- execute-only
- *** E/R -- execute/readable
- a = accessed (1 = accessed, 0 = not accessed)
- ^L
- =======================================================================
- == ==
- == Exceptions & Traps ==
- == ==
- =======================================================================
-
- Interrupt Number Class Description
- ================ ===== ===========
- 0 Fault Divide error
- 1 Fault or Trap Debugger interrupt
- 2 Interrupt Nonmaskable interrupt
- 3 Trap Breakpoint
- 4 Trap Interrupt on overflow
- 5 Fault Array boundary violation
- 6 Fault Invalid opcode
- 7 Fault Coprocessor not available
- 8 Abort Double fault
- 9 Abort Coprocessor segment overrun
- A Fault Invalid task state segment
- B Fault Segment not present
- C Fault Stack exception
- D Fault General protection violation
- E Fault Page fault
- F (reserved)
- 10 Fault Coprocessor error
- 11-1F (reserved)
- 20-FF Interrupt or Trap System dependent
-
- Interrupts: caused by hardware signals outside of the CPU
-
- Traps: errors detected after the execution of a software instruction
-
- Faults: errors detected during the processing of an instruction
-
- Aborts: errors so severe that some context is lost
-
- WU> And who is my "service
- WU> representative"?
-
- that's your task to find out...
-
-
- cu albe.
-
-
- ---
-