home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / dv_x / dvxhlp10.zip / EXAMPLE.ZIP / Q15.TXT < prev    next >
Text File  |  1992-05-30  |  3KB  |  81 lines

  1. /FHQ15: What are Exceptions 12 and 13?/FB
  2.  
  3.  
  4.  
  5. An exception 12 (or 13) is caused by the program you are running doing
  6. something that it is not allowed to do on a 80386 while in Virtual 8086
  7. (V86) mode. Since QEMM is the 386 ``control program,'' it can only
  8. report the error caused by the user program. The main cause is operand
  9. wrapping past the last address in segment, 65,535 (FFFF in hex)
  10.  
  11.  
  12.  
  13. Note that exceptions are only reported by QEMM, and are not caused by
  14. either QEMM or DESQview.  They are caused by old programs that assume
  15. they are running on an 80286 or less; or by a program that ``crashed''.
  16.  
  17.  
  18.  
  19. From the INTEL ``80386 Programmer's Reference Manual,''
  20.  
  21. /ML4/PART III - COMPATIBILITY
  22.  
  23. /ML4/chapter 15, VIRTUAL 8086 MODE
  24.  
  25. /ML4/Section 15.6 DIFFERENCES FROM 8086
  26.  
  27. /ML4/Stated ``reasons'' 6, 7 & 8
  28.  
  29. /ML4/(pages 15-10 & 15-11)
  30.  
  31. /ML-20/Quoting from the INTEL manual:
  32.  
  33. /ML4/15.6 DIFFERENCES FROM 8086
  34.  
  35. In general, V86 mode will correctly execute software designed for
  36. the 8086, 8088, 80186 and 80188. Following is a list of the minor
  37. differences between 8086 execution on the 80386 and on an 8086.
  38.  
  39.  
  40.  
  41. /ML4/... (only those causing exception 12 or 13 are listed)
  42.  
  43.  
  44.  
  45. /ML-4/6. Redundant prefixes.
  46.  
  47. The 80386 sets a limit of 15 bytes on instruction length. The only
  48. way to violate this limit is by putting redundant prefixes before
  49. an instruction.  Exception 13 occurs if the limit on instruction
  50. length is violated. The 8086//8088 has no instruction limit.
  51.  
  52.  
  53.  
  54. 7. Operand crossing offset 0 or 65,535.
  55.  
  56. On the 8086, an attempt to access a memory operand that crosses
  57. offset 65,535 (e.g., MOV a word to offset 65,535) or offset 0
  58. (e.g., PUSH a word when SP = 1) causes the offset to wrap around
  59. modulo 65,535. The 80386 raises an exception in these cases -
  60. exception 13 if the data segment (i.e., if CS, DS, ES, FS, or GS is
  61. being used to address the segment), exception 12 if the segment is
  62. a stack segment (i.e., if SS is being used.)
  63.  
  64.  
  65.  
  66. 8. Sequential execution across offset 65,535.
  67.  
  68. On the 8086, if sequence execution of instructions proceeds past
  69. offset 65,535, the processor fetches the next instruction byte from
  70. offset 0 of the same segment. On the 80386, the processor raises
  71. exception 13 in such a case.
  72.  
  73.  
  74.  
  75. In order to fix an Exception 13, you can try to load the program causing
  76. it into a different area of memory.  To do this, try increasing your
  77. FILES or BUFFERS, or loading some TSRs low rather than high, etc.
  78. However, the best solution is to contact the programmer.  Another
  79. possible solution is to increase the amount of memory specified in
  80. Change A Program.
  81.