86BUGS.LST 116 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004
  1. (C) Copyright 1993, 1994 By Harald Feldmann Revision 04, Nov 3rd 1994.
  2. Hamarsoft's 86BUGS list, (C) 1993/94 By Hamarsoft (R)
  3. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  4. The 86BUGS list, distributed with Ralf Brown's Interrupt list, is maintained
  5. and provided to you by Hamarsoft, the maker of the HAP & PAH datacompression
  6. program. Latest version of HAP & PAH is 3.14e. If you like this list you are
  7. encouraged to register the HAP 3.00 shareware program. You will receive
  8. the latest, registered, version of HAP 3.14e by air-mail on 3.5" diskette.
  9. FTP to garbo.uwasa.fi and get pc/arcers/hap300re.zip for more info.
  10. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  11. To contact Hamarsoft, write to ³ or send e-mail over Internet to:
  12. ³ harald.feldmann@almac.co.uk
  13. Hamarsoft, New Address! ³ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  14. Harald Feldmann, ³ or send e-mail to HARALD FELDMANN over
  15. P.o. Box 451, ³ Ilink in the international COMPRESS echo
  16. 6400 AL Heerlen, ³ The p.o. box will be maintained if e-mail
  17. The Netherlands ³ should no longer be possible.
  18. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  19. Various people have contributed to this list. They are mentioned in a
  20. separate page, click on <acknowledgements> to see their names and e-mail
  21. addresses. These people are not employed by or affiliated with Hamarsoft.
  22. Hamarsoft and all people who contributed to the 86BUGS list do not accept
  23. any liability whatsoever regarding the use, inability to use, correctness
  24. or completeness of the information presented in the 86BUGS list.
  25. Attention authors: if you mention this list in your article or book, please
  26. send a courtesy copy to the P.o. box address by airmail. Thank you.
  27. This is 86BUGS list revision level 04, issued November 3rd 1994.
  28. (C) Copyright 1993, 1994 By Harald Feldmann.
  29. Acknowledgements
  30. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  31. This file lists undocumented and buggy instructions of the Intel 80x86
  32. family of processors as well as features of processors compatible with
  33. Intel products. Note that Intel does not support the special features and
  34. may decide to drop opcode variants and instructions in future products.
  35. Wherever the notation 88,86,87,186,286,287,287xl,386,386sx,387,387sx,
  36. 486,486sx,487 and Pentium is used, Intel CPUs are referenced unless
  37. noted otherwise.
  38. All mentioned trademarks and/or tradenames are owned by the respective
  39. owners and are acknowledged.
  40. I would like to give credit to those who provided useful information or
  41. who in another way contributed to the 86BUGS list.
  42. 9308 Chris Lueders (chris_lueders@zaphod.fido.de) iAPX program & mul bugs
  43. 9311 Anthony Naggs (amn@ubik.demon.co.uk) NEC differences and CPU tests
  44. 9407 Christian Ludloff (Ludwig-K�hn-Str. 15, 09123 Chemnitz, Germany)
  45. Discovered CPUID instruction on 486.
  46. 9410 Robert Mashlan (rmashlan@r2m.com) BOUND difference on NEC V20
  47. 9410 Anthony Naggs (amn@ubik.demon.co.uk) POP CS & MOV CS on 86/88
  48. SETALC on NEC & i186 BOUND difference, NEC specific
  49. instructions.
  50. 9410 Christian Ludloff (see above for address) Pentium extensions (MSRs),
  51. INFO and STAT programs.
  52. If you contributed, but are not listed, please send a note.
  53. AAA Adjust After BCD Addition
  54. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  55. Mnemonic: AAA
  56. Opcode : 37 (88=8, 86=8, 286=3, 386=4, 486=3 clocks)
  57. Bug in : Different implementation in 88 and 86 versus 286+
  58. Function:
  59. The 88 and 86 processors would not add a carry out of al into ah if an
  60. invalid operand would be in al (FF), the newer processors _will_, yielding
  61. different results for the same _invalid_ operand. Execution is effectively
  62. the same when valid operands are loaded.
  63. Highest 4 bits of AL are always cleared.
  64. AAD Adjust After BCD Division
  65. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  66. Mnemonic: AAD
  67. Opcode : D5 imm8 (88=60, 86=60, 286=14, 386=19, 486=14 clocks)
  68. Bug in : Is an opcode variant on Intel's 88,86,286,386,486
  69. Variant does not work on NEC's V-series, probably not on AMD CPUs
  70. Function:
  71. This instruction regularly performs the following action:
  72. - unpacked BCD in AX example (AX = 0104h)
  73. - AL = AH * 10d + AL (AL = 0eh )
  74. - AH = 00 (AH = 00h )
  75. The normal opcode decodes as follows: d5,0a
  76. The instruction itself is an instruction plus operand. By replacing the
  77. second byte with any number in the range 00 - ff you can build your own
  78. instruction AAD for various number systems in those ranges. For example
  79. by coding d5,10 you achieve an instruction that performs:
  80. - AL = AH * 16d + AL.
  81. - AH = 00
  82. This feature of Intel's chips can be used to determine whether there is
  83. a true Intel CPU installed in a system.
  84. (NEC difference supplied by Anthony Naggs)
  85. AAM Adjust After BCD Multiplication
  86. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  87. Mnemonic: AAM
  88. Opcode : D4 imm8 (88=83, 86=83, 286=16, 386=17, 486=15 clocks)
  89. Bug in : Is an opcode variant on Intel's 88,86,286,386,486
  90. Function:
  91. This instruction regularly performs the following action:
  92. - binary number in AL
  93. - AH = AL / 10d
  94. - AL = AL MOD 10d
  95. Thus creating an unpacked BCD in AX. The normal opcode decodes as follows:
  96. d4,0a. The instruction itself is an instruction plus operand. By replacing
  97. the second byte with any number in the range 00 - ff you can build your own
  98. instruction AAM for various number systems in that range. For example by
  99. coding d4,07 you achieve an instruction that performs:
  100. - binary number in AL
  101. - AH = AL / 07d
  102. - AL = AL MOD 07d
  103. AAS Adjust After BCD Subtraction
  104. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  105. Mnemonic: AAS
  106. Opcode : 3F
  107. Bug in : Intel's documentation
  108. Function:
  109. Adjusts result of two subtracted BCD numbers to form a valid new BCD number.
  110. Highest 4 bits of AL are always cleared.
  111. ADD4S Addition of packed BCD strings (NEC V20/30 only)
  112. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  113. Mnemonic: ADD4S
  114. Opcode : 0F 20 (7+19n clocks, n is the number of bytes per operand)
  115. Bug in : Rarely documented, except in NEC manuals
  116. Function:
  117. Adds the packed BCD string at DS:SI to the packed BCD string at ES:DI. The
  118. length of the string, in BCD digits, is specified in CL. Unlike Intel string
  119. operations CL, DI & SI are unchanged by the operation. The Zero Flag (ZF) is
  120. set if both operands are zero. The Carry Flag (CF) and Overflow Flag (OF)
  121. appear to be set by the addition of the most significant digits.
  122. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  123. instructions on 286+ CPUs.
  124. (Supplied by Anthony Naggs)
  125. See also SUB4S, CMP4S, ROL4, ROR4
  126. BOUND Checks register against limits
  127. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  128. Mnemonic: BOUND reg,mem
  129. Opcode : 62 [mod:reg:r/m]
  130. Bug in : NEC V20 handles it differently from Intel 286+. But apparently,
  131. according to Intel documentation, equal to 186.
  132. Function:
  133. Bound checks a register against limits and generates exception 5 if the
  134. value falls outside the limit. On NEC CPUs the mnemonic is apparently also
  135. referred to as 'CHKIND'.
  136. Note that the mem component refers to two consecutive memory locations, of
  137. size 'reg' which contain the lower and upper limit for the value in 'reg'
  138. as [low limit][high limit].
  139. 'reg' size: 'mem' specifies address of:
  140. word dword
  141. dword qword
  142. Normally, on Intel 286+ CPUs, the exception saves the CS:IP pointing TO the
  143. BOUND instruction. On the NEC V20, the saved CS:IP point to the instruction
  144. following the BOUND instruction.
  145. According to Intel's documentation the 186 handles this exception the same
  146. way the NEC does. It has been verified on a 486 that the CS:IP of BOUND on
  147. that CPU indeed points TO the instruction itself and not the following one.
  148. Also, contrary to what one might expect, BOUND only allows word or dword
  149. registers to be tested. Byte registers are invalid.
  150. (V20 supplied by Robert Mashlan)
  151. (186 difference & 'CHKIND' supplied by Anthony Naggs)
  152. Breakpoint errors while debugging
  153. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  154. Mnemonic: N/A
  155. Opcode : N/A
  156. Bug in : some 386, some 486
  157. Function:
  158. Breakpoints are used in the process of debugging programs.
  159. On the 386+, debug registers may be used instead of a one byte opcode.
  160. 386 specific debugging bugs occurring on some 386s:
  161. Breakpoints are missed under the following conditions:
  162. - A data breakpoint set to a mem16 operand of a VERR, VERW, LSL or LAR while
  163. the segment with selector at mem16 is not accessible.
  164. - A data breakpoint is set to the write operand of a REP MOVS instruction
  165. and the read cycle of the next iteration generates a fault.
  166. - A code or data breakpoint is set on the instruction following a MOV or
  167. POP to SS while the instruction needs more than two clocks.
  168. (see <MOV> and <POP>)
  169. Random breakpoints may occur under the following condition:
  170. - Breakpoints set using debug registers DR0 to DR4 may produce spurious
  171. breaks if breakpoints were enabled before a MOV from CR3, TR6 or TR7 took
  172. place. These unreliable breaks may continue to occur until the next JMP
  173. instruction is executed. A workaround would be to:
  174. = disable breakpoints before any MOV from CR3, TR6 or TR7
  175. = MOV the values
  176. = perform a JMP
  177. = enable breakpoints.
  178. Single stepping is not disabled in the handler for a TSS fault if the code
  179. that caused the fault was being single-stepped and a task gate was used to
  180. handle the fault.
  181. 486 specific debugging bugs occurring on some 486s:
  182. A code breakpoint set on control transfer instructions (like CALL, RET, JMP
  183. etc.) will clear the lowest four bits of DR6 when the breakpoint is taken.
  184. A code breakpoint set on an instruction immediately following a RETN, JCXZ,
  185. intrasegment indirect CALL (CALL word ptr [bx] for example) or
  186. intrasegment indirect JMP (JMP word ptr [bx] for example) will always be
  187. satisfied, even when the control instruction is taken. A breakpoint set at
  188. the target of these control transfer instructions will not be taken,
  189. even if control is transferred to them, because the buggy breakpoint sets
  190. the RF (Resume Flag). There is said to be no workaround other than to avoid
  191. the situation, however, coding a nop after the control transfer instruction
  192. and setting the breakpoint to the instruction following the nop may,
  193. according to my view, very well solve the problem. (untested)
  194. BRKEM Break for emulation (NEC V20/30 only)
  195. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  196. Mnemonic: BRKEM imm
  197. Opcode : 0F FF imm (38 clocks)
  198. Bug in : Rarely documented, except in NEC manuals
  199. Function:
  200. (8080 is written here as 8O8O to avoid visual confusion with the 8088).
  201. This is the basic instruction used to switch to 8O8O emulation mode.
  202. The BRKEM instruction is used in a similar way to an INT instruction,
  203. (referred to as BRK by NEC). The mode flag (MD) is set to zero, the Flags,
  204. CS & IP are pushed onto the stack then CS & IP are loaded from the
  205. specified interrupt vector.
  206. In 8O8O emulation mode the V30 registers and flags are mapped to 8O8O
  207. registers and flags.
  208. General purpose register names:
  209. ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
  210. 8O8O nameÄÄÄÄÄÄij A ³ B ³ C ³ D ³ E ³ H ³ L ³ SP³ PC³
  211. Intel x86 nameÄij AL³ CH³ CL³ DH³ DL³ BH³ BL³ BP³ IP³
  212. V30 nameÄÄÄÄÄÄÄij AL³ CH³ CL³ DH³ DL³ BH³ BL³ BP³ PC³
  213. ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
  214. Individual flag names:
  215. ÚÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄÂÄÄÄ¿
  216. 8O8O nameÄÄÄÄÄÄij C ³ Z ³ S ³ P ³ AC³
  217. Intel x86 nameÄij CF³ ZF³ SF³ PF³ AF³
  218. V30 nameÄÄÄÄÄÄÄij C ³ Z ³ S ³ P ³ AC³
  219. ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÙ
  220. In 8O8O emulation mode the segment used for instructions is determined
  221. by the CS (PS) register. The DS (DS0) register determines the segment
  222. used for data.
  223. When an interrupt occurs during 8O8O emulation the CPU switches to native
  224. V30 mode to process the interrupt. When the interrupt handler is complete
  225. the IRET, (RETI in NEC nomenclature), will return to 8O8O emulation mode.
  226. From 8O8O emulation mode RETEM (Return from Emulation, opcode ED FD) returns
  227. to native mode, setting MD flag and restoring flags, CS & IP from the native
  228. stack. Alternatively CALLN imm8 (Call Native, opcode ED ED imm) can be used
  229. to call native V30 interrupts, (just like a regular INT).
  230. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  231. instructions on 286+ CPUs.
  232. (Supplied by Anthony Naggs)
  233. BSF, Bit Scan Forward
  234. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  235. Mnemonic: BSF op1,op2
  236. Opcode : 0F BC
  237. Bug in : Intel's documentation
  238. Function:
  239. Finds the first (lowest) bit set to 1 in op2, sets ZF=1 and returns the bit
  240. position in op1. If op2 is 0, ZF=0 and the value of op1 is undetermined,
  241. some 386's leave the old value in op1, some early 486's load garbage into
  242. op1 and later 486's leave op1 unchanged.
  243. BSWAP reg32 Byte Swap
  244. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  245. Mnemonic: BSWAP reg32
  246. Opcode : 0F C8+reg# (00001111 11001rrr)
  247. Bug in : 486
  248. Function:
  249. Swaps all bytes in 32 bit registers, changing the sequence from ABCD to
  250. DCBA, handy for converting numbers to a CPU format where the byte order
  251. is reversed. Bug appears when BSWAP is not preceded by prefix 66h to
  252. indicate 32 bit registers in 16 bit mode or when it IS preceded by 66h
  253. in 32 bit mode.
  254. Do not use this instruction with 16 bit registers as operand.
  255. Results are undefined in that case. Use XCHG reg8,reg8 instead if you need
  256. to swap 2 bytes in a 16 bit register like AX.
  257. BT op1,op2 Bit Test
  258. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  259. Mnemonic: BT
  260. Opcode : 0F A3 op1,op2
  261. Bug in : No bug, avoid use on ports in 386, 486
  262. Function:
  263. Basically copies bit(op2) from op1 into CY. Memory variant is more complex.
  264. Do not use on memory mapped I/O ports or memory operands that span into or
  265. lie completely within nonexistent memory.
  266. In the case of memory mapped I/O ports, use MOV and TEST instead.
  267. BTC op1,op2 Bit Test and Complement
  268. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  269. Mnemonic: BTC op1,op2
  270. Opcode : 0F BB reg1,reg2
  271. 0F BA reg,mem
  272. Bug in : No bug, avoid use on ports in 386, 486
  273. Function:
  274. Basically copies bit(op2) from op1 into CY and complements bit(op2) of op1.
  275. Memory variant is more complex. Do not use on memory mapped I/O ports or
  276. memory operands that span into or lie completely within nonexistent memory.
  277. In the case of memory mapped I/O ports, use MOV and TEST instead.
  278. BTR op1,op2 Bit Test and Reset
  279. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  280. Mnemonic: BTR op1,op2
  281. Opcode : 0F B3 [mod:reg:r/m]
  282. 0F BA [mod:110:r/m] imm8
  283. Bug in : No bug, avoid use on ports in 386, 486
  284. Function:
  285. Basically copies bit(op2) from op1 into CY and sets bit(op2) of op1 to 0.
  286. Memory variant is more complex. Do not use on memory mapped I/O ports or
  287. memory operands that span into or lie completely within nonexistent memory.
  288. In the case of memory mapped I/O ports, use MOV and TEST instead.
  289. BTS op1,op2 Bit Test and Set
  290. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  291. Mnemonic: BTS
  292. Opcode : 0F BA [mod:101:r/m] imm8 / 0F AB [mod:reg:r/m]
  293. Bug in : No bug, avoid use on ports in 386, 486
  294. Function:
  295. Basically copies bit(op2) from op1 into CY and sets bit(op2) of op1 to 1.
  296. Memory variant is more complex. Do not use on memory mapped I/O ports or
  297. memory operands that span into or lie completely within nonexistent memory.
  298. In the case of memory mapped I/O ports, use MOV and TEST instead.
  299. Chip Step information for Intel CPUs
  300. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  301. CPUs are manufactured in models (like the 80386). While these models are
  302. manufactured, errors in the mask layout and mask design may become
  303. apparent. These errors may be corrected before a new batch of chips is
  304. made. To distinguish between these revisions an identification code is
  305. placed within the mask design on 386+ CPUs. By testing the CPU with CPUID
  306. or by performing a RESET, this information is copied to specific registers.
  307. The register used to hold mask info after a RESET is DX (apparently also
  308. sometimes the high word of EDX on some 486s).
  309. This page lists some component and revision ID's found in the DX register
  310. for the 386SX, 386DX, 486SX and 486DX models from Intel.
  311. CPU: DX: Step:
  312. 386SX 2304h A0
  313. 2305h B
  314. 2306h C
  315. 2308h D1
  316. 386DX 0303h B0 - B10
  317. 0305h D0
  318. 0308h D1 & D2
  319. 486SX 0420h A0
  320. 486DX 0000h A1
  321. 0401h Bn
  322. 0302h C0
  323. 0404h D0
  324. 0410h cAn
  325. 0411h cBn
  326. CLEAR1 Clears a specific bit to 0 (NEC V20/30 only)
  327. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  328. Mnemonic: CLEAR1 reg/mem,CL/immediate
  329. Opcode : CLEAR1 r/m8,CL : 0F 12 [mod:000:r/m] (5/14 clocks)
  330. CLEAR1 r/m8,imm3 : 0F 1A [mod:000:r/m] imm (6/15 clocks)
  331. CLEAR1 r/m16,CL : 0F 13 [mod:000:r/m] (5/14 clocks)
  332. CLEAR1 r/m16,imm4: 0F 1B [mod:000:r/m] imm (6/15 clocks)
  333. CLEAR1 CY : F8 (NEC nomenclature for Intel's CLC)
  334. CLEAR1 DIR : FC (NEC nomenclature for Intel's CLD)
  335. Bug in : Rarely documented, except in NEC manuals
  336. Function:
  337. Clears the specified bit in the register/memory operand. The bit number (CL
  338. or immediate) is ANDed with 07 (for 8-bit operands) or 0F (for 16-bit
  339. operands) to get a valid bit number. No flags are affected by this
  340. operation, except by CLEAR1 CY and CLEAR1 DIR.
  341. The first (smaller) clock count of each pair is for register operands.
  342. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  343. instructions on 286+ CPUs.
  344. (Supplied by Anthony Naggs)
  345. See Also: NECINS, EXT, TEST1, NOT1, SET1
  346. CMP4S Subtraction of packed BCD strings (NEC V20/30 only)
  347. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  348. Mnemonic: CMP4S
  349. Opcode : 0F 26 (7+19n clocks, n is the number of bytes per operand)
  350. Bug in : Rarely documented, except in NEC manuals
  351. Function:
  352. Subtracts the packed BCD string at DS:SI from the packed BCD string at
  353. ES:DI, but does not store the result. The length of the string, in BCD
  354. digits, is specified in CL. Unlike Intel string operations CL, DI & SI are
  355. unchanged by the operation. The Zero Flag (ZF) is set if the result is zero.
  356. The Carry Flag (CF) and Overflow Flag (OF) appear to be set by the
  357. subtraction of the most significant digits.
  358. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  359. instructions on 286+ CPUs.
  360. (Supplied by Anthony Naggs)
  361. See Also: ADD4S, SUB4S, ROL4, ROR4
  362. CMPS Compare String Bytes, Word or Dword
  363. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  364. Mnemonic: CMPS
  365. Opcode : A6 (Bytes)
  366. A7 (Words)
  367. 66 A6 (Bytes)
  368. 66 A7 (DWords)
  369. Bug in : Early 286 in protected mode
  370. Function:
  371. Compares two strings in memory.
  372. Repeated version (REP CMPS) in early 286 protected mode has a bug that
  373. shows when, during execution, a segment limit exception or IO Privilege
  374. Level Exception occurs.
  375. In that case the exception handler sees the value of CX as it was at the
  376. start of the REP instruction. SI and DI however reflect the correct index
  377. of the elements currently scanned at the time of the exception.
  378. Workaround: Do not scan beyond segment limits or into memory mapped I/O
  379. areas.
  380. CMPXCHG op1,op2 Compare and Exchange
  381. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  382. Mnemonic: CMPXCHG
  383. Opcode : 0F B0 reg,mem/reg (Byte)
  384. 0F B1 reg,mem/reg (Word)
  385. 66 0F b0/b1 (Byte / DWord)
  386. Bug in : pre-B step 486
  387. Function:
  388. Compares the accumulator (8,16 or 32 bit form) with op1 by internally
  389. subtracting op1 from the accumulator and setting ZF according to the result.
  390. If ZR, op2 is copied to op1, otherwise op1 is loaded into the accumulator.
  391. On the A-step of the 486, this Mnemonic was coded using the opcodes for
  392. the, discarded, A- to B0-step 386 instructions XBTS (a6) and IBTS (a7).
  393. Because of software conflicts with software written for the early 386 DX the
  394. opcodes for the 486 were changed to the ones above starting with the B step.
  395. Note that some 386 software won't run on older 386es and some 486
  396. software will not run on early 486es when using this instruction.
  397. CPUID Identify CPU on 486 and higher CPUs
  398. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  399. Mnemonic: CPUID
  400. Opcode : 0F A2
  401. Bug in : Is undocumented for 486, seems not to work on tested AMD 486s
  402. Officially introduced as a new instruction with the Pentium.
  403. Function:
  404. Identifies CPU and revision information for the installed CPU. Note that
  405. Intel officially introduced CPUID only with the Pentium processor.
  406. It seems the instruction was unofficially introduced in the later
  407. 486 CPUs as well. Discovered by Christian Ludloff (see acknowledgements).
  408. Supported by the UMC U5S 486 clones as well.
  409. Executing it on an early 486 yields an Invalid Opcode Exception.
  410. To safely use this instruction, an exception handler must be installed.
  411. A safer workaround though is to test whether the ID bit in EFLAGS is set.
  412. If so, the CPU supports CPUID. See <EFLAGS> image.
  413. The instruction expects input in the EAX register and outputs information
  414. in the EAX, EBX, ECX and EDX registers.
  415. Input: EAX = 0000 0000 : Check CPU 486+ installed
  416. Output: after CPUID:
  417. EAX = 0000 0001 : OK, instruction supported
  418. EBX = 756e 6547 : 'uneG'
  419. EDX = 4965 6e69 : 'Ieni'
  420. ECX = 6c65 746e : 'letn'
  421. effectively the CPU says 'GenuineIntel'
  422. Officially this returns a 'vendor string', which may indicate other than
  423. Intel strings for OEMs.
  424. The UMC U5S-33 returns 'UMC UMC UMC ' or ' UMC UMC UMC' (untested).
  425. Input: EAX = 0000 0001 : Obtain model specific information
  426. Output: after CPUID:
  427. EAX = RRRR RFMS : revision information
  428. R = Reserved Zero, but reserved
  429. F = Family (4=486, 5=Pentium)
  430. M = Model (3 on tested 486DX-2/66, 1 on tested Pentium/60)
  431. S = Stepping (5 on tested 486DX-2/66, 3 on tested Pentium/60)
  432. EBX = RRRR RRRR
  433. R = Reserved Zero, but reserved
  434. ECX = RRRR RRRR
  435. R = Reserved Zero, but reserved
  436. EDX = xxxx xxxx : Bitmapped features, 1 means option available
  437. Bit 0 = FPU built-in (supported on 486 and Pentium)
  438. Bit 1 = V-86 mode extensions present
  439. Bit 2 = I/O breakpoints possible
  440. Bit 3 = 4 MB paging supported
  441. Bit 4 = Time Stamp Counter present
  442. Bit 5 = Has Pentium compatible Model Specific Registers
  443. Bit 6 = Reserved (0)
  444. Bit 7 = Machine Check Exception supported (P5 only)
  445. Bit 8 = CMPXCHG8B supported (apparently Pentium only)
  446. Bits 9-31 Reserved
  447. Assume zero if bit is not mentioned.
  448. Note that this instruction is not supported on all 486 CPUs. However,
  449. Christian Ludloff has tested it on some 486 DX and 486 SX models, in
  450. addition to the Pentium/60 and found them to be present on those machines.
  451. Any step and model information you find this instruction to run on is
  452. welcomed. Please forward it to Christian.
  453. Apparently all new(er) Intel CPUs are equipped with (some) of these
  454. extensions, not just the Pentium.
  455. CR0-4 register layout (386+)
  456. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  457. = CR0: Some bits remain from the Machine Status Word of the 286.
  458. Bit 31 16 0
  459. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄ¿
  460. ³P³C³N³r³r³r³r³r³r³r³r³r³r³A³r³W³r³r³r³r³r³r³r³r³r³r³n³e³t³E³m³p³
  461. ÀÅÁÅÁÅÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÅÁÄÁÅÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÅÁÅÁÅÁÅÁÅÁÅÙ
  462. ³ÚÙ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ ³ ³ ³
  463. ³³ÚÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ³ ³ ³ ³ ³ ³
  464. ³³ÀNW Not Write through (1 if write through) ³ ³ ³ ³ ³ ³ ³ ³
  465. ³ÀÄCD Cache Disable (1 if disabled) ³ ³ ³ ³ ³ ³ ³ ³
  466. ÀÄÄPE Paging Enabled ³ ³ ³ ³ ³ ³ ³ ³
  467. AC Alignment mask (1=masked)ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³ ³
  468. WP Write Protect (1 if read-only pages protected)³ ³ ³ ³ ³ ³
  469. NE Numeric Error (1 if errors should be ignored)ÄÙ ³ ³ ³ ³ ³
  470. ET Extension Type (1=387 type FPU,0=287 type FPU)ÄÄÙ ³ ³ ³ ³
  471. TS Task Switch (1=task switch has occurred)ÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³
  472. EP Emulate Processor Extension ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³
  473. (1=execute exception 7 on FPU codes) ³ ³
  474. MP Math Present (1=_FPU_ will handle FPU codes)ÄÄÄÄÄÄÄÄÄÄÙ ³
  475. PE Protection Enabled (1=Protected mode activated)ÄÄÄÄÄÄÄÄÄÙ
  476. If EP=1 and MP=0, the FPU codes will be handled by software routines
  477. via exception 7. Coprocessor emulators use this property.
  478. = CR1: Is reserved
  479. = CR2: Linear 32-bit address of Page Fault
  480. = CR3: Page Directory Base Register (386+)
  481. Bit 31 16 0
  482. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄ¿
  483. ³x³x³x³x³x³x³x³x³x³x³x³x³x³x³x³x³x³x³x³x³r³r³r³r³r³r³r³p³P³r³r³r³
  484. ÀÅÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÅÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÅÁÅÁÄÁÄÁÄÙ
  485. ÀÄÄÄÄÄPage Directory Base RegisterÄÄÄÄÙ ³ ³ PDBR
  486. (used in the Paging process implemented on the 386+) ³ ³
  487. ³ ³
  488. Page-level Cache Disable (486+)ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ PCD
  489. Page-level Writes Transparent (486+)ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ PWT
  490. = CR4: Extended Machine Control (Pentium+)
  491. Bit 31 16 0
  492. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄ¿
  493. ³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³r³M³r³p³D³T³P³V³
  494. ÀÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÅÁÄÁÅÁÅÁÅÁÅÁÅÙ
  495. Machine Check Enable (1=enabled)ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ MCE
  496. Page Size Extension (1=4 Mb paging instead of 4 Kb)ÄÄÄÙ ³ ³ ³ ³ PSE
  497. Debugging Extension (1=breakpoints also valid for I/O)ÄÄÙ ³ ³ ³ DE
  498. Time Stamp instruction Disable (1=RDTSC only with CPL=0)ÄÄÙ ³ ³ TSD
  499. Protected mode Virtual Interrupts (1=use VI flag in PM)ÄÄÄÄÄÙ ³ PVI
  500. Virtual86 mode Virtual Interrupts (1=use VI flag in VM)ÄÄÄÄÄÄÄÙ VME
  501. The VME bit allows a V86 (or VM) task to use the 'virtual' interrupt
  502. flag. Setting and clearing the interrupt flag (IF) in EFLAGS is no
  503. longer intercepted by the V86 Monitor program (a very time consuming
  504. procedure), instead, the Pentium+ sets and clears the VI flag in
  505. EFLAGS, instead of the IF flag. This saves task switches to the
  506. monitor to handle the CLI and STI instructions and thus a lot
  507. of time in general purpose 8086 programs running in V86 mode.
  508. The PVI bit allows the same for Protected Mode procedures who would
  509. otherwise need supervision by a different task. That is:
  510. Tasks with CPL<0 may now call tasks with CPL=0 without crashing
  511. the system, but only under specific circumstances.
  512. The TSD bit changes the CPL-sensitivity of the RDTSC (Read Time
  513. Stamp Counter) instruction, a built-in CPU counter which is
  514. incremented every internal clockpulse.
  515. When TSD is 0, <RDTSC> is accessible for all CPL levels.
  516. With TSD set to 1 however, RDTSC is available only to tasks with
  517. CPL=0.
  518. The DE bit allows the Pentium+ to set breakpoints in I/O space
  519. using the breakpoint registers. The R/W coding 10b is used to
  520. indicate that the breakpoint is in I/O space on the Pentium+.
  521. The 10b encoding was marked as 'invalid' for pre-Pentium CPUs.
  522. The PSE bit determines the size of the pages controlled by the
  523. Paging Unit. With PSE = 0, the Paging mechanism uses 4 Kb pages.
  524. With PSE set to 1 however, the Paging mechanism uses 4 Mb pages.
  525. The MCE bit is used to allow generation of a Machine Check Exception.
  526. This exception is the result of a Parity error _within_ the Pentium
  527. or an active BUSCHK signal (low) on pin T3 (upper right hand corner,
  528. fourth pin from right, third from top when pin A1 is upper left
  529. corner, TOP view). The exception is vectored through interrupt 18d
  530. (or 12h). Execution after this exception may void system integrity.
  531. The Machine Check Address register holds the value of the address
  532. bus at the moment the event took place.
  533. The Machine Check Type register holds the type of bus access at the
  534. time the event took place.
  535. Both these registers are internal 64 bit registers which can only be
  536. read through the instruction <RDMSR> (Read Model Specific Register).
  537. See also <WRMSR> (Write Model Specific Register).
  538. EFLAGS register layout (8088 to Pentium & NEC)
  539. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  540. Bit 31 16 0
  541. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄ¿
  542. ³r³r³r³r³r³r³r³r³r³r³c³p³v³a³V³R³M³N³IOP³O³D³I³T³S³Z³r³A³r³P³r³C³
  543. ÀÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÅÁÅÁÅÁÅÁÅÁÅÁÅÁÅÁÅÁÄÁÅÁÅÁÅÁÅÁÅÁÅÁÄÁÅÁÄÁÅÁÄÁÅÙ
  544. ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³Carry
  545. CPUID available ÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ Parity
  546. Virtual Interrupt Pending³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀAux carry
  547. Virtual Interrupt flag ÄÄÙ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄ Zero
  548. Alignment check ÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³ ³ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄ Sign
  549. Virtual-86 mode enabled ÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³ ³ À Trap (step mode)
  550. Resume flag ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ ÀÄÄ Interrupt enable
  551. Mode Flag ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ÀÄÄÄÄ Direction (1=up)
  552. Nested Task ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Overflow
  553. ÀÄÄ I/O privilege level 0..3
  554. Note: the Mode Flag is supported only on the NEC V20/30,
  555. it is reserved on Intel CPUs.
  556. The diagram below shows the names for each bit as referenced to in most
  557. books, along with the CPU in which the bit was =officially= introduced.
  558. Description: Name: CPU introduced:
  559. CPUID availableÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄID Pentium
  560. Virtual Interrupt PendingÄÄÄÄÄVIP Pentium
  561. Virtual Interrupt flagÄÄÄÄÄÄÄÄVI Pentium
  562. Alignment Check FlagÄÄÄÄÄÄÄÄÄÄAC 486
  563. Virtual-86 Mode FlagÄÄÄÄÄÄÄÄÄÄVM 386
  564. Resume FlagÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄRF 386
  565. Mode Flag (8O8O emulation on)ÄMD V20/V30 only
  566. Nested TaskÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄNT 286
  567. I/O privilege level 0..3ÄÄÄÄÄÄIOPL 286
  568. Overflow FlagÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄOF 86
  569. Direction Flag (1=up)ÄÄÄÄÄÄÄÄÄDF 86
  570. Interrupt Flag (1=enabled)ÄÄÄÄIF 86
  571. Trap Flag (single step mode)ÄÄTF 86
  572. Sign FlagÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄSF 86
  573. Zero FlagÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄZF 86
  574. Auxiliary carry FlagÄÄÄÄÄÄÄÄÄÄAF 86
  575. Parity FlagÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄPF 86
  576. Carry FlagÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄCF 86
  577. (8080 is written here as 8O8O to avoid visual confusion with the 8088).
  578. (Mode Flag supplied by Anthony Naggs)
  579. EXT Extract bit field (NEC V20/30 only)
  580. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  581. Mnemonic: EXT reg8,reg8 / EXT reg8,imm4
  582. Opcode : 0F 33 [mod:reg:r/m] (26-55 clocks)
  583. Bug in : Rarely documented, except in NEC manuals
  584. Function:
  585. Loads AX with bit field data. Bit field length is specified by the lowest
  586. four bits of the second operand, more significant bits in AX are set to
  587. zero. DS:SI specify the first memory location to read, and the low 4-bits
  588. of the first operand specify the bit start position. The bit field can
  589. cross a byte boundary. After each complete data transfer, SI and the first
  590. operand are automatically updated to point to the next bit field.
  591. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  592. instructions on 286+ CPUs.
  593. (Supplied by Anthony Naggs)
  594. See Also: NECINS, TEST1, NOT1, CLEAR1, SET1
  595. FPO2 Floating Point Operation 2 (NEC V20/30 only)
  596. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  597. Mnemonic: FPO2 fp-op / FPO2 fp-op,mem
  598. Opcode : 0110011X [mod:XXX:r/m] (2/11 clocks)
  599. Bug in : Rarely documented, except in NEC manuals
  600. Function:
  601. Intended to communicate with NEC maths co-processors. The NEC "FPO1" opcode
  602. corresponds to Intel's "ESC" prefix for co-processor instructions. Although
  603. data sheets exist for NEC maths co-processors, they have never been
  604. manufactured.
  605. Note that the 386+ CPUs implement the opcodes 66 and 67 as Operand Size and
  606. Address Size prefixes respectively.
  607. (Supplied by Anthony Naggs)
  608. HLT Halt the processor
  609. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  610. Mnemonic: HLT
  611. Opcode : F4
  612. Bug in : No bug, handy use of instruction described below
  613. Function:
  614. Halts the processor, CPU restarts only when external event takes place such
  615. as RESET activation, NMI request on NMI lines or maskable interrupt request
  616. on INTR when interrupts are enabled.
  617. Handy to use with following piece of code:
  618. STI ; enable interrupts
  619. lazy:
  620. HLT ; suspend CPU internal bus clock
  621. IN AL,60h ; Key pressed !
  622. CMP AL,whatever_key
  623. JNE lazy ; was not our key, just go back to sleep.
  624. If the CPU is not going to be used for any processing tasks (hence is idle)
  625. one may execute the code above to cool down the CPU because it stops the
  626. internal CPU bus clock. It also saves (some) energy.
  627. IBTS op1,op2 Insert Bit String
  628. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  629. Mnemonic: IBTS op1,op2
  630. Opcode : 0F A7
  631. Bug in : 386, 486 conflicting instruction opcode.
  632. Function:
  633. Obsolete instruction which was introduced on the A step of the 386 and
  634. removed on the B1 step of the 386. The opcode a7 is used by the A step 486
  635. to function as part of the CMPXCHG instruction. Because of software
  636. conflicts (some compilers generated code for IBTS and its counterpart XBTS)
  637. Intel decided to change the opcode for CMPXCHG on the B step of the 486.
  638. Do NOT use IBTS in general purpose 386 or 486 applications.
  639. IMUL Integer, signed, Multiply
  640. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  641. Mnemonic: IMUL op
  642. IMUL op1,op2
  643. IMUL op1,op2,op3
  644. IMUL op1,op3
  645. Opcode : F6w [mod:101:r/m] disp
  646. Bug in : Apparently no bug, timing formula may be handy
  647. Function:
  648. It is mentioned here because of the timing formula.
  649. The clocks used on 386 and 486 equal 9 or ceiling(log2(multiplier))+6.
  650. Depending on which one is bigger.
  651. Add an additional 3 clocks if multiplier is a memory operand.
  652. See <MUL> for 32-bit MUL bugs.
  653. INS Input String from IO port
  654. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  655. Mnemonic: INS, INSB, INSW, INSD
  656. Opcode : AA, AB
  657. Bug in : early 286, some 386, early 486, NEC conflicting mnemonic: INS
  658. Function:
  659. Reads values from a port address in DX into a string at ES:DI or ES:EDI
  660. in memory. When used with the REPcondition prefix, CX or ECX contains the
  661. number of values to read.
  662. There is also a NEC specific instruction with the conflicting mnemonic INS,
  663. see <NECINS> or select <NEC specific instructions> from the mnemonic list
  664. page for more information regarding that instruction.
  665. Bugs in the 286;
  666. If, in protected mode, ES would contain a null selector or ES:DI would
  667. point beyond the segment limit when executing the single INS, causing
  668. exception 0dh, the 0d exception handler would point to the instruction
  669. following INS and not to it.
  670. If, in protected mode, during the repeated version of the instruction, a
  671. segment limit or IOPL exception occurred, the exception handler would see
  672. the CX value as it was before the start of the instruction, DI would reflect
  673. the proper index at the time of the exception though. This type of bug
  674. also occurs with the CMPS instruction.
  675. Bugs in the 386:
  676. The value of CX or ECX after the REPcondition version is not correct when
  677. the instruction is followed by a PUSH, POP or memory reference. After
  678. REP INS the value of CX, ECX is -1, not 0. Do not assume (E)CX to be 0.
  679. When REP INS or INS is followed by an instruction that uses a different
  680. address size or when they are followed by an instruction that references
  681. the stack implicitly while the B bit of the SS descriptor is different than
  682. the address size used by the instruction, INS will not properly update
  683. the (E)DI and REP INS will not properly update the (E)CX register.
  684. The actual address size used will be the one of the instruction following
  685. the (REP) INS.
  686. A workaround for this bug is to code a NOP with the same address size as the
  687. INS right behind it by using the address size prefix byte 67h (when needed).
  688. Bugs in the 486:
  689. Early 486 may hang if the INS destination address spans across a doubleword
  690. boundary, while not asserting BS16# or BS8#.
  691. To avoid this, always align the string at a doubleword.
  692. INS (NECINS) Insert bit field (NEC V20/30 only)
  693. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  694. Mnemonic: INS reg8,reg8 / INS reg8,imm4
  695. Opcode : 0F 31 [mod:reg:r/m] (31-117 clocks)
  696. Bug in : Rarely documented, except in NEC manuals
  697. Function:
  698. Stores bit field data from AX into memory. Bit field length is specified by
  699. the lowest four bits of the second operand. ES:DI specify the first memory
  700. location to write, and the low 4-bits of the first operand specify the bit
  701. offset position. The bit field can cross a byte boundary. After each
  702. complete data transfer, DI and the first operand are automatically updated
  703. to point to the next bit field.
  704. This mnemonic (INS) conflicts with the Intel mnemonic INS, which reads
  705. a string from an I/O port. This Intel instruction has bugs which are listed
  706. with the entry for <INS>. For clarity, this NEC version is referred to as
  707. "NECINS" where possible in this list.
  708. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  709. instructions on 286+ CPUs.
  710. (Supplied by Anthony Naggs)
  711. See Also: EXT, TEST1, NOT1, CLEAR1, SET1
  712. INVD Invalidate internal and external caches
  713. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  714. Mnemonic: INVD
  715. Opcode : 0F 08
  716. Bug in : some 486
  717. Function:
  718. INVD tells the processor that all data in both the internal as well as the
  719. external caches is invalid. Data held in external write-back caches is
  720. discarded.
  721. If on some 486's a cache line fill is in progress while the INVD instruction
  722. is being executed, that line is NOT invalidated and the buffer contents
  723. is moved into the cache. Valid cache lines are ALWAYS used to satisfy
  724. read requests on all 486's, regardless whether the cache is enabled or not.
  725. Workaround is to disable the cache prior to flushing it like this:
  726. MOV EAX,CR0
  727. OR EAX,60000000h ; cache disable bits
  728. PUSHFD
  729. CLI
  730. MOV BL,CS:here
  731. OUT dummyport,dummydata
  732. MOV CR0,EAX
  733. here:
  734. INVD
  735. AND EAX,9fffffff ; cache enable, write-through
  736. MOV CR0,EAX
  737. POPFD
  738. JMP Jump unconditionally.
  739. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  740. Mnemonic: JMP dest
  741. Opcode : EB disp8
  742. Bug in : A to C0 step of 486
  743. Function:
  744. JMP transfers execution to a location within -127 to +128 bytes from the
  745. jump instruction. The bug occurs when the jump causes a General Protection
  746. Violation while an NMI or INTR occur at exactly the same clockpulse.
  747. Although very unlikely to occur, it is listed for completeness.
  748. LAR Load Access Rights (Protected Mode)
  749. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  750. Mnemonic: LAR reg1,reg/mem
  751. Opcode : 0F 02
  752. Bug in : some 386
  753. Function:
  754. LAR Loads the Access rights of a descriptor in the Global Descriptor Table,
  755. whose selector is reg/mem into reg1. When successful, ZF=1, otherwise ZF=0.
  756. Some 386es allow access to selector 0 in the GDT leaving ZF=1.
  757. Normally this should not be possible and produce the condition ZF=0.
  758. Workaround would be to create an entry 0 in the GDT that consists of only
  759. zeroes. This will cause access with a selector of 0 to fail and
  760. produce ZF=0.
  761. A data breakpoint set to the mem16 operand of LAR can be missed on some
  762. 386es if the segment with the selector at mem16 is not accessible.
  763. (see also <debugging>)
  764. 286-LOADALL / 386-LOADALL
  765. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  766. Mnemonic: LOADALL
  767. Opcode : 286 : 0F 05 (195 clocks)
  768. 386+: 0F 07 ( ? clocks)
  769. Bug in : Is an undocumented opcode on 286,some 386,some early 486 ?
  770. Support for this instruction has been dropped with the 486.
  771. Function:
  772. Loads virtually all processor registers with defined values from memory.
  773. Initialises processor to specified state. Apparently aliased on the 286 by
  774. opcode 0f 04.
  775. The 286 LOADALL instruction reads a block of 102 bytes into the chip,
  776. starting at address 000800 hex.
  777. Memory description for LOADALL read area on 286:
  778. (addresses are in hexadecimal, lengths in decimal)
  779. 0800: 6 N/A
  780. 0806: 2 MSW (Machine Status Word)
  781. 0808: 14 N/A
  782. 0816: 2 TR (Task Register)
  783. 0818: 2 FLAGS (286 Flags)
  784. 081a: 2 IP (Instruction Pointer)
  785. 081c: 2 LDT (Local Descriptortable)
  786. 081e: 2 DS (Data Segment)
  787. 0820: 2 SS (Stack Segment)
  788. 0822: 2 CS (Code Segment)
  789. 0824: 2 ES (Extra Segment)
  790. 0826: 2 DI (Destination Index)
  791. 0828: 2 SI (Source Index)
  792. 082a: 2 BP (Base Pointer)
  793. 082c: 2 SP (Stack Pointer)
  794. 082e: 2 BX (BX register)
  795. 0830: 2 DX (DX register)
  796. 0832: 2 CX (CX register)
  797. 0834: 2 AX (AX register)
  798. 0836: 6 ES cache (ES descriptor _cache_)
  799. 083c: 6 CS cache (CS descriptor _cache_)
  800. 0842: 6 SS cache (SS descriptor _cache_)
  801. 0848: 6 DS cache (DS descriptor _cache_)
  802. 084e: 6 GDTR (Global Descriptor Table)
  803. 0854: 6 LDT cache (Local Descriptor_cache_)
  804. 085a: 6 IDTR (Interrupt Descriptor table)
  805. 0860: 6 TSS cache (Task State Segment _cache_)
  806. Descriptor caches layout:
  807. 3 bytes 24 bit physical address of segment
  808. 1 byte access rights byte, same format as access right byte
  809. in a regular descriptor. The 'present' bit now
  810. represents a 'valid' bit. If this bit is cleared
  811. (zero) the segment is invalid and accessing it will
  812. trigger exception 0dh.
  813. The DPL (Descriptor Privilege Level) fields of the CS
  814. and SS descriptor caches determine the CPL
  815. (Current Privilege Level).
  816. 2 bytes 16 bit segment length limit.
  817. This layout is the same for the GDTR and IDTR registers,
  818. except that the access rights byte must be zero.
  819. The register caches are internal CPU registers containing a copy of the last
  820. 'composed' address and access information loaded for a particular register
  821. in protected mode (e.g. ES). An outline of the basics of 286 protected
  822. mode register caching and register layout is beyond the scope of this file
  823. The 386 LOADALL loads 204 (dec) bytes from the address at ES:EDI and resumes
  824. execution in the specified state.
  825. Memory description for LOADALL read area on 386+:
  826. (addresses are in hexadecimal, lengths in decimal)
  827. relative offset: Bytes: Registers:
  828. 0000: 4 CR0
  829. 0004: 4 EFLAGS
  830. 0008: 4 EIP
  831. 000c: 4 EDI
  832. 0010: 4 ESI
  833. 0014: 4 EBP
  834. 0018: 4 ESP
  835. 001c: 4 EBX
  836. 0020: 4 EDX
  837. 0024: 4 ECX
  838. 0028: 4 EAX
  839. 002c: 4 DR6
  840. 0030: 4 DR7
  841. 0034: 4 TR
  842. 0038: 4 LDT
  843. 003c: 4 GS (zero extended)
  844. 0040: 4 FS (zero extended)
  845. 0044: 4 DS (zero extended)
  846. 0048: 4 SS (zero extended)
  847. 004c: 4 CS (zero extended)
  848. 0050: 4 ES (zero extended)
  849. 0054: 12 TSS descriptor cache
  850. 0060: 12 IDT descriptor cache
  851. 006c: 12 GDT descriptor cache
  852. 0078: 12 LDT descriptor cache
  853. 0084: 12 GS descriptor cache
  854. 0090: 12 FS descriptor cache
  855. 009c: 12 DS descriptor cache
  856. 00a8: 12 SS descriptor cache
  857. 00b4: 12 CS descriptor cache
  858. 00c0: 12 ES descriptor cache
  859. Descriptor caches layout:
  860. 1 byte zero
  861. 1 byte access rights byte, same as 286
  862. 2 bytes zero
  863. 4 bytes 32 bit physical base address of segment
  864. 4 bytes 32 bit segment length limit
  865. LSL Load Segment Limit
  866. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  867. Mnemonic: LSL reg1,reg/mem
  868. Opcode : 0F 03
  869. Bug : some 386
  870. Function:
  871. Loads the limits of a segment in protected mode by reading GDT entry reg/mem
  872. into reg1. Proper completion generates ZF=1, otherwise ZF=0.
  873. Some 386es allow access to selector 0 in the GDT leaving ZF=1.
  874. Normally this should not be possible and produce the condition ZF=0.
  875. Workaround would be to create an entry 0 in the GDT that consists of only
  876. zeroes. This will cause access with a selector of 0 to fail and
  877. produce ZF=0.
  878. Some 386es leave SP/ESP corrupted after successful completion of LSL, when
  879. LSL is followed by an explicit stack reference, using instructions like
  880. CALL, ENTER, LEAVE, IRET, RET, PUSH, POP, PUSHA, POPA, PUSHF and POPF.
  881. System-induced exceptions or interrupts however do not corrupt SP/ESP in
  882. that case. A workaround is to code a NOP after LSL.
  883. A data breakpoint set to the mem16 operand of LSL can be missed on some
  884. 386es if the segment with the selector at mem16 is not accessible.
  885. (see also <debugging>)
  886. MOV Move data to and from registers and or memory
  887. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  888. Mnemonic: MOV involving CRx, DRx or TRx, MOV to SS, CS
  889. Opcode : 0F 2n [mod:rrr:r/m], 8E [mod:sreg:r/m]
  890. Bug in : some 88,some 86,some 386,all 386,A to C0 step of 486
  891. Function:
  892. MOV Moves data in and out of (special) registers and memory.
  893. Some _very early_ 88 and 86 processors do not disable interrupts following
  894. a MOV sreg,reg. This causes them to crash when an interrupt uses the stack
  895. between MOV SS,reg and MOV SP,op. These versions carry a copyright message
  896. for 1978 on the package. Later, corrected revisions, carry both 1978 and
  897. 1981 as the copyright year.
  898. Normally interrupts would be disabled between the move to SS and execution
  899. of the instruction following it on 88 and 86es. A workaround is to manually
  900. disable the interrupts when reloading SS. The 286 and higher processors only
  901. disable interrupts after a MOV SS, in contrast to earlier CPUs, including
  902. the NECs, who do this with all MOV sreg,op instructions.
  903. An unsolvable problem occurs when an unmaskable interrupt or exception
  904. takes place while executing the instruction pair on an old 88 or 86.
  905. There are conflicting messages though about this type of interrupts having
  906. no effect on the bug.
  907. On the 86 and 88, but not on the C-MOS versions 80C86 and 80C88, the
  908. instruction MOV CS,op is valid and causes an unconditional jump.
  909. The C-MOS versions, as well as the NEC V20 and V30 ignore this coding.
  910. This may also be the case on the 186 but has not been tested.
  911. The 286+ CPUs consider CS an invalid operand for this instruction and
  912. generate exception 6 (Invalid opcode).
  913. The opcode for the MOV CS,op is: 8e [mod:001:r/m] See also <POP CS>.
  914. On some 386es, random breakpoint breaks occur from the debug registers
  915. D0-D3 when a MOV from CR3, TR6 or TR7 is executed. This will continue until
  916. after a jump instruction is executed. The actual contexts of D0-D3 is not
  917. affected. Workaround is to disable breakpoints before the MOV from CR3,TR6
  918. or TR7, execute a jmp right after the move and enabling breakpoints again.
  919. See also <debugging>
  920. On some 386es a MOV to SS may cause a code or data breakpoint set to the
  921. instruction following the MOV to be missed if the instruction takes more
  922. than two clocks. (see <debugging>)
  923. On all 386es a MOV to or from CRx, TRx or DRx executes correctly regardless
  924. of the mod field (the first two bits in the third byte of the opcode).
  925. The mod should be 11b. Intel documentation for the 386 stated it was
  926. undefined.
  927. Some 386 assemblers and compilers may generate values other than 11b for
  928. mod and fail on early 486es, causing an Invalid Opcode Exception, since they
  929. do require the mod field to be correct. More recent 486es recognize the
  930. aliased instructions as valid and execute them accordingly.
  931. On all 386es, moves to or from DR4 and DR5 are aliased to DR6 and DR7.
  932. On the early 486es these encodings are not recognized and generate an
  933. Invalid Opcode Exception. More recent 486es do recognize these aliases and
  934. execute them correctly.
  935. On the A to C0 steps of the 486, loading TR5 with a reg32 operand may hang
  936. the CPU if bits 0 and 1 (control bits) activate cache read, cache write or
  937. flush. A workaround is:
  938. JMP fetcher
  939. ALIGN 16
  940. fetcher:
  941. NOP
  942. IN AL,port ; Note that this corrupts EAX...
  943. MOV TR5,EBX ; EBX contained the new TR5 value.
  944. NOP
  945. NOP
  946. On the A to C0 step of the 486 loading a value into CR0 which disables the
  947. cache may corrupt the cache. Forcing a prefetch will avoid this.
  948. PUSHFD
  949. CLI
  950. MOV BL,CS:label
  951. MOV CR0,EAX
  952. label:
  953. POPFD
  954. NOP
  955. Using EBX:
  956. Note that using EBX under the Microsoft Windows 3.0 DOS box in standard mode
  957. or after Microsoft Windows 3.0' termination after running standard mode, for
  958. 32-bit addressing in real or virtual 86 mode, is likely to crash the system
  959. due to the fact that apparently the Windows 3.0 DOS box trashes EBX while
  960. servicing interrupts, turning bit 18 of EBX to 1 and thus causing unwanted
  961. segment violation errors. Use of EBX in calculations is likely to cause
  962. spurious errors and may yield unpredictable behaviour of your code under
  963. the aforementioned circumstances.
  964. (MOV CS,op for NEC and 88/86, C88/C86, & 1978 copyright message
  965. supplied by Anthony Naggs).
  966. MOVS Move string of bytes, words or doublewords in memory
  967. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  968. Mnemonic: MOVSB / MOVSW / MOVSD
  969. Opcode : A4 / A5 / 66 A5
  970. Bug in : early 286 in PM, some 386
  971. Function:
  972. MOVS moves strings in memory. Possible units to move are byte, word and
  973. doubleword. Typically the source is DS:(E)SI, the target ES:(E)DI
  974. If the single instruction MOVS (not prefixed by REPx) is executed with a
  975. NULL selector in ES or when ES:DI points beyond the segment limit while
  976. executing the the single instruction, causing exception 0dh, the CS:IP
  977. saved by the 0dh exception handler will point after the MOVS instruction,
  978. instead of to it on some 286s.
  979. If a segment limit exception or IOPL violation exception occurs during the
  980. REPx prefixed form of MOVS in Protected Mode, some early 286 will reset CX
  981. to its initial setting (before the REPx started) instead of showing CX as
  982. it was at the time of the exception. SI and DI are not affected and show the
  983. values they had at the time of the exception.
  984. During debugging with breakpoints set, REP MOVS can cause data breakpoints
  985. to be missed on some 386, see <debugging>.
  986. If, on some 386es, MOVS is followed by an instruction which uses a different
  987. address size, or by an instruction which implicitly references the stack
  988. (like POP, PUSH, IRET, RET, CALL, ENTER, LEAVE, PUSHA, POPA, PUSHF and POPF)
  989. while the D-bit for the stack is different from the current address size
  990. used by the MOVS instruction, the destination register updated will depend
  991. on the address size of the instruction that follows, rather than that of
  992. the MOVS. This can result in the updating of only DI when EDI was meant
  993. or EDI when only DI was meant.
  994. The repeated form REPx MOVS has the same bug, but in addition to (E)DI,
  995. also (E)SI is affected.
  996. A workaround is to always code a NOP with the same address size after MOVS
  997. and REPx MOVS.
  998. Example:
  999. (16-bit code segment)
  1000. MOVSW ; 16-bit addressing MOVS
  1001. NOP ; 16-bit addressing NOP
  1002. db 67h
  1003. MOVSW ; 32-bit addressing MOVS
  1004. db 67h
  1005. NOP ; 32-bit addressing NOP
  1006. (32-bit code segment)
  1007. MOVSD ; 32-bit addressing MOVS
  1008. NOP ; 32-bit addressing NOP
  1009. db 67h
  1010. MOVSD ; 16-bit addressing MOVS
  1011. db 67h
  1012. NOP ; 16-bit addressing NOP
  1013. MUL Unsigned Multiply 16 & 32-bit versions
  1014. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1015. Mnemonic: MUL reg
  1016. Opcode : (66) F7 Ex
  1017. Bug in : 386
  1018. Function:
  1019. MUL multiplies ax with a 16-bit operand to form a 32-bit result in dx:ax.
  1020. The 32-bit version multiplies eax with a 32-bit operand to form a 64-bit
  1021. result in edx:eax.
  1022. Some 386es have a problem which redirects output from the 32-bit MUL
  1023. to the wrong parts of the wrong registers.
  1024. Typically the following happens:
  1025. Properly operating 32-bit version: Properly operating 16-bit version:
  1026. EAX: 'A':'B' EAX: 'A':'B'
  1027. EBX: 'C':'D' EBX: 'C':'D'
  1028. EDX: 'E':'F' EDX: 'E':'F'
  1029. CD x AB gives a result in EF:AB D x B gives a result in F:B
  1030. While executing the 32-bit MUL, the faulty CPU takes CD times AB and puts
  1031. the value it should have added to 'A' into 'F' while at the same time
  1032. adding the value it should have put into EF to AB.
  1033. No workaround other than to use 16-bit multiply.
  1034. Some 386's have a bug which generates incorrect values in 16-bit mode.
  1035. The iAPX program from IGEL (Chris Lueders) tests for this bug.
  1036. Intel apparently organized a replacement project to get the faulty chips
  1037. returned to factory for screening. After testing at Intel the faulty CPUs
  1038. were sold again to bulk buyers who installed them in 16-bit only machines.
  1039. These tested and failed chips carry the text "16-bit S/W only" or a single
  1040. sigma. The tested and passed chips carry a double sigma (ää) on the package.
  1041. (supplied by Chris Lueders)
  1042. NEC V20/V30 introduction
  1043. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1044. The NEC V series microprocessors are functionally similar to the 8086 design
  1045. which NEC licensed from Intel. The internal microcode and most NEC mnemonics
  1046. are different from Intel's, to avoid Intel copyright claims. Only the
  1047. NEC V20 & V30, pin compatible with 8088 & 8086 respectively, are usually
  1048. found in IBM compatible PCs.
  1049. The V20 and V30 are often supplied as an "upgrade kit" for PCs originally
  1050. equipped with an 88/86, as they execute most instructions in fewer clocks
  1051. and can be used at a higher clock rate than the Intel parts.
  1052. Occasionally single board PCs use the V40 & V50, which are based on the same
  1053. CPU core and have integrated peripheral functions. Other V series family
  1054. members diverge further from the Intel x86 series and are used in
  1055. controllers and instrumentation rather than PCs.
  1056. The V20 and V30 have four classes of extra instructions beyond those
  1057. present on the 86/88:
  1058. * the instructions Intel introduced on the 186/188
  1059. * unique instructions for the NEC V series
  1060. * instructions to switch to/from 8O8O emulation mode
  1061. * 8O8O instructions in 8O8O emulation mode
  1062. (8080 is written here as 8O8O to avoid visual confusion with the 8088).
  1063. Since the 188/186 instructions are widely documented, and the 8O8O
  1064. instructions are of use only if you are writing a CP/M emulator or similar,
  1065. these instructions are not listed. The special instructions which can be
  1066. used in Intel x86 mode are listed in the <NEC mnemonics page>
  1067. (Supplied by Anthony Naggs)
  1068. NEC V20/V30-specific mnemonics list
  1069. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1070. Bit field instructions:
  1071. <INS> (NECINS) Insert bit field <EXT> Extract bit field
  1072. <TEST1> Test a specific bit <NOT1> Invert a specific bit
  1073. <CLEAR1> Clear a specific bit <SET1> Set a specific bit
  1074. Packed BCD support:
  1075. <ADD4S> Add packed BCD numbers <SUB4S> Subtract BCD strings
  1076. <CMP4S> Compare BCD strings (subtract without storing)
  1077. <ROL4> Rotate left 4 bits <ROR4> Rotate right 4 bits
  1078. Instruction prefixes:
  1079. <REPC> Repeat while Carry <REPNC> Repeat while No Carry
  1080. Floating point escape: Start 8O8O emulation:
  1081. <FPO2> NEC equivalent of ESC <BRKEM> Break to 8O8O emulation mode
  1082. (Supplied by Anthony Naggs)
  1083. NOT1 Invert a specific bit (NOT operation) (NEC V20/30 only)
  1084. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1085. Mnemonic: NOT1 reg/mem,CL/immediate
  1086. Opcode : NOT1 r/m8,CL : 0F 16 [mod:000:r/m] (4/18 clocks)
  1087. NOT1 r/m8,imm3 : 0F 1E [mod:000:r/m] imm (5/19 clocks)
  1088. NOT1 r/m16,CL : 0F 17 [mod:000:r/m] (4/18 clocks)
  1089. NOT1 r/m16,imm4: 0F 1F [mod:000:r/m] imm (5/19 clocks)
  1090. NOT1 CY : F5 (NEC nomenclature for Intel's CMC)
  1091. Bug in : Rarely documented, except in NEC manuals
  1092. Function:
  1093. NOTs the specified bit in the register/memory operand. The bit number (CL
  1094. or immediate) is ANDed with 07 (for 8-bit operands) or 0F (for 16-bit
  1095. operands) to get a valid bit number. No flags are affected by this
  1096. operation, except by NOT1 CY.
  1097. The first (smaller) clock count in each pair is for register operands.
  1098. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  1099. instructions on 286+ CPUs.
  1100. (Supplied by Anthony Naggs)
  1101. See Also: NECINS, EXT, TEST1, CLEAR1, SET1
  1102. POP Pop register from stack
  1103. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1104. Mnemonic: POP
  1105. Opcode : 51+reg (01011rrr) for general purpose registers, 0F for POP CS
  1106. Bug in : POP CS is a valid opcode for 88, 86, invalid opcode for 186
  1107. 0F is prefix byte on NEC V20/30 and 286+
  1108. POP SS and breakpoints on some 386
  1109. Function:
  1110. POP retrieves data from the stack while adjusting the stackpointer.
  1111. The 88 and 86 allow the encoding of 0f for POP CS. The NEC V20 and V30,
  1112. as well as the 286+ CPUs use that encoding to indicate new instructions.
  1113. On the 88 and 86 POP CS causes an unconditional jump. Executing 0F on
  1114. the 186 generates an Invalid opcode exception (6).
  1115. On some 386es a code or data breakpoint set to the instruction following
  1116. POP SS will not be taken if the instruction takes more than two clocks.
  1117. (see also <debugging>)
  1118. (POP CS supplied by Anthony Naggs)
  1119. POPA / POPAD Pop all general purpose registers
  1120. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1121. Mnemonic: POPA / POPAD
  1122. Opcode : 61 / 66 61
  1123. Bug in : some 386
  1124. Function:
  1125. POPA and POPAD pop all general purpose registers from the stack.
  1126. POPA pops 16-bit registers and POPAD pops 32-bit registers. The opcode is
  1127. the same. POPAD is POPA with an operand size prefix (66h).
  1128. If either POPA or POPAD is followed by an instruction which uses an
  1129. effective address calculation consisting of a base register and another
  1130. register other than (E)AX as an index, the contents of EAX is corrupted.
  1131. Also, if POPA or POPAD in 16-bit mode is followed by an instruction which
  1132. uses an effective address using EAX as a base or index, the CPU will hang.
  1133. The workaround is to always code a NOP after POPA as well as POPAD.
  1134. Prefetch queue, bus & cache parameters per CPU
  1135. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1136. NEC NEC sx dx sx dx
  1137. 88 V20 188 86 V30 186 286 386 386 486 486 Pentium
  1138. ÚÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÂÄÁÄÄÄÄÄ¿
  1139. SPQBÄÄÄÅ 4 ³ 4 ³ 4 ³ 6 ³ 6 ³ 6 ³ 6 ³16 ³16 ³32 ³32 ³32 x 2 ³
  1140. NEBIPQÄÄÅ 1 ³ 1 ³ 1 ³ 2 ³ 2 ³ 2 ³ 2 ³ 2 ³ 4 ³16 ³16 ³ ? ³
  1141. MPBRMPÄÄÅ 1 ³ 1 ³ 1 ³ 1 ³ 1 ³ 1 ³ 1 ³ 1 ³ 1 ³16b³16b³ 32a³
  1142. DIQLÄÄÄÅ - ³ - ³ - ³ - ³ - ³ - ³ 3 ³ 3 ³ 3 ³ - ³ - ³ ? ³
  1143. OCSKBÄÄÅ - ³ - ³ - ³ - ³ - ³ - ³ - ³ - ³ - ³ 8 ³ 8 ³ 8 x 2 ³
  1144. DBSBÄÄÄÅ 8 ³ 8 ³ 8 ³16 ³16 ³16 ³16 ³16 ³32 ³32 ³32 ³ 64 ³
  1145. ABSBÄÄÄÅ20 ³20 ³20 ³20 ³20 ³20 ³24 ³24 ³32 ³32 ³32 ³ 32 ³
  1146. ÀÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÁÄÄÄÄÄÄÄÙ
  1147. Legend:
  1148. SPQB = Size of the Prefetch Queue (PQueue) in Bytes
  1149. NEBIPQ = Number of Empty Bytes In PQueue to initiate prefetch cycle
  1150. *MPBRMP = Minimum possible number of Bytes to Read from Memory to Prefetch
  1151. DIQL = Decoded Instruction Queue Length, measured in instructions
  1152. OCSKB = On-chip Cache Size in KiloBytes
  1153. DBSB = Data Bus Size in Bits
  1154. ABSB = Address Bus Size in Bits
  1155. - = None
  1156. b = 16-byte burst mode cache line fill
  1157. a = 32-byte burst mode cache line fill
  1158. * note that starting with the 486, prefetches are read from the cache.
  1159. A cache line fill is performed in case of a cache miss and starts to
  1160. read on paragraph boundaries only. A cache line on the 486 is 16 bytes
  1161. in size. On the Pentium, a line fill starts on a boundary which lies
  1162. at an even number of paragraphs (32-byte chunks).
  1163. (NEC & 188/186 prefetches supplied by Anthony Naggs)
  1164. PUSH Pushes value or register onto the stack.
  1165. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1166. Mnemonic: PUSH reg / PUSH mem
  1167. Opcode : 01010rrr / FF [mod:110:r/m]
  1168. Bug in : PUSH (E)SP different operation on 286+, PUSH mem on some 286 in PM
  1169. Function:
  1170. PUSH pushes a value or register onto the stack.
  1171. Normally, the value pushed is placed in the location pointed to by SS:SP
  1172. (or SS:ESP on 386+), after which (E)SP is decremented by a word or dword.
  1173. When pushing any register or value, the difference between 286+ and previous
  1174. CPUs is not visible and causes no problems.
  1175. However, when pushing SP (or ESP on 386+) the value pushed is different
  1176. between 286 and previous CPUs.
  1177. On CPUs prior to the 286, SP would be decremented and then pushed.
  1178. On 286+ however, SP gets pushed and then decremented, leaving a different
  1179. value on the stack for SP. On the 386+ the same is in effect when
  1180. pushing ESP
  1181. If PUSH mem on the 286 in Protected Mode causes a stack limit violation -
  1182. exception 0bh, the saved CS:IP will point _after_ the PUSH instead of _to_
  1183. it on some early 286.
  1184. RDTSC Read Time Stamp Counter
  1185. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1186. Mnemonic: RDTSC
  1187. Opcode : 0F 31
  1188. Bug in : Poorly documented for Pentium Processor
  1189. Function:
  1190. RDTSC reads a Pentium internal 64 bit register which is being incremented
  1191. from 0000 0000 0000 0000 at every CPU internal clockcycle. Note that this
  1192. gives a clockcycle-accurate timer with a range of more than 8800 years at
  1193. 66 Mhz...
  1194. The instruction places the counter in the EDX:EAX register pair.
  1195. REPNC / REPC Repeat next string operation while (No) Carry
  1196. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1197. Mnemonic: REPC / REPNC
  1198. Opcode : 65 / 64 ( ? clocks) (GS/FS override on 386+)
  1199. Bug in : Rarely documented except in NEC manuals, invalid on Intel CPUs
  1200. Conflicting opcode for GS and FS segment override for 386+
  1201. Function:
  1202. REPC repeats the following string instruction while the Carry Flag is set.
  1203. REPNC repeats the following string instruction while the Carry Flag is
  1204. clear. CX should hold the maximum number of iterations,
  1205. just as with REPZ/REPNZ.
  1206. Note that since these instructions works with the Carry Flag, they have no
  1207. special effect on MOVS and LODS. A simple REP should be used in these cases.
  1208. These instructions are NEC specific. They are not implemented on the Intel
  1209. CPUs. Note that the 386+ implements the listed opcodes 64 and 65 for the
  1210. segment override instructions FS and GS respectively.
  1211. If your software will run on a NEC, they may be handy.
  1212. ROL4 Rotate left 4 bits (NEC V20/30 only)
  1213. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1214. Mnemonic: ROL4 reg8/mem8
  1215. Opcode : 0F 28 [mod:000:r/m] (25/28 clocks)
  1216. Bug in : Rarely documented, except in NEC manuals
  1217. Function:
  1218. Rotates a BCD digit (4 bits) left out of the operand, through the low 4 bits
  1219. of AX.
  1220. AL reg/mem
  1221. 7 . . . . . . 0 7 . . . . . . 0
  1222. ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
  1223. ³ ³ ³<ÄÄÄÄÄÄ´ ³ ³<ÄÄÄ¿
  1224. ÀÄÄÄÄÄÄÄÁÄÄÄÂÄÄÄÙ ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ ³
  1225. ÀÄÄ>ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  1226. The first (smaller) clock count is for a register operand.
  1227. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  1228. instructions on 286+ CPUs.
  1229. (Supplied by Anthony Naggs)
  1230. See Also: ADD4S, SUB4S, CMP4S, ROR4
  1231. ROR4 Rotate right 4 bits (NEC V20/30 only)
  1232. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1233. Mnemonic: ROR4 reg8/mem8
  1234. Opcode : 0F 2A [mod:000:r/m] (29/33 clocks)
  1235. Bug in : Rarely documented, except in NEC manuals
  1236. Function:
  1237. Rotates a BCD digit (4 bits) right out of the operand, through the low 4
  1238. bits of AX.
  1239. AL reg/mem
  1240. 7 . . . . . . 0 7 . . . . . . 0
  1241. ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
  1242. ³ ³ ÃÄÄÄÄÄÄ>³ ³ Ã>ÄÄÄ¿
  1243. ÀÄÄÄÄÄÄÄÁÄÄÄÂÄÄÄÙ ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ ³
  1244. ÀÄÄ<ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  1245. The first (smaller) clock count is for a register operand.
  1246. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  1247. instructions on 286+ CPUs.
  1248. (Supplied by Anthony Naggs)
  1249. See Also: ADD4S, SUB4S, CMP4S, ROL4
  1250. SET1 Set a specific bit (NEC V20/30 only)
  1251. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1252. Mnemonic: SET1 reg/mem,CL/immediate
  1253. Opcode : SET1 r/m8,CL : 0F 14 [mod:000:r/m] (4/13 clocks)
  1254. SET1 r/m8,imm3 : 0F 1C [mod:000:r/m] imm (5/14 clocks)
  1255. SET1 r/m16,CL : 0F 15 [mod:000:r/m] (4/13 clocks)
  1256. SET1 r/m16,imm4: 0F 1D [mod:000:r/m] imm (5/14 clocks)
  1257. SET1 CY : F9 (NEC nomenclature for Intel's STC)
  1258. SET1 DIR : FD (NEC nomenclature for Intel's STD)
  1259. Bug in : Rarely documented, except in NEC manuals
  1260. Function:
  1261. Sets the specified bit in the register/memory operand. The bit number (CL
  1262. or immediate) is ANDed with 07 (for 8-bit operands) or 0F (for 16-bit
  1263. operands) to get a valid bit number. No flags are affected by this
  1264. operation, except the Carry and Direction Flag with SET1 CY and SET1 DIR.
  1265. The first (smaller) clock count in each pair is for register operands.
  1266. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  1267. instructions on 286+ CPUs.
  1268. (Supplied by Anthony Naggs)
  1269. See Also: NECINS, EXT, TEST1, NOT1, CLEAR1
  1270. SETALC Set AL according to Carry
  1271. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1272. Mnemonic: SETALC
  1273. Opcode : D6 ( ? clocks)
  1274. Bug in : Is an undocumented opcode on 88,86,286,386,486
  1275. Does not work on NEC and Sony V20+ (is alias for XLATB there)
  1276. Function:
  1277. This instruction copies the Carry Flag to the AL register without changing
  1278. any flags. In case of a CY, AL becomes ffh. When the Carry Flag is cleared,
  1279. AL becomes 00.
  1280. (NEC & Sony difference, and 86/88 availability supplied by Anthony Naggs)
  1281. Shift and Rotate operand limitations
  1282. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1283. Mnemonic: SHL, SAL, SHR, SAR, ROL, RCL, ROR, RCR, and all xxxD variants
  1284. Opcode : various
  1285. Bug in : 186+ will AND the shift- or rotate count with 1f before execution
  1286. NEC V20 and V30 act like 88 / 86 and do not limit the count.
  1287. Function:
  1288. The instructions mentioned above will limit the actual number of bits
  1289. shifted or rotated to the number of bits to be shifted AND 1f. The
  1290. remainder is actually shifted or rotated. A shift of 21h will actually be
  1291. a shift of 1.
  1292. This is also the case for the double shifts on 386+.
  1293. (186 and NEC difference supplied by Anthony Naggs)
  1294. SUB4S Subtraction of packed BCD strings (NEC V20/30 only)
  1295. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1296. Mnemonic: SUB4S
  1297. Opcode : 0F 22 (7+19n clocks, n is the number of bytes per operand)
  1298. Bug in : Rarely documented, except in NEC manuals, is conflicting opcode
  1299. on 386+ (MOV)
  1300. Function:
  1301. Subtracts the packed BCD string at DS:SI from the packed BCD string at
  1302. ES:DI. The length of the string, in BCD digits, is specified in CL. Unlike
  1303. Intel string operations CL, DI & SI are unchanged by the operation. The
  1304. Zero Flag (ZF) is set if the result is zero. The Carry Flag (CF) and
  1305. Overflow Flag (OF) appear to be set by the subtraction of the most
  1306. significant digits.
  1307. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  1308. instructions on 286+ CPUs.
  1309. (Supplied by Anthony Naggs)
  1310. See Also: ADD4S, CMP4S, ROL4, ROR4
  1311. TEST1 Test a specific bit (NEC V20/30 only)
  1312. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1313. Mnemonic: TEST1 reg/mem,CL/immediate
  1314. Opcode : TEST1 r/m8,CL : 0F 10 [mod:000:r/m] (3/12 clocks)
  1315. TEST1 r/m8,imm3 : 0F 18 [mod:000:r/m] imm (4/13 clocks)
  1316. TEST1 r/m16,CL : 0F 11 [mod:000:r/m] (3/12 clocks)
  1317. TEST1 r/m16,imm4: 0F 19 [mod:000:r/m] imm (4/13 clocks)
  1318. Bug in : Rarely documented, except in NEC manuals, opcodes 0f 10 and
  1319. 0f 11 are conflicting opcodes on 386+ (MOV aliases for 88-8b)
  1320. Function:
  1321. Tests the specified bit in the register/memory operand, if it is zero the
  1322. Z flag is set otherwise it is cleared. The bit number (CL or immediate)
  1323. is ANDed with 07 (for 8-bit operands) or 0F (for 16-bit operands) to get a
  1324. valid bit number.
  1325. The first (smaller) clock count in each pair is for register operands.
  1326. Note that 0F is treated as <POP CS> on the 88/86 and prefixes newer
  1327. instructions on 286+.
  1328. (Supplied by Anthony Naggs)
  1329. See Also: NECINS, EXT, NOT1, CLEAR1, SET1
  1330. UNKNOWN opcode, info wanted
  1331. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1332. Mnemonic: UNKNOWN
  1333. Opcode : 0F 04 ( ? clocks)
  1334. Bug in : Is an unknown opcode on 286
  1335. Function:
  1336. Exact purpose unknown, when executed it hangs the machine, likely bringing
  1337. it into protected mode, anyone with a hardware debugger may check to find
  1338. out. This instruction is likely to be an alias for the LOADALL on the 286.
  1339. It does not generate an exception. >> info wanted <<
  1340. VERR / VERW Verify a segment selector for Reading or Writing
  1341. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1342. Mnemonic: VERR op / VERW op
  1343. Opcode : 0F 00 [mod:100:r/m] / 0f 00 [mod:101:r/m]
  1344. Bug in : some 386
  1345. Function:
  1346. VERR verifies that the segment selector in memory, pointed to by op, is
  1347. readable and accessible with the current privilege level (CPL).
  1348. If so, the Zero Flag is set to 1, if not, the Zero Flag is cleared.
  1349. VERW verifies that the segment selector in memory, pointed to by op, is
  1350. writable and accessible with the current privilege level (CPL).
  1351. If so, the Zero Flag is set to 1, if not, the Zero Flag is cleared.
  1352. On some 386 both instructions allow a NULL selector to be specified,
  1353. accessing selector zero in the GDT, instead of failing unconditionally with
  1354. ZF=0, which would be the normal procedure. Workaround is to fill descriptor
  1355. zero in the GDT with all zeroes. Accessing it will then always fail and
  1356. produce the desired effect.
  1357. On some 386 both VERR and VERW can hang the CPU until an INTR, NMI or RESET
  1358. occurs. This bug occurs when there is no memory operand, JMP or CALL
  1359. instruction in the <prefetch queue> along with the VERR or VERW.
  1360. Workaround is to code a JMP or Jcondition instruction right after the VERR
  1361. or VERW, with the added condition that _the last byte_ of the VERR / VERW
  1362. and the _complete_ JMP instruction must fit in the same aligned doubleword.
  1363. A data breakpoint set to the mem16 operand of either VERR or VERR can be
  1364. missed on some 386es if the segment with the selector at mem16 is not
  1365. accessible. (see also <debugging>)
  1366. WBINVD Write back & invalidate both internal & external caches
  1367. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1368. Mnemonic: WBINVD
  1369. Opcode : 0F 09
  1370. Bug in : some 486
  1371. Function:
  1372. WBINVD tells the processor that all data in both the internal as well as the
  1373. external caches is invalid. Data held in external write-back caches is
  1374. written back to memory before the flush.
  1375. If on some 486's a cache line fill is in progress while the WBINVD
  1376. instruction is being executed, that line is NOT invalidated and the buffer
  1377. contents is moved into the cache. Valid cache lines are ALWAYS used to
  1378. satisfy read requests on all 486's, regardless whether the cache is enabled
  1379. or not.
  1380. Workaround is to disable the cache prior to flushing it like this:
  1381. MOV EAX,CR0
  1382. OR EAX,60000000h ; cache disable bits
  1383. PUSHFD
  1384. CLI
  1385. MOV BL,CS:here
  1386. OUT dummyport,dummydata
  1387. MOV CR0,EAX
  1388. here:
  1389. WBINVD
  1390. AND EAX,9fffffff ; cache enable, write-through
  1391. MOV CR0,EAX
  1392. POPFD
  1393. Write / Read Model Specific Register (Pentium+ compatible)
  1394. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1395. Mnemonic: WRMSR / RDMSR
  1396. Opcode : 0F 30 / 0f 32
  1397. Bug in : Are minimally documented opcodes for Pentium+ compatible CPUs
  1398. Function:
  1399. It should be possible to use the WRMSR & RDMSR instructions on any CPU which
  1400. A: supports the CPUID instruction and
  1401. B: has the extension bit 5 in the feature bitmap of EDX set after
  1402. executing function 1 (EAX=1) with CPUID.
  1403. WRMSR writes to a Model Specific Register. EDX:EAX contain the value to
  1404. write into the register whose number is given in ECX.
  1405. RDMSR reads from a Model Specific Register. EDX:EAX will receive the value
  1406. from the MSR whose number is given in ECX.
  1407. List of Model Specific Registers:
  1408. 00h Machine Check Exception-Address register (Read-only)
  1409. 01h Machine Check Exception-Type register (Read-only)
  1410. 02h Unknown
  1411. ..
  1412. 0dh Unknown
  1413. 0eh Test register T12
  1414. 0fh Unknown
  1415. 10h Time Stamp Counter (See RDTSC)
  1416. 11h Counter / Event Selection register (See CESR Map)
  1417. 12h Counter #0 (40 bit resolution)
  1418. 13h Counter #1 (40 bit resolution)
  1419. CESR Map. Note that CESR is a 64-bit register, of which only the
  1420. bottom 32 bits are currently known to be used.
  1421. Bit 31 16 0
  1422. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄ¿
  1423. ³r³r³r³r³r³r³r³c³3³2³t³t³t³t³t³t³r³r³r³r³r³r³r³C³3³2³T³T³T³T³T³T³
  1424. ÀÄÁÄÁÄÁÄÁÄÁÄÁÄÁÅÁÅÁÅÁÅÁÄÁÄÁÄÁÄÁÅÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÅÁÅÁÅÁÅÁÄÁÄÁÄÁÄÁÅÙ
  1425. ³ ³ ³ ÀÄÄÄÄÄÂÄÄÄÙ ³ ³ ³ ÀÄÄÄÄÂÄÄÄÄÙ
  1426. Counting methodÙ ³ ÀÄÄÄÄÄ¿ ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³
  1427. Allow counting in CPL3 ³ ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³
  1428. Allow counting in CPL0-2ÄÙ ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³
  1429. Event type (what to count)ÄÙ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  1430. (see list below)
  1431. ÀÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  1432. Counter #1:ÄÙ Counter #0:ÄÙ
  1433. Counting methods: 1= count CPU cycles 0= count events
  1434. Allow count in CPL3: 1= Yes 0= No
  1435. Allow count in CPL0-2: 1= Yes 0= No
  1436. Event Type List:
  1437. 00h data read
  1438. 01h data write
  1439. 02h data TLB miss
  1440. 03h data read miss
  1441. 04h data write miss
  1442. 05h Write (hit) to M (modified) or E (exclusive) cacheline
  1443. (MESI protocol)
  1444. 06h data cache lines written back
  1445. 07h data cache snoops
  1446. 08h data cache snoop hits
  1447. 09h memory accesses in both pipes
  1448. (cumulative ?)
  1449. 0ah data bank access conflicts (U & V pipe access same data line in
  1450. data cache).
  1451. 0bh misaligned data memory references
  1452. 0ch code read
  1453. 0dh code TLB miss
  1454. 0eh code cache miss
  1455. 0fh any segment register load
  1456. 10h segment descriptor cache accesses
  1457. 11h segment descriptor cache hits
  1458. 12h branches
  1459. 13h Branch Target Buffer (BTB) hits
  1460. 14h taken branch or BTB hit
  1461. 15h pipeline flushes
  1462. 16h instructions executed
  1463. 17h instructions executed in V pipe
  1464. 18h bus utilization (apparently events in which the CPU has to wait
  1465. for bus access).
  1466. 19h pipeline stalled by write backups
  1467. 1ah pipeline stalled by data memory read
  1468. 1bh pipeline stalled by write to M or E line
  1469. 1ch locked bus cycle (for instance during xchg)
  1470. 1dh I/O read or write cycles
  1471. 1eh noncacheable memory references
  1472. 1fh pipeline stalled by Address Generation Interlock (AGI)
  1473. 20h unknown
  1474. 21h unknown
  1475. 22h floating point operations
  1476. 23h breakpoint 0 match
  1477. 24h breakpoint 1 match
  1478. 25h breakpoint 2 match
  1479. 26h breakpoint 3 match
  1480. 27h hardware interrupts
  1481. 28h data read or data write
  1482. 29h data read miss or data write miss
  1483. (All info provided by Christian Ludloff)
  1484. All mentioned x86 CPU instructions by Mnemonic
  1485. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1486. Click on any instruction mnemonic to see details.
  1487. See <Breakpoint errors> for CPU bugs relating to debugging.
  1488. See <Chip Step info> for a summary on revision codes.
  1489. See <General FPU bugs> for FPU bugs unrelated to instructions.
  1490. See <FPU mnemonics> for FPU bugs related to FPU instructions.
  1491. See <List of NEC mnemonics> for a list of NEC instructions.
  1492. See <NEC general info> for a summary of special features in NECs.
  1493. <AAA> Adjust after addition <AAD> Adjust after division
  1494. <AAM> Adjust after multiply <AAS> Adjust after subtraction
  1495. <BOUND> Bounds check
  1496. <BSF> Bit scan forward <BSWAP> 4-Byte swap (e-registers)
  1497. <BT> Bit test <BTC> Bit test & complement
  1498. <BTR> Bit test & reset <BTS> Bit test & set
  1499. <CHKIND> Alias mnemonic for BOUND on NEC
  1500. <CMPS> CMPSB CMPSW CMPSD String compare, Byte, Word, Doubleword
  1501. <CMPXCHG> Compare & exchange <CPUID> Identify CPU (486+)
  1502. <CR0> CR1 CR2 CR3 CR4 Map of control registers
  1503. <EFLAGS> Map of EFLAGS register
  1504. <HLT> Halt the CPU <IBTS> Insert bit string
  1505. <IMUL> Integer multiply
  1506. <INS> INSB INSW INSD Input of string from I/O port, Byte, Word, Doubleword
  1507. <INVD> Invalidate cache <JMP> Unconditional jump
  1508. <LAR> Load access rights <LOADALL> Load all registers.
  1509. <LSL> Load segment limit <MOV> Move data to/from registers
  1510. <MOVS> Move string <MUL> Multiply unsigned
  1511. <POP> Pop data from stack <POPA> Pop all registers
  1512. <PUSH> Push value onto stack <RDTSC> Read time stamp counter
  1513. <RDMSR> Read Model Specific Register (Pentium+)
  1514. <Rotate and Shift> Concerns all Rotation and Shift instructions
  1515. <SETALC> Carry bit to all of al <UNKNOWN> An unknown opcode
  1516. <VERR> Verify segment for Read <VERW> Verify segment for Write
  1517. <WBINVD> Write Back and Invalidate Cache (486+)
  1518. <WRMSR> Write Model Specific Register (Pentium+)
  1519. All mentioned FPU instructions by Mnemonic
  1520. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1521. Alphabetic listing on FPU Mnemonics for instructions behaving different
  1522. than expected. Instructions marked with * are considered undocumented.
  1523. * <FCOS> FPU Cosine in radians on IIT math coprocessor
  1524. <FDISI / FNDISI> Disable Floating point interrupts
  1525. <FDIV / FDIVP> Divide
  1526. <FDIVR / FDIVRP> Divide reversed
  1527. <FENI / FNENI> Enable Floating point interrupts
  1528. <FLDENV> Load Floating point Environment
  1529. <FMUL4X4> Matrix multiply on IIT math coprocessor
  1530. <FPREM> Modulus of ST by ST(1) into ST
  1531. <FPTAN> Tangent ratio of ST into ST & ST(1)
  1532. <FRSTPM> Tells the FPU to use Real (or V86) Mode formats
  1533. <FRSTOR> Loads the FPU state from memory see FSAVE
  1534. <FSAVE> Saves the FPU state to memory see FRSTOR
  1535. * <FSBP0,1,2,3> Bankswitching on IIT math coprocessor
  1536. <FSCALE> Adds the value in ST to the exponent in ST(1)
  1537. <FSETPM> Tells the FPU to use Protected Mode formats
  1538. * <FSIN> FPU Sine in radians on IIT math coprocessor
  1539. <FSINCOS> calculates FPU sine and cosine in radians
  1540. <FSTENV> Store Floating point Environment
  1541. General Intel FPU bugs, unrelated to opcodes
  1542. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1543. Mnemonic: N/A
  1544. Opcode : N/A
  1545. Bug in : some 486 / 487
  1546. Function:
  1547. While using a maths coprocessor (also referred to as floating point
  1548. unit FPU), errors may occur and invalid numbers may be generated.
  1549. While most FPUs don't have any problem handling these situations, some
  1550. steps may lock up or misbehave otherwise. The list below shows known
  1551. malfunctions which may arise during FPU operations on some systems.
  1552. True bugs:
  1553. <FERR# not handled correctly by FPU>
  1554. <FPU performance degradation because IGNNE# active>
  1555. Incompatibilities between different types of FPU:
  1556. <Four indications for 'empty' in Condition Code Bits after FXAM>
  1557. '87 to 287 specific differences:
  1558. <Error signal does not go through PIC on 287+>
  1559. <Exceptions are different>
  1560. <Exception pointers saved by 287+ save prefixes>
  1561. <287+ need no synchronization>
  1562. <287 & 387 use reserved I/O ports>
  1563. FERR# not handled correctly by FPU
  1564. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1565. <Back> (General Intel FPU bugs, unrelated to opcodes)
  1566. * FERR# not handled correctly by FPU:
  1567. In some cases an FPU operation may generate a floating point error,
  1568. which will not be recognized by the CPU.
  1569. The workaround for this is to replace all FWAIT with FNOP or follow
  1570. all FWAIT with a NOP, while masking all floating point errors.
  1571. FPU performance degradation because IGNNE# active
  1572. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1573. <Back> (General Intel FPU bugs, unrelated to opcodes)
  1574. * FPU performance degradation because IGNNE# active:
  1575. If an unmasked exception occurs with bit NE (Numeric Error or Numeric
  1576. Exception) in CR0 cleared (recognize exceptions), while IGNNE# is
  1577. active, all following FPU instructions will require an additional 17 to
  1578. 22 clocks. This because the exception remains pending due to the logic
  1579. conflict caused by contradicting signals. It lets the 486/487 execute
  1580. microcode in order to classify and analyze the exception, but it does
  1581. not let it handle it, prior to executing the next FPU opcode.
  1582. A workaround is to clear all unmasked exceptions with FCLEX or FINIT
  1583. within an exception handler before it finishes or to make sure IGNNE#
  1584. is not made active so exceptions are recognized and handled immediately
  1585. as they occur (when NE is cleared).
  1586. Four indications for 'empty' in Condition Code Bits after FXAM
  1587. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1588. <Back> (General Intel FPU bugs, unrelated to opcodes)
  1589. * Four different indications for 'empty' in Condition Code Bits after FXAM:
  1590. The various FPUs use different bit patterns to indicate an empty FPU
  1591. register after the FXAM instruction. You should rely only on bits C0
  1592. and C3 to be 1 in case an FPU register is to be considered empty.
  1593. (See <FPU Condition Code Bits>)
  1594. Error signal does not go through PIC on 287+
  1595. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1596. <Back> (General Intel FPU bugs, unrelated to opcodes)
  1597. * Error signal does not go through PIC on 287+
  1598. On the 86, an FPU error is signalled through the PIC (Programmable
  1599. Interrupt Controller). Starting with the 287, FPU errors are
  1600. signalled over a dedicated pin on the CPU / FPU combination,
  1601. namely ERROR#. There may be code which depends on the PIC handling
  1602. the error. These error handlers will need to be rewritten.
  1603. Exceptions are different
  1604. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1605. <Back> (General Intel FPU bugs, unrelated to opcodes)
  1606. * Exceptions are different
  1607. The coprocessor segment overrun exception (09) is issued when the
  1608. FPU attempts to read the second or subsequent words of a data
  1609. operand beyond a segment limit on a 286. On a 386 it is not normally
  1610. used. The 486 signals exception 0dh instead.
  1611. The segment wraparound exception (General Protection exception 0dh)
  1612. will be issued if the FPU attempts to execute an instruction that
  1613. spans into or lies beyond a segment limit.
  1614. All other errors are signalled through interrupt 10h in 286 systems.
  1615. Exception pointers saved by 287+ save prefixes
  1616. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1617. <Back> (General Intel FPU bugs, unrelated to opcodes)
  1618. * Exception pointers saved by 287+ save prefixes
  1619. The exception pointers on the 87 would point to the ESC instruction
  1620. itself, regardless of any segment overrides (or other prefixes for
  1621. that matter). The 287+ pointers point to the first prefix before
  1622. the ESC instruction, if any.
  1623. 287+ need no synchronization
  1624. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1625. <Back> (General Intel FPU bugs, unrelated to opcodes)
  1626. * 287+ need no synchronization
  1627. On the 87, the FPU and CPU worked separated from each other. Any
  1628. communication between the FPU and CPU had to be coordinated with
  1629. WAITs. On the 287+, no WAITs are required except for control
  1630. instructions. The CPU examines the BUSY# signal before communicating
  1631. with the FPU to assure the FPU can accept commands.
  1632. The 387 also examines BUSY# before sending commands to the FPU.
  1633. Data transfers are regulated by monitoring the PEREQ# pin.
  1634. 287 & 387 use reserved I/O ports
  1635. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1636. <Back> (General Intel FPU bugs, unrelated to opcodes)
  1637. * 287 & 387 use reserved I/O ports
  1638. On the 287, FPU instructions and data are sent to and received from
  1639. the FPU via I/O ports. These ports are f0-ff on the 286 / 287.
  1640. This property is important to consider when the number of I/O
  1641. waitstates on the mainboard can be changed. To safely increase the
  1642. FPU performance some experimentation may be necessary, but a 25%
  1643. speed increase has been accomplished on a 12 MHz 286 with 20 MHz
  1644. IIT 2c87 by decreasing the number of I/O waitstates from 6 to 4.
  1645. On the 387, FPU instructions and data are sent to and received from
  1646. the FPU via I/O ports too. These ports are 800000f0 - 800000ff.
  1647. Note that the I/O waitstate trick may very well work on 386 / 387
  1648. systems as well.
  1649. FPU Condition Code Bits after a test, compare or reduction
  1650. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1651. Vatious FPU test instructions set the Condition Code bits C0 to C3 based
  1652. on the values tested. Below is a list of possible bit combinations.
  1653. These C-bits map to the flags register as follows after stswax and sahf:
  1654. Eflags map: ZF PF - CF (C1 has no flag assigned to it)
  1655. C3 C2 C1 C0
  1656. Examine 0 0 0 0 +Unnormal (positive, valid, unnormalized)
  1657. 0 0 0 1 +NaN (positive, invalid, exponent is 0)
  1658. 0 0 1 0 -Unnormal (negative, valid, unnormalized)
  1659. 0 0 1 1 -NaN (negative, invalid, exponent is 0)
  1660. 0 1 0 0 +Normal (positive, valid, normalized)
  1661. 0 1 0 1 +Infinity (positive, infinity)
  1662. 0 1 1 0 -Normal (negative, valid, normalized)
  1663. 0 1 1 1 -Infinity (negative, infinity)
  1664. 1 0 0 0 +Zero (positive, zero)
  1665. 1 0 0 1 Empty (empty register)
  1666. 1 0 1 0 -Zero (negative, zero)
  1667. 1 0 1 1 Empty (empty register)
  1668. 1 1 0 0 +Denormal (positive, invalid, exponent is 0)
  1669. 1 1 0 1 Empty (empty register)
  1670. 1 1 1 0 -Denormal (negative, invalid, exponent is 0)
  1671. 1 1 1 1 Empty (empty register)
  1672. FCOM or
  1673. STST 0 0 ? 0 ST > Source with FCOM or ST > 0 with FSTST
  1674. 0 0 ? 1 ST < Source with FCOM or ST < 0 with FSTST
  1675. 1 0 ? 0 ST = Source with FCOM or ST = 0 with FSTST
  1676. 1 1 ? 1 ST cannot be compared ot tested
  1677. Reduction b1 0 b0 b2 If reduction was complete, bits 0,1 and 2
  1678. equal the three lowest bits of the qoutient
  1679. ? 1 ? ? Reduction was incomplete
  1680. FPU Status Word, Control Word and Tag Word layout
  1681. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1682. The layout of the Status-, Control- and Tag Word of the FPU.
  1683. FPU Status Word
  1684. Bit 15 8 0
  1685. ÚÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÁ¿
  1686. ³ B³c3³ ST n ³c2³c1³c0³ES³sf³Pe³Ue³Oe³Ze³De³Ie³
  1687. ÀÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÙ
  1688. ³ ³ ÀÄÄÅÄÄÙ ÀÄÄÅÄÄÙ ³ ³ ³ ³ ³ ³ ³ ³
  1689. Busy ÔÍÍÍÍÍØÍÍÍÍÍÍÍ͵ ³ ³ ³ ³ ³ ³ ³ ³
  1690. Stack TopÄÄÙ ³ ³ ³ ³ ³ ³ ³ ³ ³
  1691. Condition Code BitsÄÙ ³ ³ ³ ³ ³ ³ ³ ³
  1692. Exception Summary * ÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³ ³
  1693. Stack faultÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³
  1694. Precision exception (1=occurred)Ù ³ ³ ³ ³ ³
  1695. Underflow exception (1=occurred)ÄÄÄÙ ³ ³ ³ ³
  1696. Overflow exception (1=occurred)ÄÄÄÄÄÄÄÙ ³ ³ ³
  1697. Zero divison exception (1=occurred)ÄÄÄÄÄÄÙ ³ ³
  1698. Denormalized operand exception (1=occurred)ÄÙ ³
  1699. Invalid operation exception (1=occurred)ÄÄÄÄÄÄÄÙ
  1700. * The Exception summary is called Interrupt request on 8087.
  1701. FPU Control Word
  1702. Bit 15 8 0
  1703. ÚÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÁ¿
  1704. ³ r³ r³ r³ic³round³prec.³ie³ r³Pm³Um³Om³Zm³Dm³Im³
  1705. ÀÄÄÁÄÄÁÄÄÁÄÅÁÄÄÁÄÅÁÄÅÁÄÄÁÄÅÁÄÄÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÁÄÅÙ
  1706. Infinity ³ ³ ³ ³ ³ ³ ³ ³ ³ ³
  1707. controlÄÄÄÄÙ ³ ³ ³ ³ ³ ³ ³ ³ ³
  1708. Rounding controlÄÙ ³ ³ ³ ³ ³ ³ ³ ³
  1709. Precision controlÄÄÄÙ ³ ³ ³ ³ ³ ³ ³
  1710. Interrupt enable maskÄÄÄÄÄÙ ³ ³ ³ ³ ³ ³
  1711. À¿ ³ ³ ³ ³ ³
  1712. Precision exception Mask 1=maskedÙ ³ ³ ³ ³ ³
  1713. Underflow exception Mask 1=maskedÄÄÙ ³ ³ ³ ³
  1714. Overflow exception Mask 1=maskedÄÄÄÄÄÄÙ ³ ³ ³
  1715. Zero divison exception Mask 1=maskedÄÄÄÄÄÙ ³ ³
  1716. Denormalized operand exception Mask 1=maskedÙ ³
  1717. Invalid operation exception Mask 1=maskedÄÄÄÄÄÄÙ
  1718. Infinity control is supported on the 8087 and 287 only.
  1719. The 87 and 287 (not the 287xl) have ic cleared by default and then
  1720. support projective closure. The 287xl+ only support affine closure.
  1721. To make sure an 87 or 287 will handle the numbers in the same way
  1722. as the 287xl+, set bit ic to make 87 & 287 support affine closure
  1723. as well. Note that a FINIT will clear ic again.
  1724. The ic setting is ignored on 287xl+.
  1725. Rounding control is set to 00 by default.
  1726. 00 = Round to nearest or even
  1727. 01 = Round down (towards negative infinity)
  1728. 10 = Round up (towards positive infinity)
  1729. 11 = Chop towards zero
  1730. Precision control is set to 11 by default.
  1731. 00 = 24 bit precision (mantissa)
  1732. 01 = reserved
  1733. 10 = 53 bit precision (mantissa)
  1734. 11 = 64 bit precision (mantissa)
  1735. Note: lesser precision does not significantly reduce execution time.
  1736. FPU Tag Word
  1737. Bit 15 8 0
  1738. ÚÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÄÅÄÄÂÄÄÂÄÄÂÄÁ¿
  1739. ³ x x³ x x³ x x³ x x³ x x³ x x³ x x³ x x³
  1740. ÀÄÄÁÄÅÁÄÄÁÄÅÁÄÄÁÄÅÁÄÄÁÄÅÁÄÄÁÄÅÁÄÄÁÄÅÁÄÄÁÄÅÁÄÄÁÄÅÙ
  1741. 7 6 5 4 3 2 1 0 Tag number
  1742. The tag number 0 corresponds to the register which is
  1743. currently ST0.
  1744. The bits for each tag have the same meaning:
  1745. 0 0 Valid
  1746. 0 1 Zero
  1747. 1 0 Special (NaN,Infinity,Denormal,Unnormal,Unsupported)
  1748. 1 1 Empty
  1749. IIT bankswitching (IIT math coprocessor)
  1750. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1751. Mnemonic: FSBP0, FSBP1, FSBP2, FSBP3
  1752. Opcode : DB E8, DB Eb, EB EA, DB E9 (6 clocks)
  1753. Bug in : Are IIT 2c87+ instructions
  1754. Function:
  1755. FSBP0 Selects the original bank. (default)
  1756. FSBP1 Selects bank 1 from <FMUL4X4> instruction diagram
  1757. FSBP2 Selects bank 2 from FMUL4X4 instruction diagram
  1758. FSBP3 Selects the scratchpad bank3 used by the FMUL4X4 internally.
  1759. The FSBP3 instruction is not publicly supported by IIT, it can be used to
  1760. select the last bank of registers, which unfortunately cannot be used for
  1761. regular operation. However, it is listed for completeness.
  1762. FSIN / FCOS Floating point sine and cosine
  1763. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1764. Mnemonic: FSIN / FCOS
  1765. Opcode : D9 FE / D9 FF
  1766. Bug in : Undocumented instructions on IIT 2c87 math chips
  1767. Function:
  1768. FSIN calculates the radial sine of the value in ST(0), leaving the result
  1769. in ST(0). Apparently the IIT FSIN functions according to Intel's 287xl
  1770. and 387+ specifications.
  1771. FCOS calculates the radial cosine of the value in ST(0), leaving the result
  1772. in ST(0). Apparently the IIT FCOS functions according to Intel's 287xl
  1773. and 387+ specifications.
  1774. Both these instructions are not officially supported by IIT for the 2c87.
  1775. Both instructions are available on Intel 287xl and 387+ processors using the
  1776. listed opcodes.
  1777. FDIV / FDIVP Floating point division / divide & POP
  1778. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1779. Mnemonic: FDIV / FDIVP
  1780. Opcode : various
  1781. Bug in : some 486
  1782. Function:
  1783. FDIV divides destination by source and returns the result in destination.
  1784. FDIVP does the same but pops the FPU stack afterwards.
  1785. The bug occurs when the instruction operates on an FPU register which is
  1786. tagged as empty, but holds a nonzero value and the next FPU instruction
  1787. occurs within 35 FPU clock counts. In that case, the current instruction
  1788. will use the invalid number in the empty location, producing an invalid
  1789. result and causing the following instruction to generate an invalid
  1790. result as well. There is no workaround.
  1791. FDIVR / FDIVRP Floating point division reversed / divide & POP
  1792. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1793. Mnemonic: FDIVR / FDIVRP
  1794. Opcode : various
  1795. Bug in : some 486
  1796. Function:
  1797. FDIVR divides source by destination and returns the result in destination.
  1798. FDIVRP does the same but pops the FPU stack afterwards.
  1799. The bug occurs when the instruction operates on an FPU register which is
  1800. tagged as empty, but holds a nonzero value and the next FPU instruction
  1801. occurs within 35 FPU clock counts. In that case, the current instruction
  1802. will use the invalid number in the empty location, producing an invalid
  1803. result and causing the following instruction to generate an invalid
  1804. result as well. There is no workaround.
  1805. FLDENV Load Floating point Environment
  1806. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1807. Mnemonic: FLDENV
  1808. Opcode : D9 [mod:100:r/m] disp
  1809. Bug in : some 387
  1810. Function:
  1811. FLDENV loads the entire FPU environment from the address given by the
  1812. memory operand. See <FPU environment layout>.
  1813. If either of the two last bytes of the environment cannot be read for
  1814. whatever reason, the instruction cannot be restarted on some 387s.
  1815. A workaround is to attempt to read those bytes before the FLDENV is
  1816. executed or to align the environment on a 128 byte boundary so it is
  1817. unlikely to fall outside a segment or page boundary.
  1818. Should that be the case, the integer unit can cause an exception or
  1819. make sure the page (in case of a swapped page) is read into memory
  1820. before FLDENV starts.
  1821. FMUL4X4 Matrix Multiply (IIT math coprocessor)
  1822. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1823. Mnemonic: FMUL4X4 or F4X4
  1824. Opcode : DB F1 (2c87=242, 3c87sx=242, 3c87=242 clocks)
  1825. Bug in : Is an IIT special instruction
  1826. Function:
  1827. This instruction is available only on the IIT (Integrated Information
  1828. Technology Inc.) math processors. The instruction performs a 4x4 matrix
  1829. multiply in one instruction using three banks of 8 floating point registers.
  1830. The operands must be loaded to a specific bank in a specific order using
  1831. Xn = (A00 * Xo) + (A01 * Xo) + (A02 * Xo) + (A03 * Xo)
  1832. Yn = (A10 * Yo) + (A11 * Yo) + (A12 * Yo) + (A13 * Yo)
  1833. Zn = (A20 * Zo) + (A21 * Zo) + (A22 * Zo) + (A23 * Zo)
  1834. Vn = (A30 * Vo) + (A31 * Vo) + (A32 * Vo) + (A33 * Vo)
  1835. Where Xo stands for the original X value and Xn for the result. Operands
  1836. must be loaded to the following registers in the specified banks in the
  1837. specified order.
  1838. Before FMUL4X4 After FMUL4X4
  1839. bank bank
  1840. Register: 0 1 2 0
  1841. ST(0) Xo A33 A31 Xn
  1842. ST(1) Yo A23 A21 Yn
  1843. ST(2) Zo A13 A11 Zn
  1844. ST(3) Vo A03 A01 Vn
  1845. ST(4) A32 A30 ?
  1846. ST(5) A22 A20 ?
  1847. ST(6) A12 A10 ?
  1848. ST(7) A02 A00 ?
  1849. All four banks can be selected by using the bankswitching instructions,
  1850. but only bank 0, 1 and 2 make sense since bank 3 is an internal scratchpad.
  1851. The separate banks can contain 8 floating point numbers and may be used
  1852. with normal instructions. Each bank acts like an independent 287.
  1853. Provided the status of the status word is saved inbetween and restored
  1854. properly after a bankswitch each bank can be used simultaneously.
  1855. Alternatively you could keep an eye on the TOP and STACKPOINTER indicators,
  1856. making sure they are the same as before when initiating a bankswitch.
  1857. By using FFREE, FFREEP and FINCSTP or FDECSTP instructions you may manually
  1858. manipulate the stack.
  1859. This feature of the IIT chips can be used to perform complex operations
  1860. in registers with many components remaining the same for a large dataset,
  1861. only saving intermediary results to one memory location, bankswitching
  1862. to the next series of operands, loading that one operand and continuing the
  1863. calculation with the next set of operands already in that bank. This does
  1864. require another read into the new bank but may save time and memoryspace
  1865. compared to memory based operands or multiple pass algorithms with multiple
  1866. arrays of intermediary results.
  1867. FENI / FDISI Enable /Disable Floating point interrupts
  1868. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1869. Mnemonic: FENI / FNENI / FDISI / FNDISI
  1870. Opcode : 9B DB E0 / DB E0 / 9B DB E1 / DB E1
  1871. Bug in : Opcodes have no meaning on 287+ (are ignored there)
  1872. Function:
  1873. FENI Clears the interrupt enable mask in the FPU Control Word, effectively
  1874. allowing the FPU to generate interrupts. FNENI does not issue a WAIT
  1875. before doing this. These instruction only have a meaning on 87s.
  1876. FDISI Sets the interrupt enable mask in the FPU Control Word, effectively
  1877. denying the FPU to generate interrupts. FNDISI does not issue a WAIT
  1878. before doing this. These instruction only have a meaning on 87s.
  1879. All these instructions are effectively ignored on the 287+.
  1880. They do not cause an invalid opcode exception.
  1881. FPREM Calculate modulus of ST by ST(1), store in ST
  1882. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1883. Mnemonic: FPREM
  1884. Opcode : D9 F8
  1885. Bug in : all 87 and 287
  1886. Function:
  1887. FPREM calculates the modulus remainder of ST divided by ST(1) and stores
  1888. the result into ST. The procedure can also be seen as a repeated
  1889. subtraction of ST by ST(1).
  1890. There are several interesting things about this instruction:
  1891. The exponent magnitude difference should be no more than 63 or else the
  1892. instruction cannot reduce the ST properly in one execution. This means
  1893. you would have to execute the instruction several times to get a correct
  1894. result for large magnitude differences.
  1895. If this is the case, condition code bit C2 is set until the result in ST
  1896. is ok. Storing the Status Word and checking C2 should be done if the
  1897. condition could occur in your data set.
  1898. In addition to that, if the instruction is done, the least-significant
  1899. three bits of the quotient are stored in C3,C1 and C0.
  1900. If arguments to the tangent function are reduced by PI/4 the codes
  1901. represent one of the eight octants of a radius for which the tangent is
  1902. to be calculated.
  1903. FPREM does not operate according to the IEEE 754 standard, FPREM1
  1904. with opcode d9 f5 does, but is about 15-25 clocks slower than FPREM.
  1905. The bug appears on the 87 and 287 when 64^a+b is performed with a>=1
  1906. and b==1 or 2. In that case the condition code bits represent an
  1907. incorrect value. There is no FP workaround. Test to prevent the situation.
  1908. Apparently this bug does not appear in the FPREM1 instruction.
  1909. FPTAN Calculate tangent of ST
  1910. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1911. Mnemonic: FPTAN
  1912. Opcode : D9 F2
  1913. Bug in : some 486 / 487, difference between pre-287xls and 287xl+
  1914. Function:
  1915. FPTAN calculates the ratio between x and y in the following formula:
  1916. x
  1917. - = TAN(original ST)
  1918. y
  1919. The y result replaces the original argument in ST and x is then pushed
  1920. onto the stack. On pre-287xl FPUs, the values for y and x may be anything,
  1921. the ratio however is correct. On 287xl+ FPUs, x is always 1.
  1922. ST(1) represents the fractional value itself there.
  1923. To generate the same set of results on all FPUs, the FPTAN should be
  1924. followed by FDIV and FLD1. Note that this reproduces the original
  1925. results on the 287xl+.
  1926. Note that ST(7) must be free or an invalid operation exception may occur
  1927. because x is pushed onto the stack.
  1928. The 486 bug occurs when a specific set of code is executed with a specific
  1929. set of data. There is no way you can anticipate this and the workaround
  1930. should always be implemented if code will run on a 486/487.
  1931. The bug corrupts the FPU stack without signalling it to either FPU or CPU.
  1932. Data corruption is usually the result.
  1933. Workaround: FPTAN should always be followed by: FCLEX, FINIT, FLDCW, FSTSW,
  1934. FSTSWAX, <FSAVE> or <FSTENV> or by a WAIT and a non-FPU instruction.
  1935. Do note that some of these FPU instructions contain bugs themselves.
  1936. FRSTOR Restore FPU state saved to memory by FSAVE
  1937. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1938. Mnemonic: FRSTOR
  1939. Opcode : DB [mod:100:r/m] disp
  1940. Bug in : some 387
  1941. Function:
  1942. FRSTOR loads the FPU internal registers (including ST-registers) and the
  1943. environment from the memory operand. See <FPU State image layout>.
  1944. If either of the two last bytes of the image being read by FRSTOR cannot
  1945. be read for whatever reason, the instruction cannot be restarted on
  1946. some 387s.
  1947. A workaround is to attempt to read those bytes before the FRSTOR is
  1948. executed or to align the image on a 128 byte boundary so it is
  1949. unlikely to fall outside a segment or page boundary.
  1950. Should that be the case, the integer unit can cause an exception or
  1951. make sure the page (in case of a swapped page) is read into memory
  1952. before FRSTOR starts.
  1953. FSAVE Save FPU state to memory
  1954. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1955. Mnemonic: FSAVE / FNSAVE
  1956. Opcode : (9B) DB [mod:110:r/m] disp
  1957. Bug in : some 387, some 386
  1958. Function:
  1959. FSAVE saves the FPU internal registers (including ST-registers) and the
  1960. environment to the memory operand. See <FPU State image layout>.
  1961. The FPU does not execute this instruction until all pending FPU
  1962. operations have completed (decoded instructions have been processed).
  1963. After completion, FSAVE initializes the FPU as if it had executed FINIT.
  1964. Apparently on all FPUs, the contents of the data pointer field is
  1965. undefined if the last FPU arithmetic instruction did not use a memory
  1966. operand.
  1967. On some 386s operating in Real or V86 mode, the opcode saved is incorrect.
  1968. The linear address saved for the opcode's address however is correct and
  1969. can be used to retrieve the opcode. No opcode is saved in Protected mode.
  1970. If either of the two last bytes of the image being saved by FSAVE cannot
  1971. be accessed for whatever reason, the instruction cannot be restarted on
  1972. some 387s.
  1973. A workaround is to attempt to write to those bytes before the FSAVE is
  1974. executed or to align the image on a 128 byte boundary so it is
  1975. unlikely to fall outside a segment or page boundary.
  1976. Should that be the case, the integer unit can cause an exception or
  1977. make sure the page (in case of a swapped page) is read into memory
  1978. before FSAVE starts.
  1979. FSETPM Make FPU use Protected Mode format in FSAVE and FSTENV
  1980. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1981. Mnemonic: FSETPM
  1982. Opcode : DB E4
  1983. Bug in : no bug, it only works on 287 and 287xl. ignored on 386+
  1984. Function:
  1985. FSETPM tells the FPU to use the data format specified in the Protected
  1986. Mode format of the <FSTENV> and <FSAVE> instructions.
  1987. These instructions save different types of data depending on the current
  1988. operating mode of the FPU.
  1989. The instruction only has a meaning on the 287 and 287xl.
  1990. FRSTPM Make FPU use Real-Mode format in FSAVE and FSTENV
  1991. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  1992. Mnemonic: FRSTPM
  1993. Opcode : DB F4
  1994. Bug in : no bug, it only works on 287 and 287xl. ignored on 386+
  1995. Function:
  1996. FRSTPM tells the FPU to use the data format specified in the Real-Mode
  1997. format of the <FSTENV> and <FSAVE> instructions.
  1998. These instructions save different types of data depending on the current
  1999. operating mode of the FPU.
  2000. The instruction only has a meaning on the 287 and 287xl.
  2001. FSCALE Adds the integer number in ST(1) to the exponent of ST
  2002. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  2003. Mnemonic: FSCALE
  2004. Opcode : D9 FD
  2005. Bug in : some 486
  2006. Function:
  2007. FSCALE multiplies the value in ST by a power of two, given in ST(1).
  2008. Pre-387s assume the value in ST(1) to be an integer in the range
  2009. -2^15 <= , < +2^15. 387+ do not assume anything about the value.
  2010. The value in ST(1) is always chopped to the nearest integer closest
  2011. to zero.
  2012. There is a bug in some 486s which allows denormal or pseudo-denormals to
  2013. be returned as a result, apparently without issuing an Invalid Operation
  2014. exception. For this to happen, ST(1) must be within the range
  2015. -1 < ST(1) < 1 and ST must be a pseudo-denormal or denormal while
  2016. underflow exceptions must not be masked. When it occurs, the value from
  2017. ST is returned as the result.
  2018. There is no workaround other than to avoid the situation. Leaving
  2019. underflow exceptions masked may prevent this bug from showing up.
  2020. FSINCOS Calculate both Sine and Cosine of ST
  2021. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  2022. Mnemonic: FSINCOS
  2023. Opcode : DB FB
  2024. Bug in : some 486, invalid on pre-287xl and IIT
  2025. Function:
  2026. FSINCOS calculates both Sine and Cosine of an argument in ST.
  2027. The first result, sine, is stored into the original ST, destroying the
  2028. source value. The second result, cosine, is then pushed onto the stack.
  2029. Note that ST(7) must be free or an invalid operation exception may occur
  2030. because the cosine is pushed onto the stack.
  2031. The 486 bug occurs when a specific set of code is executed with a specific
  2032. set of data. There is no way you can anticipate this and the workaround
  2033. should always be implemented if code will run on a 486/487.
  2034. The bug corrupts the FPU stack without signalling it to either FPU or CPU.
  2035. Data corruption is usually the result.
  2036. Workaround: FSINCOS should always be followed by: FCLEX, FINIT, FLDCW,
  2037. FSTSW, FSTSWAX, <FSAVE> or <FSTENV> or by a WAIT
  2038. and a non-FPU instruction. Do note that some of these FPU instructions
  2039. contain bugs themselves.
  2040. FSTENV Store Floating point Environment
  2041. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  2042. Mnemonic: FSTENV
  2043. Opcode : (9B) D9 [mod:110:r/m] disp
  2044. Bug in : some 386
  2045. Function:
  2046. FSTENV saves the FPU environment to the memory operand.
  2047. See <FPU environment image layout>.
  2048. This environment does not include the FPU stack, but does include
  2049. Control Word, Status Word, Tag Word and exception pointers.
  2050. The FPU does not execute this instruction until all pending FPU
  2051. operations have completed (decoded instructions have been processed).
  2052. After completion, FSTENV initializes the FPU as if it had executed FINIT.
  2053. Apparently on all FPUs, the contents of the data pointer field is
  2054. undefined if the last FPU arithmetic instruction did not use a memory
  2055. operand.
  2056. On some 386s operating in Real or V86 mode, the opcode saved is incorrect.
  2057. The linear address saved for the opcode's address however is correct and
  2058. can be used to retrieve the opcode. No opcode is saved in Protected mode.
  2059. If either of the two last bytes of the image being saved by FSTENV cannot
  2060. be accessed for whatever reason, the instruction cannot be restarted on
  2061. some 387s.
  2062. A workaround is to attempt to write to those bytes before the FSTENV is
  2063. executed or to align the image on a 128 byte boundary so it is
  2064. unlikely to fall outside a segment or page boundary.
  2065. Should that be the case, the integer unit can cause an exception or
  2066. make sure the page (in case of a swapped page) is read into memory
  2067. before FSTENV starts.
  2068. Layout of environment & state stored by FSTENV and FSAVE
  2069. ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  2070. The environment area saved by <FSTENV> and loaded by <FLDENV> depends on the
  2071. current operating mode of the FPU. Apart from the mode, the current
  2072. default addressing mode within the operating mode is also important.
  2073. The state information saved by <FSAVE> and loaded by <FRSTOR>
  2074. consists of the environment mentioned above but also has the eight FPU
  2075. stack registers appended to it in temporary real format starting with the
  2076. current ST register. Note that which register represents ST depends on
  2077. the values in the Control Word.
  2078. There are four states in which the 387+ FPU can operate
  2079. 16-bit real or V86 mode (like in DOS)
  2080. 16-bit Protected Mode (16-bit code segment)
  2081. 32-bit real or V86 mode (using 66h and 67h prefixes)
  2082. 32-bit Protected Mode (32-bit code segment)
  2083. 16-bit real or V86 mode:
  2084. 15 12 8 4 0
  2085. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁ¿
  2086. ³d³d³d³d³0³0³0³0³0³0³0³0³0³0³0³0³ d = Data pointer bits 16 - 19
  2087. ÃÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄ´
  2088. ³ Data pointer bits 0-15 ³
  2089. ÃÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄÂÄ´ bit 11 is zero, not a typo.
  2090. ³i³i³i³i³0³o³o³o³o³o³o³o³o³o³o³o³ i = Instruction pointer bits 16 - 19
  2091. ÃÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄ´ o = Opcode highest 11 bits
  2092. ³ Instruction pointer bits 0-15 ³
  2093. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2094. ³ Tag Word (16 bit) ³
  2095. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2096. ³ Status Word (16 bit) ³
  2097. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2098. ³ Control Word (16 bit) ³ Low memory
  2099. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  2100. 16-bit Protected Mode:
  2101. 15 12 8 4 0
  2102. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁ¿
  2103. ³ Data selector ³
  2104. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2105. ³ Data offset ³
  2106. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2107. ³ Instruction selector ³
  2108. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2109. ³ Instruction offset ³
  2110. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2111. ³ Tag Word (16 bit) ³
  2112. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2113. ³ Status Word (16 bit) ³
  2114. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2115. ³ Control Word (16 bit) ³ Low memory
  2116. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  2117. 32-bit Real Mode:
  2118. 31 28 24 20 15 12 8 4 0
  2119. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÂÁÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁ¿
  2120. ³0³0³0³0³ Data pointer bits 16-31 ³0³0³0³0³0³0³0³0³0³0³0³0³
  2121. ÃÄÁÄÁÄÁÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄÁÄ´
  2122. ³- - - - - - - - - - - - - - - -³ Data pointer bits 0-15 ³
  2123. ÃÄÂÄÂÄÂÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÅÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2124. ³0³0³0³0³ Instruction pointer bits 16-31³0³ Opcode top 11 bits ³
  2125. ÃÄÁÄÁÄÁÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÁÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2126. ³- - - - - - - - - - - - - - - -³ Instruction pointer 0-15 ³
  2127. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2128. ³- - - - - - - - - - - - - - - -³ Tag Word (16 bit) ³
  2129. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2130. ³- - - - - - - - - - - - - - - -³ Status Word (16 bit) ³
  2131. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2132. ³- - - - - - - - - - - - - - - -³ Control Word (16 bit) ³
  2133. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  2134. Low memory
  2135. 32-bit Protected Mode:
  2136. 31 28 24 20 15 12 8 4 0
  2137. ÚÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÂÁÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÄÅÄÂÄÂÄÂÁ¿
  2138. ³- - - - - - - - - - - - - - - -³ Data selector ³
  2139. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2140. ³ Data offset (32-bit) ³
  2141. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2142. ³- - - - - - - - - - - - - - - -³ Instruction selector ³
  2143. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2144. ³ Instruction offset (32-bit) ³
  2145. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2146. ³- - - - - - - - - - - - - - - -³ Tag Word (16 bit) ³
  2147. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2148. ³- - - - - - - - - - - - - - - -³ Status Word (16 bit) ³
  2149. ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  2150. ³- - - - - - - - - - - - - - - -³ Control Word (16 bit) ³
  2151. ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
  2152. Low memory
  2153. - = Don't care.