[
  {
    "path": ".gitattributes",
    "content": "###############################################################################\n# Set default behavior to automatically normalize line endings.\n###############################################################################\n* text=auto\n\n###############################################################################\n# Set default behavior for command prompt diff.\n#\n# This is need for earlier builds of msysgit that does not have it on by\n# default for csharp files.\n# Note: This is only used by command line\n###############################################################################\n#*.cs     diff=csharp\n\n###############################################################################\n# Set the merge driver for project and solution files\n#\n# Merging from the command prompt will add diff markers to the files if there\n# are conflicts (Merging from VS is not affected by the settings below, in VS\n# the diff markers are never inserted). Diff markers may cause the following \n# file extensions to fail to load in VS. An alternative would be to treat\n# these files as binary and thus will always conflict and require user\n# intervention with every merge. To do so, just uncomment the entries below\n###############################################################################\n#*.sln       merge=binary\n#*.csproj    merge=binary\n#*.vbproj    merge=binary\n#*.vcxproj   merge=binary\n#*.vcproj    merge=binary\n#*.dbproj    merge=binary\n#*.fsproj    merge=binary\n#*.lsproj    merge=binary\n#*.wixproj   merge=binary\n#*.modelproj merge=binary\n#*.sqlproj   merge=binary\n#*.wwaproj   merge=binary\n\n###############################################################################\n# behavior for image files\n#\n# image files are treated as binary by default.\n###############################################################################\n#*.jpg   binary\n#*.png   binary\n#*.gif   binary\n\n###############################################################################\n# diff behavior for common document formats\n# \n# Convert binary document formats to text before diffing them. This feature\n# is only available from the command line. Turn it on by uncommenting the \n# entries below.\n###############################################################################\n#*.doc   diff=astextplain\n#*.DOC   diff=astextplain\n#*.docx  diff=astextplain\n#*.DOCX  diff=astextplain\n#*.dot   diff=astextplain\n#*.DOT   diff=astextplain\n#*.pdf   diff=astextplain\n#*.PDF   diff=astextplain\n#*.rtf   diff=astextplain\n#*.RTF   diff=astextplain\n"
  },
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User-specific files\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n*.iso\n\n# User-specific files (MonoDevelop/Xamarin Studio)\n*.userprefs\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\nx64/\nx86/\nbld/\n[Bb]in/\n[Oo]bj/\n[Ll]og/\n\n# Visual Studio 2015 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n# NUNIT\n*.VisualState.xml\nTestResult.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n# DNX\nproject.lock.json\nproject.fragment.lock.json\nartifacts/\n\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opendb\n*.opensdf\n*.sdf\n*.cachefile\n*.VC.db\n*.VC.VC.opendb\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n*.sap\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# JustCode is a .NET coding add-in\n.JustCode\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\nnCrunchTemp_*\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n# TODO: Comment the next line if you want to checkin your web deploy settings\n# but database connection strings (with potential passwords) will be unencrypted\n#*.pubxml\n*.publishproj\n\n# Microsoft Azure Web App publish settings. Comment the next line if you want to\n# checkin your Azure Web App publish settings, but sensitive information contained\n# in these scripts will be unencrypted\nPublishScripts/\n\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n**/packages/*\n# except build/, which is used as an MSBuild target.\n!**/packages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n#!**/packages/repositories.config\n# NuGet v3's project.json files produces more ignoreable files\n*.nuget.props\n*.nuget.targets\n\n# Microsoft Azure Build Output\ncsx/\n*.build.csdef\n\n# Microsoft Azure Emulator\necf/\nrcf/\n\n# Windows Store app package directories and files\nAppPackages/\nBundleArtifacts/\nPackage.StoreAssociation.xml\n_pkginfo.txt\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n\n# Others\nClientBin/\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.jfm\n*.pfx\n*.publishsettings\nnode_modules/\norleans.codegen.cs\n\n# Since there are multiple workflows, uncomment next line to ignore bower_components\n# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)\n#bower_components/\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\n\n# SQL Server files\n*.mdf\n*.ldf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n\n# Microsoft Fakes\nFakesAssemblies/\n\n# GhostDoc plugin setting file\n*.GhostDoc.xml\n\n# Node.js Tools for Visual Studio\n.ntvs_analysis.dat\n\n# Visual Studio 6 build log\n*.plg\n\n# Visual Studio 6 workspace options file\n*.opt\n\n# Visual Studio LightSwitch build output\n**/*.HTMLClient/GeneratedArtifacts\n**/*.DesktopClient/GeneratedArtifacts\n**/*.DesktopClient/ModelManifest.xml\n**/*.Server/GeneratedArtifacts\n**/*.Server/ModelManifest.xml\n_Pvt_Extensions\n\n# Paket dependency manager\n.paket/paket.exe\npaket-files/\n\n# FAKE - F# Make\n.fake/\n\n# JetBrains Rider\n.idea/\n*.sln.iml\n\n# CodeRush\n.cr/\n\n# Python Tools for Visual Studio (PTVS)\n__pycache__/\n*.pyc\n/Dos622.img\n/Logs\n/CD\n/vm.vmx.lck/M43884.lck\n"
  },
  {
    "path": ".gitmodules",
    "content": "[submodule \"Int50\"]\n\tpath = Int50\n\turl = https://github.com/WindowsNT/Int50\n"
  },
  {
    "path": "Readme.md",
    "content": "# Assembly Manual\nWelcome to my assembly tutorials.\n\n# Update\nCleaner DMMI interface for you:\nhttps://github.com/WindowsNT/Int50\n\nArticles:\n* Full article (all in one): https://www.codeproject.com/Articles/1273844/The-Intel-Assembly-Manual\n\nOlder Articles: \n* Real/Protected/Long mode : https://www.codeproject.com/Articles/45788/The-Real-Protected-Long-mode-assembly-tutorial-for\n* Virtualization: https://www.codeproject.com/Articles/215458/Virtualization-for-System-Programmers\n* Multicore DOS: https://www.codeproject.com/Articles/889245/Deep-inside-CPU-Raw-multicore-programming\n* DMMI: https://www.codeproject.com/Articles/894522/Teh-Low-Level-M-ss-DOS-Multicore-Mode-Interface\n\nAt the moment, the first part is implemented (Real/Protected/Long mode), the Protected Mode Virtualization (working in Bochs), the third part (test SIPI multicore, working on Bochs and VMWare)\nand the fourth part finished (DMMI). More to follow soon.\n\n## Instructions\n1. Edit build.bat to specify flat assembler (FASM) path.\n2. Edit startbochs.bat, startvmware.bat and startvbox.bat to locate the executables of these applications. Bochs is included\nin the repository.\n\nBuild and run, it will automatically start bochs/vmware/virtualbox with the included FreeDOS image. \nIt will create a CD-ROM as D: and you can run it from d:\\entry.exe, by default it is automatically run (autoexec.bat)\n\n## 3rd Party Apps included\n1. DOS32A - http://dos32a.narechk.net/index_en.html\n2. 386SWAT - http://www.sudleyplace.com/swat/\n3. UDIS86 - http://udis86.sourceforge.net/ , including an open watcom C project that is used by VDEBUG and MDEBUG\n4. DPMIONE - http://www.sudleyplace.com/dpmione/\n5. QLINK - http://www.sudleyplace.com/qlink/\n\n\n## Tests performed\n1. Real mode test\n2. Protected mode test with or without paging\n3. Long mode test with paging and PAE\n4. Real mode thread calling\n5. Real mode thread called from protected mode\n6. Real mode thread called from long mode\n7. Protected mode thread called from real mode\n8. Long mode thread called from real mode\n9. VMX is there\n10. Spawn a Virtual Machine in Unrestricted guest mode. Paged Protected Mode guest also there.\n11. Entry /r which installs as TSR the DMMI services\n12. DPMI startup example taken from https://board.flatassembler.net/topic.php?t=7122\n13. DMMIC app runs which demonstrates DMMI, launching real mode, protected mode, long mode and virtualized protected mode threads\n14. DOS32A loads a linear executable created with FASM\n15. VDEBUG Virtualized Debugger (Not fully implemented yet)\n15. MDEBUG Multicore Debugger (Not fully implemented yet)\n16. SWITCHER multitasker (Not fully implemented yet)\n\n## DMMI\nI've called it DOS Multicore Mode Interface. It is a driver which helps you develop 32 and 64 bit multicore applications for DOS, using int 0xF0. \nThis interrupt is accessible from both real, protected and long mode. Put the function number to AH.\n\nTo check for existence, check the vector for INT 0xF0. It should not be pointing to 0 or to an IRET, ES:BX+2 should point to a dword 'dmmi'.\n\nInt 0xF0 provides the following functions to all modes (real, protected, long)\n\n1. AH = 0, verify existence. Return values, AX = 0xFACE if the driver exists, DL = total CPUs, DH = virtualization support (0 none, 1 PM only, 2 Unrestricted guest). This function is accessible from real, protected and long mode.\n2. AH = 1, begin thread. BL is the CPU index (1 to max-1). The function creates a thread, depending on AL:\n   * 0, begin (un)real mode thread. ES:DX = new thread seg:ofs. The thread is run with FS capable of unreal mode addressing, must use RETF to return.\n   * 1, begin 32 bit protected mode thread. EDX is the linear address of the thread. The thread must return with RETF.\n   * 2, begin 64 bit long mode thread. EDX holds the linear address of the code to start in 64-bit long mode. The thread must terminate with RET.\n   * 3, begin virtualized thread. BH contains the virtualization mode (1 for unrestricted guest real mode thread, and 2 for protected mode), and EDX the virtualized linear stack (or in seg:ofs format if unrestricted guest). The thread must return with RETF or VMCALL.\n3. AH = 5, mutex functions. This function is accessible from all modes.\n    * AL = 0 => initialize mutex to ES:DI (real) , EDI linear (protected), RDI linear (long).\n    * AL = 1 => Lock mutex\n    * AL = 2 => Unlock mutex\n    * AL = 3 => Wait for mutex\n4. AH = 4, execute real mode interrupt. This function is accessible from all modes. AL is the interrupt number, BP holds the AX value and BX,CX,DX,SI,DI are passed to the interrupt. DS and ES are loaded from the high 16 bits of ESI and EDI.\n4. AH = 9, Switch To Mode.\n\t* From real mode: AL = 0 (enter unreal), AL = 2 (enter long, ECX = linear address to start. Code must set IDT found at [rax] on entry)\n\t* From long mode: AL = 0, go back to real, ECX = linear. \n\nNow, if you have more than one CPU, your DOS applications/games can now directly access all 2^64 of memory and all your CPUs, while still being able to call DOS directly. \n\nIn order to avoid calling int 0xF0 directly from assembly and to make the driver compatible with higher level languages, an INT 0x21 redirection handler is installed. \nIf you call INT 0x21 from the main thread, INT 0x21 is executed directly. If you call INT 0x21 from protected or long mode thread, then INT 0xF0 function AX = 0x0421 is executed automatically.\n\n\n## Virtualization Debugger\nDebugging protected or long mode under DOS is next to impossible. I am now trying to create a simple DEBUG enhancement, called VDEBUG, which should be able to debug any DOS app in virtualization.\n\nCompile it with config.asm VDEBUG = 1. This app does the following:\n\n* Load the debugee (int 0x21, function 0x4B01)\n* Enter long mode (int 0xf0, function 0x0902)\n* Prepare virtualization structures (int 0xf0, function 0x0801)\n* Launch an unrestricted guest VM\n* In the VM, set the trap flag so each opcode causes a VMEXIT.\n* Jump to the entry point of the debugee \n* When target process calls int 0x21 function 0x4C to terminate, control returns to the command next to the int 0x21 function 0x4B01 call. Check there if under virtual machine. If so, do VMCALL to exit.\n* Go back to real mode and exit.\n* At the moment, the implemented functions are:\n\t* r - (registers) - shows Control, General, Segment regs, Dissassembly and bytes using UDIS86\n\t* g - (go) - runs program\n\t* t - (trace) - traces commands \n\t* h - (help) - shows help\n\t* q - (quit) - quits\n\n\n## Multicore Debugger\nDebugging protected or long mode under DOS is next to impossible (again). I am now trying to create a simple DEBUG enhancement, called MDEBUG, which should be able to debug any DOS app from another CPU core.\n\nCompile it with config.asm MDEBUG = 1. This app should perform the following:\n\n* Jump to another core\n* Load the debugee (int 0x21, function 0x4B01)\n* Set the trap flag\n* On exception, HLT the first processor then go to the MDEBUG processor\n* On resume, send resume IPI to the first processor\n\nThis project is not yet created, but I hope that it will be here soon!\n\n## Switcher\nSwitcher is a DMMI client that is able to do multitasking in DOS using multiple cores and virtualization.\nMore to follow soon!\n\n\n\n\n\n\n"
  },
  {
    "path": "a20.asm",
    "content": "; --------------------------------------- A20 line routines ---------------------------------------\nUSE16\nWaitKBC:\n\tmov cx,0ffffh\nA20L:\n\tin al,64h\n\ttest al,2\n\tloopnz A20L\nret\n\nEnableA20:\n\tcall WaitKBC\n\tmov al,0d1h\n\tout 64h,al\n\tcall WaitKBC\n\tmov al,0dfh\n\tout 60h,al\nret\n\n\nEnableA20f:\n\tcall WaitKBC\n\tmov al,0d1h\n\tout 64h,al\n\tcall WaitKBC\n\tmov al,0dfh\n\tout 60h,al\nretf\n\n\nDisableA20:\n\tcall WaitKBC\n\tmov al,0d1h\n\tout 64h,al\n\tcall WaitKBC\n\tmov al,0ddh\n\tout 60h,al\nret\n\nCheckA20:\n    PUSH ax \n    PUSH ds\n    PUSH es \n\n    XOR ax,ax \n    MOV ds,ax \n    NOT ax \n    MOV es,ax \n    MOV ah,[ds:0] \n    CMP ah,[es:10h] \n    JNZ A20_ON \n\n    CLI \n    INC ah \n    MOV [ds:0],ah \n    CMP [es:10h],ah \n    PUSHF \n    DEC ah \n    MOV [ds:0],ah \n    STI \n    POPF \n    JNZ A20_ON \n\n    CLC \n    POP es\n    POP ds\n    POP ax \n    RET \n\nA20_ON: \n    STC \n    POP es\n    POP ds\n    POP ax \nRET\n\n"
  },
  {
    "path": "acpi16.asm",
    "content": "; --------------------------------------- 16 bit APIC functions ---------------------------------------\nUSE16\n\ninclude 'mutex16.asm'\n\n\n; Returns APIC in EBX\n; implemented as FAR to allow calling from elsewhere\nGetMyApic16f:\n\tpush eax\n\tpush ecx\n\tpush edx\n\tmov eax,1\n\tcpuid\n\tand ebx,0xff000000\n\tshr ebx,24\n\tpop edx\n\tpop ecx\n\tpop eax\nretf\n\t\n\n;-------------------------------------------------------------------------------------------\n; Function ChecksumValid : Check the sum. EDI physical addr, ECX count\n;-------------------------------------------------------------------------------------------\t\t\nChecksumValid:\n\tPUSH ECX\n\tPUSH EDI\n\tXOR EAX,EAX\n\t.St:\n\tADD EAX,[FS:EDI]\n\tINC EDI\n\tDEC ECX\n\tJECXZ .End\n\tJMP .St\n\t.End:\n\tTEST EAX,0xFF\n\tJNZ .F\n\tMOV EAX,1\n\t.F:\n\tPOP EDI\n\tPOP ECX\n\tRETF\n\n;-------------------------------------------------------------------------------------------\n; Function FillACPI : Finds RDSP, and then RDST or XDST\n;-------------------------------------------------------------------------------------------\t\nFillACPI:\n\tpushadxeax\n\tpush es\n\tmov es,[fs:040eh]\n\txor edi,edi\n\tmov di,[es:0]\n\tpop es\n\tmov edi, 0x000E0000\t\n\t.s:\n\tcmp edi, 0x000FFFFF\t; \n\tjge .noACPI\t\t\t; Fail.\n\tmov eax,[fs:edi]\n\tadd edi,4\n\tmov edx,[fs:edi]\n\tadd edi,4\n\tcmp eax,0x20445352\n\tjnz .s\n\tcmp edx,0x20525450\n\tjnz .s\n\tjmp .found\n\t.noACPI:\n\tpopadxeax\n\tmov EAX,0xFFFFFFFF\nRETF\n\t.found:\n\n\t; Found at EDI\n\tsub edi,8\n\tmov esi,edi\n\t; 36 bytes for ACPI 2\n\tmov ecx,36\n\tpush cs\n\tcall ChecksumValid\n\tcmp eax,1\n\tjnz .noACPI2\n\tmov eax,[fs:edi + 24]\n\tmov dword [ds:XsdtAddress],eax\n\tmov eax,[fs:edi + 28]\n\tmov dword [ds:XsdtAddress + 4],eax\n\tmov edi,dword [ds:XsdtAddress]\n\tmov eax,[fs:edi]\n\tcmp eax, 'XSDT'\t\t\t; Valid?\n\tjnz .noACPI2\npopadxeax\nRETF\n\t.noACPI2:\n\tmov edi,esi\n\tmov ecx,20\n\tpush cs\n\tcall ChecksumValid\n\tcmp eax,1\n\tjnz .noACPI\n\tmov eax,[fs:edi + 16]\n\tmov dword [ds:XsdtAddress],eax\n\tmov edi,dword [ds:XsdtAddress]\n\tmov eax,[fs:edi]\n\tcmp eax, 'RSDT'\t\t\t; Valid?\n\tjnz .noACPI\n\n\tmov edi,dword [ds:XsdtAddress]\n\tmov dword [ds:XsdtAddress],0\n\tmov dword [ds:RsdtAddress],edi\n\npopadxeax\nRETF\n\n\n;-------------------------------------------------------------------------------------------\n; Function FindACPITableX : Finds EAX Table,  edi is rsdt/xsdt address and ecx is 4 or 8\n;-------------------------------------------------------------------------------------------\t\t\nFindACPITableX:\n\tcmp edi,0\n\tjz .f\n\n\t; len, must be more than 36\n\tmov ebx,[fs:edi + 4]\n\tcmp ebx,36\n\tjle .f\n\tsub ebx,36 \n\txor edx,edx\n\n\t.loop:\n\tcmp edx,ebx\n\tjz .f\n\tmov esi,[fs:edi + 36 + edx]\n\tcmp eax,[fs:esi]\n\tjnz .c\n\tmov eax,esi\nRETF\n\t.c:\n\tadd edx,ecx\n\tjmp .loop\n\t.f:\n\tmov eax,0ffffffffh\nRETF\n\n\t\n;-------------------------------------------------------------------------------------------\n; Function DumpMadt : Fills from  EAX MADT\n;-------------------------------------------------------------------------------------------\t\t\nDumpMadt: ; EAX\n\t\t\n\tpushad\n\tmov edi,eax\n\tmov [ds:numcpus],0\n\n\tmov ecx,[fs:edi + 4] ; length\n\tmov eax,[fs:edi + 0x24] ; Local APIC \n\tmov [ds:LocalApic],eax\n\n\tadd edi,0x2C\n\tsub ecx,0x2C\n\t.l1:\n\t\t\t\n\t\txor ebx,ebx\n\t\tmov bl,[fs:edi + 1] ; length\n\t\tcmp bl,0\n\t\tjz .end ; duh\n\t\tsub ecx,ebx\n\t\t\t\n\t\tmov al,[fs:edi] ; type\n\t\tcmp al,0\n\t\tjnz .no0\n\t\t\t\n\t\t; This is a CPU!\n\t\txor eax,eax\n\t\tmov al,[ds:numcpus]\n\t\tinc [ds:numcpus]\n\t\tmov edx,cpusstructize\n\t\tmul edx\n\t\txor esi,esi\n\t\tmov si,cpus\n\t\tadd esi,eax\n\t\tmov al,[fs:edi + 2]; ACPI id\n\t\tmov byte [ds:si],al\n\t\tmov al,[fs:edi + 3]; APIC id\n\t\tmov byte [ds:si + 4],al\n\t\t\t\n\n\t\t.no0:\n\t\t\t\n\t\tadd edi,ebx\n\t\t\n\tjecxz .end\n\tjmp .l1\n\t.end:\n\t\t\n\tpopad\nRETF\n\n\n;-------------------------------------------------------------------------------------------\n; Function DumpAll ; edi = xsdt or rsdt\n;-------------------------------------------------------------------------------------------\t\t\nDumpAll:\n\nmov ebp, 32 ; max count\n\tcmp edi,0\n\tjz .f\n\n\t; len, must be more than 36\n\tmov ebx,[fs:edi + 4]\n\tcmp ebx,36\n\tjle .f\n\tsub ebx,36 \n\txor edx,edx\n\n\t.loop:\n\tcmp edx,ebx\n\tjz .f\n\tmov esi,[fs:edi + 36 + edx]\n\tmov eax,[fs:esi]\n\n\t\t; eax to show\n\tpush edx\n\tmov edx,eax\n\tmov ah,2\n\tint 21h\n\n\tshr edx,8\n\tmov ah,2\n\tint 21h\n\t\n\tshr edx,8\n\tmov ah,2\n\tint 21h\n\n\tshr edx,8\n\tmov ah,2\n\tint 21h\n\t\n\tmov dl,' ';\n\tmov ah,2\n\tint 21h\n\n\tpop edx\n\n\tadd edx,ecx\n\n\tdec ebp\n\tcmp ebp, 0\n\tjz .f\n\n\tjmp .loop\n\t.f:\nRETF\n\n\n\n\n\n\n\n;-------------------------------------------------------------------------------------------\n; Function SendSIPIf : Sends SIPI. EBX = CPU Index, EAX = linear\n;-------------------------------------------------------------------------------------------\t\t\nSendSIPIf:\n\tPUSHAD\n\tPUSH DS\n\tmov cx,DATA16\n\tmov ds,cx\n\t\t\n\tXOR ECX,ECX\n\t; Spurious\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x0F0\n\tMOV EDX,[FS:EDI]\n\tOR EDX,0x1FF\n\tMOV [FS:EDI],EDX\n\t; Vector\n\t.L1:\n\tMOV ECX,EAX\n\tTEST EAX,0xFFF\n\tJZ .L2\n\tINC EAX\n\tJMP .L1\n\t.L2:\n\tMOV ESI,EAX\n\tSHR ESI,12\n\t; Init\n\tMOV ECX,0x04500\n\tOR ECX,ESI\n\tpush cs\n\tcall SendIPI16\n\t; Delay 10 ms  = 0,01 s = (100 Hz)\n\t; 1193182/100\n;\t\tsleep16 11931\n\tMOV AH,86H\n\tMOV CX,0\n\tMOV DX,10*1000 ;10 ms\n\tINT 15H\n\t; SIPI 1\n\tMOV ECX,0x05600\n\tOR ECX,ESI\n\tpush cs\n\tcall SendIPI16\n\t; Delay 200 us = 0,2 ms = 0,0002 s = (5000 Hz)\n\t; 1193182/5000\n;\t\tsleep16 238\n\tMOV AH,86H\n\tMOV CX,0\n\tMOV DX,200 ; 200us\n\tINT 15H\n\t; SIPI 2\n\tMOV ECX,0x05600\n\tOR ECX,ESI\n\tpush cs\n\tcall SendIPI16\n\tPOP DS\n\tPOPAD\nRETF\n\n\n;-------------------------------------------------------------------------------------------\n; Function SendIPI16 : Sends IPI. EBX = CPU Index, ECX = IPI\n;-------------------------------------------------------------------------------------------\t\t\nSendIPI16: ; EBX = CPU INDEX, ECX = IPI\n\tPUSHAD\n\t; Lock Mutex\t\t\n\tmov ax,mut_ipi\n\tpush cs\n\tcall qwaitlock16\n\n\t\t\n\t; Write it to 0x310\n\t; EBX is CPU INDEX\n\t; MAKE IT APIC ID\n\txor eax,eax\n\tmov ax,cpusstructize\n\tmul bx\n\tadd ax,cpus\n\tmov di,ax\n\tadd di,4\n\tmov bl,[ds:di]\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x310\n\tMOV EDX,[FS:EDI]\n\tAND EDX,0xFFFFFF\n\tXOR EAX,EAX\n\tMOV AL,BL\n\tSHL EAX,24\n\tOR EDX,EAX\n\tMOV [FS:EDI],EDX\n\t\t\n\t\t\n\t; Write it to 0x300\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x300\n\tMOV [FS:EDI],ECX\n\t; Verify it got delivered\n\t.Verify:\n\t PAUSE\n\tMOV EAX,[FS:EDI];\n\tSHR EAX,12\n\tTEST EAX,1\n\tJNZ .Verify\n\t; Write it to 0xB0 (EOI)\n \n;\tMOV EDI,[DS:LocalApic]\n;\tADD EDI,0xB0\n;    MOV dword [FS:EDI],0\n\t\t\n\t; Release Mutex\n\tqunlock16 mut_ipi\n\tPOPAD\nRETF\n\n\n"
  },
  {
    "path": "acpi32.asm",
    "content": "; --------------------------------------- 32 bit APIC functions ---------------------------------------\nUSE32\n\ninclude 'mutex32.asm'\n\n\n\n\n;-------------------------------------------------------------------------------------------\n; Function SendSIPI32f : Sends SIPI. EBX = CPU Index, EAX = linear\n;-------------------------------------------------------------------------------------------\t\t\nSendSIPI32f:\n\tPUSHAD\n\tPUSH DS\n\tPUSH ES\n\tmov cx,page32_idx ; This is a base-0 segment, so \"linear\" for EDI positioning\n\tmov es,cx\n\tmov cx,data16_idx\n\tmov ds,cx\n\t\t\n\tXOR ECX,ECX\n\t; Spurious\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x0F0\n\tMOV EDX,[ES:EDI]\n\tOR EDX,0x1FF\n\tMOV [ES:EDI],EDX\n\t; Vector\n\t.L1:\n\tMOV ECX,EAX\n\tTEST EAX,0xFFF\n\tJZ .L2\n\tINC EAX\n\tJMP .L1\n\t.L2:\n\tMOV ESI,EAX\n\tSHR ESI,12\n\t; Init\n\tMOV ECX,0x04500\n\tOR ECX,ESI\n\tpush cs\n\tcall SendIPI32\n\n\t; SIPI 1\n\tMOV ECX,0x05600\n\tOR ECX,ESI\n\tpush cs\n\tcall SendIPI32\n\n\t; SIPI 2\n\tMOV ECX,0x05600\n\tOR ECX,ESI\n\tpush cs\n\tcall SendIPI32\n\tPOP ES\n\tPOP DS\n\tPOPAD\nRETF\n\n\n;-------------------------------------------------------------------------------------------\n; Function SendIPI32 : Sends IPI. EBX = CPU Index, ECX = IPI\n;-------------------------------------------------------------------------------------------\t\t\nSendIPI32: ; EBX = CPU INDEX, ECX = IPI\n\tPUSHAD\n\t; Lock Mutex\t\t\n\tmov ax,mut_ipi\n\tpush cs\n\tcall qwaitlock32\n\n\t; Write it to 0x310\n\t; EBX is CPU INDEX\n\t; MAKE IT APIC ID\n\txor eax,eax\n\tmov ax,cpusstructize\n\tmul bx\n\tadd ax,cpus\n\tmov di,ax\n\tadd di,4\n\tmov bl,[ds:di]\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x310\n\tMOV EDX,[ES:EDI]\n\tAND EDX,0xFFFFFF\n\tXOR EAX,EAX\n\tMOV AL,BL\n\tSHL EAX,24\n\tOR EDX,EAX\n\tMOV [ES:EDI],EDX\n\t\t\n\t\t\n\t; Write it to 0x300\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x300\n\tMOV [ES:EDI],ECX\n\t; Verify it got delivered\n\t.Verify:\n\t PAUSE\n\tMOV EAX,[ES:EDI];\n\tSHR EAX,12\n\tTEST EAX,1\n\tJNZ .Verify\n\t; Write it to 0xB0 (EOI)\n \n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0xB0\n    MOV dword [ES:EDI],0\n\t\t\n\t; Release Mutex\n\tqunlock32 mut_ipi\n\tPOPAD\nRETF\n\n\n"
  },
  {
    "path": "acpi64.asm",
    "content": "; --------------------------------------- 64 bit APIC functions ---------------------------------------\nUSE64\n\n\ninclude 'mutex64.asm'\n\n\n\n\n;-------------------------------------------------------------------------------------------\n; Function SendSIPI64 : Sends SIPI. RBX = CPU Index, EAX = linear\n;-------------------------------------------------------------------------------------------\t\t\nSendSIPI64:\n\tPUSH RAX\n\tPUSH RBX\n\tPUSH RCX\n\tPUSH RDX\n\tPUSH RSI\n\tPUSH RDI\n\t\t\n\t\t\n\tlinear edi,LocalApic\n\tmov ecx,[edi]\n\n\t; Spurious\n\tMOV EDI,[RCX]\n\tADD EDI,0x0F0\n\tMOV EDX,[EDI]\n\tOR EDX,0x1FF\n\tMOV [EDI],EDX\n\n\t; Vector\n\t.L1:\n\tMOV ECX,EAX\n\tTEST EAX,0xFFF\n\tJZ .L2\n\tINC EAX\n\tJMP .L1\n\t.L2:\n\tMOV ESI,EAX\n\tSHR ESI,12\n\t; Init\n\tMOV ECX,0x04500\n\tOR ECX,ESI\n\tcall SendIPI64\n\t; SIPI 1\n\tMOV ECX,0x05600\n\tOR ECX,ESI\n\tcall SendIPI64\n\n\t; SIPI 2\n\tMOV ECX,0x05600\n\tOR ECX,ESI\n\tcall SendIPI64\n\n\n\tPOP RDI\n\tPOP RSI\n\tPOP RDX\n\tPOP RCX\n\tPOP RBX\n\tPOP RAX\nRET\n\n\n;-------------------------------------------------------------------------------------------\n; Function SendIPI64 : Sends IPI. EBX = CPU Index, ECX = IPI\n;-------------------------------------------------------------------------------------------\t\t\nSendIPI64: ; EBX = CPU INDEX, ECX = IPI\n\nPUSH RAX\n\tPUSH RBX\n\tPUSH RCX\n\tPUSH RDX\n\tPUSH RSI\n\tPUSH RDI\n\n\t; Lock Mutex\t\t\n    xor rax,rax\n\tmov ax,mut_ipi\n\tcall qwaitlock64\n\n\t; Write it to 0x310\n\t; EBX is CPU INDEX\n\t; MAKE IT APIC ID\n\txor eax,eax\n\tmov ax,cpusstructize\n\tmul bx\n\tadd ax,cpus\n\txor rdi,rdi\n\tmov di,ax\n\tadd di,4\n\tlinear esi,edi\n\tmov bl,[esi]\n\n\tlinear edi,LocalApic\n\tmov edi,[edi]\n\tADD EDI,0x310\n\tMOV EDX,[EDI]\n\tAND EDX,0xFFFFFF\n\tXOR EAX,EAX\n\tMOV AL,BL\n\tSHL EAX,24\n\tOR EDX,EAX\n\tMOV [EDI],EDX\n\t\t\n\t\t\n\t; Write it to 0x300\n\tlinear edi,LocalApic\n\tmov edi,[edi]\n\tADD EDI,0x300\n\tMOV [EDI],ECX\n\n\n\t; Verify it got delivered\n\t.Verify:\n\t PAUSE\n\tMOV EAX,[EDI];\n\tSHR EAX,12\n\tTEST EAX,1\n\tJNZ .Verify\n\t; Write it to 0xB0 (EOI)\n \n;\tMOV EDI,[ecx]\n;\tADD EDI,0xB0\n;    MOV dword [EDI],0\n\t\t\n\t; Release Mutex\n\tqunlock64 mut_ipi\n\n\tPOP RDI\n\tPOP RSI\n\tPOP RDX\n\tPOP RCX\n\tPOP RBX\n\tPOP RAX\nRET\n\n\n"
  },
  {
    "path": "asm.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 15\nVisualStudioVersion = 15.0.28307.168\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"asm\", \"asm.vcxproj\", \"{68FEA001-C33A-4EBC-A70F-9788736975B5}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tBochs|DOS = Bochs|DOS\n\t\tVirtualBox|DOS = VirtualBox|DOS\n\t\tVMWare|DOS = VMWare|DOS\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{68FEA001-C33A-4EBC-A70F-9788736975B5}.Bochs|DOS.ActiveCfg = DOS|x64\n\t\t{68FEA001-C33A-4EBC-A70F-9788736975B5}.Bochs|DOS.Build.0 = DOS|x64\n\t\t{68FEA001-C33A-4EBC-A70F-9788736975B5}.VirtualBox|DOS.ActiveCfg = VirtualBox|x64\n\t\t{68FEA001-C33A-4EBC-A70F-9788736975B5}.VirtualBox|DOS.Build.0 = VirtualBox|x64\n\t\t{68FEA001-C33A-4EBC-A70F-9788736975B5}.VMWare|DOS.ActiveCfg = VMWare|x64\n\t\t{68FEA001-C33A-4EBC-A70F-9788736975B5}.VMWare|DOS.Build.0 = VMWare|x64\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\n\tGlobalSection(ExtensibilityGlobals) = postSolution\n\t\tSolutionGuid = {FA27BBE5-85B1-418A-9938-437642B9D60B}\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "asm.vcxproj",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"15.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup Label=\"ProjectConfigurations\">\n    <ProjectConfiguration Include=\"BochsNoDebug|x64\">\n      <Configuration>BochsNoDebug</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"DOS|x64\">\n      <Configuration>DOS</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"VirtualBox|x64\">\n      <Configuration>VirtualBox</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n    <ProjectConfiguration Include=\"VMWare|x64\">\n      <Configuration>VMWare</Configuration>\n      <Platform>x64</Platform>\n    </ProjectConfiguration>\n  </ItemGroup>\n  <PropertyGroup Label=\"Globals\">\n    <VCProjectVersion>15.0</VCProjectVersion>\n    <ProjectGuid>{68FEA001-C33A-4EBC-A70F-9788736975B5}</ProjectGuid>\n    <RootNamespace>asm</RootNamespace>\n    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>MultiByte</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>MultiByte</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>MultiByte</CharacterSet>\n  </PropertyGroup>\n  <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\" Label=\"Configuration\">\n    <ConfigurationType>Application</ConfigurationType>\n    <UseDebugLibraries>false</UseDebugLibraries>\n    <PlatformToolset>v143</PlatformToolset>\n    <WholeProgramOptimization>true</WholeProgramOptimization>\n    <CharacterSet>MultiByte</CharacterSet>\n  </PropertyGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n  <ImportGroup Label=\"ExtensionSettings\">\n  </ImportGroup>\n  <ImportGroup Label=\"Shared\">\n  </ImportGroup>\n  <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\" Label=\"PropertySheets\">\n    <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n  </ImportGroup>\n  <PropertyGroup Label=\"UserMacros\" />\n  <PropertyGroup />\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\">\n    <ClCompile>\n      <WarningLevel>Level3</WarningLevel>\n      <Optimization>MaxSpeed</Optimization>\n      <FunctionLevelLinking>true</FunctionLevelLinking>\n      <IntrinsicFunctions>true</IntrinsicFunctions>\n      <SDLCheck>true</SDLCheck>\n      <ConformanceMode>true</ConformanceMode>\n    </ClCompile>\n    <Link>\n      <EnableCOMDATFolding>true</EnableCOMDATFolding>\n      <OptimizeReferences>true</OptimizeReferences>\n    </Link>\n  </ItemDefinitionGroup>\n  <ItemGroup>\n    <CustomBuild Include=\"entry.asm\">\n      <FileType>Document</FileType>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\">build.bat</Command>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\">build.bat</Command>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\">build.bat</Command>\n      <Command Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\">build.bat</Command>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\">entry.exe;dmmic.exe;le.exe;debuggee.exe;vdebug.exe;mdebug.exe</Outputs>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\">entry.exe;dmmic.exe;le.exe;debuggee.exe;vdebug.exe;mdebug.exe</Outputs>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\">entry.exe;dmmic.exe;le.exe;debuggee.exe;vdebug.exe;mdebug.exe</Outputs>\n      <Outputs Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\">entry.exe;dmmic.exe;le.exe;debuggee.exe;vdebug.exe;mdebug.exe</Outputs>\n      <LinkObjects Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\">false</LinkObjects>\n      <LinkObjects Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\">false</LinkObjects>\n      <LinkObjects Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\">false</LinkObjects>\n      <LinkObjects Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\">false</LinkObjects>\n      <TreatOutputAsContent Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\">true</TreatOutputAsContent>\n      <TreatOutputAsContent Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\">true</TreatOutputAsContent>\n      <TreatOutputAsContent Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\">true</TreatOutputAsContent>\n      <TreatOutputAsContent Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\">true</TreatOutputAsContent>\n      <AdditionalInputs Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\">*.asm</AdditionalInputs>\n      <AdditionalInputs Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\">*.asm</AdditionalInputs>\n      <AdditionalInputs Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\">*.asm</AdditionalInputs>\n      <AdditionalInputs Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\">*.asm</AdditionalInputs>\n    </CustomBuild>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"a20.asm\">\n      <FileType>Document</FileType>\n    </None>\n    <None Include=\"acpi16.asm\" />\n    <None Include=\"acpi32.asm\" />\n    <None Include=\"acpi64.asm\" />\n    <None Include=\"asmtest.vbox\" />\n    <None Include=\"bochsrc.bxrc\" />\n    <None Include=\"build.bat\" />\n    <None Include=\"code16.asm\" />\n    <None Include=\"code32.asm\" />\n    <None Include=\"code64.asm\" />\n    <None Include=\"config.asm\" />\n    <None Include=\"data16.asm\" />\n    <None Include=\"data32.asm\" />\n    <None Include=\"data64.asm\" />\n    <None Include=\"directlong.asm\" />\n    <None Include=\"dmmic.asm\" />\n    <None Include=\"dpmic.asm\" />\n    <None Include=\"gdt.asm\" />\n    <None Include=\"guest16.asm\" />\n    <None Include=\"guest32.asm\" />\n    <None Include=\"guest64.asm\" />\n    <None Include=\"himem16.asm\" />\n    <None Include=\"idt.asm\" />\n    <None Include=\"int16.asm\" />\n    <None Include=\"int32.asm\" />\n    <None Include=\"int64.asm\" />\n    <None Include=\"iso.ps1\" />\n    <None Include=\"leheader.asm\" />\n    <None Include=\"lemain.asm\" />\n    <None Include=\"mdebug.asm\" />\n    <None Include=\"mdebugcore.asm\" />\n    <None Include=\"mutex16.asm\" />\n    <None Include=\"mutex32.asm\" />\n    <None Include=\"mutex64.asm\" />\n    <None Include=\"opcodes.asm\" />\n    <None Include=\"page16.asm\" />\n    <None Include=\"page32.asm\" />\n    <None Include=\"Readme.md\" />\n    <None Include=\"reqdmmi.asm\" />\n    <None Include=\"runx.bat\" />\n    <None Include=\"stack16.asm\" />\n    <None Include=\"stack32.asm\" />\n    <None Include=\"stack64.asm\" />\n    <None Include=\"startbochs.bat\" />\n    <None Include=\"startvbox.bat\" />\n    <None Include=\"startvmware.bat\" />\n    <None Include=\"struct.asm\" />\n    <None Include=\"switcher\\switcher.mk1\" />\n    <None Include=\"switcher\\switcher.wpj\" />\n    <None Include=\"thread16.asm\" />\n    <None Include=\"thread32.asm\" />\n    <None Include=\"thread64.asm\" />\n    <None Include=\"unreal.asm\" />\n    <None Include=\"vdebug.asm\" />\n    <None Include=\"debuggee.asm\" />\n    <None Include=\"vdebug64.asm\" />\n    <None Include=\"vdisplay.asm\" />\n    <None Include=\"vm.vmx\" />\n    <None Include=\"vmxhost64.asm\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"dos32.asm\">\n      <FileType>Document</FileType>\n    </None>\n  </ItemGroup>\n  <ItemGroup>\n    <Text Include=\"dis\\main.c\">\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='VirtualBox|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='DOS|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='VMWare|x64'\">false</ExcludedFromBuild>\n      <ExcludedFromBuild Condition=\"'$(Configuration)|$(Platform)'=='BochsNoDebug|x64'\">false</ExcludedFromBuild>\n      <FileType>CppCode</FileType>\n    </Text>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"switcher\\main.cpp\" />\n  </ItemGroup>\n  <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n  <ImportGroup Label=\"ExtensionTargets\">\n  </ImportGroup>\n</Project>"
  },
  {
    "path": "asm.vcxproj.filters",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <ItemGroup>\n    <Filter Include=\"Configuration\">\n      <UniqueIdentifier>{f5fc6a1f-afcd-4e0e-999a-4740cb3500c2}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Data\">\n      <UniqueIdentifier>{f2ee1441-75fc-48c0-baec-44f7ad5f153f}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"32 bit code\">\n      <UniqueIdentifier>{05819406-8f59-4c3a-a88d-6638e01bd070}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"16 bit code\">\n      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\n      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\n    </Filter>\n    <Filter Include=\"64 bit code\">\n      <UniqueIdentifier>{1f5ef5e6-1cd9-452e-b6d1-e803a1a2e812}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"DMMI Client\">\n      <UniqueIdentifier>{3d1fb20d-d4c2-4578-9778-ec0c4531a433}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"DPMI Client\">\n      <UniqueIdentifier>{19c81409-b80e-4267-80bc-95d0f74ac19d}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"VDebug\">\n      <UniqueIdentifier>{0d5a1d9a-c2fb-4445-a6d7-4676170147c1}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"MDebug\">\n      <UniqueIdentifier>{7f2ca36e-0cd5-4db7-ae28-3f94f4eb6f98}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Debuggee\">\n      <UniqueIdentifier>{189d96b4-2842-4505-805a-815b3b66bbd4}</UniqueIdentifier>\n    </Filter>\n    <Filter Include=\"Switcher\">\n      <UniqueIdentifier>{3d37bfd1-8ba1-4f5b-b5f5-5a30a1334465}</UniqueIdentifier>\n    </Filter>\n  </ItemGroup>\n  <ItemGroup>\n    <CustomBuild Include=\"entry.asm\">\n      <Filter>16 bit code</Filter>\n    </CustomBuild>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"code16.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"a20.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"gdt.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"idt.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"bochsrc.bxrc\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"build.bat\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"data16.asm\">\n      <Filter>Data</Filter>\n    </None>\n    <None Include=\"data32.asm\">\n      <Filter>Data</Filter>\n    </None>\n    <None Include=\"data64.asm\">\n      <Filter>Data</Filter>\n    </None>\n    <None Include=\"struct.asm\">\n      <Filter>Data</Filter>\n    </None>\n    <None Include=\"Readme.md\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"iso.ps1\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"vm.vmx\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"code32.asm\">\n      <Filter>32 bit code</Filter>\n    </None>\n    <None Include=\"code64.asm\">\n      <Filter>64 bit code</Filter>\n    </None>\n    <None Include=\"stack16.asm\">\n      <Filter>Data</Filter>\n    </None>\n    <None Include=\"stack32.asm\">\n      <Filter>Data</Filter>\n    </None>\n    <None Include=\"stack64.asm\">\n      <Filter>Data</Filter>\n    </None>\n    <None Include=\"page32.asm\">\n      <Filter>32 bit code</Filter>\n    </None>\n    <None Include=\"startvbox.bat\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"startvmware.bat\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"startbochs.bat\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"asmtest.vbox\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"acpi16.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"unreal.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"mutex16.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"thread16.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"config.asm\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"acpi32.asm\">\n      <Filter>32 bit code</Filter>\n    </None>\n    <None Include=\"mutex32.asm\">\n      <Filter>32 bit code</Filter>\n    </None>\n    <None Include=\"mutex64.asm\">\n      <Filter>64 bit code</Filter>\n    </None>\n    <None Include=\"acpi64.asm\">\n      <Filter>64 bit code</Filter>\n    </None>\n    <None Include=\"dos32.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"thread32.asm\">\n      <Filter>32 bit code</Filter>\n    </None>\n    <None Include=\"thread64.asm\">\n      <Filter>64 bit code</Filter>\n    </None>\n    <None Include=\"page16.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"guest16.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"guest32.asm\">\n      <Filter>32 bit code</Filter>\n    </None>\n    <None Include=\"vmxhost64.asm\">\n      <Filter>64 bit code</Filter>\n    </None>\n    <None Include=\"int16.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"dmmic.asm\">\n      <Filter>DMMI Client</Filter>\n    </None>\n    <None Include=\"int32.asm\">\n      <Filter>32 bit code</Filter>\n    </None>\n    <None Include=\"himem16.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"int64.asm\">\n      <Filter>64 bit code</Filter>\n    </None>\n    <None Include=\"directlong.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"guest64.asm\">\n      <Filter>64 bit code</Filter>\n    </None>\n    <None Include=\"lemain.asm\">\n      <Filter>DPMI Client</Filter>\n    </None>\n    <None Include=\"leheader.asm\">\n      <Filter>DPMI Client</Filter>\n    </None>\n    <None Include=\"opcodes.asm\">\n      <Filter>16 bit code</Filter>\n    </None>\n    <None Include=\"vdebug.asm\">\n      <Filter>VDebug</Filter>\n    </None>\n    <None Include=\"vdebug64.asm\">\n      <Filter>VDebug</Filter>\n    </None>\n    <None Include=\"debuggee.asm\">\n      <Filter>Debuggee</Filter>\n    </None>\n    <None Include=\"mdebug.asm\">\n      <Filter>MDebug</Filter>\n    </None>\n    <None Include=\"reqdmmi.asm\">\n      <Filter>DMMI Client</Filter>\n    </None>\n    <None Include=\"mdebugcore.asm\">\n      <Filter>MDebug</Filter>\n    </None>\n    <None Include=\"vdisplay.asm\">\n      <Filter>VDebug</Filter>\n    </None>\n    <None Include=\"runx.bat\">\n      <Filter>Configuration</Filter>\n    </None>\n    <None Include=\"dpmic.asm\">\n      <Filter>DPMI Client</Filter>\n    </None>\n    <None Include=\"switcher\\switcher.mk1\">\n      <Filter>Switcher</Filter>\n    </None>\n    <None Include=\"switcher\\switcher.wpj\">\n      <Filter>Switcher</Filter>\n    </None>\n    <None Include=\"switcher\\main.cpp\">\n      <Filter>Switcher</Filter>\n    </None>\n  </ItemGroup>\n  <ItemGroup>\n    <Text Include=\"dis\\main.c\">\n      <Filter>16 bit code</Filter>\n    </Text>\n  </ItemGroup>\n</Project>"
  },
  {
    "path": "asmtest.vbox",
    "content": "<?xml version=\"1.0\"?>\n<!--\n** DO NOT EDIT THIS FILE.\n** If you make changes to this file while any VirtualBox related application\n** is running, your changes will be overwritten later, without taking effect.\n** Use VBoxManage or the VirtualBox Manager GUI to make changes.\n-->\n<VirtualBox xmlns=\"http://www.virtualbox.org/\" version=\"1.15-windows\">\n  <Machine uuid=\"{a436033c-67f8-4e9f-b0fe-0a7efbadb84d}\" name=\"asmtest\" OSType=\"Other_64\" snapshotFolder=\"Snapshots\" lastStateChange=\"2019-01-30T21:43:48Z\">\n    <MediaRegistry>\n      <DVDImages>\n        <Image uuid=\"{e6514449-af13-4958-9628-33af9ee8fa81}\" location=\"d.iso\"/>\n      </DVDImages>\n      <FloppyImages>\n        <Image uuid=\"{3633dce4-e06c-456b-9a07-c48367a1e1a2}\" location=\"a.img\"/>\n      </FloppyImages>\n    </MediaRegistry>\n    <ExtraData>\n      <ExtraDataItem name=\"GUI/LastCloseAction\" value=\"PowerOff\"/>\n      <ExtraDataItem name=\"GUI/LastNormalWindowPosition\" value=\"450,261,720,442\"/>\n    </ExtraData>\n    <Hardware>\n      <CPU count=\"3\">\n        <PAE enabled=\"true\"/>\n        <LongMode enabled=\"true\"/>\n        <HardwareVirtExLargePages enabled=\"true\"/>\n      </CPU>\n      <Memory RAMSize=\"64\"/>\n      <Paravirt provider=\"Default\"/>\n      <Display VRAMSize=\"6\"/>\n      <VideoCapture screens=\"1\" file=\".\" fps=\"25\"/>\n      <RemoteDisplay enabled=\"false\"/>\n      <BIOS>\n        <IOAPIC enabled=\"true\"/>\n      </BIOS>\n      <USB>\n        <Controllers>\n          <Controller name=\"OHCI\" type=\"OHCI\"/>\n        </Controllers>\n      </USB>\n      <Network>\n        <Adapter slot=\"0\" enabled=\"true\" MACAddress=\"080027A516CD\" cable=\"true\" type=\"Am79C973\">\n          <NAT/>\n        </Adapter>\n      </Network>\n      <AudioAdapter driver=\"DirectSound\" enabled=\"true\" enabledIn=\"false\"/>\n      <GuestProperties>\n        <GuestProperty name=\"/VirtualBox/HostInfo/GUI/LanguageID\" value=\"en_US\" timestamp=\"1548884628564704400\" flags=\"\"/>\n      </GuestProperties>\n    </Hardware>\n    <StorageControllers>\n      <StorageController name=\"IDE\" type=\"PIIX4\" PortCount=\"2\" useHostIOCache=\"true\" Bootable=\"true\">\n        <AttachedDevice passthrough=\"false\" tempeject=\"true\" type=\"DVD\" hotpluggable=\"false\" port=\"1\" device=\"0\">\n          <Image uuid=\"{e6514449-af13-4958-9628-33af9ee8fa81}\"/>\n        </AttachedDevice>\n      </StorageController>\n      <StorageController name=\"Floppy\" type=\"I82078\" PortCount=\"1\" useHostIOCache=\"true\" Bootable=\"true\">\n        <AttachedDevice type=\"Floppy\" hotpluggable=\"false\" port=\"0\" device=\"0\">\n          <Image uuid=\"{3633dce4-e06c-456b-9a07-c48367a1e1a2}\"/>\n        </AttachedDevice>\n      </StorageController>\n    </StorageControllers>\n  </Machine>\n</VirtualBox>\n"
  },
  {
    "path": "asmtest.vbox-prev",
    "content": "<?xml version=\"1.0\"?>\n<!--\n** DO NOT EDIT THIS FILE.\n** If you make changes to this file while any VirtualBox related application\n** is running, your changes will be overwritten later, without taking effect.\n** Use VBoxManage or the VirtualBox Manager GUI to make changes.\n-->\n<VirtualBox xmlns=\"http://www.virtualbox.org/\" version=\"1.15-windows\">\n  <Machine uuid=\"{a436033c-67f8-4e9f-b0fe-0a7efbadb84d}\" name=\"asmtest\" OSType=\"Other_64\" snapshotFolder=\"Snapshots\" lastStateChange=\"2019-01-30T21:43:48Z\">\n    <MediaRegistry>\n      <DVDImages>\n        <Image uuid=\"{e6514449-af13-4958-9628-33af9ee8fa81}\" location=\"d.iso\"/>\n      </DVDImages>\n      <FloppyImages>\n        <Image uuid=\"{3633dce4-e06c-456b-9a07-c48367a1e1a2}\" location=\"a.img\"/>\n      </FloppyImages>\n    </MediaRegistry>\n    <ExtraData>\n      <ExtraDataItem name=\"GUI/LastCloseAction\" value=\"PowerOff\"/>\n      <ExtraDataItem name=\"GUI/LastNormalWindowPosition\" value=\"0,23,640,522\"/>\n    </ExtraData>\n    <Hardware>\n      <CPU count=\"3\">\n        <PAE enabled=\"true\"/>\n        <LongMode enabled=\"true\"/>\n        <HardwareVirtExLargePages enabled=\"true\"/>\n      </CPU>\n      <Memory RAMSize=\"64\"/>\n      <Paravirt provider=\"Default\"/>\n      <Display VRAMSize=\"6\"/>\n      <VideoCapture screens=\"1\" file=\".\" fps=\"25\"/>\n      <RemoteDisplay enabled=\"false\"/>\n      <BIOS>\n        <IOAPIC enabled=\"true\"/>\n      </BIOS>\n      <USB>\n        <Controllers>\n          <Controller name=\"OHCI\" type=\"OHCI\"/>\n        </Controllers>\n      </USB>\n      <Network>\n        <Adapter slot=\"0\" enabled=\"true\" MACAddress=\"080027A516CD\" cable=\"true\" type=\"Am79C973\">\n          <NAT/>\n        </Adapter>\n      </Network>\n      <AudioAdapter driver=\"DirectSound\" enabled=\"true\" enabledIn=\"false\"/>\n      <GuestProperties>\n        <GuestProperty name=\"/VirtualBox/HostInfo/GUI/LanguageID\" value=\"en_US\" timestamp=\"1548215661025663900\" flags=\"\"/>\n      </GuestProperties>\n    </Hardware>\n    <StorageControllers>\n      <StorageController name=\"IDE\" type=\"PIIX4\" PortCount=\"2\" useHostIOCache=\"true\" Bootable=\"true\">\n        <AttachedDevice passthrough=\"false\" tempeject=\"true\" type=\"DVD\" hotpluggable=\"false\" port=\"1\" device=\"0\">\n          <Image uuid=\"{e6514449-af13-4958-9628-33af9ee8fa81}\"/>\n        </AttachedDevice>\n      </StorageController>\n      <StorageController name=\"Floppy\" type=\"I82078\" PortCount=\"1\" useHostIOCache=\"true\" Bootable=\"true\">\n        <AttachedDevice type=\"Floppy\" hotpluggable=\"false\" port=\"0\" device=\"0\">\n          <Image uuid=\"{3633dce4-e06c-456b-9a07-c48367a1e1a2}\"/>\n        </AttachedDevice>\n      </StorageController>\n    </StorageControllers>\n  </Machine>\n</VirtualBox>\n"
  },
  {
    "path": "bochsrc.bxrc",
    "content": "# configuration file generated by Bochs\nplugin_ctrl: unmapped=1, biosdev=1, speaker=1, extfpuirq=1, parallel=1, serial=1, gameport=1\nconfig_interface: win32config\ndisplay_library: win32, options=\"gui_debug\"\nmemory: host=32, guest=32\nromimage: file=\"g:\\bochs2/BIOS-bochs-latest\", address=0x0, options=none\nvgaromimage: file=\"g:\\bochs2/VGABIOS-lgpl-latest\"\nboot: floppy\nfloppy_bootsig_check: disabled=0\nfloppya: type=1_44, 1_44=\"F:\\TOOLS\\ASM\\full2\\a.img\", status=inserted, write_protected=0\n# no floppyb\nata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14\nata0-master: type=none\nata0-slave: type=cdrom, path=\"F:\\TOOLS\\ASM\\full2\\d.iso\", status=inserted, model=\"Generic 1234\", biosdetect=auto\nata1: enabled=1, ioaddr1=0x170, ioaddr2=0x370, irq=15\nata1-master: type=none\nata1-slave: type=none\nata2: enabled=0\nata3: enabled=0\noptromimage1: file=none\noptromimage2: file=none\noptromimage3: file=none\noptromimage4: file=none\noptramimage1: file=none\noptramimage2: file=none\noptramimage3: file=none\noptramimage4: file=none\npci: enabled=1, chipset=i440fx\nvga: extension=vbe, update_freq=5, realtime=1\ncpu: count=2:2:2, ips=4000000, quantum=16, model=bx_generic, reset_on_triple_fault=1, cpuid_limit_winnt=0, ignore_bad_msrs=1, mwait_is_nop=0\ncpuid: level=6, stepping=3, model=3, family=6, vendor_string=\"GenuineIntel\", brand_string=\"              Intel(R) Pentium(R) 4 CPU        \"\ncpuid: mmx=1, apic=x2apic, simd=ssse3, sse4a=0, misaligned_sse=0, sep=1, movbe=0, adx=0\ncpuid: aes=1, sha=0, xsave=0, xsaveopt=0, x86_64=1, 1g_pages=1, pcid=0, fsgsbase=0\ncpuid: smep=0, smap=0, mwait=1, vmx=2\nprint_timestamps: enabled=0\ndebugger_log: -\nmagic_break: enabled=1\nport_e9_hack: enabled=0\nprivate_colormap: enabled=0\nclock: sync=none, time0=local, rtc_sync=0\n# no cmosimage\n# no loader\nlog: -\nlogprefix: %t%e%d\ndebug: action=ignore\ninfo: action=report\nerror: action=report\npanic: action=ask\nkeyboard: type=mf, serial_delay=250, paste_delay=100000, user_shortcut=none\nmouse: type=ps2, enabled=0, toggle=ctrl+mbutton\nsound: waveoutdrv=win, waveout=none, waveindrv=win, wavein=none, midioutdrv=win, midiout=none\nspeaker: enabled=1, mode=sound\nparport1: enabled=1, file=none\nparport2: enabled=0\ncom1: enabled=1, mode=null\ncom2: enabled=0\ncom3: enabled=0\ncom4: enabled=0\n"
  },
  {
    "path": "build.bat",
    "content": "del d.iso\nfasm entry.asm\nfasm dpmic.asm\nfasm dmmic.asm\nfasm vdebug.asm\nfasm mdebug.asm\nfasm debuggee.asm\nfasm leheader.asm le.exe\n\nREM Wmake\nREM Replace G:\\WATCOM with your OpenWatcom Path\ncd switcher\ng:\\watcom\\binnt\\wpp main.cpp -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\ng:\\WATCOM\\binnt\\wlink libpath g:\\watcom\\lib286 libpath g:\\watcom\\lib286\\dos name switcher d all op m op maxe=25 op q op symf file main.obj format dos \ncd ..\n\nREM upx --best entry.exe\nmkdir CD\ncopy /y vdebug.exe .\\CD\\\ncopy /y mdebug.exe .\\CD\\mdebug.exe \ncopy /y debuggee.exe .\\CD\\debuggee.exe \ncopy /y entry.exe .\\CD\\entry.exe \ncopy /y dmmic.exe .\\CD\\dmmic.exe\ncopy /y dpmic.exe .\\CD\\dpmic.exe\ncopy /y .\\switcher\\switcher.exe .\\CD\\switcher.exe\ncopy /y le.exe .\\CD\\le.exe\ncopy /y runx.bat .\\CD\\runx.bat\npowershell -ExecutionPolicy RemoteSigned -File \"iso.ps1\"\ndel .\\CD\\386swat.lod\ncopy swat\\386swat.lod .\\CD\\386swat.lod\ncopy /y dos32a\\* .\\CD\\ \nxcopy /y /s /e /i swat\\* .\\CD\\swat\nxcopy /y /s /e /i qlink\\* .\\CD\\qlink\nxcopy /y /s /e /i dpmi\\* .\\CD\\dpmi\ncopy /y dis\\dism.exe .\\CD\\\n\n\t"
  },
  {
    "path": "bx_enh_dbg.ini",
    "content": "# bx_enh_dbg_ini\nSeeReg[0] = TRUE\nSeeReg[1] = TRUE\nSeeReg[2] = TRUE\nSeeReg[3] = TRUE\nSeeReg[4] = FALSE\nSeeReg[5] = FALSE\nSeeReg[6] = FALSE\nSeeReg[7] = FALSE\nSingleCPU = FALSE\nShowIOWindows = TRUE\nShowButtons = TRUE\nSeeRegColors = TRUE\nignoreNxtT = TRUE\nignSSDisasm = TRUE\nUprCase = 1\nDumpInAsciiMode = 2\nisLittleEndian = TRUE\nDefaultAsmLines = 512\nDumpWSIndex = 0\nDockOrder = 0x123\nListWidthPix[0] = 561\nListWidthPix[1] = 446\nListWidthPix[2] = 382\nFontName = System\nFontSize = -16\nMainWindow = 307, 106, 1712, 956\n"
  },
  {
    "path": "code16.asm",
    "content": "SEGMENT CODE16 USE16\nORG 0h\n\nmacro break16\n{\n\txchg bx,bx\n}\n\nINCLUDE 'himem16.asm'\nINCLUDE 'unreal.asm'\nINCLUDE 'page16.asm'\nINCLUDE 'acpi16.asm'\nINCLUDE 'thread16.asm'\nINCLUDE 'opcodes.asm'\n\n\nmacro EnterProtected ofs32 = Start32,codeseg = code32_idx,noinits = 0\n{\n    mov ax,noinits\n\tcmp ax,1\n\tjz .noinitg\n\tmov ax,DATA16\n\tmov ds,ax\n\tcall far CODE16:GDTInit\n\tcall far CODE16:IDTInit\n\tcall far CODE16:IDTInit64\n\t.noinitg:\n\tcli\n\tmov bx,gdt_start\n\tlgdt [bx]\n\tmov bx,idt_PM_start\n\n\t; = NO DEBUG HERE =\n\tlidt [bx]\n\tmov eax,cr0\n\tor al,1\n\tmov cr0,eax \n\n\t; gs load with linear data so DMMI knows\n\tmov ax,page32_idx\n\tmov gs,ax\n\n\tdb  066h  \n\tdb  0eah \n\tdd  ofs32\n\tdw  codeseg\n\n\tNOP ; never executed\n}\n\n\nINCLUDE 'int16.asm'\n\n; --------------------------------------- This is where the application starts ---------------------------------------\nstart16:\n\n; --------------------------------------- Initialization of our segments ---------------------------------------\ncli\n\n; Overriden by HEAP 0 in entry.asm\n;mov ax,0x4A00\n;mov bx,ENDS\n;int 0x21\n\n\n\nmov ax,DATA16\nmov ds,ax\nmov es,ax\nmov ax,STACK16\nmov sp,stack16_end\nmov ss,ax\nsti\nmov bx,idt_RM_start\nsidt [bx] \n\n; --------------------------------------- HIMEM.SYS test ---------------------------------------\n\ncall himemthere\nmov edx,1024\ncall allochigh\nmov dx,cx\ncall freehigh\n\n; --------------------------------------- A20 line  ---------------------------------------\n\nmov [ds:a20enabled],0\ncall CheckA20\njc A20AlreadyOn\ncall EnableA20\nmov [ds:a20enabled],1\nA20AlreadyOn:\n\n; --------------------------------------- Opcode tests ---------------------------------------\ncall OpcodeTest\n\n\n; --------------------------------------- Prepare Long Mode  ---------------------------------------\n\nif TEST_LONG > 0 \n\n; Supported?\nmov [LongModeSupported],0\nmov eax, 0x80000000 \ncpuid\ncmp eax, 0x80000001\njb .NoLongMode         \nmov [LongModeSupported],1\nmov dx,supportlm\nmov ax,0x0900\nint 0x21\n\nxor eax,eax\nmov ax,CODE64\nshl eax,4\nadd eax,Start64\npush fs\nmov bx,CODE32\nmov fs,bx\nmov dword [fs:PutLinearStart64],eax\npop fs\n\n; And Page 1GB Support\nmov [Support1GBPaging],0\nmov eax,80000001h\ncpuid\nbt edx,26\njnc .no1gbpg\nmov [Support1GBPaging],1\nmov dx,support1gb\nmov ax,0x0900\nint 0x21\n.no1gbpg:\n.NoLongMode:\n\nend if\n\n\n\n\n; --------------------------------------- Protected Mode Find Page Entry  ---------------------------------------\nxor ecx,ecx\n\n; Alloc 32 Pages high, preserve low ram\nmov edx,1024*100\ncall allochigh\nmov [Paging32InXMSH],cx\nmov [Paging32InXMS],edi\n\nLoopPMR:\nxor eax,eax\nmov eax,[Paging32InXMS]\n\nadd eax,ecx\nmov ebx,eax\nshr eax,12\nshl eax,12\ncmp eax,ebx\njz LoopPRMFound\ninc ecx\njmp LoopPMR\nLoopPRMFound:\nmov [PhysicalPagingOffset32],eax\n\n\n; --------------------------------------- Long Mode Find Page Entry  ---------------------------------------\nif TEST_LONG > 0 \n\n; Alloc 64 Pages high, preserve low ram\nmov edx,1024*100\ncall allochigh\nmov [Paging64InXMSH],cx\nmov [Paging64InXMS],edi\n\n\nxor ecx,ecx\nLoopPMR2:\nxor eax,eax\nmov eax,[Paging64InXMS]\nadd eax,ecx\nmov ebx,eax\nshr eax,12\nshl eax,12\ncmp eax,ebx\njz LoopPRMFound2\ninc ecx\njmp LoopPMR2\nLoopPRMFound2:\nmov [PhysicalPagingOffset64],eax\n\n\nend if\n\n; --------------------------------------- VMX EPT Find Page Entry  ---------------------------------------\nif TEST_VMX > 0 \n\n\nmov [VMXSupported],0\nmov [VMXUnrestrictedSupported],0\nmov eax,1\ncpuid\nbt ecx,5\njnc VMX_NotSupported \nmov [VMXSupported],1\nmov dx,supportvm\nmov ax,0x0900\nint 0x21\n\n; Unrestricted guest also\nxor eax,eax\nxor edx,edx\nmov ecx,0x48B ; IA32_VMX_PROCBASED_CTLS2\nrdmsr\nbt edx,7\njnc VMX_NoUR\n\nmov [VMXUnrestrictedSupported],1\n\nVMX_NoUR:\nVMX_NotSupported:\n\n; Alloc VMX Pages high, preserve low ram\nmov edx,1024*100\ncall allochigh\nmov [PagingVMInXMSH],cx\nmov [PagingVMInXMS],edi\n\nxor ecx,ecx\nLoopPMR5:\nxor eax,eax\n\nmov eax,[PagingVMInXMS]\nadd eax,ecx\nmov ebx,eax\nshr eax,12\nshl eax,12\ncmp eax,ebx\njz LoopPRMFound5\ninc ecx\njmp LoopPMR5\nLoopPRMFound5:\nmov dword [PhysicalEptOffset64],eax\n\n\nend if\n\n; --------------------------------------- Quick Unreal ---------------------------------------\n\n\n\npush cs\ncli\ncall EnterUnreal\nsti\n\npush cs\ncall InitPageTableFor64\n\nmov ax,CODE16\nmov ds,ax\nlinear eax,Thread64P,CODE16\nmov [Thread64Ptr1],eax\nmov ax,CODE64\nmov ds,ax\nlinear eax,Thread64_1a,CODE64\nmov [Thread64Ptr2],eax\nmov ax,CODE16\nmov ds,ax\nlinear eax,BackFromExecutingInterruptLM,CODE64\nmov [Thread64Ptr3],eax\nmov ax,CODE16\nmov ds,ax\nlinear eax,Thread64PV,CODE16\nmov [Thread64Ptr4],eax\nmov ax,CODE16\nmov ds,ax\nlinear eax,UR_Mode_2,CODE16\nmov [Thread64Ptr1V],eax\n\nmov ax,CODE16\nmov ds,ax\nlinear eax,VMX_Init_Structures,CODE64\nmov [cv64_vmxinitstructures],eax\nlinear eax,VMX_Enable,CODE64\nmov [cv64_vmxenable],eax\nlinear eax,VMX_Disable,CODE64\nmov [cv64_vmxdisable],eax\nlinear eax,VMX_Initialize_Host,CODE64\nmov [cv64_vmxinithost],eax\nlinear eax,VMX_Initialize_Guest2,CODE64\nmov [cv64_vmxinitguest2],eax\nlinear eax,VMX_Initialize_UnrestrictedGuest,CODE64\nmov [cv64_vmxinitguest1],eax\nlinear eax,VMX_InitializeEPT,CODE64\nmov [cv64_vmxinitept],eax\nlinear eax,VMX_Initialize_VMX_Controls,CODE64\nmov [cv64_vmxinitcontrols1],eax\nmov [cv64_vmxinitcontrols2],eax\n\n\n; --------------------------------------- Find ACPI  ---------------------------------------\nif TEST_MULTI > 0 \n\nmov ax,DATA16\nmov ds,ax\npush cs\ncall GetMyApic16f\nmov [ds:MainCPUAPIC],bl\n\npush cs\n\ncall FillACPI\ncmp eax,0xFFFFFFFF\njnz .coo\njmp .noacpi\n.coo:\n\ncmp eax, 'XSDT'\njz .ac2\n\nmov eax,'APIC'\npush cs\nmov ecx,4\nmov edi,[RsdtAddress]\ncall FindACPITableX\njmp .eac\n\n.ac2:\nmov eax,'APIC'\npush cs\nmov ecx,8\nmov edi,dword [XsdtAddress]\ncall FindACPITableX\n\n.eac:\ncmp eax,0xFFFFFFFF\njnz .coo2\njmp .noacpi\n.coo2:\npush cs\ncall DumpMadt\n.noacpi:\n\nend if\n\n\n; Resident test /r cmdline\nmov ax,0x6200\nint 0x21\npush ds\nmov ds,bx\nmov al,[0x80]\ncmp al,3\njnz .nores\n\nmov al,[0x82]\ncmp al,'/'\njnz .nores\nmov al,[0x83]\ncmp al,'r'\njnz .nores\n\n; Resident\n    pop ds\n\nif RESIDENT = 0\n\tmov ax,0x4c00\n\tint 0x21\nend if\n\n\t; Check if there first\n\tmov ax,0x35F0\n\tint 0x21\n\tcmp dword [es:bx + 2],'dmmi'\n\tjz .yres\n\tjmp .fres\n\n\t.yres:\n\tmov ax,0\n\tint 0xF0\n\tcmp ax,0xFACE\n\tjnz .fres\n\n\tmov ax,DATA16\n\tmov ds,ax\n    mov ax,0x0900\n\tmov dx,resm2\n\tint 0x21\n\t\n\tmov ax,0x4C00\n\tint 0x21\n\t\n\n\n\t.fres:\n    mov ax,0x35F0\n\tint 0x21\n\tmov ax,DATA16\n\tmov ds,ax\n\tmov [of0s],es\n\tmov [of0o],bx\n\n\tmov ax,CODE16\n\tmov ds,ax\n    mov ax,0x25F0\n\tmov dx,int16\n\tint 0x21\n\n\tmov ax,DATA16\n\tmov ds,ax\n    mov ax,0x0900\n\tmov dx,resm\n\tint 0x21\n\t\n\tmov dx,ENDS\n\tmov ax,0x3100\n\tint 0x21\n\n\n\n.nores:\npop ds\n\n\n\n; --------------------------------------- Protected Mode Test ---------------------------------------\n\nEnterProtected\n \n; --------------------------------------- Exit ---------------------------------------\n\nexit16:\nmov     eax,cr0         \nand     al,not 1        \nmov     cr0,eax         \ndb      0eah\ndw      flush_ipq,CODE16\nflush_ipq:\nmov     ax,STACK16 \nmov     ss,ax\nmov     sp,stack16_end\nmov ax, DATA16\nmov     ds,ax\nmov     es,ax\nmov     di,idt_RM_start\nlidt    [di]\nsti\n; = END NO DEBUG HERE =\n\n; Free Paging 32 bit reserved in XMS\nmov dx,[Paging32InXMSH]\ncall freehigh\n\n; Free Paging 64 bit reserved in XMS\nmov dx,[Paging64InXMSH]\ncall freehigh\n\n; Free Paging VM bit reserved in XMS\nmov dx,[PagingVMInXMSH]\ncall freehigh\n\n; --------------------------------------- Quick Unreal ---------------------------------------\npush cs\ncli\ncall EnterUnreal\nsti\n\nif TEST_LONG > 0 \n; Restore screen (long mode bug) -- Fixed :)\n;mov ax,3\n;int 10h\nend if\n\n\n\n\n; --------------------------------------- ACPI tests ---------------------------------------\nif TEST_MULTI > 0 \nif TEST_RM_SIPI > 0 \n\n\nqlock16 mut_1\nqlock16 mut_1\nqlock16 mut_1\nqlock16 mut_1\n\nxor eax,eax\nmov ax,DATA16\nmov ds,ax\nlinear eax,Thread16_1,CODE16\nmov ebx,1\ncall far CODE16:SendSIPIf\n\nxor eax,eax\nmov ax,DATA16\nmov ds,ax\nlinear eax,Thread16_2,CODE16\nmov ebx,2\ncall far CODE16:SendSIPIf\n\nxor eax,eax\nmov ax,DATA16\nmov ds,ax\nlinear eax,Thread32_1,CODE32\nmov ebx,3\ncall far CODE16:SendSIPIf\n\nxor eax,eax\nmov ax,DATA16\nmov ds,ax\nlinear eax,Thread64_1,CODE64\nmov ebx,1 ; Back to 1 core\ncall far CODE16:SendSIPIf\n\n\nmov ax,mut_1\npush cs\ncall qwait16\nmov ax,mut_1\npush cs\ncall qwait16\nmov ax,mut_1\npush cs\ncall qwait16\nmov ax,mut_1\npush cs\ncall qwait16\n\nend if\nend if\n\n\n\n; --------------------------------------- Tests ---------------------------------------\n\n\n\nif TEST_MULTI > 0 \n\n; NumCpus\nxor cx,cx\nmov cl,[ds:numcpus]\n.cpul:\ncmp cx,0\nje .endr\ndec cx\nmov ax,0900h\nmov dx,cpuf\nint 21h\njmp .cpul\n.endr:\nmov ax,0900h\nmov dx,crlf\nint 21h\n\n\nend if\n\npush cs\ncall EnterUnreal\n\nif TEST_MULTI > 0 \n\n; Apic test\ncmp dword [ds:RsdtAddress],0\njz .noa1\nmov ax,0900h\nmov dx,ap1\nint 21h\nmov edi, [ds:RsdtAddress]\npush cs\nmov ecx,4\ncall DumpAll\nmov ax,0900h\nmov dx,crlf\nint 21h\n.noa1:\n\ncmp dword [ds:XsdtAddress],0\njz .noa2\nmov ax,0900h\nmov dx,ap2\nint 21h\nmov edi, dword [ds:XsdtAddress]\nmov ecx,8\npush cs \ncall DumpAll\nmov ax,0900h\nmov dx,crlf\nint 21h\n.noa2:\n\n\nmacro thrtest too,msg\n{\n    local .fx\n\tmov ax,DATA16\n\tmov gs,ax\n\tcmp [gs:too],1\n\tjnz .fx\n\tmov dx,msg\n\tmov ax,0900h\n\tint 21h\n\t.fx:\n}\n\nthrtest FromThread1,thr1\nthrtest FromThread2,thr2\nthrtest FromThread3,thr3\nthrtest FromThread4,thr4\nthrtest FromThread5,thr5\nthrtest FromThread6,thr6\nmov ax,0x900\nmov dx,crlf\nint 0x21\n\nend if\n\n; Real mode test\nmov ax,0900h\nmov dx,rm1\nint 21h\n\n; PM mode test\n\nmov ax,DATA32\nmov gs,ax\ncmp [gs:d32],1\njnz fail_1\nmov dx,pm1\nmov ax,0900h\nint 21h\nfail_1:\n\nif TEST_LONG > 0 \n\n; Long mode test\nmov ax,DATA64\nmov gs,ax\ncmp [gs:d64],1\njnz fail_2\nmov dx,lm1\nmov ax,0900h\nint 21h\nfail_2:\n\nend if\n\n; VMX test\nmacro vmxshow vmt,vmm\n{\n    local .ffx\n\tcmp [vmt],1\n\tjnz .ffx\n\tmov dx,vmm\n\tmov ax,0900h\n\tint 21h\n\t.ffx:\n}\nvmxshow vmt1,vmm1\nvmxshow vmt2,vmm2\nvmxshow vmt3,vmm2\n\n\nmov ax,0900h\nmov dx,crlf\nint 21h\n\n; A20 off if enabled\n\ncmp [ds:a20enabled],1\njnz SkipA20Disable\n\nmov ax,0900h\nmov dx,a20off\nint 21h\n\ncall DisableA20\nSkipA20Disable:\n\n; --------------------------------------- Bye! ---------------------------------------\nmov ax,4c00h\nint 21h\n\n"
  },
  {
    "path": "code32.asm",
    "content": "; --------------------------------------- 32 bit Code ---------------------------------------\nSEGMENT CODE32 USE32\nORG 0h\n\nmacro break32\n{\n\txchg bx,bx\n}\n\n\n\n; --------------------------------------- One interrupt definition ---------------------------------------\nintr00:\n\tIRETD\n\nINCLUDE 'acpi32.asm'\nINCLUDE 'page32.asm'\ninclude 'thread32.asm'\nINCLUDE 'int32.asm'\n\n\n; --------------------------------------- Entry Point ---------------------------------------\nStart32:\n\tmov     ax,stack32_idx          \n\tmov     ss,ax                   \n\tmov     esp,stack32_end  \n\tmov     ax,data32_idx           \n\tmov     ds,ax\n\tmov     es,ax\n\tmov     ax,data16_idx\n\tmov     gs,ax\n\tmov     fs,ax\n\t;jmp ToBack16\n\t\n; --------------------------------------- Data stuff ---------------------------------------\n\tmov eax,1\n\tmov [ds:d32],eax\n\tmov ebx,[ds:d32]\n\n; --------------------------------------- Interrupt Test ---------------------------------------\n\tint 0x0;\n\n; --------------------------------------- SIPI to real mode test ---------------------------------------\nif TEST_PM_SIPI > 0 \n\nqlock32 mut_1\n\nxor eax,eax\nmov ax,data16_idx\nmov ds,ax\nlinear eax,Thread16_3,CODE16\nmov ebx,1\npush cs\ncall SendSIPI32f\n\nmov ax,mut_1\npush cs\ncall qwait32\n\n\nend if\n\n; --------------------------------------- LLDT ---------------------------------------\n\tmov ax,ldt_idx\n\tlldt ax\n\tmov ax,data32_ldt_idx\n\tmov gs,ax\n\tpush ds\n\tpop gs \n\n; --------------------------------------- Page Tests---------------------------------------\n\tcall InitPageTable32a\n\tmov ax,data16_idx\n\tpush gs\n\tmov gs,ax\n\tmov edx,[gs:PhysicalPagingOffset32]\n\tpop gs\n\n\tmov CR3,edx\n\tmov eax,cr4\n\tbts eax,4\n\tmov cr4,eax\n\tmov eax, cr0\n\tor eax,80000000h\n\tmov cr0, eax\n\t; Paging is now enabled\n\tnop\n\tnop\n\tnop\n\t; Disable Paging\n\tmov eax, cr0 ; Read CR0.\n\tand eax,7FFFFFFFh; Set PE=0\n\tmov cr0, eax ; Write CR0.\n;\tjmp ToBack16\n\n; --------------------------------------- Prepare Long Mode ---------------------------------------\nif TEST_LONG > 0 \n    \nif TEST_LM_SIPI > 0 \n    \n\tmov ax,data16_idx\n\tpush gs\n\tmov gs,ax\n\tmov dl,[gs:Support1GBPaging]\n\tmov dh,[gs:LongModeSupported]\n\tpop gs\n\tcmp dh,1\n\tjnz ToBack16\n\tcmp dl,1\n\tjnz .no1GB\n\tcall InitPageTable643 ; 1gb pages, map entire 4gb\n\tjmp .okPaging\n\t.no1GB:\n\tcall InitPageTable642 ; Small pages\n\nelse\n\tcall InitPageTable642\nend if\n\n\t.okPaging:\n    ; Enable PAE\n    mov eax, cr4\n    bts eax, 5\n    mov cr4, eax\n    \n\t; Load new page table\n   \tmov ax,data16_idx\n\tpush gs\n\tmov gs,ax\n\tmov edx,[gs:PhysicalPagingOffset64]\n\tpop gs\n    mov cr3,edx\n\n\t; Enable Long Mode\n    mov ecx, 0c0000080h ; EFER MSR number. \n    rdmsr ; Read EFER.\n    bts eax, 8 ; Set LME=1.\n    wrmsr ; Write EFER.\n\t; Enable Paging to activate Long Mode\n    mov eax, cr0 ; Read CR0.\n    or eax,80000000h ; Set PE=1.\n    mov cr0, eax ; Write CR0.\n\tnop\n\tnop\n\tnop\n        \n\t; We are now in Long Mode / Compatibility mode\n    ; Jump to an 64-bit segment to enable 64-bit mode\n    db 0eah\n    PutLinearStart64 dd 0\n    dw code64_idx\nelse\n    jmp ToBack16\nend if \n\n; --------------------------------------- Back from Long Mode ---------------------------------------\nBack32:\n; We are now in Compatibility mode again\n\tmov     ax,stack32_idx          \n\tmov     ss,ax                   \n\tmov     esp,stack32_end  \n\tmov     ax,data32_idx           \n\tmov     ds,ax\n\tmov     es,ax\n\tmov     ax,data16_idx\n\tmov     gs,ax\n\tmov     fs,ax\n\n; Disable Paging to get out of Long Mode\n\tmov eax, cr0\n\tand eax,7fffffffh \n\tmov cr0, eax\n  \n; Deactivate Long Mode\n\tmov ecx, 0c0000080h\n\trdmsr\n\tbtc eax, 8\n\twrmsr\n \n; Disable PAE\n\tmov eax, cr4\n\tbtc eax, 5\n\tmov cr4, eax\n\n; --------------------------------------- Back to Real mode ---------------------------------------\nToBack16:\n; = Give FS the abs32 segment\n; To test unreal mode \n\tmov ax,absd32_idx\n\tmov fs,ax\n\n; Go back\n\tdb 066h ; because we are in a 32bit segment\n\tdb 0eah\n\tdw exit16\n\tdw code16_idx\n\n\n"
  },
  {
    "path": "code64.asm",
    "content": "; --------------------------------------- 64 bit Code ---------------------------------------\nSEGMENT CODE64 USE64\nORG 0h\n\n\nmacro break64\n{\n\txchg bx,bx\n}\n\ninclude 'guest64.asm'\ninclude 'acpi64.asm'\ninclude 'thread64.asm'\nINCLUDE 'int64.asm'\ninclude 'vmxhost64.asm'\n\n; --------------------------------------- One interrupt definition ---------------------------------------\nintr6400:\n    nop\n\tnop\n\tIRETQ\n\nStart64:\n\n\txor r8d,r8d\n\tlinear rsp,stack64_end  \n\tpush rax\n\tmov rax,0\n\tpop rax\n\n\t; access d64 using linear, ds not used\n\txor rax,rax\n\tmov ax,DATA64\n\tshl rax,4\n\tadd rax,d64\n\tmov byte [rax],1\n\n\n; --------------------------------------- Interrupt Test ---------------------------------------\n   linear rax,idt_LM_start\n   lidt [rax]\n   int 0x1;\n\n; --------------------------------------- SIPI to real mode test ---------------------------------------\nif TEST_LM_SIPI > 0 \n\n\tqlock64 mut_1\n\n\tlinear rax,Thread16_4,CODE16\n\tmov rbx,1\n\tcall SendSIPI64\n\t\n\tmov rax,mut_1\n\tcall qwait64\n\nend if\n\nif TEST_VMX > 0\n; VMX operations\n\n\tcall VMX_Host\n\nend if \n\n\t; Back to Compatibility Mode\n\tpush code32_idx\n\txor rcx,rcx\n\tmov ecx,Back32\n\tpush rcx\n\tretf\n\n\n\n"
  },
  {
    "path": "config.asm",
    "content": "TEST_LONG = 1\nTEST_MULTI = 1\nTEST_RM_SIPI = 1\nTEST_PM_SIPI = 1\nTEST_LM_SIPI = 1\nTEST_VMX = 1\n\nRESIDENT = 1\n\n\nVDEBUG = 0\nMDEBUG = 0\n\n"
  },
  {
    "path": "data16.asm",
    "content": "SEGMENT DATA16 USE16\n\n\n\n; --------------------------------------- 16 bit data ---------------------------------------\na20enabled db 0\nnumcpus db 0\nsomecpu A_CPU 0,0,0,0\ncpusstructize = $-(somecpu)\nCpusOfs:\ncpus db cpusstructize*64 dup(0)\nMainCPUAPIC db 0\nLocalApic dd 0xFEE00000\nRsdtAddress dd 0\nXsdtAddress dq 0\nProcedureStart dd 0\nFromThread1 db 0 \nFromThread2 db 0 \nFromThread3 db 0 \nFromThread4 db 0 \nFromThread5 db 0 \nFromThread6 db 0 \nof0s dw 0\nof0o dw 0\n\nLongModeSupported db 0\nSupport1GBPaging db 0 \nVMXSupported db 0 \nVMXUnrestrictedSupported db 0\n\nPaging32InXMS dd 0\nPaging32InXMSH dw 0\n\nPaging64InXMS dd 0\nPaging64InXMSH dw 0\n\nPagingVMInXMS dd 0\nPagingVMInXMSH dw 0\n\n; --------------------------------------- VMX tests---------------------------------------\nvmt1 db 0 ; existence\nvmt2 db 0 ; protected mode guest\nvmt3 db 0 ; unrestricted guest\n\nvmm1 db \"[VMX] \",\"$\"\nvmm2 db \"[VMX Launch] \",\"$\"\n\n; --------------------------------------- 16 bit mutexes ---------------------------------------\nmut_ipi db 0xFF\nmut_1 db 0xFF\nmut_i21 db 0xFF\n\n; --------------------------------------- Messages ---------------------------------------\nrm1 db \"[Real mode] \",\"$\"\npm1 db \"[Protected mode] \",\"$\"\nlm1 db \"[Long mode] \",\"$\"\nap1 db \"Apic 1 found \",\"$\"\nap2 db \"Apic 2 found \",\"$\"\n\ncpuf db \"CPU $\"\nthrm1 db \"Message from real mode thread\",0dh,0ah,\"$\"\nthrm2 db \"Message from real mode thread called from protected mode\",0dh,0ah,\"$\"\nthrm3 db \"Message from real mode thread called from long mode\",0dh,0ah,\"$\"\nthr1 db \"[T1 RM] $\"\nthr2 db \"[T2 RM] $\"\nthr3 db \"[T3 PM->RM] $\"\nthr4 db \"[T4 LM->RM] $\"\nthr5 db \"[T5 RM->PM] $\"\nthr6 db \"[T6 RM->LM] $\"\n\nresm db \"DMMI Server Active\",0dh,0ah,\"$\"\nresm2 db \"DMMI Server Already installed\",0dh,0ah,\"$\"\n\na20off db \"Restoring A20\",0dh,0ah,\"$\"\n\ncrlf db 0dh,0ah,\"$\"\n\n\n; --------------------------------------- GDT ---------------------------------------\ngdt_start dw gdt_size\ngdt_ptr dd 0\ndummy_descriptor   GDT_STR 0,0,0,0,0,0\ncode32_descriptor  GDT_STR 0ffffh,0,0,9ah,0cfh,0 ; 4GB 32-bit code , 9ah = 10011010b = Present, DPL 00,No System, Code Exec/Read. 0cfh access = 11001111b = Big,32bit,<resvd 0>,1111 more size\ndata32_descriptor  GDT_STR 0ffffh,0,0,92h,0cfh,0 ; 4GB 32-bit data,   92h = 10010010b = Presetn , DPL 00, No System, Data Read/Write\nstack32_descriptor GDT_STR 0ffffh,0,0,92h,0cfh,0 ; 4GB 32-bit stack\ncode16_descriptor  GDT_STR 0ffffh,0,0,9ah,0,0    ; 64k 16-bit code\ndata16_descriptor  GDT_STR 0ffffh,0,0,92h,0,0    ; 64k 16-bit data\nstack16_descriptor GDT_STR 0ffffh,0,0,92h,0,0    ; 64k 16-bit data\nldt_descriptor     GDT_STR ldt_size,0,0,82h,0,0  ; pointer to LDT,  82h = 10000010b = Present, DPL 00, System , Type \"0010b\" = LDT entry\ncode64_descriptor  GDT_STR 0ffffh,0,0,9ah,0afh,0 ; 16TB 64-bit code, 08cfh access = 01001111b = Big,64bit (0), 1111 more size\npage32_descriptor  GDT_STR 0ffffh,0,0,92h,0cfh,0 ; 4GB 32-bit data,   92h = 10010010b = Presetn , DPL 00, No System, Data Read/Write\npage64_descriptor  GDT_STR 0ffffh,0,0,92h,0cfh,0 ; 4GB 32-bit data,   92h = 10010010b = Presetn , DPL 00, No System, Data Read/Write\nabsd32_descriptor  GDT_STR 0ffffh,0,0,92h,0cfh,0 ; 4GB 32-bit data,   92h = 10010010b = Presetn , DPL 00, No System, Data Read/Write\ndata64_descriptor  GDT_STR 0ffffh,0,0,92h,0afh,0 ; 16TB 64-bit data, 08cfh access = 10001111b = Big,64bit (0), 1111 more size\nabsd64_descriptor  GDT_STR 0ffffh,0,0,92h,0afh,0 ; 16TB 64-bit data, 08cfh access = 10001111b = Big,64bit (0), 1111 more size\ntssd32_descriptor  GDT_STR 0h,0,0,89h,040h,0 ; TSS segment in GDT\nvmx32_descriptor   GDT_STR 0ffffh,0,0,9ah,0cfh,0 ; 4GB 32-bit code , 9ah = 10011010b = Present, DPL 00,No System, Code Exec/Read. 0cfh access = 11001111b = Big,32bit,<resvd 0>,1111 more size\nraw32_descriptor   GDT_STR 0ffffh,0,0,9ah,0cfh,0 ; 4GB 32-bit code , 9ah = 10011010b = Present, DPL 00,No System, Code Exec/Read. 0cfh access = 11001111b = Big,32bit,<resvd 0>,1111 more size\ntssd64_descriptor  GDT_STR 0h,0,0,89h,040h,0 ; TSS segment in GDT\ngdt_size = $-(dummy_descriptor)\n\ndummy_idx       = 0h    ; dummy selector\ncode32_idx      =       08h             ; offset of 32-bit code  segment in GDT\ndata32_idx      =       10h             ; offset of 32-bit data  segment in GDT\nstack32_idx     =       18h             ; offset of 32-bit stack segment in GDT\ncode16_idx      =       20h             ; offset of 16-bit code segment in GDT\ndata16_idx      =       28h             ; offset of 16-bit data segment in GDT\nstack16_idx     =       30h             ; offset of 16-bit stack segment in GDT\nldt_idx         =       38h             ; offset of LDT in GDT\ncode64_idx      =       40h             ; offset of 64-bit code segment in GDT\npage32_idx      =       48h             ; offset of 32-bit data segment in GDT\npage64_idx      =       50h             ; offset of 64-bit data segment in GDT\nabsd32_idx      =       58h             ; offset of 32-bit data  segment in GDT\ndata64_idx      =       60h             ; offset of 64-bit data segment in GDT\nabsd64_idx      =       68h             ; offset of 64-bit data segment in GDT\ntssd32_idx      =       70h             ; TSS descriptor\nvmx32_idx       =       78h             ; offset of 32-bit code  segment in GDT\nraw32_idx       =       80h             ; offset of 32-bit code  segment in GDT\ntssd64_idx      =       88h             ; TSS descriptor\n\ndata32_ldt_idx  =       04h             ; offset of 32-bit data  segment in LDT\n\n\n; And For Quick Unreal\ngdt_startUNR dw gdt_sizeUNR\ngdt_ptrUNR dd 0\ndummy_descriptorUNR GDT_STR 0,0,0,0,0,0\ncode16_descriptorUNR  GDT_STR 0ffffh,0,0,9ah,0,0\ndata32_descriptorUNR  GDT_STR 0ffffh,0,0,92h,0cfh,0\ngdt_sizeUNR = $-(dummy_descriptorUNR)\n\n\n; --------------------------------------- IDT ---------------------------------------\n\nidt_RM_start      dw 0\nidt_RM_ptr dd 0\n\nidt_PM_start      dw             idt_size\nidt_PM_ptr dd 0\ninterruptsall rb 256*8\n;interruptsall IDT_STR 0,0,0,0,0\n; rb 256 * 8\nidt_size=$-(interruptsall)\n\n\nidt_LM_start      dw             idtl_size\nidt_LM_ptr db 0 dup(8)\ninterruptsall64 rb 256*16\nidtl_size=$-(interruptsall64)\n\n\n\n; --------------------------------------- PAGE ---------------------------------------\nPhysicalPagingOffset32 dd 0\nPhysicalPagingOffset64 dd 0\nPhysicalEptOffset64 dq 0\n\n; --------------------------------------- Supported ---------------------------------------\nsupportlm db \"[Long Mode] \",\"$\"\nsupport1gb db \"[1GB Paging] \",\"$\"\nsupportvm db \"[VM] \",0x0d,0x0a,\"$\"\n;supportvmu db \"VM Unrestricted Supported\",0x0d,0x0a,\"$\"\n\n; --- DISM\ndismdata db 1000 dup (0) ; 1 type byte, 2 length, 3+data\ndismdatac dd 0\ndismdata2 db 2000 dup (0) ; Result\n"
  },
  {
    "path": "data32.asm",
    "content": "; --------------------------------------- 32 bit Data ---------------------------------------\nSEGMENT DATA32 USE32\n\nldt_start:\nldt_1_descriptor  GDT_STR 0ffffh,0,0,92h,0cfh,0 ; 4GB 32-bit data\nldt_size=$-(ldt_1_descriptor)\n; unlike the GDT , LDT does not have a 6-byte header to indicate its absolute address and limit ; these are specified into its GDT entry.\n      \ntssdata db 2048 dup (0) ; for some empty TSS\nd32 dd 0\n\n\n; --------------------------------------- MOVEMENTS FOR INT0xF0 ---------------------------------------\nFrom32To16Regs db 64 dup (0)\n\n\n"
  },
  {
    "path": "data64.asm",
    "content": "; --------------------------------------- 64 bit Data ---------------------------------------\nSEGMENT DATA64 USE64\nORG 0\n\nd64 db 0\n\n\nSEGMENT VMXDATA64 USE64\n\n; --------------------------------------- VMX Data ---------------------------------------\nALIGN 4096\nVMXStructureData db 20000 dup (0)\nVMXStructureData1 dq 0 ; Used for VMXON\nVMXStructureData2 dq 0 ; First VMCS\n;VMXStructureData3 dq 0 ; Second VMCS\nVMXRevision dd 0 ; Save Revision here\nVMXStructureSize dd 0 ; Save structure size here\n\n; Temp Data\nTempData db 128 dup(0)\n\n\n\n; --------------------------------------- MOVEMENTS FOR INT0xF0 ---------------------------------------\nFrom64To16Regs db 64 dup (0)\n\n; --------------------------------------- 64 bit Data another segment---------------------------------------\nSEGMENT ABSD64 USE64\n\n\n"
  },
  {
    "path": "debuggee.asm",
    "content": "FORMAT MZ\nHEAP 0\n\nmacro linear reg,trg,seg = DATA16\n\t{\n\tmov reg,seg\n\tshl reg,4\n\tadd reg,trg\n\t}\nstruc GDT_STR s0_15,b0_15,b16_23,flags,access,b24_31\n        {\n\t\t.s0_15   dw s0_15\n\t\t.b0_15   dw b0_15\n\t\t.b16_23  db b16_23\n\t\t.flags   db flags\n\t\t.access  db access\n\t\t.b24_31  db b24_31\n        }\n\n\n\nsegment DATA16\nUSE16\n\n; And For Quick Unreal\ngdt_startUNR dw gdt_sizeUNR\ngdt_ptrUNR dd 0\ndummy_descriptorUNR GDT_STR 0,0,0,0,0,0\ncode16_descriptorUNR  GDT_STR 0ffffh,0,0,9ah,0,0\ndata32_descriptorUNR  GDT_STR 0ffffh,0,0,92h,0cfh,0\ngdt_sizeUNR = $-(dummy_descriptorUNR)\n\n\n\n\n; main\nsegment CODE16\nUSE16\n\nm1 db \"Hello\",0xD,0xA,\"$\"\n\ninclude 'unreal.asm'\n\nstart16:\n    mov ax,CODE16\n\tmov ds,ax\n\tmov ax,0x0900\n\tmov dx,m1\n\tint 0x21\n\tnop\n\tnop\n\n\t; Enter Unreal\n\t;call EnterUnreal\n\t\n\tmov ax,0x4C00\n\tint 0x21\n\nSEGMENT ENDS \nentry CODE16:start16\n\n\n"
  },
  {
    "path": "directlong.asm",
    "content": "\n\nmacro thread64header brk=0\n{\n   local nobrk\n\n\tUSE16 \n\t; Remember CPU starts in real mode\n\tdb 4096 dup (144) ; // fill NOPs\n\n\tcli\n\n\t\n\n\n\t; Stack\n\tmov ax,STACK16T5\n\tmov ss,ax\n\tmov sp,stack16t5_end\n\n\t; A20\n\tcall FAR CODE16:EnableA20f\n\n\t; Unreal\n\tcall FAR CODE16:EnterUnreal\n\n\n\t; GDT and IDT\n\tmov ax,DATA16\n\tmov ds,ax\n\tcall far CODE16:GDTInit\n\tcall far CODE16:IDTInit\n\tcall far CODE16:IDTInit64\n\tmov bx,gdt_start\n\tlgdt [bx]\n\n\n\t; Prepare Paging\n\tnop\n\tnop\n\tcall FAR CODE16:InitPageTableFor64\n\n\n\t; Spurious, APIC\t\t\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x0F0\n\tMOV EDX,[FS:EDI]\n\tOR EDX,0x1FF\n\tpush dword 0\n\tpop fs\n\tMOV [FS:EDI],EDX\n\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x0B0\n\tMOV dword [FS:EDI],0\n\n\t; Breakpoint\n\tmov ax,brk\n\tcmp ax,1\n\tjnz nobrk\n\txchg bx,bx\n\tnobrk:\n\n\n\t; Enter Long Mode\n    mov eax, cr4\n    bts eax, 5\n    mov cr4, eax\n    \n\t; Load new page table\n   \tmov ax,DATA16\n\tpush gs\n\tmov gs,ax\n\tmov edx,[gs:PhysicalPagingOffset64]\n\tpop gs\n    mov cr3,edx\n    \n\t; Enable Long Mode\n    mov ecx, 0c0000080h ; EFER MSR number. \n    rdmsr ; Read EFER.\n    bts eax, 8 ; Set LME=1.\n    wrmsr ; Write EFER.\n\n\t; Enable both PM and Paging to activate Long Mode from Real Mode\n    mov eax, cr0 ; Read CR0.\n    or eax,80000000h ; Set PE=1.\n\tor eax,1 ; Also PM=1\n    mov cr0, eax ; Write CR0.\n\tnop\n\tnop\n\tnop\n\n\t\n\t\n\n\t; We are now in Long Mode / Compatibility mode\n    ; Jump to an 64-bit segment to enable 64-bit mode\n\n}\n"
  },
  {
    "path": "dis/Makefile.am",
    "content": "#\n# -- udis86/libudis86\n#\n\nPYTHON  = @PYTHON@\nOPTABLE = @top_srcdir@/docs/x86/optable.xml\n\nMAINTAINERCLEANFILES = Makefile.in\n\nlib_LTLIBRARIES\t= libudis86.la\n\nlibudis86_la_SOURCES =\t\\\n    itab.c \\\n    decode.c \\\n    syn.c \\\n    syn-intel.c \\\n    syn-att.c \\\n    udis86.c \\\n\tudint.h \\\n    syn.h \\\n    decode.h\n\ninclude_ladir = ${includedir}/libudis86\ninclude_la_HEADERS = \\\n    types.h \\\n    extern.h \\\n    itab.h\n\n\nBUILT_SOURCES = \\\n    itab.c \\\n    itab.h\n\n#\n# DLLs may not contain undefined symbol references.  \n# We have the linker check this explicitly.\n#\nif TARGET_WINDOWS\nlibudis86_la_LDFLAGS = -no-undefined -version-info 0:0:0\nendif\n\nitab.c itab.h: $(OPTABLE) \\\n\t\t\t   $(top_srcdir)/scripts/ud_itab.py \\\n               $(top_srcdir)/scripts/ud_opcode.py \\\n               $(top_srcdir)/scripts/ud_optable.py\n\t$(PYTHON) $(top_srcdir)/scripts/ud_itab.py $(OPTABLE) $(srcdir)\n\n\nclean-local:\n\trm -rf $(BUILT_SOURCES)\n\nmaintainer-clean-local:\n"
  },
  {
    "path": "dis/Makefile.in",
    "content": "# Makefile.in generated by automake 1.13.1 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994-2012 Free Software Foundation, Inc.\n\n# This Makefile.in is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\n@SET_MAKE@\n\n#\n# -- udis86/libudis86\n#\n\n\nVPATH = @srcdir@\nam__make_dryrun = \\\n  { \\\n    am__dry=no; \\\n    case $$MAKEFLAGS in \\\n      *\\\\[\\ \\\t]*) \\\n        echo 'am--echo: ; @echo \"AM\"  OK' | $(MAKE) -f - 2>/dev/null \\\n          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \\\n      *) \\\n        for am__flg in $$MAKEFLAGS; do \\\n          case $$am__flg in \\\n            *=*|--*) ;; \\\n            *n*) am__dry=yes; break;; \\\n          esac; \\\n        done;; \\\n    esac; \\\n    test $$am__dry = yes; \\\n  }\npkgdatadir = $(datadir)/@PACKAGE@\npkgincludedir = $(includedir)/@PACKAGE@\npkglibdir = $(libdir)/@PACKAGE@\npkglibexecdir = $(libexecdir)/@PACKAGE@\nam__cd = CDPATH=\"$${ZSH_VERSION+.}$(PATH_SEPARATOR)\" && cd\ninstall_sh_DATA = $(install_sh) -c -m 644\ninstall_sh_PROGRAM = $(install_sh) -c\ninstall_sh_SCRIPT = $(install_sh) -c\nINSTALL_HEADER = $(INSTALL_DATA)\ntransform = $(program_transform_name)\nNORMAL_INSTALL = :\nPRE_INSTALL = :\nPOST_INSTALL = :\nNORMAL_UNINSTALL = :\nPRE_UNINSTALL = :\nPOST_UNINSTALL = :\nbuild_triplet = @build@\nhost_triplet = @host@\nsubdir = libudis86\nDIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \\\n\t$(top_srcdir)/build/depcomp $(include_la_HEADERS)\nACLOCAL_M4 = $(top_srcdir)/aclocal.m4\nam__aclocal_m4_deps = $(top_srcdir)/build/m4/libtool.m4 \\\n\t$(top_srcdir)/build/m4/ltoptions.m4 \\\n\t$(top_srcdir)/build/m4/ltsugar.m4 \\\n\t$(top_srcdir)/build/m4/ltversion.m4 \\\n\t$(top_srcdir)/build/m4/lt~obsolete.m4 \\\n\t$(top_srcdir)/m4/ax_compare_version.m4 \\\n\t$(top_srcdir)/m4/ax_prog_sphinx_version.m4 \\\n\t$(top_srcdir)/m4/ax_prog_yasm_version.m4 \\\n\t$(top_srcdir)/m4/ax_with_prog.m4 \\\n\t$(top_srcdir)/m4/ax_with_python.m4 $(top_srcdir)/configure.ac\nam__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \\\n\t$(ACLOCAL_M4)\nmkinstalldirs = $(install_sh) -d\nCONFIG_HEADER = $(top_builddir)/config.h\nCONFIG_CLEAN_FILES =\nCONFIG_CLEAN_VPATH_FILES =\nam__vpath_adj_setup = srcdirstrip=`echo \"$(srcdir)\" | sed 's|.|.|g'`;\nam__vpath_adj = case $$p in \\\n    $(srcdir)/*) f=`echo \"$$p\" | sed \"s|^$$srcdirstrip/||\"`;; \\\n    *) f=$$p;; \\\n  esac;\nam__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;\nam__install_max = 40\nam__nobase_strip_setup = \\\n  srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*|]/\\\\\\\\&/g'`\nam__nobase_strip = \\\n  for p in $$list; do echo \"$$p\"; done | sed -e \"s|$$srcdirstrip/||\"\nam__nobase_list = $(am__nobase_strip_setup); \\\n  for p in $$list; do echo \"$$p $$p\"; done | \\\n  sed \"s| $$srcdirstrip/| |;\"' / .*\\//!s/ .*/ ./; s,\\( .*\\)/[^/]*$$,\\1,' | \\\n  $(AWK) 'BEGIN { files[\".\"] = \"\" } { files[$$2] = files[$$2] \" \" $$1; \\\n    if (++n[$$2] == $(am__install_max)) \\\n      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = \"\" } } \\\n    END { for (dir in files) print dir, files[dir] }'\nam__base_list = \\\n  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\\n/ /g' | \\\n  sed '$$!N;$$!N;$$!N;$$!N;s/\\n/ /g'\nam__uninstall_files_from_dir = { \\\n  test -z \"$$files\" \\\n    || { test ! -d \"$$dir\" && test ! -f \"$$dir\" && test ! -r \"$$dir\"; } \\\n    || { echo \" ( cd '$$dir' && rm -f\" $$files \")\"; \\\n         $(am__cd) \"$$dir\" && rm -f $$files; }; \\\n  }\nam__installdirs = \"$(DESTDIR)$(libdir)\" \"$(DESTDIR)$(include_ladir)\"\nLTLIBRARIES = $(lib_LTLIBRARIES)\nlibudis86_la_LIBADD =\nam_libudis86_la_OBJECTS = itab.lo decode.lo syn.lo syn-intel.lo \\\n\tsyn-att.lo udis86.lo\nlibudis86_la_OBJECTS = $(am_libudis86_la_OBJECTS)\nAM_V_lt = $(am__v_lt_@AM_V@)\nam__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)\nam__v_lt_0 = --silent\nam__v_lt_1 = \nlibudis86_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \\\n\t$(libudis86_la_LDFLAGS) $(LDFLAGS) -o $@\nAM_V_P = $(am__v_P_@AM_V@)\nam__v_P_ = $(am__v_P_@AM_DEFAULT_V@)\nam__v_P_0 = false\nam__v_P_1 = :\nAM_V_GEN = $(am__v_GEN_@AM_V@)\nam__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)\nam__v_GEN_0 = @echo \"  GEN     \" $@;\nam__v_GEN_1 = \nAM_V_at = $(am__v_at_@AM_V@)\nam__v_at_ = $(am__v_at_@AM_DEFAULT_V@)\nam__v_at_0 = @\nam__v_at_1 = \nDEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)\ndepcomp = $(SHELL) $(top_srcdir)/build/depcomp\nam__depfiles_maybe = depfiles\nam__mv = mv -f\nCOMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \\\n\t$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)\nLTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \\\n\t$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \\\n\t$(AM_CFLAGS) $(CFLAGS)\nAM_V_CC = $(am__v_CC_@AM_V@)\nam__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)\nam__v_CC_0 = @echo \"  CC      \" $@;\nam__v_CC_1 = \nCCLD = $(CC)\nLINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \\\n\t$(AM_LDFLAGS) $(LDFLAGS) -o $@\nAM_V_CCLD = $(am__v_CCLD_@AM_V@)\nam__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)\nam__v_CCLD_0 = @echo \"  CCLD    \" $@;\nam__v_CCLD_1 = \nSOURCES = $(libudis86_la_SOURCES)\nDIST_SOURCES = $(libudis86_la_SOURCES)\nam__can_run_installinfo = \\\n  case $$AM_UPDATE_INFO_DIR in \\\n    n|no|NO) false;; \\\n    *) (install-info --version) >/dev/null 2>&1;; \\\n  esac\nHEADERS = $(include_la_HEADERS)\nam__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)\n# Read a list of newline-separated strings from the standard input,\n# and print each of them once, without duplicates.  Input order is\n# *not* preserved.\nam__uniquify_input = $(AWK) '\\\n  BEGIN { nonempty = 0; } \\\n  { items[$$0] = 1; nonempty = 1; } \\\n  END { if (nonempty) { for (i in items) print i; }; } \\\n'\n# Make sure the list of sources is unique.  This is necessary because,\n# e.g., the same source file might be shared among _SOURCES variables\n# for different programs/libraries.\nam__define_uniq_tagged_files = \\\n  list='$(am__tagged_files)'; \\\n  unique=`for i in $$list; do \\\n    if test -f \"$$i\"; then echo $$i; else echo $(srcdir)/$$i; fi; \\\n  done | $(am__uniquify_input)`\nETAGS = etags\nCTAGS = ctags\nDISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\nACLOCAL = @ACLOCAL@\nACLOCAL_AMFLAGS = @ACLOCAL_AMFLAGS@\nAMTAR = @AMTAR@\nAM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@\nAR = @AR@\nAS = @AS@\nAUTOCONF = @AUTOCONF@\nAUTOHEADER = @AUTOHEADER@\nAUTOMAKE = @AUTOMAKE@\nAWK = @AWK@\nCC = @CC@\nCCDEPMODE = @CCDEPMODE@\nCFLAGS = @CFLAGS@\nCPP = @CPP@\nCPPFLAGS = @CPPFLAGS@\nCYGPATH_W = @CYGPATH_W@\nDEFS = @DEFS@\nDEPDIR = @DEPDIR@\nDLLTOOL = @DLLTOOL@\nDSYMUTIL = @DSYMUTIL@\nDUMPBIN = @DUMPBIN@\nECHO_C = @ECHO_C@\nECHO_N = @ECHO_N@\nECHO_T = @ECHO_T@\nEGREP = @EGREP@\nEXEEXT = @EXEEXT@\nFGREP = @FGREP@\nGREP = @GREP@\nINSTALL = @INSTALL@\nINSTALL_DATA = @INSTALL_DATA@\nINSTALL_PROGRAM = @INSTALL_PROGRAM@\nINSTALL_SCRIPT = @INSTALL_SCRIPT@\nINSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@\nLD = @LD@\nLDFLAGS = @LDFLAGS@\nLIBOBJS = @LIBOBJS@\nLIBS = @LIBS@\nLIBTOOL = @LIBTOOL@\nLIPO = @LIPO@\nLN_S = @LN_S@\nLTLIBOBJS = @LTLIBOBJS@\nMAKEINFO = @MAKEINFO@\nMANIFEST_TOOL = @MANIFEST_TOOL@\nMKDIR_P = @MKDIR_P@\nNM = @NM@\nNMEDIT = @NMEDIT@\nOBJDUMP = @OBJDUMP@\nOBJEXT = @OBJEXT@\nOTOOL = @OTOOL@\nOTOOL64 = @OTOOL64@\nPACKAGE = @PACKAGE@\nPACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@\nPACKAGE_NAME = @PACKAGE_NAME@\nPACKAGE_STRING = @PACKAGE_STRING@\nPACKAGE_TARNAME = @PACKAGE_TARNAME@\nPACKAGE_URL = @PACKAGE_URL@\nPACKAGE_VERSION = @PACKAGE_VERSION@\nPATH_SEPARATOR = @PATH_SEPARATOR@\nPYTHON = @PYTHON@\nRANLIB = @RANLIB@\nSED = @SED@\nSET_MAKE = @SET_MAKE@\nSHELL = @SHELL@\nSPHINX_BUILD = @SPHINX_BUILD@\nSPHINX_VERSION = @SPHINX_VERSION@\nSTRIP = @STRIP@\nVERSION = @VERSION@\nYASM = @YASM@\nYASM_VERSION = @YASM_VERSION@\nabs_builddir = @abs_builddir@\nabs_srcdir = @abs_srcdir@\nabs_top_builddir = @abs_top_builddir@\nabs_top_srcdir = @abs_top_srcdir@\nac_ct_AR = @ac_ct_AR@\nac_ct_CC = @ac_ct_CC@\nac_ct_DUMPBIN = @ac_ct_DUMPBIN@\nam__include = @am__include@\nam__leading_dot = @am__leading_dot@\nam__quote = @am__quote@\nam__tar = @am__tar@\nam__untar = @am__untar@\nbindir = @bindir@\nbuild = @build@\nbuild_alias = @build_alias@\nbuild_cpu = @build_cpu@\nbuild_os = @build_os@\nbuild_vendor = @build_vendor@\nbuilddir = @builddir@\ndatadir = @datadir@\ndatarootdir = @datarootdir@\ndocdir = @docdir@\ndvidir = @dvidir@\nexec_prefix = @exec_prefix@\nhost = @host@\nhost_alias = @host_alias@\nhost_cpu = @host_cpu@\nhost_os = @host_os@\nhost_vendor = @host_vendor@\nhtmldir = @htmldir@\nincludedir = @includedir@\ninfodir = @infodir@\ninstall_sh = @install_sh@\nlibdir = @libdir@\nlibexecdir = @libexecdir@\nlocaledir = @localedir@\nlocalstatedir = @localstatedir@\nmandir = @mandir@\nmkdir_p = @mkdir_p@\noldincludedir = @oldincludedir@\npdfdir = @pdfdir@\nprefix = @prefix@\nprogram_transform_name = @program_transform_name@\npsdir = @psdir@\nsbindir = @sbindir@\nsharedstatedir = @sharedstatedir@\nsrcdir = @srcdir@\nsysconfdir = @sysconfdir@\ntarget_alias = @target_alias@\ntop_build_prefix = @top_build_prefix@\ntop_builddir = @top_builddir@\ntop_srcdir = @top_srcdir@\nOPTABLE = @top_srcdir@/docs/x86/optable.xml\nMAINTAINERCLEANFILES = Makefile.in\nlib_LTLIBRARIES = libudis86.la\nlibudis86_la_SOURCES = \\\n    itab.c \\\n    decode.c \\\n    syn.c \\\n    syn-intel.c \\\n    syn-att.c \\\n    udis86.c \\\n\tudint.h \\\n    syn.h \\\n    decode.h\n\ninclude_ladir = ${includedir}/libudis86\ninclude_la_HEADERS = \\\n    types.h \\\n    extern.h \\\n    itab.h\n\nBUILT_SOURCES = \\\n    itab.c \\\n    itab.h\n\n\n#\n# DLLs may not contain undefined symbol references.  \n# We have the linker check this explicitly.\n#\n@TARGET_WINDOWS_TRUE@libudis86_la_LDFLAGS = -no-undefined -version-info 0:0:0\nall: $(BUILT_SOURCES)\n\t$(MAKE) $(AM_MAKEFLAGS) all-am\n\n.SUFFIXES:\n.SUFFIXES: .c .lo .o .obj\n$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)\n\t@for dep in $?; do \\\n\t  case '$(am__configure_deps)' in \\\n\t    *$$dep*) \\\n\t      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \\\n\t        && { if test -f $@; then exit 0; else break; fi; }; \\\n\t      exit 1;; \\\n\t  esac; \\\n\tdone; \\\n\techo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libudis86/Makefile'; \\\n\t$(am__cd) $(top_srcdir) && \\\n\t  $(AUTOMAKE) --foreign libudis86/Makefile\n.PRECIOUS: Makefile\nMakefile: $(srcdir)/Makefile.in $(top_builddir)/config.status\n\t@case '$?' in \\\n\t  *config.status*) \\\n\t    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \\\n\t  *) \\\n\t    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \\\n\t    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \\\n\tesac;\n\n$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n\n$(top_srcdir)/configure:  $(am__configure_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(ACLOCAL_M4):  $(am__aclocal_m4_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(am__aclocal_m4_deps):\n\ninstall-libLTLIBRARIES: $(lib_LTLIBRARIES)\n\t@$(NORMAL_INSTALL)\n\t@list='$(lib_LTLIBRARIES)'; test -n \"$(libdir)\" || list=; \\\n\tlist2=; for p in $$list; do \\\n\t  if test -f $$p; then \\\n\t    list2=\"$$list2 $$p\"; \\\n\t  else :; fi; \\\n\tdone; \\\n\ttest -z \"$$list2\" || { \\\n\t  echo \" $(MKDIR_P) '$(DESTDIR)$(libdir)'\"; \\\n\t  $(MKDIR_P) \"$(DESTDIR)$(libdir)\" || exit 1; \\\n\t  echo \" $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'\"; \\\n\t  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 \"$(DESTDIR)$(libdir)\"; \\\n\t}\n\nuninstall-libLTLIBRARIES:\n\t@$(NORMAL_UNINSTALL)\n\t@list='$(lib_LTLIBRARIES)'; test -n \"$(libdir)\" || list=; \\\n\tfor p in $$list; do \\\n\t  $(am__strip_dir) \\\n\t  echo \" $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'\"; \\\n\t  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f \"$(DESTDIR)$(libdir)/$$f\"; \\\n\tdone\n\nclean-libLTLIBRARIES:\n\t-test -z \"$(lib_LTLIBRARIES)\" || rm -f $(lib_LTLIBRARIES)\n\t@list='$(lib_LTLIBRARIES)'; \\\n\tlocs=`for p in $$list; do echo $$p; done | \\\n\t      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \\\n\t      sort -u`; \\\n\ttest -z \"$$locs\" || { \\\n\t  echo rm -f $${locs}; \\\n\t  rm -f $${locs}; \\\n\t}\nlibudis86.la: $(libudis86_la_OBJECTS) $(libudis86_la_DEPENDENCIES) $(EXTRA_libudis86_la_DEPENDENCIES) \n\t$(AM_V_CCLD)$(libudis86_la_LINK) -rpath $(libdir) $(libudis86_la_OBJECTS) $(libudis86_la_LIBADD) $(LIBS)\n\nmostlyclean-compile:\n\t-rm -f *.$(OBJEXT)\n\ndistclean-compile:\n\t-rm -f *.tab.c\n\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/decode.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itab.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syn-att.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syn-intel.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syn.Plo@am__quote@\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/udis86.Plo@am__quote@\n\n.c.o:\n@am__fastdepCC_TRUE@\t$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<\n@am__fastdepCC_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po\n@AMDEP_TRUE@@am__fastdepCC_FALSE@\t$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCC_FALSE@\tDEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCC_FALSE@\t$(AM_V_CC@am__nodep@)$(COMPILE) -c $<\n\n.c.obj:\n@am__fastdepCC_TRUE@\t$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`\n@am__fastdepCC_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po\n@AMDEP_TRUE@@am__fastdepCC_FALSE@\t$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCC_FALSE@\tDEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCC_FALSE@\t$(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`\n\n.c.lo:\n@am__fastdepCC_TRUE@\t$(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<\n@am__fastdepCC_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo\n@AMDEP_TRUE@@am__fastdepCC_FALSE@\t$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCC_FALSE@\tDEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCC_FALSE@\t$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<\n\nmostlyclean-libtool:\n\t-rm -f *.lo\n\nclean-libtool:\n\t-rm -rf .libs _libs\ninstall-include_laHEADERS: $(include_la_HEADERS)\n\t@$(NORMAL_INSTALL)\n\t@list='$(include_la_HEADERS)'; test -n \"$(include_ladir)\" || list=; \\\n\tif test -n \"$$list\"; then \\\n\t  echo \" $(MKDIR_P) '$(DESTDIR)$(include_ladir)'\"; \\\n\t  $(MKDIR_P) \"$(DESTDIR)$(include_ladir)\" || exit 1; \\\n\tfi; \\\n\tfor p in $$list; do \\\n\t  if test -f \"$$p\"; then d=; else d=\"$(srcdir)/\"; fi; \\\n\t  echo \"$$d$$p\"; \\\n\tdone | $(am__base_list) | \\\n\twhile read files; do \\\n\t  echo \" $(INSTALL_HEADER) $$files '$(DESTDIR)$(include_ladir)'\"; \\\n\t  $(INSTALL_HEADER) $$files \"$(DESTDIR)$(include_ladir)\" || exit $$?; \\\n\tdone\n\nuninstall-include_laHEADERS:\n\t@$(NORMAL_UNINSTALL)\n\t@list='$(include_la_HEADERS)'; test -n \"$(include_ladir)\" || list=; \\\n\tfiles=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \\\n\tdir='$(DESTDIR)$(include_ladir)'; $(am__uninstall_files_from_dir)\n\nID: $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); mkid -fID $$unique\ntags: tags-am\nTAGS: tags\n\ntags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\tset x; \\\n\there=`pwd`; \\\n\t$(am__define_uniq_tagged_files); \\\n\tshift; \\\n\tif test -z \"$(ETAGS_ARGS)$$*$$unique\"; then :; else \\\n\t  test -n \"$$unique\" || unique=$$empty_fix; \\\n\t  if test $$# -gt 0; then \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      \"$$@\" $$unique; \\\n\t  else \\\n\t    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t      $$unique; \\\n\t  fi; \\\n\tfi\nctags: ctags-am\n\nCTAGS: ctags\nctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); \\\n\ttest -z \"$(CTAGS_ARGS)$$unique\" \\\n\t  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \\\n\t     $$unique\n\nGTAGS:\n\there=`$(am__cd) $(top_builddir) && pwd` \\\n\t  && $(am__cd) $(top_srcdir) \\\n\t  && gtags -i $(GTAGS_ARGS) \"$$here\"\ncscopelist: cscopelist-am\n\ncscopelist-am: $(am__tagged_files)\n\tlist='$(am__tagged_files)'; \\\n\tcase \"$(srcdir)\" in \\\n\t  [\\\\/]* | ?:[\\\\/]*) sdir=\"$(srcdir)\" ;; \\\n\t  *) sdir=$(subdir)/$(srcdir) ;; \\\n\tesac; \\\n\tfor i in $$list; do \\\n\t  if test -f \"$$i\"; then \\\n\t    echo \"$(subdir)/$$i\"; \\\n\t  else \\\n\t    echo \"$$sdir/$$i\"; \\\n\t  fi; \\\n\tdone >> $(top_builddir)/cscope.files\n\ndistclean-tags:\n\t-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags\n\ndistdir: $(DISTFILES)\n\t@srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\ttopsrcdirstrip=`echo \"$(top_srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\tlist='$(DISTFILES)'; \\\n\t  dist_files=`for file in $$list; do echo $$file; done | \\\n\t  sed -e \"s|^$$srcdirstrip/||;t\" \\\n\t      -e \"s|^$$topsrcdirstrip/|$(top_builddir)/|;t\"`; \\\n\tcase $$dist_files in \\\n\t  */*) $(MKDIR_P) `echo \"$$dist_files\" | \\\n\t\t\t   sed '/\\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \\\n\t\t\t   sort -u` ;; \\\n\tesac; \\\n\tfor file in $$dist_files; do \\\n\t  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \\\n\t  if test -d $$d/$$file; then \\\n\t    dir=`echo \"/$$file\" | sed -e 's,/[^/]*$$,,'`; \\\n\t    if test -d \"$(distdir)/$$file\"; then \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \\\n\t      cp -fpR $(srcdir)/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t      find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t    fi; \\\n\t    cp -fpR $$d/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t  else \\\n\t    test -f \"$(distdir)/$$file\" \\\n\t    || cp -p $$d/$$file \"$(distdir)/$$file\" \\\n\t    || exit 1; \\\n\t  fi; \\\n\tdone\ncheck-am: all-am\ncheck: $(BUILT_SOURCES)\n\t$(MAKE) $(AM_MAKEFLAGS) check-am\nall-am: Makefile $(LTLIBRARIES) $(HEADERS)\ninstalldirs:\n\tfor dir in \"$(DESTDIR)$(libdir)\" \"$(DESTDIR)$(include_ladir)\"; do \\\n\t  test -z \"$$dir\" || $(MKDIR_P) \"$$dir\"; \\\n\tdone\ninstall: $(BUILT_SOURCES)\n\t$(MAKE) $(AM_MAKEFLAGS) install-am\ninstall-exec: install-exec-am\ninstall-data: install-data-am\nuninstall: uninstall-am\n\ninstall-am: all-am\n\t@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am\n\ninstallcheck: installcheck-am\ninstall-strip:\n\tif test -z '$(STRIP)'; then \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t      install; \\\n\telse \\\n\t  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t    install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t    \"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'\" install; \\\n\tfi\nmostlyclean-generic:\n\nclean-generic:\n\ndistclean-generic:\n\t-test -z \"$(CONFIG_CLEAN_FILES)\" || rm -f $(CONFIG_CLEAN_FILES)\n\t-test . = \"$(srcdir)\" || test -z \"$(CONFIG_CLEAN_VPATH_FILES)\" || rm -f $(CONFIG_CLEAN_VPATH_FILES)\n\nmaintainer-clean-generic:\n\t@echo \"This command is intended for maintainers to use\"\n\t@echo \"it deletes files that may require special tools to rebuild.\"\n\t-test -z \"$(BUILT_SOURCES)\" || rm -f $(BUILT_SOURCES)\n\t-test -z \"$(MAINTAINERCLEANFILES)\" || rm -f $(MAINTAINERCLEANFILES)\nclean: clean-am\n\nclean-am: clean-generic clean-libLTLIBRARIES clean-libtool clean-local \\\n\tmostlyclean-am\n\ndistclean: distclean-am\n\t-rm -rf ./$(DEPDIR)\n\t-rm -f Makefile\ndistclean-am: clean-am distclean-compile distclean-generic \\\n\tdistclean-tags\n\ndvi: dvi-am\n\ndvi-am:\n\nhtml: html-am\n\nhtml-am:\n\ninfo: info-am\n\ninfo-am:\n\ninstall-data-am: install-include_laHEADERS\n\ninstall-dvi: install-dvi-am\n\ninstall-dvi-am:\n\ninstall-exec-am: install-libLTLIBRARIES\n\ninstall-html: install-html-am\n\ninstall-html-am:\n\ninstall-info: install-info-am\n\ninstall-info-am:\n\ninstall-man:\n\ninstall-pdf: install-pdf-am\n\ninstall-pdf-am:\n\ninstall-ps: install-ps-am\n\ninstall-ps-am:\n\ninstallcheck-am:\n\nmaintainer-clean: maintainer-clean-am\n\t-rm -rf ./$(DEPDIR)\n\t-rm -f Makefile\nmaintainer-clean-am: distclean-am maintainer-clean-generic \\\n\tmaintainer-clean-local\n\nmostlyclean: mostlyclean-am\n\nmostlyclean-am: mostlyclean-compile mostlyclean-generic \\\n\tmostlyclean-libtool\n\npdf: pdf-am\n\npdf-am:\n\nps: ps-am\n\nps-am:\n\nuninstall-am: uninstall-include_laHEADERS uninstall-libLTLIBRARIES\n\n.MAKE: all check install install-am install-strip\n\n.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \\\n\tclean-libLTLIBRARIES clean-libtool clean-local cscopelist-am \\\n\tctags ctags-am distclean distclean-compile distclean-generic \\\n\tdistclean-libtool distclean-tags distdir dvi dvi-am html \\\n\thtml-am info info-am install install-am install-data \\\n\tinstall-data-am install-dvi install-dvi-am install-exec \\\n\tinstall-exec-am install-html install-html-am \\\n\tinstall-include_laHEADERS install-info install-info-am \\\n\tinstall-libLTLIBRARIES install-man install-pdf install-pdf-am \\\n\tinstall-ps install-ps-am install-strip installcheck \\\n\tinstallcheck-am installdirs maintainer-clean \\\n\tmaintainer-clean-generic maintainer-clean-local mostlyclean \\\n\tmostlyclean-compile mostlyclean-generic mostlyclean-libtool \\\n\tpdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \\\n\tuninstall-include_laHEADERS uninstall-libLTLIBRARIES\n\n\nitab.c itab.h: $(OPTABLE) \\\n\t\t\t   $(top_srcdir)/scripts/ud_itab.py \\\n               $(top_srcdir)/scripts/ud_opcode.py \\\n               $(top_srcdir)/scripts/ud_optable.py\n\t$(PYTHON) $(top_srcdir)/scripts/ud_itab.py $(OPTABLE) $(srcdir)\n\nclean-local:\n\trm -rf $(BUILT_SOURCES)\n\nmaintainer-clean-local:\n\n# Tell versions [3.59,3.63) of GNU make to not export all variables.\n# Otherwise a system limit (for SysV at least) may be exceeded.\n.NOEXPORT:\n"
  },
  {
    "path": "dis/d.lb1",
    "content": "+'decode.obj'\n+'itab.obj'\n+'syn-att.obj'\n+'syn-intel.obj'\n+'syn.obj'\n+'udis86.obj'\n"
  },
  {
    "path": "dis/d.mk",
    "content": "project : F:\\TOOLS\\ASM\\full2\\dis\\d.lib .SYMBOLIC\n\n!include F:\\TOOLS\\ASM\\full2\\dis\\d.mk1\n"
  },
  {
    "path": "dis/d.mk1",
    "content": "!define BLANK \"\"\nF:\\TOOLS\\ASM\\full2\\dis\\decode.obj : F:\\TOOLS\\ASM\\full2\\dis\\decode.c .AUTODEP&\nEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc decode.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\itab.obj : F:\\TOOLS\\ASM\\full2\\dis\\itab.c .AUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc itab.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\syn-att.obj : F:\\TOOLS\\ASM\\full2\\dis\\syn-att.c .AUTOD&\nEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc syn-att.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\syn-intel.obj : F:\\TOOLS\\ASM\\full2\\dis\\syn-intel.c .A&\nUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc syn-intel.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\syn.obj : F:\\TOOLS\\ASM\\full2\\dis\\syn.c .AUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc syn.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\udis86.obj : F:\\TOOLS\\ASM\\full2\\dis\\udis86.c .AUTODEP&\nEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc udis86.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\d.lib : F:\\TOOLS\\ASM\\full2\\dis\\decode.obj F:\\TOOLS\\AS&\nM\\full2\\dis\\itab.obj F:\\TOOLS\\ASM\\full2\\dis\\syn-att.obj F:\\TOOLS\\ASM\\full2\\d&\nis\\syn-intel.obj F:\\TOOLS\\ASM\\full2\\dis\\syn.obj F:\\TOOLS\\ASM\\full2\\dis\\udis8&\n6.obj .AUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n %create d.lb1\n!ifneq BLANK \"decode.obj itab.obj syn-att.obj syn-intel.obj syn.obj udis86.o&\nbj\"\n @for %i in (decode.obj itab.obj syn-att.obj syn-intel.obj syn.obj udis86.ob&\nj) do @%append d.lb1 +'%i'\n!endif\n!ifneq BLANK \"\"\n @for %i in () do @%append d.lb1 +'%i'\n!endif\n *wlib -b -c -n -q -p=512 d.lib @d.lb1\n\n"
  },
  {
    "path": "dis/d.tgt",
    "content": "40\ntargetIdent\n0\nMProject\n1\nMComponent\n0\n2\nWString\n3\nLIB\n3\nWString\n5\nd_6sn\n1\n0\n1\n4\nMCommand\n0\n5\nMCommand\n0\n6\nMItem\n5\nd.lib\n7\nWString\n3\nLIB\n8\nWVList\n0\n9\nWVList\n0\n-1\n1\n1\n0\n10\nWPickList\n7\n11\nMItem\n3\n*.c\n12\nWString\n4\nCOBJ\n13\nWVList\n0\n14\nWVList\n0\n-1\n1\n1\n0\n15\nMItem\n8\ndecode.c\n16\nWString\n4\nCOBJ\n17\nWVList\n0\n18\nWVList\n0\n11\n1\n1\n0\n19\nMItem\n6\nitab.c\n20\nWString\n4\nCOBJ\n21\nWVList\n0\n22\nWVList\n0\n11\n1\n1\n0\n23\nMItem\n9\nsyn-att.c\n24\nWString\n4\nCOBJ\n25\nWVList\n0\n26\nWVList\n0\n11\n1\n1\n0\n27\nMItem\n11\nsyn-intel.c\n28\nWString\n4\nCOBJ\n29\nWVList\n0\n30\nWVList\n0\n11\n1\n1\n0\n31\nMItem\n5\nsyn.c\n32\nWString\n4\nCOBJ\n33\nWVList\n0\n34\nWVList\n0\n11\n1\n1\n0\n35\nMItem\n8\nudis86.c\n36\nWString\n4\nCOBJ\n37\nWVList\n0\n38\nWVList\n0\n11\n1\n1\n0\n"
  },
  {
    "path": "dis/d.wpj",
    "content": "40\nprojectIdent\n0\nVpeMain\n1\nWRect\n0\n0\n7680\n9210\n2\nMProject\n3\nMCommand\n0\n4\nMCommand\n0\n1\n5\nWFileName\n5\nd.tgt\n6\nWVList\n1\n7\nVComponent\n8\nWRect\n0\n0\n5666\n4280\n0\n0\n9\nWFileName\n5\nd.tgt\n0\n0\n7\n"
  },
  {
    "path": "dis/decode.c",
    "content": "/* udis86 - libudis86/decode.c\n * \n * Copyright (c) 2002-2009 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"udint.h\"\n#include \"types.h\"\n#include \"decode.h\"\n\n#ifndef __UD_STANDALONE__\n# include <string.h>\n#endif /* __UD_STANDALONE__ */\n\n/* The max number of prefixes to an instruction */\n#define MAX_PREFIXES    15\n\n/* rex prefix bits */\n#define REX_W(r)        ( ( 0xF & ( r ) )  >> 3 )\n#define REX_R(r)        ( ( 0x7 & ( r ) )  >> 2 )\n#define REX_X(r)        ( ( 0x3 & ( r ) )  >> 1 )\n#define REX_B(r)        ( ( 0x1 & ( r ) )  >> 0 )\n#define REX_PFX_MASK(n) ( ( P_REXW(n) << 3 ) | \\\n                          ( P_REXR(n) << 2 ) | \\\n                          ( P_REXX(n) << 1 ) | \\\n                          ( P_REXB(n) << 0 ) )\n\n/* scable-index-base bits */\n#define SIB_S(b)        ( ( b ) >> 6 )\n#define SIB_I(b)        ( ( ( b ) >> 3 ) & 7 )\n#define SIB_B(b)        ( ( b ) & 7 )\n\n/* modrm bits */\n#define MODRM_REG(b)    ( ( ( b ) >> 3 ) & 7 )\n#define MODRM_NNN(b)    ( ( ( b ) >> 3 ) & 7 )\n#define MODRM_MOD(b)    ( ( ( b ) >> 6 ) & 3 )\n#define MODRM_RM(b)     ( ( b ) & 7 )\n\nstatic int decode_ext(struct ud *u, uint16_t ptr);\n\nenum reg_class { /* register classes */\n  REGCLASS_GPR,\n  REGCLASS_MMX,\n  REGCLASS_CR,\n  REGCLASS_DB,\n  REGCLASS_SEG,\n  REGCLASS_XMM\n};\n\n /* \n * inp_start\n *    Should be called before each de-code operation.\n */\nstatic void\ninp_start(struct ud *u)\n{\n  u->inp_ctr = 0;\n}\n\n   \nstatic uint8_t\ninp_next(struct ud *u)\n{\n  if (u->inp_end == 0) {\n    if (u->inp_buf != NULL) {\n      if (u->inp_buf_index < u->inp_buf_size) {\n        u->inp_ctr++;\n        return (u->inp_curr = u->inp_buf[u->inp_buf_index++]);\n      }\n    } else {\n      int c;\n      if ((c = u->inp_hook(u)) != UD_EOI) {\n        u->inp_curr = c;\n        u->inp_sess[u->inp_ctr++] = u->inp_curr;\n        return u->inp_curr;\n      }\n    }\n  }\n  u->inp_end = 1;\n  UDERR(u, \"byte expected, eoi received\\n\");\n  return 0;\n}\n\nstatic uint8_t\ninp_curr(struct ud *u)\n{\n  return u->inp_curr;\n}\n\n\n/*\n * inp_uint8\n * int_uint16\n * int_uint32\n * int_uint64\n *    Load little-endian values from input\n */\nstatic uint8_t \ninp_uint8(struct ud* u)\n{\n  return inp_next(u);\n}\n\nstatic uint16_t \ninp_uint16(struct ud* u)\n{\n  uint16_t r, ret;\n\n  ret = inp_next(u);\n  r = inp_next(u);\n  return ret | (r << 8);\n}\n\nstatic uint32_t \ninp_uint32(struct ud* u)\n{\n  uint32_t r, ret;\n\n  ret = inp_next(u);\n  r = inp_next(u);\n  ret = ret | (r << 8);\n  r = inp_next(u);\n  ret = ret | (r << 16);\n  r = inp_next(u);\n  return ret | (r << 24);\n}\n\nstatic uint64_t \ninp_uint64(struct ud* u)\n{\n  uint64_t r, ret;\n\n  ret = inp_next(u);\n  r = inp_next(u);\n  ret = ret | (r << 8);\n  r = inp_next(u);\n  ret = ret | (r << 16);\n  r = inp_next(u);\n  ret = ret | (r << 24);\n  r = inp_next(u);\n  ret = ret | (r << 32);\n  r = inp_next(u);\n  ret = ret | (r << 40);\n  r = inp_next(u);\n  ret = ret | (r << 48);\n  r = inp_next(u);\n  return ret | (r << 56);\n}\n\n\nstatic inline int\neff_opr_mode(int dis_mode, int rex_w, int pfx_opr)\n{\n  if (dis_mode == 64) {\n    return rex_w ? 64 : (pfx_opr ? 16 : 32);\n  } else if (dis_mode == 32) {\n    return pfx_opr ? 16 : 32;\n  } else {\n    UD_ASSERT(dis_mode == 16);\n    return pfx_opr ? 32 : 16;\n  }\n}\n\n\nstatic inline int\neff_adr_mode(int dis_mode, int pfx_adr)\n{\n  if (dis_mode == 64) {\n    return pfx_adr ? 32 : 64;\n  } else if (dis_mode == 32) {\n    return pfx_adr ? 16 : 32;\n  } else {\n    UD_ASSERT(dis_mode == 16);\n    return pfx_adr ? 32 : 16;\n  }\n}\n\n\n/* \n * decode_prefixes\n *\n *  Extracts instruction prefixes.\n */\nstatic int \ndecode_prefixes(struct ud *u)\n{\n  int done = 0;\n  uint8_t curr, last = 0;\n  UD_RETURN_ON_ERROR(u);\n\n  do {\n    last = curr;\n    curr = inp_next(u); \n    UD_RETURN_ON_ERROR(u);\n    if (u->inp_ctr == MAX_INSN_LENGTH) {\n      UD_RETURN_WITH_ERROR(u, \"max instruction length\");\n    }\n   \n    switch (curr)  \n    {\n    case 0x2E: \n      u->pfx_seg = UD_R_CS; \n      break;\n    case 0x36:     \n      u->pfx_seg = UD_R_SS; \n      break;\n    case 0x3E: \n      u->pfx_seg = UD_R_DS; \n      break;\n    case 0x26: \n      u->pfx_seg = UD_R_ES; \n      break;\n    case 0x64: \n      u->pfx_seg = UD_R_FS; \n      break;\n    case 0x65: \n      u->pfx_seg = UD_R_GS; \n      break;\n    case 0x67: /* adress-size override prefix */ \n      u->pfx_adr = 0x67;\n      break;\n    case 0xF0: \n      u->pfx_lock = 0xF0;\n      break;\n    case 0x66: \n      u->pfx_opr = 0x66;\n      break;\n    case 0xF2:\n      u->pfx_str = 0xf2;\n      break;\n    case 0xF3:\n      u->pfx_str = 0xf3;\n      break;\n    default:\n      /* consume if rex */\n      done = (u->dis_mode == 64 && (curr & 0xF0) == 0x40) ? 0 : 1;\n      break;\n    }\n  } while (!done);\n  /* rex prefixes in 64bit mode, must be the last prefix */\n  if (u->dis_mode == 64 && (last & 0xF0) == 0x40) {\n    u->pfx_rex = last;  \n  }\n  return 0;\n}\n\n\nstatic inline unsigned int modrm( struct ud * u )\n{\n    if ( !u->have_modrm ) {\n        u->modrm = inp_next( u );\n        u->have_modrm = 1;\n    }\n    return u->modrm;\n}\n\n\nstatic unsigned int\nresolve_operand_size( const struct ud * u, unsigned int s )\n{\n    switch ( s ) \n    {\n    case SZ_V:\n        return ( u->opr_mode );\n    case SZ_Z:  \n        return ( u->opr_mode == 16 ) ? 16 : 32;\n    case SZ_Y:\n        return ( u->opr_mode == 16 ) ? 32 : u->opr_mode;\n    case SZ_RDQ:\n        return ( u->dis_mode == 64 ) ? 64 : 32;\n    default:\n        return s;\n    }\n}\n\n\nstatic int resolve_mnemonic( struct ud* u )\n{\n  /* resolve 3dnow weirdness. */\n  if ( u->mnemonic == UD_I3dnow ) {\n    u->mnemonic = ud_itab[ u->le->table[ inp_curr( u )  ] ].mnemonic;\n  }\n  /* SWAPGS is only valid in 64bits mode */\n  if ( u->mnemonic == UD_Iswapgs && u->dis_mode != 64 ) {\n    UDERR(u, \"swapgs invalid in 64bits mode\\n\");\n    return -1;\n  }\n\n  if (u->mnemonic == UD_Ixchg) {\n    if ((u->operand[0].type == UD_OP_REG && u->operand[0].base == UD_R_AX  &&\n         u->operand[1].type == UD_OP_REG && u->operand[1].base == UD_R_AX) ||\n        (u->operand[0].type == UD_OP_REG && u->operand[0].base == UD_R_EAX &&\n         u->operand[1].type == UD_OP_REG && u->operand[1].base == UD_R_EAX)) {\n      u->operand[0].type = UD_NONE;\n      u->operand[1].type = UD_NONE;\n      u->mnemonic = UD_Inop;\n    }\n  }\n\n  if (u->mnemonic == UD_Inop && u->pfx_repe) {\n    u->pfx_repe = 0;\n    u->mnemonic = UD_Ipause;\n  }\n  return 0;\n}\n\n\n/* -----------------------------------------------------------------------------\n * decode_a()- Decodes operands of the type seg:offset\n * -----------------------------------------------------------------------------\n */\nstatic void \ndecode_a(struct ud* u, struct ud_operand *op)\n{\n  if (u->opr_mode == 16) {  \n    /* seg16:off16 */\n    op->type = UD_OP_PTR;\n    op->size = 32;\n    op->lval.ptr.off = inp_uint16(u);\n    op->lval.ptr.seg = inp_uint16(u);\n  } else {\n    /* seg16:off32 */\n    op->type = UD_OP_PTR;\n    op->size = 48;\n    op->lval.ptr.off = inp_uint32(u);\n    op->lval.ptr.seg = inp_uint16(u);\n  }\n}\n\n/* -----------------------------------------------------------------------------\n * decode_gpr() - Returns decoded General Purpose Register \n * -----------------------------------------------------------------------------\n */\nstatic enum ud_type \ndecode_gpr(register struct ud* u, unsigned int s, unsigned char rm)\n{\n  switch (s) {\n    case 64:\n        return UD_R_RAX + rm;\n    case 32:\n        return UD_R_EAX + rm;\n    case 16:\n        return UD_R_AX  + rm;\n    case  8:\n        if (u->dis_mode == 64 && u->pfx_rex) {\n            if (rm >= 4)\n                return UD_R_SPL + (rm-4);\n            return UD_R_AL + rm;\n        } else return UD_R_AL + rm;\n    case 0:\n        /* invalid size in case of a decode error */\n        UD_ASSERT(u->error);\n        return UD_NONE;\n    default:\n        UD_ASSERT(!\"invalid operand size\");\n        return UD_NONE;\n  }\n}\n\nstatic void\ndecode_reg(struct ud *u, \n           struct ud_operand *opr,\n           int type,\n           int num,\n           int size)\n{\n  int reg;\n  size = resolve_operand_size(u, size);\n  switch (type) {\n    case REGCLASS_GPR : reg = decode_gpr(u, size, num); break;\n    case REGCLASS_MMX : reg = UD_R_MM0  + (num & 7); break;\n    case REGCLASS_XMM : reg = UD_R_XMM0 + num; break;\n    case REGCLASS_CR : reg = UD_R_CR0  + num; break;\n    case REGCLASS_DB : reg = UD_R_DR0  + num; break;\n    case REGCLASS_SEG : {\n      /*\n       * Only 6 segment registers, anything else is an error.\n       */\n      if ((num & 7) > 5) {\n        UDERR(u, \"invalid segment register value\\n\");\n        return;\n      } else {\n        reg = UD_R_ES + (num & 7);\n      }\n      break;\n    }\n    default:\n      UD_ASSERT(!\"invalid register type\");\n      return;\n  }\n  opr->type = UD_OP_REG;\n  opr->base = reg;\n  opr->size = size;\n}\n\n\n/*\n * decode_imm \n *\n *    Decode Immediate values.\n */\nstatic void \ndecode_imm(struct ud* u, unsigned int size, struct ud_operand *op)\n{\n  op->size = resolve_operand_size(u, size);\n  op->type = UD_OP_IMM;\n\n  switch (op->size) {\n  case  8: op->lval.sbyte = inp_uint8(u);   break;\n  case 16: op->lval.uword = inp_uint16(u);  break;\n  case 32: op->lval.udword = inp_uint32(u); break;\n  case 64: op->lval.uqword = inp_uint64(u); break;\n  default: return;\n  }\n}\n\n\n/* \n * decode_mem_disp\n *\n *    Decode mem address displacement.\n */\nstatic void \ndecode_mem_disp(struct ud* u, unsigned int size, struct ud_operand *op)\n{\n  switch (size) {\n  case 8:\n    op->offset = 8; \n    op->lval.ubyte  = inp_uint8(u);\n    break;\n  case 16:\n    op->offset = 16; \n    op->lval.uword  = inp_uint16(u); \n    break;\n  case 32:\n    op->offset = 32; \n    op->lval.udword = inp_uint32(u); \n    break;\n  case 64:\n    op->offset = 64; \n    op->lval.uqword = inp_uint64(u); \n    break;\n  default:\n      return;\n  }\n}\n\n\n/*\n * decode_modrm_reg\n *\n *    Decodes reg field of mod/rm byte\n * \n */\nstatic inline void\ndecode_modrm_reg(struct ud         *u, \n                 struct ud_operand *operand,\n                 unsigned int       type,\n                 unsigned int       size)\n{\n  uint8_t reg = (REX_R(u->pfx_rex) << 3) | MODRM_REG(modrm(u));\n  decode_reg(u, operand, type, reg, size);\n}\n\n\n/*\n * decode_modrm_rm\n *\n *    Decodes rm field of mod/rm byte\n * \n */\nstatic void \ndecode_modrm_rm(struct ud         *u, \n                struct ud_operand *op,\n                unsigned char      type,    /* register type */\n                unsigned int       size)    /* operand size */\n\n{\n  size_t offset = 0;\n  unsigned char mod, rm;\n\n  /* get mod, r/m and reg fields */\n  mod = MODRM_MOD(modrm(u));\n  rm  = (REX_B(u->pfx_rex) << 3) | MODRM_RM(modrm(u));\n\n  /* \n   * If mod is 11b, then the modrm.rm specifies a register.\n   *\n   */\n  if (mod == 3) {\n    decode_reg(u, op, type, rm, size);\n    return;\n  }\n\n  /* \n   * !11b => Memory Address\n   */  \n  op->type = UD_OP_MEM;\n  op->size = resolve_operand_size(u, size);\n\n  if (u->adr_mode == 64) {\n    op->base = UD_R_RAX + rm;\n    if (mod == 1) {\n      offset = 8;\n    } else if (mod == 2) {\n      offset = 32;\n    } else if (mod == 0 && (rm & 7) == 5) {           \n      op->base = UD_R_RIP;\n      offset = 32;\n    } else {\n      offset = 0;\n    }\n    /* \n     * Scale-Index-Base (SIB) \n     */\n    if ((rm & 7) == 4) {\n      inp_next(u);\n      \n      op->scale = (1 << SIB_S(inp_curr(u))) & ~1;\n      op->index = UD_R_RAX + (SIB_I(inp_curr(u)) | (REX_X(u->pfx_rex) << 3));\n      op->base  = UD_R_RAX + (SIB_B(inp_curr(u)) | (REX_B(u->pfx_rex) << 3));\n\n      /* special conditions for base reference */\n      if (op->index == UD_R_RSP) {\n        op->index = UD_NONE;\n        op->scale = UD_NONE;\n      }\n\n      if (op->base == UD_R_RBP || op->base == UD_R_R13) {\n        if (mod == 0) {\n          op->base = UD_NONE;\n        } \n        if (mod == 1) {\n          offset = 8;\n        } else {\n          offset = 32;\n        }\n      }\n    }\n  } else if (u->adr_mode == 32) {\n    op->base = UD_R_EAX + rm;\n    if (mod == 1) {\n      offset = 8;\n    } else if (mod == 2) {\n      offset = 32;\n    } else if (mod == 0 && rm == 5) {\n      op->base = UD_NONE;\n      offset = 32;\n    } else {\n      offset = 0;\n    }\n\n    /* Scale-Index-Base (SIB) */\n    if ((rm & 7) == 4) {\n      inp_next(u);\n\n      op->scale = (1 << SIB_S(inp_curr(u))) & ~1;\n      op->index = UD_R_EAX + (SIB_I(inp_curr(u)) | (REX_X(u->pfx_rex) << 3));\n      op->base  = UD_R_EAX + (SIB_B(inp_curr(u)) | (REX_B(u->pfx_rex) << 3));\n\n      if (op->index == UD_R_ESP) {\n        op->index = UD_NONE;\n        op->scale = UD_NONE;\n      }\n\n      /* special condition for base reference */\n      if (op->base == UD_R_EBP) {\n        if (mod == 0) {\n          op->base = UD_NONE;\n        } \n        if (mod == 1) {\n          offset = 8;\n        } else {\n          offset = 32;\n        }\n      }\n    }\n  } else {\n    const unsigned int bases[]   = { UD_R_BX, UD_R_BX, UD_R_BP, UD_R_BP,\n                                     UD_R_SI, UD_R_DI, UD_R_BP, UD_R_BX };\n    const unsigned int indices[] = { UD_R_SI, UD_R_DI, UD_R_SI, UD_R_DI,\n                                     UD_NONE, UD_NONE, UD_NONE, UD_NONE };\n    op->base  = bases[rm & 7];\n    op->index = indices[rm & 7];\n    if (mod == 0 && rm == 6) {\n      offset = 16;\n      op->base = UD_NONE;\n    } else if (mod == 1) {\n      offset = 8;\n    } else if (mod == 2) { \n      offset = 16;\n    }\n  }\n\n  if (offset) {\n    decode_mem_disp(u, offset, op);\n  }\n}\n\n\n/* \n * decode_moffset\n *    Decode offset-only memory operand\n */\nstatic void\ndecode_moffset(struct ud *u, unsigned int size, struct ud_operand *opr)\n{\n  opr->type = UD_OP_MEM;\n  opr->size = resolve_operand_size(u, size);\n  decode_mem_disp(u, u->adr_mode, opr);\n}\n\n\n/* -----------------------------------------------------------------------------\n * decode_operands() - Disassembles Operands.\n * -----------------------------------------------------------------------------\n */\nstatic int\ndecode_operand(struct ud           *u, \n               struct ud_operand   *operand,\n               enum ud_operand_code type,\n               unsigned int         size)\n{\n  operand->_oprcode = type;\n\n  switch (type) {\n    case OP_A :\n      decode_a(u, operand);\n      break;\n    case OP_MR:\n      decode_modrm_rm(u, operand, REGCLASS_GPR, \n                      MODRM_MOD(modrm(u)) == 3 ? \n                        Mx_reg_size(size) : Mx_mem_size(size));\n      break;\n    case OP_F:\n      u->br_far  = 1;\n      /* intended fall through */\n    case OP_M:\n      if (MODRM_MOD(modrm(u)) == 3) {\n        UDERR(u, \"expected modrm.mod != 3\\n\");\n      }\n      /* intended fall through */\n    case OP_E:\n      decode_modrm_rm(u, operand, REGCLASS_GPR, size);\n      break;\n    case OP_G:\n      decode_modrm_reg(u, operand, REGCLASS_GPR, size);\n      break;\n    case OP_sI:\n    case OP_I:\n      decode_imm(u, size, operand);\n      break;\n    case OP_I1:\n      operand->type = UD_OP_CONST;\n      operand->lval.udword = 1;\n      break;\n    case OP_N:\n      if (MODRM_MOD(modrm(u)) != 3) {\n        UDERR(u, \"expected modrm.mod == 3\\n\");\n      }\n      /* intended fall through */\n    case OP_Q:\n      decode_modrm_rm(u, operand, REGCLASS_MMX, size);\n      break;\n    case OP_P:\n      decode_modrm_reg(u, operand, REGCLASS_MMX, size);\n      break;\n    case OP_U:\n      if (MODRM_MOD(modrm(u)) != 3) {\n        UDERR(u, \"expected modrm.mod == 3\\n\");\n      }\n      /* intended fall through */\n    case OP_W:\n      decode_modrm_rm(u, operand, REGCLASS_XMM, size);\n      break;\n    case OP_V:\n      decode_modrm_reg(u, operand, REGCLASS_XMM, size);\n      break;\n    case OP_MU:\n      decode_modrm_rm(u, operand, REGCLASS_XMM, \n                      MODRM_MOD(modrm(u)) == 3 ? \n                        Mx_reg_size(size) : Mx_mem_size(size));\n      break;\n    case OP_S:\n      decode_modrm_reg(u, operand, REGCLASS_SEG, size);\n      break;\n    case OP_O:\n      decode_moffset(u, size, operand);\n      break;\n    case OP_R0: \n    case OP_R1: \n    case OP_R2: \n    case OP_R3: \n    case OP_R4: \n    case OP_R5: \n    case OP_R6: \n    case OP_R7:\n      decode_reg(u, operand, REGCLASS_GPR, \n                 (REX_B(u->pfx_rex) << 3) | (type - OP_R0), size);\n      break;\n    case OP_AL:\n    case OP_AX:\n    case OP_eAX:\n    case OP_rAX:\n      decode_reg(u, operand, REGCLASS_GPR, 0, size);\n      break;\n    case OP_CL:\n    case OP_CX:\n    case OP_eCX:\n      decode_reg(u, operand, REGCLASS_GPR, 1, size);\n      break;\n    case OP_DL:\n    case OP_DX:\n    case OP_eDX:\n      decode_reg(u, operand, REGCLASS_GPR, 2, size);\n      break;\n    case OP_ES: \n    case OP_CS: \n    case OP_DS:\n    case OP_SS: \n    case OP_FS: \n    case OP_GS:\n      /* in 64bits mode, only fs and gs are allowed */\n      if (u->dis_mode == 64) {\n        if (type != OP_FS && type != OP_GS) {\n          UDERR(u, \"invalid segment register in 64bits\\n\");\n        }\n      }\n      operand->type = UD_OP_REG;\n      operand->base = (type - OP_ES) + UD_R_ES;\n      operand->size = 16;\n      break;\n    case OP_J :\n      decode_imm(u, size, operand);\n      operand->type = UD_OP_JIMM;\n      break ;\n    case OP_R :\n      if (MODRM_MOD(modrm(u)) != 3) {\n        UDERR(u, \"expected modrm.mod == 3\\n\");\n      }\n      decode_modrm_rm(u, operand, REGCLASS_GPR, size);\n      break;\n    case OP_C:\n      decode_modrm_reg(u, operand, REGCLASS_CR, size);\n      break;\n    case OP_D:\n      decode_modrm_reg(u, operand, REGCLASS_DB, size);\n      break;\n    case OP_I3 :\n      operand->type = UD_OP_CONST;\n      operand->lval.sbyte = 3;\n      break;\n    case OP_ST0: \n    case OP_ST1: \n    case OP_ST2: \n    case OP_ST3:\n    case OP_ST4:\n    case OP_ST5: \n    case OP_ST6: \n    case OP_ST7:\n      operand->type = UD_OP_REG;\n      operand->base = (type - OP_ST0) + UD_R_ST0;\n      operand->size = 80;\n      break;\n    default :\n      break;\n  }\n  return 0;\n}\n\n\n/* \n * decode_operands\n *\n *    Disassemble upto 3 operands of the current instruction being\n *    disassembled. By the end of the function, the operand fields\n *    of the ud structure will have been filled.\n */\nstatic int\ndecode_operands(struct ud* u)\n{\n  decode_operand(u, &u->operand[0],\n                    u->itab_entry->operand1.type,\n                    u->itab_entry->operand1.size);\n  decode_operand(u, &u->operand[1],\n                    u->itab_entry->operand2.type,\n                    u->itab_entry->operand2.size);\n  decode_operand(u, &u->operand[2],\n                    u->itab_entry->operand3.type,\n                    u->itab_entry->operand3.size);\n  return 0;\n}\n    \n/* -----------------------------------------------------------------------------\n * clear_insn() - clear instruction structure\n * -----------------------------------------------------------------------------\n */\nstatic void\nclear_insn(register struct ud* u)\n{\n  u->error     = 0;\n  u->pfx_seg   = 0;\n  u->pfx_opr   = 0;\n  u->pfx_adr   = 0;\n  u->pfx_lock  = 0;\n  u->pfx_repne = 0;\n  u->pfx_rep   = 0;\n  u->pfx_repe  = 0;\n  u->pfx_rex   = 0;\n  u->pfx_str   = 0;\n  u->mnemonic  = UD_Inone;\n  u->itab_entry = NULL;\n  u->have_modrm = 0;\n  u->br_far    = 0;\n\n  memset( &u->operand[ 0 ], 0, sizeof( struct ud_operand ) );\n  memset( &u->operand[ 1 ], 0, sizeof( struct ud_operand ) );\n  memset( &u->operand[ 2 ], 0, sizeof( struct ud_operand ) );\n}\n\n\nstatic inline int\nresolve_pfx_str(struct ud* u)\n{\n  if (u->pfx_str == 0xf3) {\n    if (P_STR(u->itab_entry->prefix)) {\n        u->pfx_rep  = 0xf3;\n    } else {\n        u->pfx_repe = 0xf3;\n    }\n  } else if (u->pfx_str == 0xf2) {\n    u->pfx_repne = 0xf3;\n  }\n  return 0;\n}\n\n\nstatic int\nresolve_mode( struct ud* u )\n{\n  int default64;\n  /* if in error state, bail out */\n  if ( u->error ) return -1; \n\n  /* propagate prefix effects */\n  if ( u->dis_mode == 64 ) {  /* set 64bit-mode flags */\n\n    /* Check validity of  instruction m64 */\n    if ( P_INV64( u->itab_entry->prefix ) ) {\n      UDERR(u, \"instruction invalid in 64bits\\n\");\n      return -1;\n    }\n\n    /* effective rex prefix is the  effective mask for the \n     * instruction hard-coded in the opcode map.\n     */\n    u->pfx_rex = ( u->pfx_rex & 0x40 ) | \n                 ( u->pfx_rex & REX_PFX_MASK( u->itab_entry->prefix ) ); \n\n    /* whether this instruction has a default operand size of \n     * 64bit, also hardcoded into the opcode map.\n     */\n    default64 = P_DEF64( u->itab_entry->prefix ); \n    /* calculate effective operand size */\n    if ( REX_W( u->pfx_rex ) ) {\n        u->opr_mode = 64;\n    } else if ( u->pfx_opr ) {\n        u->opr_mode = 16;\n    } else {\n        /* unless the default opr size of instruction is 64,\n         * the effective operand size in the absence of rex.w\n         * prefix is 32.\n         */\n        u->opr_mode = default64 ? 64 : 32;\n    }\n\n    /* calculate effective address size */\n    u->adr_mode = (u->pfx_adr) ? 32 : 64;\n  } else if ( u->dis_mode == 32 ) { /* set 32bit-mode flags */\n    u->opr_mode = ( u->pfx_opr ) ? 16 : 32;\n    u->adr_mode = ( u->pfx_adr ) ? 16 : 32;\n  } else if ( u->dis_mode == 16 ) { /* set 16bit-mode flags */\n    u->opr_mode = ( u->pfx_opr ) ? 32 : 16;\n    u->adr_mode = ( u->pfx_adr ) ? 32 : 16;\n  }\n\n  return 0;\n}\n\n\nstatic inline int\ndecode_insn(struct ud *u, uint16_t ptr)\n{\n  UD_ASSERT((ptr & 0x8000) == 0);\n  u->itab_entry = &ud_itab[ ptr ];\n  u->mnemonic = u->itab_entry->mnemonic;\n  return (resolve_pfx_str(u)  == 0 &&\n          resolve_mode(u)     == 0 &&\n          decode_operands(u)  == 0 &&\n          resolve_mnemonic(u) == 0) ? 0 : -1;\n}\n\n\n/*\n * decode_3dnow()\n *\n *    Decoding 3dnow is a little tricky because of its strange opcode\n *    structure. The final opcode disambiguation depends on the last\n *    byte that comes after the operands have been decoded. Fortunately,\n *    all 3dnow instructions have the same set of operand types. So we\n *    go ahead and decode the instruction by picking an arbitrarily chosen\n *    valid entry in the table, decode the operands, and read the final\n *    byte to resolve the menmonic.\n */\nstatic inline int\ndecode_3dnow(struct ud* u)\n{\n  uint16_t ptr;\n  UD_ASSERT(u->le->type == UD_TAB__OPC_3DNOW);\n  UD_ASSERT(u->le->table[0xc] != 0);\n  decode_insn(u, u->le->table[0xc]);\n  inp_next(u); \n  if (u->error) {\n    return -1;\n  }\n  ptr = u->le->table[inp_curr(u)]; \n  UD_ASSERT((ptr & 0x8000) == 0);\n  u->mnemonic = ud_itab[ptr].mnemonic;\n  return 0;\n}\n\n\nstatic int\ndecode_ssepfx(struct ud *u)\n{\n  uint8_t idx;\n  uint8_t pfx;\n \n  /*\n   * String prefixes (f2, f3) take precedence over operand\n   * size prefix (66).\n   */\n  pfx = u->pfx_str;\n  if (pfx == 0) {\n    pfx = u->pfx_opr;\n  }\n  idx = ((pfx & 0xf) + 1) / 2;\n  if (u->le->table[idx] == 0) {\n    idx = 0;\n  }\n  if (idx && u->le->table[idx] != 0) {\n    /*\n     * \"Consume\" the prefix as a part of the opcode, so it is no\n     * longer exported as an instruction prefix.\n     */\n    u->pfx_str = 0;\n    if (pfx == 0x66) {\n        /* \n         * consume \"66\" only if it was used for decoding, leaving\n         * it to be used as an operands size override for some\n         * simd instructions.\n         */\n        u->pfx_opr = 0;\n    }\n  }\n  return decode_ext(u, u->le->table[idx]);\n}\n\n\n/*\n * decode_ext()\n *\n *    Decode opcode extensions (if any)\n */\nstatic int\ndecode_ext(struct ud *u, uint16_t ptr)\n{\n  uint8_t idx = 0;\n  if ((ptr & 0x8000) == 0) {\n    return decode_insn(u, ptr); \n  }\n  u->le = &ud_lookup_table_list[(~0x8000 & ptr)];\n  if (u->le->type == UD_TAB__OPC_3DNOW) {\n    return decode_3dnow(u);\n  }\n\n  switch (u->le->type) {\n    case UD_TAB__OPC_MOD:\n      /* !11 = 0, 11 = 1 */\n      idx = (MODRM_MOD(modrm(u)) + 1) / 4;\n      break;\n      /* disassembly mode/operand size/address size based tables.\n       * 16 = 0,, 32 = 1, 64 = 2\n       */\n    case UD_TAB__OPC_MODE:\n      idx = u->dis_mode != 64 ? 0 : 1;\n      break;\n    case UD_TAB__OPC_OSIZE:\n      idx = eff_opr_mode(u->dis_mode, REX_W(u->pfx_rex), u->pfx_opr) / 32;\n      break;\n    case UD_TAB__OPC_ASIZE:\n      idx = eff_adr_mode(u->dis_mode, u->pfx_adr) / 32;\n      break;\n    case UD_TAB__OPC_X87:\n      idx = modrm(u) - 0xC0;\n      break;\n    case UD_TAB__OPC_VENDOR:\n      if (u->vendor == UD_VENDOR_ANY) {\n        /* choose a valid entry */\n        idx = (u->le->table[idx] != 0) ? 0 : 1;\n      } else if (u->vendor == UD_VENDOR_AMD) {\n        idx = 0;\n      } else {\n        idx = 1;\n      }\n      break;\n    case UD_TAB__OPC_RM:\n      idx = MODRM_RM(modrm(u));\n      break;\n    case UD_TAB__OPC_REG:\n      idx = MODRM_REG(modrm(u));\n      break;\n    case UD_TAB__OPC_SSE:\n      return decode_ssepfx(u);\n    default:\n      UD_ASSERT(!\"not reached\");\n      break;\n  }\n\n  return decode_ext(u, u->le->table[idx]);\n}\n\n\nstatic int\ndecode_opcode(struct ud *u)\n{\n  uint16_t ptr;\n  UD_ASSERT(u->le->type == UD_TAB__OPC_TABLE);\n  UD_RETURN_ON_ERROR(u);\n  u->primary_opcode = inp_curr(u);\n  ptr = u->le->table[inp_curr(u)];\n  if (ptr & 0x8000) {\n    u->le = &ud_lookup_table_list[ptr & ~0x8000];\n    if (u->le->type == UD_TAB__OPC_TABLE) {\n      inp_next(u);\n      return decode_opcode(u);\n    }\n  }\n  return decode_ext(u, ptr);\n}\n\n \n/* =============================================================================\n * ud_decode() - Instruction decoder. Returns the number of bytes decoded.\n * =============================================================================\n */\nunsigned int\nud_decode(struct ud *u)\n{\n  inp_start(u);\n  clear_insn(u);\n  u->le = &ud_lookup_table_list[0];\n  u->error = decode_prefixes(u) == -1 || \n             decode_opcode(u)   == -1 ||\n             u->error;\n  /* Handle decode error. */\n  if (u->error) {\n    /* clear out the decode data. */\n    clear_insn(u);\n    /* mark the sequence of bytes as invalid. */\n    u->itab_entry = &ud_itab[0]; /* entry 0 is invalid */\n    u->mnemonic = u->itab_entry->mnemonic;\n  } \n\n    /* maybe this stray segment override byte\n     * should be spewed out?\n     */\n    if ( !P_SEG( u->itab_entry->prefix ) && \n            u->operand[0].type != UD_OP_MEM &&\n            u->operand[1].type != UD_OP_MEM )\n        u->pfx_seg = 0;\n\n  u->insn_offset = u->pc; /* set offset of instruction */\n  u->asm_buf_fill = 0;   /* set translation buffer index to 0 */\n  u->pc += u->inp_ctr;    /* move program counter by bytes decoded */\n\n  /* return number of bytes disassembled. */\n  return u->inp_ctr;\n}\n\n/*\nvim: set ts=2 sw=2 expandtab\n*/\n"
  },
  {
    "path": "dis/decode.h",
    "content": "/* udis86 - libudis86/decode.h\n *\n * Copyright (c) 2002-2009 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef UD_DECODE_H\n#define UD_DECODE_H\n\n#include \"types.h\"\n#include \"itab.h\"\n\n#define MAX_INSN_LENGTH 15\n\n/* itab prefix bits */\n#define P_none          ( 0 )\n#define P_cast          ( 1 << 0 )\n#define P_CAST(n)       ( ( n >> 0 ) & 1 )\n#define P_rexb          ( 1 << 1 )\n#define P_REXB(n)       ( ( n >> 1 ) & 1 )\n#define P_inv64         ( 1 << 4 )\n#define P_INV64(n)      ( ( n >> 4 ) & 1 )\n#define P_rexw          ( 1 << 5 )\n#define P_REXW(n)       ( ( n >> 5 ) & 1 )\n#define P_def64         ( 1 << 7 )\n#define P_DEF64(n)      ( ( n >> 7 ) & 1 )\n#define P_rexr          ( 1 << 8 )\n#define P_REXR(n)       ( ( n >> 8 ) & 1 )\n#define P_oso           ( 1 << 9 )\n#define P_OSO(n)        ( ( n >> 9 ) & 1 )\n#define P_aso           ( 1 << 10 )\n#define P_ASO(n)        ( ( n >> 10 ) & 1 )\n#define P_rexx          ( 1 << 11 )\n#define P_REXX(n)       ( ( n >> 11 ) & 1 )\n#define P_ImpAddr       ( 1 << 12 )\n#define P_IMPADDR(n)    ( ( n >> 12 ) & 1 )\n#define P_seg           ( 1 << 13 )\n#define P_SEG(n)        ( ( n >> 13 ) & 1 )\n#define P_str           ( 1 << 14 )\n#define P_STR(n)        ( ( n >> 14 ) & 1 )\n#define P_strz          ( 1 << 15 )\n#define P_STR_ZF(n)     ( ( n >> 15 ) & 1 )\n\n/* operand type constants -- order is important! */\n\nenum ud_operand_code {\n    OP_NONE,\n\n    OP_A,      OP_E,      OP_M,       OP_G,       \n    OP_I,      OP_F,\n\n    OP_R0,     OP_R1,     OP_R2,      OP_R3,\n    OP_R4,     OP_R5,     OP_R6,      OP_R7,\n\n    OP_AL,     OP_CL,     OP_DL,\n    OP_AX,     OP_CX,     OP_DX,\n    OP_eAX,    OP_eCX,    OP_eDX,\n    OP_rAX,    OP_rCX,    OP_rDX,\n\n    OP_ES,     OP_CS,     OP_SS,      OP_DS,  \n    OP_FS,     OP_GS,\n\n    OP_ST0,    OP_ST1,    OP_ST2,     OP_ST3,\n    OP_ST4,    OP_ST5,    OP_ST6,     OP_ST7,\n\n    OP_J,      OP_S,      OP_O,          \n    OP_I1,     OP_I3,     OP_sI,\n\n    OP_V,      OP_W,      OP_Q,       OP_P, \n    OP_U,      OP_N,      OP_MU,\n\n    OP_R,      OP_C,      OP_D,       \n\n    OP_MR\n} UD_ATTR_PACKED;\n\n\n/* operand size constants */\n\nenum ud_operand_size {\n    SZ_NA  = 0,\n    SZ_Z   = 1,\n    SZ_V   = 2,\n    SZ_RDQ = 7,\n\n    /* the following values are used as is,\n     * and thus hard-coded. changing them \n     * will break internals \n     */\n    SZ_B   = 8,\n    SZ_W   = 16,\n    SZ_D   = 32,\n    SZ_Q   = 64,\n    SZ_T   = 80,\n    SZ_O   = 128,\n\n    SZ_Y   = 17,\n\n    /*\n     * complex size types, that encode sizes for operands\n     * of type MR (memory or register), for internal use\n     * only. Id space 256 and above.\n     */\n    SZ_BD  = (SZ_B << 8) | SZ_D,\n    SZ_BV  = (SZ_B << 8) | SZ_V,\n    SZ_WD  = (SZ_W << 8) | SZ_D,\n    SZ_WV  = (SZ_W << 8) | SZ_V,\n    SZ_WY  = (SZ_W << 8) | SZ_Y,\n    SZ_DY  = (SZ_D << 8) | SZ_Y,\n    SZ_WO  = (SZ_W << 8) | SZ_O,\n    SZ_DO  = (SZ_D << 8) | SZ_O,\n    SZ_QO  = (SZ_Q << 8) | SZ_O,\n\n} UD_ATTR_PACKED;\n\n\n/* resolve complex size type.\n */\nstatic inline enum ud_operand_size\nMx_mem_size(enum ud_operand_size size)\n{\n    return (size >> 8) & 0xff;\n}\n\nstatic inline enum ud_operand_size\nMx_reg_size(enum ud_operand_size size)\n{\n    return size & 0xff;\n}\n\n/* A single operand of an entry in the instruction table. \n * (internal use only)\n */\nstruct ud_itab_entry_operand \n{\n  enum ud_operand_code type;\n  enum ud_operand_size size;\n};\n\n\n/* A single entry in an instruction table. \n *(internal use only)\n */\nstruct ud_itab_entry \n{\n  enum ud_mnemonic_code         mnemonic;\n  struct ud_itab_entry_operand  operand1;\n  struct ud_itab_entry_operand  operand2;\n  struct ud_itab_entry_operand  operand3;\n  uint32_t                      prefix;\n};\n\nstruct ud_lookup_table_list_entry {\n    const uint16_t *table;\n    enum ud_table_type type;\n    const char *meta;\n};\n     \n\n\nstatic inline int\nud_opcode_field_sext(uint8_t primary_opcode)\n{\n  return (primary_opcode & 0x02) != 0;\n}\n\nextern struct ud_itab_entry ud_itab[];\nextern struct ud_lookup_table_list_entry ud_lookup_table_list[];\n\n#endif /* UD_DECODE_H */\n\n/* vim:cindent\n * vim:expandtab\n * vim:ts=4\n * vim:sw=4\n */\n"
  },
  {
    "path": "dis/dism.lk1",
    "content": "FIL decode.obj,itab.obj,main.obj,syn-att.obj,syn-intel.obj,syn.obj,udis86.obj\n\n"
  },
  {
    "path": "dis/dism.mk",
    "content": "project : F:\\TOOLS\\ASM\\full2\\dis\\dism.exe .SYMBOLIC\n\n!include F:\\TOOLS\\ASM\\full2\\dis\\dism.mk1\n"
  },
  {
    "path": "dis/dism.mk1",
    "content": "!define BLANK \"\"\nF:\\TOOLS\\ASM\\full2\\dis\\decode.obj : F:\\TOOLS\\ASM\\full2\\dis\\decode.c .AUTODEP&\nEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc decode.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\itab.obj : F:\\TOOLS\\ASM\\full2\\dis\\itab.c .AUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc itab.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\main.obj : F:\\TOOLS\\ASM\\full2\\dis\\main.c .AUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc main.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\syn-att.obj : F:\\TOOLS\\ASM\\full2\\dis\\syn-att.c .AUTOD&\nEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc syn-att.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\syn-intel.obj : F:\\TOOLS\\ASM\\full2\\dis\\syn-intel.c .A&\nUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc syn-intel.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\syn.obj : F:\\TOOLS\\ASM\\full2\\dis\\syn.c .AUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc syn.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\udis86.obj : F:\\TOOLS\\ASM\\full2\\dis\\udis86.c .AUTODEP&\nEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n *wcc udis86.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\n\nF:\\TOOLS\\ASM\\full2\\dis\\dism.exe : F:\\TOOLS\\ASM\\full2\\dis\\decode.obj F:\\TOOLS&\n\\ASM\\full2\\dis\\itab.obj F:\\TOOLS\\ASM\\full2\\dis\\main.obj F:\\TOOLS\\ASM\\full2\\d&\nis\\syn-att.obj F:\\TOOLS\\ASM\\full2\\dis\\syn-intel.obj F:\\TOOLS\\ASM\\full2\\dis\\s&\nyn.obj F:\\TOOLS\\ASM\\full2\\dis\\udis86.obj F:\\TOOLS\\ASM\\full2\\dis\\decode.h F:\\&\nTOOLS\\ASM\\full2\\dis\\extern.h F:\\TOOLS\\ASM\\full2\\dis\\itab.h F:\\TOOLS\\ASM\\full&\n2\\dis\\syn.h F:\\TOOLS\\ASM\\full2\\dis\\types.h F:\\TOOLS\\ASM\\full2\\dis\\udint.h .A&\nUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\dis\n @%write dism.lk1 FIL decode.obj,itab.obj,main.obj,syn-att.obj,syn-intel.obj&\n,syn.obj,udis86.obj\n @%append dism.lk1 \n *wlink name dism d all sys dos op m op maxe=25 op q op symf @dism.lk1\n\n"
  },
  {
    "path": "dis/dism.tgt",
    "content": "40\ntargetIdent\n0\nMProject\n1\nMComponent\n0\n2\nWString\n3\nEXE\n3\nWString\n5\nde6en\n1\n0\n1\n4\nMCommand\n0\n5\nMCommand\n0\n6\nMItem\n8\ndism.exe\n7\nWString\n3\nEXE\n8\nWVList\n0\n9\nWVList\n0\n-1\n1\n1\n0\n10\nWPickList\n15\n11\nMItem\n3\n*.c\n12\nWString\n4\nCOBJ\n13\nWVList\n0\n14\nWVList\n0\n-1\n1\n1\n0\n15\nMItem\n8\ndecode.c\n16\nWString\n4\nCOBJ\n17\nWVList\n0\n18\nWVList\n0\n11\n1\n1\n0\n19\nMItem\n6\nitab.c\n20\nWString\n4\nCOBJ\n21\nWVList\n0\n22\nWVList\n0\n11\n1\n1\n0\n23\nMItem\n6\nmain.c\n24\nWString\n4\nCOBJ\n25\nWVList\n0\n26\nWVList\n0\n11\n1\n1\n0\n27\nMItem\n9\nsyn-att.c\n28\nWString\n4\nCOBJ\n29\nWVList\n0\n30\nWVList\n0\n11\n1\n1\n0\n31\nMItem\n11\nsyn-intel.c\n32\nWString\n4\nCOBJ\n33\nWVList\n0\n34\nWVList\n0\n11\n1\n1\n0\n35\nMItem\n5\nsyn.c\n36\nWString\n4\nCOBJ\n37\nWVList\n0\n38\nWVList\n0\n11\n1\n1\n0\n39\nMItem\n8\nudis86.c\n40\nWString\n4\nCOBJ\n41\nWVList\n0\n42\nWVList\n0\n11\n1\n1\n0\n43\nMItem\n3\n*.h\n44\nWString\n3\nNIL\n45\nWVList\n0\n46\nWVList\n0\n-1\n1\n1\n0\n47\nMItem\n8\ndecode.h\n48\nWString\n3\nNIL\n49\nWVList\n0\n50\nWVList\n0\n43\n1\n1\n0\n51\nMItem\n8\nextern.h\n52\nWString\n3\nNIL\n53\nWVList\n0\n54\nWVList\n0\n43\n1\n1\n0\n55\nMItem\n6\nitab.h\n56\nWString\n3\nNIL\n57\nWVList\n0\n58\nWVList\n0\n43\n1\n1\n0\n59\nMItem\n5\nsyn.h\n60\nWString\n3\nNIL\n61\nWVList\n0\n62\nWVList\n0\n43\n1\n1\n0\n63\nMItem\n7\ntypes.h\n64\nWString\n3\nNIL\n65\nWVList\n0\n66\nWVList\n0\n43\n1\n1\n0\n67\nMItem\n7\nudint.h\n68\nWString\n3\nNIL\n69\nWVList\n0\n70\nWVList\n0\n43\n1\n1\n0\n"
  },
  {
    "path": "dis/dism.txt",
    "content": "cd F:\\TOOLS\\ASM\\full2\\dis\nwmake -f F:\\TOOLS\\ASM\\full2\\dis\\dism.mk -h -e\nwcc main.c -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml\nwlink name dism d all sys dos op m op maxe=25 op q op symf @dism.lk1\nExecution complete\n"
  },
  {
    "path": "dis/dism.wpj",
    "content": "40\nprojectIdent\n0\nVpeMain\n1\nWRect\n0\n0\n7680\n9210\n2\nMProject\n3\nMCommand\n0\n4\nMCommand\n0\n1\n5\nWFileName\n8\ndism.tgt\n6\nWVList\n1\n7\nVComponent\n8\nWRect\n0\n0\n5666\n4280\n0\n0\n9\nWFileName\n8\ndism.tgt\n0\n3\n7\n"
  },
  {
    "path": "dis/extern.h",
    "content": "/* udis86 - libudis86/extern.h\n *\n * Copyright (c) 2002-2009, 2013 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef UD_EXTERN_H\n#define UD_EXTERN_H\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"types.h\"\n\n/* ============================= PUBLIC API ================================= */\n\nextern void ud_init(struct ud*);\n\nextern void ud_set_mode(struct ud*, uint8_t);\n\nextern void ud_set_pc(struct ud*, uint64_t);\n\nextern void ud_set_input_hook(struct ud*, int (*)(struct ud*));\n\nextern void ud_set_input_buffer(struct ud*, const uint8_t*, size_t);\n\n#ifndef __UD_STANDALONE__\nextern void ud_set_input_file(struct ud*, FILE*);\n#endif /* __UD_STANDALONE__ */\n\nextern void ud_set_vendor(struct ud*, unsigned);\n\nextern void ud_set_syntax(struct ud*, void (*)(struct ud*));\n\nextern void ud_input_skip(struct ud*, size_t);\n\nextern int ud_input_end(const struct ud*);\n\nextern unsigned int ud_decode(struct ud*);\n\nextern unsigned int ud_disassemble(struct ud*);\n\nextern void ud_translate_intel(struct ud*);\n\nextern void ud_translate_att(struct ud*);\n\nextern const char* ud_insn_asm(const struct ud* u);\n\nextern const uint8_t* ud_insn_ptr(const struct ud* u);\n\nextern uint64_t ud_insn_off(const struct ud*);\n\nextern const char* ud_insn_hex(struct ud*);\n\nextern unsigned int ud_insn_len(const struct ud* u);\n\nextern const struct ud_operand* ud_insn_opr(const struct ud *u, unsigned int n);\n\nextern int ud_opr_is_sreg(const struct ud_operand *opr);\n\nextern int ud_opr_is_gpr(const struct ud_operand *opr);\n\nextern enum ud_mnemonic_code ud_insn_mnemonic(const struct ud *u);\n\nextern const char* ud_lookup_mnemonic(enum ud_mnemonic_code c);\n\nextern void ud_set_user_opaque_data(struct ud*, void*);\n\nextern void* ud_get_user_opaque_data(const struct ud*);\n\nextern uint64_t ud_insn_sext_imm(const struct ud*, const struct ud_operand*);\n\nextern void ud_set_asm_buffer(struct ud *u, char *buf, size_t size);\n\nextern void ud_set_sym_resolver(struct ud *u, \n                                const char* (*resolver)(struct ud*, \n                                                        uint64_t addr,\n                                                        int64_t *offset));\n\n/* ========================================================================== */\n\n#ifdef __cplusplus\n}\n#endif\n#endif /* UD_EXTERN_H */\n"
  },
  {
    "path": "dis/itab.c",
    "content": "/* itab.c -- generated by udis86:scripts/ud_itab.py, do no edit */\n#include \"decode.h\"\n\n#define GROUP(n) (0x8000 | (n))\n\n\nstatic const uint16_t ud_itab__1[] = {\n  /*  0 */           7,           0,\n};\n\nstatic const uint16_t ud_itab__2[] = {\n  /*  0 */           8,           0,\n};\n\nstatic const uint16_t ud_itab__3[] = {\n  /*  0 */          15,           0,\n};\n\nstatic const uint16_t ud_itab__6[] = {\n  /*  0 */          16,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__7[] = {\n  /*  0 */          17,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__8[] = {\n  /*  0 */          18,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__9[] = {\n  /*  0 */          19,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__10[] = {\n  /*  0 */          20,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__11[] = {\n  /*  0 */          21,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__5[] = {\n  /*  0 */    GROUP(6),    GROUP(7),    GROUP(8),    GROUP(9),\n  /*  4 */   GROUP(10),   GROUP(11),           0,           0,\n};\n\nstatic const uint16_t ud_itab__15[] = {\n  /*  0 */          22,           0,\n};\n\nstatic const uint16_t ud_itab__14[] = {\n  /*  0 */   GROUP(15),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__17[] = {\n  /*  0 */          23,           0,\n};\n\nstatic const uint16_t ud_itab__16[] = {\n  /*  0 */   GROUP(17),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__19[] = {\n  /*  0 */          24,           0,\n};\n\nstatic const uint16_t ud_itab__18[] = {\n  /*  0 */   GROUP(19),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__21[] = {\n  /*  0 */          25,           0,\n};\n\nstatic const uint16_t ud_itab__20[] = {\n  /*  0 */   GROUP(21),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__23[] = {\n  /*  0 */          26,           0,\n};\n\nstatic const uint16_t ud_itab__22[] = {\n  /*  0 */   GROUP(23),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__25[] = {\n  /*  0 */          27,           0,\n};\n\nstatic const uint16_t ud_itab__24[] = {\n  /*  0 */   GROUP(25),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__27[] = {\n  /*  0 */          28,           0,\n};\n\nstatic const uint16_t ud_itab__26[] = {\n  /*  0 */   GROUP(27),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__13[] = {\n  /*  0 */   GROUP(14),   GROUP(16),   GROUP(18),   GROUP(20),\n  /*  4 */   GROUP(22),           0,   GROUP(24),   GROUP(26),\n};\n\nstatic const uint16_t ud_itab__32[] = {\n  /*  0 */           0,          29,           0,\n};\n\nstatic const uint16_t ud_itab__31[] = {\n  /*  0 */           0,   GROUP(32),\n};\n\nstatic const uint16_t ud_itab__30[] = {\n  /*  0 */   GROUP(31),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__35[] = {\n  /*  0 */           0,          30,           0,\n};\n\nstatic const uint16_t ud_itab__34[] = {\n  /*  0 */           0,   GROUP(35),\n};\n\nstatic const uint16_t ud_itab__33[] = {\n  /*  0 */   GROUP(34),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__38[] = {\n  /*  0 */           0,          31,           0,\n};\n\nstatic const uint16_t ud_itab__37[] = {\n  /*  0 */           0,   GROUP(38),\n};\n\nstatic const uint16_t ud_itab__36[] = {\n  /*  0 */   GROUP(37),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__41[] = {\n  /*  0 */           0,          32,           0,\n};\n\nstatic const uint16_t ud_itab__40[] = {\n  /*  0 */           0,   GROUP(41),\n};\n\nstatic const uint16_t ud_itab__39[] = {\n  /*  0 */   GROUP(40),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__29[] = {\n  /*  0 */           0,   GROUP(30),   GROUP(33),   GROUP(36),\n  /*  4 */   GROUP(39),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__44[] = {\n  /*  0 */           0,          33,\n};\n\nstatic const uint16_t ud_itab__43[] = {\n  /*  0 */   GROUP(44),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__46[] = {\n  /*  0 */           0,          34,\n};\n\nstatic const uint16_t ud_itab__45[] = {\n  /*  0 */   GROUP(46),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__42[] = {\n  /*  0 */   GROUP(43),   GROUP(45),           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__49[] = {\n  /*  0 */           0,          35,\n};\n\nstatic const uint16_t ud_itab__48[] = {\n  /*  0 */   GROUP(49),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__51[] = {\n  /*  0 */           0,          36,\n};\n\nstatic const uint16_t ud_itab__50[] = {\n  /*  0 */   GROUP(51),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__47[] = {\n  /*  0 */   GROUP(48),   GROUP(50),           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__55[] = {\n  /*  0 */          37,           0,           0,\n};\n\nstatic const uint16_t ud_itab__54[] = {\n  /*  0 */           0,   GROUP(55),\n};\n\nstatic const uint16_t ud_itab__53[] = {\n  /*  0 */   GROUP(54),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__58[] = {\n  /*  0 */          38,           0,           0,\n};\n\nstatic const uint16_t ud_itab__57[] = {\n  /*  0 */           0,   GROUP(58),\n};\n\nstatic const uint16_t ud_itab__56[] = {\n  /*  0 */   GROUP(57),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__61[] = {\n  /*  0 */          39,           0,           0,\n};\n\nstatic const uint16_t ud_itab__60[] = {\n  /*  0 */           0,   GROUP(61),\n};\n\nstatic const uint16_t ud_itab__59[] = {\n  /*  0 */   GROUP(60),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__64[] = {\n  /*  0 */          40,           0,           0,\n};\n\nstatic const uint16_t ud_itab__63[] = {\n  /*  0 */           0,   GROUP(64),\n};\n\nstatic const uint16_t ud_itab__62[] = {\n  /*  0 */   GROUP(63),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__67[] = {\n  /*  0 */          41,           0,           0,\n};\n\nstatic const uint16_t ud_itab__66[] = {\n  /*  0 */           0,   GROUP(67),\n};\n\nstatic const uint16_t ud_itab__65[] = {\n  /*  0 */   GROUP(66),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__70[] = {\n  /*  0 */          42,           0,           0,\n};\n\nstatic const uint16_t ud_itab__69[] = {\n  /*  0 */           0,   GROUP(70),\n};\n\nstatic const uint16_t ud_itab__68[] = {\n  /*  0 */   GROUP(69),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__73[] = {\n  /*  0 */          43,           0,           0,\n};\n\nstatic const uint16_t ud_itab__72[] = {\n  /*  0 */           0,   GROUP(73),\n};\n\nstatic const uint16_t ud_itab__71[] = {\n  /*  0 */   GROUP(72),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__76[] = {\n  /*  0 */          44,           0,           0,\n};\n\nstatic const uint16_t ud_itab__75[] = {\n  /*  0 */           0,   GROUP(76),\n};\n\nstatic const uint16_t ud_itab__74[] = {\n  /*  0 */   GROUP(75),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__52[] = {\n  /*  0 */   GROUP(53),   GROUP(56),   GROUP(59),   GROUP(62),\n  /*  4 */   GROUP(65),   GROUP(68),   GROUP(71),   GROUP(74),\n};\n\nstatic const uint16_t ud_itab__78[] = {\n  /*  0 */           0,          45,\n};\n\nstatic const uint16_t ud_itab__77[] = {\n  /*  0 */   GROUP(78),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__80[] = {\n  /*  0 */           0,          46,\n};\n\nstatic const uint16_t ud_itab__79[] = {\n  /*  0 */   GROUP(80),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__83[] = {\n  /*  0 */           0,          47,\n};\n\nstatic const uint16_t ud_itab__82[] = {\n  /*  0 */   GROUP(83),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__86[] = {\n  /*  0 */          48,           0,           0,\n};\n\nstatic const uint16_t ud_itab__85[] = {\n  /*  0 */           0,   GROUP(86),\n};\n\nstatic const uint16_t ud_itab__84[] = {\n  /*  0 */   GROUP(85),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__81[] = {\n  /*  0 */   GROUP(82),   GROUP(84),           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__28[] = {\n  /*  0 */   GROUP(29),   GROUP(42),   GROUP(47),   GROUP(52),\n  /*  4 */   GROUP(77),           0,   GROUP(79),   GROUP(81),\n};\n\nstatic const uint16_t ud_itab__12[] = {\n  /*  0 */   GROUP(13),   GROUP(28),\n};\n\nstatic const uint16_t ud_itab__87[] = {\n  /*  0 */          49,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__88[] = {\n  /*  0 */          50,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__89[] = {\n  /*  0 */          51,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__90[] = {\n  /*  0 */          52,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__91[] = {\n  /*  0 */          53,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__92[] = {\n  /*  0 */          54,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__93[] = {\n  /*  0 */          55,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__94[] = {\n  /*  0 */          56,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__96[] = {\n  /*  0 */          57,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__97[] = {\n  /*  0 */          58,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__98[] = {\n  /*  0 */          59,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__99[] = {\n  /*  0 */          60,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__100[] = {\n  /*  0 */          61,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__101[] = {\n  /*  0 */          62,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__102[] = {\n  /*  0 */          63,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__103[] = {\n  /*  0 */          64,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__95[] = {\n  /*  0 */   GROUP(96),   GROUP(97),   GROUP(98),   GROUP(99),\n  /*  4 */  GROUP(100),  GROUP(101),  GROUP(102),  GROUP(103),\n};\n\nstatic const uint16_t ud_itab__104[] = {\n  /*  0 */          65,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__105[] = {\n  /*  0 */           0,           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n  /*  8 */           0,           0,           0,           0,\n  /*  c */          66,          67,           0,           0,\n  /* 10 */           0,           0,           0,           0,\n  /* 14 */           0,           0,           0,           0,\n  /* 18 */           0,           0,           0,           0,\n  /* 1c */          68,          69,           0,           0,\n  /* 20 */           0,           0,           0,           0,\n  /* 24 */           0,           0,           0,           0,\n  /* 28 */           0,           0,           0,           0,\n  /* 2c */           0,           0,           0,           0,\n  /* 30 */           0,           0,           0,           0,\n  /* 34 */           0,           0,           0,           0,\n  /* 38 */           0,           0,           0,           0,\n  /* 3c */           0,           0,           0,           0,\n  /* 40 */           0,           0,           0,           0,\n  /* 44 */           0,           0,           0,           0,\n  /* 48 */           0,           0,           0,           0,\n  /* 4c */           0,           0,           0,           0,\n  /* 50 */           0,           0,           0,           0,\n  /* 54 */           0,           0,           0,           0,\n  /* 58 */           0,           0,           0,           0,\n  /* 5c */           0,           0,           0,           0,\n  /* 60 */           0,           0,           0,           0,\n  /* 64 */           0,           0,           0,           0,\n  /* 68 */           0,           0,           0,           0,\n  /* 6c */           0,           0,           0,           0,\n  /* 70 */           0,           0,           0,           0,\n  /* 74 */           0,           0,           0,           0,\n  /* 78 */           0,           0,           0,           0,\n  /* 7c */           0,           0,           0,           0,\n  /* 80 */           0,           0,           0,           0,\n  /* 84 */           0,           0,           0,           0,\n  /* 88 */           0,           0,          70,           0,\n  /* 8c */           0,           0,          71,           0,\n  /* 90 */          72,           0,           0,           0,\n  /* 94 */          73,           0,          74,          75,\n  /* 98 */           0,           0,          76,           0,\n  /* 9c */           0,           0,          77,           0,\n  /* a0 */          78,           0,           0,           0,\n  /* a4 */          79,           0,          80,          81,\n  /* a8 */           0,           0,          82,           0,\n  /* ac */           0,           0,          83,           0,\n  /* b0 */          84,           0,           0,           0,\n  /* b4 */          85,           0,          86,          87,\n  /* b8 */           0,           0,           0,          88,\n  /* bc */           0,           0,           0,          89,\n  /* c0 */           0,           0,           0,           0,\n  /* c4 */           0,           0,           0,           0,\n  /* c8 */           0,           0,           0,           0,\n  /* cc */           0,           0,           0,           0,\n  /* d0 */           0,           0,           0,           0,\n  /* d4 */           0,           0,           0,           0,\n  /* d8 */           0,           0,           0,           0,\n  /* dc */           0,           0,           0,           0,\n  /* e0 */           0,           0,           0,           0,\n  /* e4 */           0,           0,           0,           0,\n  /* e8 */           0,           0,           0,           0,\n  /* ec */           0,           0,           0,           0,\n  /* f0 */           0,           0,           0,           0,\n  /* f4 */           0,           0,           0,           0,\n  /* f8 */           0,           0,           0,           0,\n  /* fc */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__106[] = {\n  /*  0 */          90,          91,          92,          93,\n};\n\nstatic const uint16_t ud_itab__107[] = {\n  /*  0 */          94,          95,          96,          97,\n};\n\nstatic const uint16_t ud_itab__110[] = {\n  /*  0 */          98,           0,\n};\n\nstatic const uint16_t ud_itab__111[] = {\n  /*  0 */          99,           0,\n};\n\nstatic const uint16_t ud_itab__112[] = {\n  /*  0 */         100,           0,\n};\n\nstatic const uint16_t ud_itab__113[] = {\n  /*  0 */         101,           0,\n};\n\nstatic const uint16_t ud_itab__109[] = {\n  /*  0 */  GROUP(110),  GROUP(111),  GROUP(112),  GROUP(113),\n};\n\nstatic const uint16_t ud_itab__115[] = {\n  /*  0 */           0,         102,\n};\n\nstatic const uint16_t ud_itab__116[] = {\n  /*  0 */           0,         103,\n};\n\nstatic const uint16_t ud_itab__117[] = {\n  /*  0 */           0,         104,\n};\n\nstatic const uint16_t ud_itab__114[] = {\n  /*  0 */  GROUP(115),  GROUP(116),  GROUP(117),           0,\n};\n\nstatic const uint16_t ud_itab__108[] = {\n  /*  0 */  GROUP(109),  GROUP(114),\n};\n\nstatic const uint16_t ud_itab__118[] = {\n  /*  0 */         105,           0,           0,         106,\n};\n\nstatic const uint16_t ud_itab__119[] = {\n  /*  0 */         107,           0,           0,         108,\n};\n\nstatic const uint16_t ud_itab__120[] = {\n  /*  0 */         109,           0,           0,         110,\n};\n\nstatic const uint16_t ud_itab__123[] = {\n  /*  0 */         111,           0,\n};\n\nstatic const uint16_t ud_itab__124[] = {\n  /*  0 */         112,           0,\n};\n\nstatic const uint16_t ud_itab__125[] = {\n  /*  0 */         113,           0,\n};\n\nstatic const uint16_t ud_itab__122[] = {\n  /*  0 */  GROUP(123),           0,  GROUP(124),  GROUP(125),\n};\n\nstatic const uint16_t ud_itab__127[] = {\n  /*  0 */           0,         114,\n};\n\nstatic const uint16_t ud_itab__128[] = {\n  /*  0 */           0,         115,\n};\n\nstatic const uint16_t ud_itab__126[] = {\n  /*  0 */  GROUP(127),           0,  GROUP(128),           0,\n};\n\nstatic const uint16_t ud_itab__121[] = {\n  /*  0 */  GROUP(122),  GROUP(126),\n};\n\nstatic const uint16_t ud_itab__129[] = {\n  /*  0 */         116,           0,           0,         117,\n};\n\nstatic const uint16_t ud_itab__131[] = {\n  /*  0 */         118,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__132[] = {\n  /*  0 */         119,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__133[] = {\n  /*  0 */         120,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__134[] = {\n  /*  0 */         121,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__130[] = {\n  /*  0 */  GROUP(131),  GROUP(132),  GROUP(133),  GROUP(134),\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__135[] = {\n  /*  0 */         122,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__136[] = {\n  /*  0 */         123,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__137[] = {\n  /*  0 */         124,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__138[] = {\n  /*  0 */         125,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__139[] = {\n  /*  0 */         126,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__140[] = {\n  /*  0 */         127,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__141[] = {\n  /*  0 */         128,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__142[] = {\n  /*  0 */         129,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__143[] = {\n  /*  0 */         130,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__144[] = {\n  /*  0 */         131,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__145[] = {\n  /*  0 */         132,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__146[] = {\n  /*  0 */         133,           0,           0,         134,\n};\n\nstatic const uint16_t ud_itab__147[] = {\n  /*  0 */         135,           0,           0,         136,\n};\n\nstatic const uint16_t ud_itab__148[] = {\n  /*  0 */         137,         138,         139,         140,\n};\n\nstatic const uint16_t ud_itab__149[] = {\n  /*  0 */         141,           0,           0,         142,\n};\n\nstatic const uint16_t ud_itab__150[] = {\n  /*  0 */         143,         144,         145,         146,\n};\n\nstatic const uint16_t ud_itab__151[] = {\n  /*  0 */         147,         148,         149,         150,\n};\n\nstatic const uint16_t ud_itab__152[] = {\n  /*  0 */         151,           0,           0,         152,\n};\n\nstatic const uint16_t ud_itab__153[] = {\n  /*  0 */         153,           0,           0,         154,\n};\n\nstatic const uint16_t ud_itab__154[] = {\n  /*  0 */         155,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__155[] = {\n  /*  0 */         156,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__156[] = {\n  /*  0 */         157,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__157[] = {\n  /*  0 */         158,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__160[] = {\n  /*  0 */           0,         160,           0,\n};\n\nstatic const uint16_t ud_itab__159[] = {\n  /*  0 */         159,  GROUP(160),\n};\n\nstatic const uint16_t ud_itab__158[] = {\n  /*  0 */  GROUP(159),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__163[] = {\n  /*  0 */           0,         162,           0,\n};\n\nstatic const uint16_t ud_itab__162[] = {\n  /*  0 */         161,  GROUP(163),\n};\n\nstatic const uint16_t ud_itab__161[] = {\n  /*  0 */  GROUP(162),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__164[] = {\n  /*  0 */         163,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__166[] = {\n  /*  0 */         164,           0,           0,         165,\n};\n\nstatic const uint16_t ud_itab__167[] = {\n  /*  0 */         166,           0,           0,         167,\n};\n\nstatic const uint16_t ud_itab__168[] = {\n  /*  0 */         168,           0,           0,         169,\n};\n\nstatic const uint16_t ud_itab__169[] = {\n  /*  0 */         170,           0,           0,         171,\n};\n\nstatic const uint16_t ud_itab__170[] = {\n  /*  0 */         172,           0,           0,         173,\n};\n\nstatic const uint16_t ud_itab__171[] = {\n  /*  0 */         174,           0,           0,         175,\n};\n\nstatic const uint16_t ud_itab__172[] = {\n  /*  0 */         176,           0,           0,         177,\n};\n\nstatic const uint16_t ud_itab__173[] = {\n  /*  0 */         178,           0,           0,         179,\n};\n\nstatic const uint16_t ud_itab__174[] = {\n  /*  0 */         180,           0,           0,         181,\n};\n\nstatic const uint16_t ud_itab__175[] = {\n  /*  0 */         182,           0,           0,         183,\n};\n\nstatic const uint16_t ud_itab__176[] = {\n  /*  0 */         184,           0,           0,         185,\n};\n\nstatic const uint16_t ud_itab__177[] = {\n  /*  0 */         186,           0,           0,         187,\n};\n\nstatic const uint16_t ud_itab__178[] = {\n  /*  0 */           0,           0,           0,         188,\n};\n\nstatic const uint16_t ud_itab__179[] = {\n  /*  0 */           0,           0,           0,         189,\n};\n\nstatic const uint16_t ud_itab__180[] = {\n  /*  0 */           0,           0,           0,         190,\n};\n\nstatic const uint16_t ud_itab__181[] = {\n  /*  0 */           0,           0,           0,         191,\n};\n\nstatic const uint16_t ud_itab__182[] = {\n  /*  0 */         192,           0,           0,         193,\n};\n\nstatic const uint16_t ud_itab__183[] = {\n  /*  0 */         194,           0,           0,         195,\n};\n\nstatic const uint16_t ud_itab__184[] = {\n  /*  0 */         196,           0,           0,         197,\n};\n\nstatic const uint16_t ud_itab__185[] = {\n  /*  0 */           0,           0,           0,         198,\n};\n\nstatic const uint16_t ud_itab__186[] = {\n  /*  0 */           0,           0,           0,         199,\n};\n\nstatic const uint16_t ud_itab__187[] = {\n  /*  0 */           0,           0,           0,         200,\n};\n\nstatic const uint16_t ud_itab__188[] = {\n  /*  0 */           0,           0,           0,         201,\n};\n\nstatic const uint16_t ud_itab__189[] = {\n  /*  0 */           0,           0,           0,         202,\n};\n\nstatic const uint16_t ud_itab__190[] = {\n  /*  0 */           0,           0,           0,         203,\n};\n\nstatic const uint16_t ud_itab__191[] = {\n  /*  0 */           0,           0,           0,         204,\n};\n\nstatic const uint16_t ud_itab__192[] = {\n  /*  0 */           0,           0,           0,         205,\n};\n\nstatic const uint16_t ud_itab__193[] = {\n  /*  0 */           0,           0,           0,         206,\n};\n\nstatic const uint16_t ud_itab__194[] = {\n  /*  0 */           0,           0,           0,         207,\n};\n\nstatic const uint16_t ud_itab__195[] = {\n  /*  0 */           0,           0,           0,         208,\n};\n\nstatic const uint16_t ud_itab__196[] = {\n  /*  0 */           0,           0,           0,         209,\n};\n\nstatic const uint16_t ud_itab__197[] = {\n  /*  0 */           0,           0,           0,         210,\n};\n\nstatic const uint16_t ud_itab__198[] = {\n  /*  0 */           0,           0,           0,         211,\n};\n\nstatic const uint16_t ud_itab__199[] = {\n  /*  0 */           0,           0,           0,         212,\n};\n\nstatic const uint16_t ud_itab__200[] = {\n  /*  0 */           0,           0,           0,         213,\n};\n\nstatic const uint16_t ud_itab__201[] = {\n  /*  0 */           0,           0,           0,         214,\n};\n\nstatic const uint16_t ud_itab__202[] = {\n  /*  0 */           0,           0,           0,         215,\n};\n\nstatic const uint16_t ud_itab__203[] = {\n  /*  0 */           0,           0,           0,         216,\n};\n\nstatic const uint16_t ud_itab__204[] = {\n  /*  0 */           0,           0,           0,         217,\n};\n\nstatic const uint16_t ud_itab__205[] = {\n  /*  0 */           0,           0,           0,         218,\n};\n\nstatic const uint16_t ud_itab__206[] = {\n  /*  0 */           0,           0,           0,         219,\n};\n\nstatic const uint16_t ud_itab__207[] = {\n  /*  0 */           0,           0,           0,         220,\n};\n\nstatic const uint16_t ud_itab__208[] = {\n  /*  0 */           0,           0,           0,         221,\n};\n\nstatic const uint16_t ud_itab__209[] = {\n  /*  0 */           0,           0,           0,         222,\n};\n\nstatic const uint16_t ud_itab__210[] = {\n  /*  0 */           0,           0,           0,         223,\n};\n\nstatic const uint16_t ud_itab__211[] = {\n  /*  0 */           0,           0,           0,         224,\n};\n\nstatic const uint16_t ud_itab__214[] = {\n  /*  0 */           0,         225,           0,\n};\n\nstatic const uint16_t ud_itab__213[] = {\n  /*  0 */           0,  GROUP(214),\n};\n\nstatic const uint16_t ud_itab__212[] = {\n  /*  0 */           0,           0,           0,  GROUP(213),\n};\n\nstatic const uint16_t ud_itab__217[] = {\n  /*  0 */           0,         226,           0,\n};\n\nstatic const uint16_t ud_itab__216[] = {\n  /*  0 */           0,  GROUP(217),\n};\n\nstatic const uint16_t ud_itab__215[] = {\n  /*  0 */           0,           0,           0,  GROUP(216),\n};\n\nstatic const uint16_t ud_itab__218[] = {\n  /*  0 */           0,           0,           0,         227,\n};\n\nstatic const uint16_t ud_itab__219[] = {\n  /*  0 */           0,           0,           0,         228,\n};\n\nstatic const uint16_t ud_itab__220[] = {\n  /*  0 */           0,           0,           0,         229,\n};\n\nstatic const uint16_t ud_itab__221[] = {\n  /*  0 */           0,           0,           0,         230,\n};\n\nstatic const uint16_t ud_itab__222[] = {\n  /*  0 */           0,           0,           0,         231,\n};\n\nstatic const uint16_t ud_itab__223[] = {\n  /*  0 */         232,         233,           0,           0,\n};\n\nstatic const uint16_t ud_itab__224[] = {\n  /*  0 */         234,         235,           0,           0,\n};\n\nstatic const uint16_t ud_itab__165[] = {\n  /*  0 */  GROUP(166),  GROUP(167),  GROUP(168),  GROUP(169),\n  /*  4 */  GROUP(170),  GROUP(171),  GROUP(172),  GROUP(173),\n  /*  8 */  GROUP(174),  GROUP(175),  GROUP(176),  GROUP(177),\n  /*  c */           0,           0,           0,           0,\n  /* 10 */  GROUP(178),           0,           0,           0,\n  /* 14 */  GROUP(179),  GROUP(180),           0,  GROUP(181),\n  /* 18 */           0,           0,           0,           0,\n  /* 1c */  GROUP(182),  GROUP(183),  GROUP(184),           0,\n  /* 20 */  GROUP(185),  GROUP(186),  GROUP(187),  GROUP(188),\n  /* 24 */  GROUP(189),  GROUP(190),           0,           0,\n  /* 28 */  GROUP(191),  GROUP(192),  GROUP(193),  GROUP(194),\n  /* 2c */           0,           0,           0,           0,\n  /* 30 */  GROUP(195),  GROUP(196),  GROUP(197),  GROUP(198),\n  /* 34 */  GROUP(199),  GROUP(200),           0,  GROUP(201),\n  /* 38 */  GROUP(202),  GROUP(203),  GROUP(204),  GROUP(205),\n  /* 3c */  GROUP(206),  GROUP(207),  GROUP(208),  GROUP(209),\n  /* 40 */  GROUP(210),  GROUP(211),           0,           0,\n  /* 44 */           0,           0,           0,           0,\n  /* 48 */           0,           0,           0,           0,\n  /* 4c */           0,           0,           0,           0,\n  /* 50 */           0,           0,           0,           0,\n  /* 54 */           0,           0,           0,           0,\n  /* 58 */           0,           0,           0,           0,\n  /* 5c */           0,           0,           0,           0,\n  /* 60 */           0,           0,           0,           0,\n  /* 64 */           0,           0,           0,           0,\n  /* 68 */           0,           0,           0,           0,\n  /* 6c */           0,           0,           0,           0,\n  /* 70 */           0,           0,           0,           0,\n  /* 74 */           0,           0,           0,           0,\n  /* 78 */           0,           0,           0,           0,\n  /* 7c */           0,           0,           0,           0,\n  /* 80 */  GROUP(212),  GROUP(215),           0,           0,\n  /* 84 */           0,           0,           0,           0,\n  /* 88 */           0,           0,           0,           0,\n  /* 8c */           0,           0,           0,           0,\n  /* 90 */           0,           0,           0,           0,\n  /* 94 */           0,           0,           0,           0,\n  /* 98 */           0,           0,           0,           0,\n  /* 9c */           0,           0,           0,           0,\n  /* a0 */           0,           0,           0,           0,\n  /* a4 */           0,           0,           0,           0,\n  /* a8 */           0,           0,           0,           0,\n  /* ac */           0,           0,           0,           0,\n  /* b0 */           0,           0,           0,           0,\n  /* b4 */           0,           0,           0,           0,\n  /* b8 */           0,           0,           0,           0,\n  /* bc */           0,           0,           0,           0,\n  /* c0 */           0,           0,           0,           0,\n  /* c4 */           0,           0,           0,           0,\n  /* c8 */           0,           0,           0,           0,\n  /* cc */           0,           0,           0,           0,\n  /* d0 */           0,           0,           0,           0,\n  /* d4 */           0,           0,           0,           0,\n  /* d8 */           0,           0,           0,  GROUP(218),\n  /* dc */  GROUP(219),  GROUP(220),  GROUP(221),  GROUP(222),\n  /* e0 */           0,           0,           0,           0,\n  /* e4 */           0,           0,           0,           0,\n  /* e8 */           0,           0,           0,           0,\n  /* ec */           0,           0,           0,           0,\n  /* f0 */  GROUP(223),  GROUP(224),           0,           0,\n  /* f4 */           0,           0,           0,           0,\n  /* f8 */           0,           0,           0,           0,\n  /* fc */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__226[] = {\n  /*  0 */           0,           0,           0,         236,\n};\n\nstatic const uint16_t ud_itab__227[] = {\n  /*  0 */           0,           0,           0,         237,\n};\n\nstatic const uint16_t ud_itab__228[] = {\n  /*  0 */           0,           0,           0,         238,\n};\n\nstatic const uint16_t ud_itab__229[] = {\n  /*  0 */           0,           0,           0,         239,\n};\n\nstatic const uint16_t ud_itab__230[] = {\n  /*  0 */           0,           0,           0,         240,\n};\n\nstatic const uint16_t ud_itab__231[] = {\n  /*  0 */           0,           0,           0,         241,\n};\n\nstatic const uint16_t ud_itab__232[] = {\n  /*  0 */           0,           0,           0,         242,\n};\n\nstatic const uint16_t ud_itab__233[] = {\n  /*  0 */         243,           0,           0,         244,\n};\n\nstatic const uint16_t ud_itab__234[] = {\n  /*  0 */           0,           0,           0,         245,\n};\n\nstatic const uint16_t ud_itab__235[] = {\n  /*  0 */           0,           0,           0,         246,\n};\n\nstatic const uint16_t ud_itab__237[] = {\n  /*  0 */         247,         248,         249,\n};\n\nstatic const uint16_t ud_itab__236[] = {\n  /*  0 */           0,           0,           0,  GROUP(237),\n};\n\nstatic const uint16_t ud_itab__238[] = {\n  /*  0 */           0,           0,           0,         250,\n};\n\nstatic const uint16_t ud_itab__239[] = {\n  /*  0 */           0,           0,           0,         251,\n};\n\nstatic const uint16_t ud_itab__240[] = {\n  /*  0 */           0,           0,           0,         252,\n};\n\nstatic const uint16_t ud_itab__242[] = {\n  /*  0 */         253,         254,         255,\n};\n\nstatic const uint16_t ud_itab__241[] = {\n  /*  0 */           0,           0,           0,  GROUP(242),\n};\n\nstatic const uint16_t ud_itab__243[] = {\n  /*  0 */           0,           0,           0,         256,\n};\n\nstatic const uint16_t ud_itab__244[] = {\n  /*  0 */           0,           0,           0,         257,\n};\n\nstatic const uint16_t ud_itab__245[] = {\n  /*  0 */           0,           0,           0,         258,\n};\n\nstatic const uint16_t ud_itab__246[] = {\n  /*  0 */           0,           0,           0,         259,\n};\n\nstatic const uint16_t ud_itab__247[] = {\n  /*  0 */           0,           0,           0,         260,\n};\n\nstatic const uint16_t ud_itab__248[] = {\n  /*  0 */           0,           0,           0,         261,\n};\n\nstatic const uint16_t ud_itab__249[] = {\n  /*  0 */           0,           0,           0,         262,\n};\n\nstatic const uint16_t ud_itab__250[] = {\n  /*  0 */           0,           0,           0,         263,\n};\n\nstatic const uint16_t ud_itab__251[] = {\n  /*  0 */           0,           0,           0,         264,\n};\n\nstatic const uint16_t ud_itab__225[] = {\n  /*  0 */           0,           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n  /*  8 */  GROUP(226),  GROUP(227),  GROUP(228),  GROUP(229),\n  /*  c */  GROUP(230),  GROUP(231),  GROUP(232),  GROUP(233),\n  /* 10 */           0,           0,           0,           0,\n  /* 14 */  GROUP(234),  GROUP(235),  GROUP(236),  GROUP(238),\n  /* 18 */           0,           0,           0,           0,\n  /* 1c */           0,           0,           0,           0,\n  /* 20 */  GROUP(239),  GROUP(240),  GROUP(241),           0,\n  /* 24 */           0,           0,           0,           0,\n  /* 28 */           0,           0,           0,           0,\n  /* 2c */           0,           0,           0,           0,\n  /* 30 */           0,           0,           0,           0,\n  /* 34 */           0,           0,           0,           0,\n  /* 38 */           0,           0,           0,           0,\n  /* 3c */           0,           0,           0,           0,\n  /* 40 */  GROUP(243),  GROUP(244),  GROUP(245),           0,\n  /* 44 */  GROUP(246),           0,           0,           0,\n  /* 48 */           0,           0,           0,           0,\n  /* 4c */           0,           0,           0,           0,\n  /* 50 */           0,           0,           0,           0,\n  /* 54 */           0,           0,           0,           0,\n  /* 58 */           0,           0,           0,           0,\n  /* 5c */           0,           0,           0,           0,\n  /* 60 */  GROUP(247),  GROUP(248),  GROUP(249),  GROUP(250),\n  /* 64 */           0,           0,           0,           0,\n  /* 68 */           0,           0,           0,           0,\n  /* 6c */           0,           0,           0,           0,\n  /* 70 */           0,           0,           0,           0,\n  /* 74 */           0,           0,           0,           0,\n  /* 78 */           0,           0,           0,           0,\n  /* 7c */           0,           0,           0,           0,\n  /* 80 */           0,           0,           0,           0,\n  /* 84 */           0,           0,           0,           0,\n  /* 88 */           0,           0,           0,           0,\n  /* 8c */           0,           0,           0,           0,\n  /* 90 */           0,           0,           0,           0,\n  /* 94 */           0,           0,           0,           0,\n  /* 98 */           0,           0,           0,           0,\n  /* 9c */           0,           0,           0,           0,\n  /* a0 */           0,           0,           0,           0,\n  /* a4 */           0,           0,           0,           0,\n  /* a8 */           0,           0,           0,           0,\n  /* ac */           0,           0,           0,           0,\n  /* b0 */           0,           0,           0,           0,\n  /* b4 */           0,           0,           0,           0,\n  /* b8 */           0,           0,           0,           0,\n  /* bc */           0,           0,           0,           0,\n  /* c0 */           0,           0,           0,           0,\n  /* c4 */           0,           0,           0,           0,\n  /* c8 */           0,           0,           0,           0,\n  /* cc */           0,           0,           0,           0,\n  /* d0 */           0,           0,           0,           0,\n  /* d4 */           0,           0,           0,           0,\n  /* d8 */           0,           0,           0,           0,\n  /* dc */           0,           0,           0,  GROUP(251),\n  /* e0 */           0,           0,           0,           0,\n  /* e4 */           0,           0,           0,           0,\n  /* e8 */           0,           0,           0,           0,\n  /* ec */           0,           0,           0,           0,\n  /* f0 */           0,           0,           0,           0,\n  /* f4 */           0,           0,           0,           0,\n  /* f8 */           0,           0,           0,           0,\n  /* fc */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__252[] = {\n  /*  0 */         265,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__253[] = {\n  /*  0 */         266,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__254[] = {\n  /*  0 */         267,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__255[] = {\n  /*  0 */         268,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__256[] = {\n  /*  0 */         269,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__257[] = {\n  /*  0 */         270,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__258[] = {\n  /*  0 */         271,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__259[] = {\n  /*  0 */         272,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__260[] = {\n  /*  0 */         273,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__261[] = {\n  /*  0 */         274,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__262[] = {\n  /*  0 */         275,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__263[] = {\n  /*  0 */         276,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__264[] = {\n  /*  0 */         277,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__265[] = {\n  /*  0 */         278,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__266[] = {\n  /*  0 */         279,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__267[] = {\n  /*  0 */         280,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__268[] = {\n  /*  0 */         281,           0,           0,         282,\n};\n\nstatic const uint16_t ud_itab__269[] = {\n  /*  0 */         283,         284,         285,         286,\n};\n\nstatic const uint16_t ud_itab__270[] = {\n  /*  0 */         287,           0,         288,           0,\n};\n\nstatic const uint16_t ud_itab__271[] = {\n  /*  0 */         289,           0,         290,           0,\n};\n\nstatic const uint16_t ud_itab__272[] = {\n  /*  0 */         291,           0,           0,         292,\n};\n\nstatic const uint16_t ud_itab__273[] = {\n  /*  0 */         293,           0,           0,         294,\n};\n\nstatic const uint16_t ud_itab__274[] = {\n  /*  0 */         295,           0,           0,         296,\n};\n\nstatic const uint16_t ud_itab__275[] = {\n  /*  0 */         297,           0,           0,         298,\n};\n\nstatic const uint16_t ud_itab__276[] = {\n  /*  0 */         299,         300,         301,         302,\n};\n\nstatic const uint16_t ud_itab__277[] = {\n  /*  0 */         303,         304,         305,         306,\n};\n\nstatic const uint16_t ud_itab__278[] = {\n  /*  0 */         307,         308,         309,         310,\n};\n\nstatic const uint16_t ud_itab__279[] = {\n  /*  0 */         311,           0,         312,         313,\n};\n\nstatic const uint16_t ud_itab__280[] = {\n  /*  0 */         314,         315,         316,         317,\n};\n\nstatic const uint16_t ud_itab__281[] = {\n  /*  0 */         318,         319,         320,         321,\n};\n\nstatic const uint16_t ud_itab__282[] = {\n  /*  0 */         322,         323,         324,         325,\n};\n\nstatic const uint16_t ud_itab__283[] = {\n  /*  0 */         326,         327,         328,         329,\n};\n\nstatic const uint16_t ud_itab__284[] = {\n  /*  0 */         330,           0,           0,         331,\n};\n\nstatic const uint16_t ud_itab__285[] = {\n  /*  0 */         332,           0,           0,         333,\n};\n\nstatic const uint16_t ud_itab__286[] = {\n  /*  0 */         334,           0,           0,         335,\n};\n\nstatic const uint16_t ud_itab__287[] = {\n  /*  0 */         336,           0,           0,         337,\n};\n\nstatic const uint16_t ud_itab__288[] = {\n  /*  0 */         338,           0,           0,         339,\n};\n\nstatic const uint16_t ud_itab__289[] = {\n  /*  0 */         340,           0,           0,         341,\n};\n\nstatic const uint16_t ud_itab__290[] = {\n  /*  0 */         342,           0,           0,         343,\n};\n\nstatic const uint16_t ud_itab__291[] = {\n  /*  0 */         344,           0,           0,         345,\n};\n\nstatic const uint16_t ud_itab__292[] = {\n  /*  0 */         346,           0,           0,         347,\n};\n\nstatic const uint16_t ud_itab__293[] = {\n  /*  0 */         348,           0,           0,         349,\n};\n\nstatic const uint16_t ud_itab__294[] = {\n  /*  0 */         350,           0,           0,         351,\n};\n\nstatic const uint16_t ud_itab__295[] = {\n  /*  0 */         352,           0,           0,         353,\n};\n\nstatic const uint16_t ud_itab__296[] = {\n  /*  0 */           0,           0,           0,         354,\n};\n\nstatic const uint16_t ud_itab__297[] = {\n  /*  0 */           0,           0,           0,         355,\n};\n\nstatic const uint16_t ud_itab__298[] = {\n  /*  0 */         356,           0,           0,         357,\n};\n\nstatic const uint16_t ud_itab__299[] = {\n  /*  0 */         358,           0,         359,         360,\n};\n\nstatic const uint16_t ud_itab__300[] = {\n  /*  0 */         361,         362,         363,         364,\n};\n\nstatic const uint16_t ud_itab__302[] = {\n  /*  0 */         365,           0,           0,         366,\n};\n\nstatic const uint16_t ud_itab__303[] = {\n  /*  0 */         367,           0,           0,         368,\n};\n\nstatic const uint16_t ud_itab__304[] = {\n  /*  0 */         369,           0,           0,         370,\n};\n\nstatic const uint16_t ud_itab__301[] = {\n  /*  0 */           0,           0,  GROUP(302),           0,\n  /*  4 */  GROUP(303),           0,  GROUP(304),           0,\n};\n\nstatic const uint16_t ud_itab__306[] = {\n  /*  0 */         371,           0,           0,         372,\n};\n\nstatic const uint16_t ud_itab__307[] = {\n  /*  0 */         373,           0,           0,         374,\n};\n\nstatic const uint16_t ud_itab__308[] = {\n  /*  0 */         375,           0,           0,         376,\n};\n\nstatic const uint16_t ud_itab__305[] = {\n  /*  0 */           0,           0,  GROUP(306),           0,\n  /*  4 */  GROUP(307),           0,  GROUP(308),           0,\n};\n\nstatic const uint16_t ud_itab__310[] = {\n  /*  0 */         377,           0,           0,         378,\n};\n\nstatic const uint16_t ud_itab__311[] = {\n  /*  0 */           0,           0,           0,         379,\n};\n\nstatic const uint16_t ud_itab__312[] = {\n  /*  0 */         380,           0,           0,         381,\n};\n\nstatic const uint16_t ud_itab__313[] = {\n  /*  0 */           0,           0,           0,         382,\n};\n\nstatic const uint16_t ud_itab__309[] = {\n  /*  0 */           0,           0,  GROUP(310),  GROUP(311),\n  /*  4 */           0,           0,  GROUP(312),  GROUP(313),\n};\n\nstatic const uint16_t ud_itab__314[] = {\n  /*  0 */         383,           0,           0,         384,\n};\n\nstatic const uint16_t ud_itab__315[] = {\n  /*  0 */         385,           0,           0,         386,\n};\n\nstatic const uint16_t ud_itab__316[] = {\n  /*  0 */         387,           0,           0,         388,\n};\n\nstatic const uint16_t ud_itab__317[] = {\n  /*  0 */         389,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__319[] = {\n  /*  0 */           0,         390,           0,\n};\n\nstatic const uint16_t ud_itab__318[] = {\n  /*  0 */  GROUP(319),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__321[] = {\n  /*  0 */           0,         391,           0,\n};\n\nstatic const uint16_t ud_itab__320[] = {\n  /*  0 */  GROUP(321),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__322[] = {\n  /*  0 */           0,         392,           0,         393,\n};\n\nstatic const uint16_t ud_itab__323[] = {\n  /*  0 */           0,         394,           0,         395,\n};\n\nstatic const uint16_t ud_itab__324[] = {\n  /*  0 */         396,           0,         397,         398,\n};\n\nstatic const uint16_t ud_itab__325[] = {\n  /*  0 */         399,           0,         400,         401,\n};\n\nstatic const uint16_t ud_itab__326[] = {\n  /*  0 */         402,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__327[] = {\n  /*  0 */         403,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__328[] = {\n  /*  0 */         404,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__329[] = {\n  /*  0 */         405,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__330[] = {\n  /*  0 */         406,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__331[] = {\n  /*  0 */         407,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__332[] = {\n  /*  0 */         408,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__333[] = {\n  /*  0 */         409,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__334[] = {\n  /*  0 */         410,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__335[] = {\n  /*  0 */         411,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__336[] = {\n  /*  0 */         412,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__337[] = {\n  /*  0 */         413,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__338[] = {\n  /*  0 */         414,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__339[] = {\n  /*  0 */         415,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__340[] = {\n  /*  0 */         416,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__341[] = {\n  /*  0 */         417,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__342[] = {\n  /*  0 */         418,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__343[] = {\n  /*  0 */         419,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__344[] = {\n  /*  0 */         420,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__345[] = {\n  /*  0 */         421,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__346[] = {\n  /*  0 */         422,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__347[] = {\n  /*  0 */         423,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__348[] = {\n  /*  0 */         424,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__349[] = {\n  /*  0 */         425,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__350[] = {\n  /*  0 */         426,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__351[] = {\n  /*  0 */         427,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__352[] = {\n  /*  0 */         428,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__353[] = {\n  /*  0 */         429,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__354[] = {\n  /*  0 */         430,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__355[] = {\n  /*  0 */         431,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__356[] = {\n  /*  0 */         432,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__357[] = {\n  /*  0 */         433,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__358[] = {\n  /*  0 */         434,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__359[] = {\n  /*  0 */         435,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__360[] = {\n  /*  0 */         436,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__361[] = {\n  /*  0 */         437,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__362[] = {\n  /*  0 */         438,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__363[] = {\n  /*  0 */         439,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__368[] = {\n  /*  0 */           0,         440,\n};\n\nstatic const uint16_t ud_itab__367[] = {\n  /*  0 */  GROUP(368),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__366[] = {\n  /*  0 */  GROUP(367),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__371[] = {\n  /*  0 */           0,         441,\n};\n\nstatic const uint16_t ud_itab__370[] = {\n  /*  0 */  GROUP(371),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__369[] = {\n  /*  0 */  GROUP(370),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__374[] = {\n  /*  0 */           0,         442,\n};\n\nstatic const uint16_t ud_itab__373[] = {\n  /*  0 */  GROUP(374),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__372[] = {\n  /*  0 */  GROUP(373),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__365[] = {\n  /*  0 */  GROUP(366),  GROUP(369),  GROUP(372),           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__364[] = {\n  /*  0 */           0,  GROUP(365),\n};\n\nstatic const uint16_t ud_itab__379[] = {\n  /*  0 */           0,         443,\n};\n\nstatic const uint16_t ud_itab__378[] = {\n  /*  0 */  GROUP(379),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__377[] = {\n  /*  0 */  GROUP(378),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__382[] = {\n  /*  0 */           0,         444,\n};\n\nstatic const uint16_t ud_itab__381[] = {\n  /*  0 */  GROUP(382),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__380[] = {\n  /*  0 */  GROUP(381),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__385[] = {\n  /*  0 */           0,         445,\n};\n\nstatic const uint16_t ud_itab__384[] = {\n  /*  0 */  GROUP(385),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__383[] = {\n  /*  0 */  GROUP(384),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__388[] = {\n  /*  0 */           0,         446,\n};\n\nstatic const uint16_t ud_itab__387[] = {\n  /*  0 */  GROUP(388),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__386[] = {\n  /*  0 */  GROUP(387),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__391[] = {\n  /*  0 */           0,         447,\n};\n\nstatic const uint16_t ud_itab__390[] = {\n  /*  0 */  GROUP(391),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__389[] = {\n  /*  0 */  GROUP(390),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__394[] = {\n  /*  0 */           0,         448,\n};\n\nstatic const uint16_t ud_itab__393[] = {\n  /*  0 */  GROUP(394),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__392[] = {\n  /*  0 */  GROUP(393),           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__376[] = {\n  /*  0 */  GROUP(377),  GROUP(380),  GROUP(383),  GROUP(386),\n  /*  4 */  GROUP(389),  GROUP(392),           0,           0,\n};\n\nstatic const uint16_t ud_itab__375[] = {\n  /*  0 */           0,  GROUP(376),\n};\n\nstatic const uint16_t ud_itab__395[] = {\n  /*  0 */         449,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__396[] = {\n  /*  0 */         450,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__397[] = {\n  /*  0 */         451,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__398[] = {\n  /*  0 */         452,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__399[] = {\n  /*  0 */         453,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__400[] = {\n  /*  0 */         454,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__404[] = {\n  /*  0 */         455,           0,\n};\n\nstatic const uint16_t ud_itab__403[] = {\n  /*  0 */  GROUP(404),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__406[] = {\n  /*  0 */         456,           0,\n};\n\nstatic const uint16_t ud_itab__405[] = {\n  /*  0 */  GROUP(406),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__408[] = {\n  /*  0 */         457,           0,\n};\n\nstatic const uint16_t ud_itab__407[] = {\n  /*  0 */  GROUP(408),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__410[] = {\n  /*  0 */         458,           0,\n};\n\nstatic const uint16_t ud_itab__409[] = {\n  /*  0 */  GROUP(410),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__412[] = {\n  /*  0 */         459,           0,\n};\n\nstatic const uint16_t ud_itab__411[] = {\n  /*  0 */  GROUP(412),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__414[] = {\n  /*  0 */         460,           0,\n};\n\nstatic const uint16_t ud_itab__413[] = {\n  /*  0 */  GROUP(414),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__416[] = {\n  /*  0 */         461,           0,\n};\n\nstatic const uint16_t ud_itab__415[] = {\n  /*  0 */  GROUP(416),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__402[] = {\n  /*  0 */  GROUP(403),  GROUP(405),  GROUP(407),  GROUP(409),\n  /*  4 */  GROUP(411),  GROUP(413),           0,  GROUP(415),\n};\n\nstatic const uint16_t ud_itab__420[] = {\n  /*  0 */           0,         462,\n};\n\nstatic const uint16_t ud_itab__419[] = {\n  /*  0 */  GROUP(420),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__422[] = {\n  /*  0 */           0,         463,\n};\n\nstatic const uint16_t ud_itab__421[] = {\n  /*  0 */  GROUP(422),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__424[] = {\n  /*  0 */           0,         464,\n};\n\nstatic const uint16_t ud_itab__423[] = {\n  /*  0 */  GROUP(424),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__426[] = {\n  /*  0 */           0,         465,\n};\n\nstatic const uint16_t ud_itab__425[] = {\n  /*  0 */  GROUP(426),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__428[] = {\n  /*  0 */           0,         466,\n};\n\nstatic const uint16_t ud_itab__427[] = {\n  /*  0 */  GROUP(428),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__430[] = {\n  /*  0 */           0,         467,\n};\n\nstatic const uint16_t ud_itab__429[] = {\n  /*  0 */  GROUP(430),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__432[] = {\n  /*  0 */           0,         468,\n};\n\nstatic const uint16_t ud_itab__431[] = {\n  /*  0 */  GROUP(432),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__434[] = {\n  /*  0 */           0,         469,\n};\n\nstatic const uint16_t ud_itab__433[] = {\n  /*  0 */  GROUP(434),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__418[] = {\n  /*  0 */  GROUP(419),  GROUP(421),  GROUP(423),  GROUP(425),\n  /*  4 */  GROUP(427),  GROUP(429),  GROUP(431),  GROUP(433),\n};\n\nstatic const uint16_t ud_itab__437[] = {\n  /*  0 */           0,         470,\n};\n\nstatic const uint16_t ud_itab__436[] = {\n  /*  0 */  GROUP(437),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__439[] = {\n  /*  0 */           0,         471,\n};\n\nstatic const uint16_t ud_itab__438[] = {\n  /*  0 */  GROUP(439),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__441[] = {\n  /*  0 */           0,         472,\n};\n\nstatic const uint16_t ud_itab__440[] = {\n  /*  0 */  GROUP(441),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__443[] = {\n  /*  0 */           0,         473,\n};\n\nstatic const uint16_t ud_itab__442[] = {\n  /*  0 */  GROUP(443),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__445[] = {\n  /*  0 */           0,         474,\n};\n\nstatic const uint16_t ud_itab__444[] = {\n  /*  0 */  GROUP(445),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__447[] = {\n  /*  0 */           0,         475,\n};\n\nstatic const uint16_t ud_itab__446[] = {\n  /*  0 */  GROUP(447),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__449[] = {\n  /*  0 */           0,         476,\n};\n\nstatic const uint16_t ud_itab__448[] = {\n  /*  0 */  GROUP(449),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__451[] = {\n  /*  0 */           0,         477,\n};\n\nstatic const uint16_t ud_itab__450[] = {\n  /*  0 */  GROUP(451),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__435[] = {\n  /*  0 */  GROUP(436),  GROUP(438),  GROUP(440),  GROUP(442),\n  /*  4 */  GROUP(444),  GROUP(446),  GROUP(448),  GROUP(450),\n};\n\nstatic const uint16_t ud_itab__454[] = {\n  /*  0 */           0,         478,\n};\n\nstatic const uint16_t ud_itab__453[] = {\n  /*  0 */  GROUP(454),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__456[] = {\n  /*  0 */           0,         479,\n};\n\nstatic const uint16_t ud_itab__455[] = {\n  /*  0 */  GROUP(456),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__458[] = {\n  /*  0 */           0,         480,\n};\n\nstatic const uint16_t ud_itab__457[] = {\n  /*  0 */  GROUP(458),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__460[] = {\n  /*  0 */           0,         481,\n};\n\nstatic const uint16_t ud_itab__459[] = {\n  /*  0 */  GROUP(460),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__462[] = {\n  /*  0 */           0,         482,\n};\n\nstatic const uint16_t ud_itab__461[] = {\n  /*  0 */  GROUP(462),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__464[] = {\n  /*  0 */           0,         483,\n};\n\nstatic const uint16_t ud_itab__463[] = {\n  /*  0 */  GROUP(464),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__466[] = {\n  /*  0 */           0,         484,\n};\n\nstatic const uint16_t ud_itab__465[] = {\n  /*  0 */  GROUP(466),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__468[] = {\n  /*  0 */           0,         485,\n};\n\nstatic const uint16_t ud_itab__467[] = {\n  /*  0 */  GROUP(468),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__452[] = {\n  /*  0 */  GROUP(453),  GROUP(455),  GROUP(457),  GROUP(459),\n  /*  4 */  GROUP(461),  GROUP(463),  GROUP(465),  GROUP(467),\n};\n\nstatic const uint16_t ud_itab__417[] = {\n  /*  0 */           0,           0,           0,           0,\n  /*  4 */           0,  GROUP(418),  GROUP(435),  GROUP(452),\n};\n\nstatic const uint16_t ud_itab__401[] = {\n  /*  0 */  GROUP(402),  GROUP(417),\n};\n\nstatic const uint16_t ud_itab__469[] = {\n  /*  0 */         486,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__470[] = {\n  /*  0 */         487,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__471[] = {\n  /*  0 */         488,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__472[] = {\n  /*  0 */         489,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__473[] = {\n  /*  0 */         490,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__474[] = {\n  /*  0 */         491,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__475[] = {\n  /*  0 */         492,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__476[] = {\n  /*  0 */         493,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__477[] = {\n  /*  0 */         494,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__478[] = {\n  /*  0 */           0,           0,         495,           0,\n};\n\nstatic const uint16_t ud_itab__480[] = {\n  /*  0 */         496,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__481[] = {\n  /*  0 */         497,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__482[] = {\n  /*  0 */         498,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__483[] = {\n  /*  0 */         499,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__479[] = {\n  /*  0 */           0,           0,           0,           0,\n  /*  4 */  GROUP(480),  GROUP(481),  GROUP(482),  GROUP(483),\n};\n\nstatic const uint16_t ud_itab__484[] = {\n  /*  0 */         500,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__485[] = {\n  /*  0 */         501,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__486[] = {\n  /*  0 */         502,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__487[] = {\n  /*  0 */         503,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__488[] = {\n  /*  0 */         504,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__489[] = {\n  /*  0 */         505,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__490[] = {\n  /*  0 */         506,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__491[] = {\n  /*  0 */         507,         508,         509,         510,\n};\n\nstatic const uint16_t ud_itab__492[] = {\n  /*  0 */         511,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__493[] = {\n  /*  0 */         512,           0,           0,         513,\n};\n\nstatic const uint16_t ud_itab__494[] = {\n  /*  0 */         514,           0,           0,         515,\n};\n\nstatic const uint16_t ud_itab__495[] = {\n  /*  0 */         516,           0,           0,         517,\n};\n\nstatic const uint16_t ud_itab__498[] = {\n  /*  0 */         518,         519,         520,\n};\n\nstatic const uint16_t ud_itab__497[] = {\n  /*  0 */  GROUP(498),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__500[] = {\n  /*  0 */           0,         521,           0,\n};\n\nstatic const uint16_t ud_itab__501[] = {\n  /*  0 */           0,         522,           0,\n};\n\nstatic const uint16_t ud_itab__502[] = {\n  /*  0 */           0,         523,           0,\n};\n\nstatic const uint16_t ud_itab__499[] = {\n  /*  0 */  GROUP(500),           0,  GROUP(501),  GROUP(502),\n};\n\nstatic const uint16_t ud_itab__504[] = {\n  /*  0 */           0,         524,           0,\n};\n\nstatic const uint16_t ud_itab__503[] = {\n  /*  0 */  GROUP(504),           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__496[] = {\n  /*  0 */           0,  GROUP(497),           0,           0,\n  /*  4 */           0,           0,  GROUP(499),  GROUP(503),\n};\n\nstatic const uint16_t ud_itab__505[] = {\n  /*  0 */         525,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__506[] = {\n  /*  0 */         526,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__507[] = {\n  /*  0 */         527,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__508[] = {\n  /*  0 */         528,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__509[] = {\n  /*  0 */         529,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__510[] = {\n  /*  0 */         530,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__511[] = {\n  /*  0 */         531,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__512[] = {\n  /*  0 */         532,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__513[] = {\n  /*  0 */           0,         533,           0,         534,\n};\n\nstatic const uint16_t ud_itab__514[] = {\n  /*  0 */         535,           0,           0,         536,\n};\n\nstatic const uint16_t ud_itab__515[] = {\n  /*  0 */         537,           0,           0,         538,\n};\n\nstatic const uint16_t ud_itab__516[] = {\n  /*  0 */         539,           0,           0,         540,\n};\n\nstatic const uint16_t ud_itab__517[] = {\n  /*  0 */         541,           0,           0,         542,\n};\n\nstatic const uint16_t ud_itab__518[] = {\n  /*  0 */         543,           0,           0,         544,\n};\n\nstatic const uint16_t ud_itab__519[] = {\n  /*  0 */           0,         545,         546,         547,\n};\n\nstatic const uint16_t ud_itab__520[] = {\n  /*  0 */         548,           0,           0,         549,\n};\n\nstatic const uint16_t ud_itab__521[] = {\n  /*  0 */         550,           0,           0,         551,\n};\n\nstatic const uint16_t ud_itab__522[] = {\n  /*  0 */         552,           0,           0,         553,\n};\n\nstatic const uint16_t ud_itab__523[] = {\n  /*  0 */         554,           0,           0,         555,\n};\n\nstatic const uint16_t ud_itab__524[] = {\n  /*  0 */         556,           0,           0,         557,\n};\n\nstatic const uint16_t ud_itab__525[] = {\n  /*  0 */         558,           0,           0,         559,\n};\n\nstatic const uint16_t ud_itab__526[] = {\n  /*  0 */         560,           0,           0,         561,\n};\n\nstatic const uint16_t ud_itab__527[] = {\n  /*  0 */         562,           0,           0,         563,\n};\n\nstatic const uint16_t ud_itab__528[] = {\n  /*  0 */         564,           0,           0,         565,\n};\n\nstatic const uint16_t ud_itab__529[] = {\n  /*  0 */         566,           0,           0,         567,\n};\n\nstatic const uint16_t ud_itab__530[] = {\n  /*  0 */         568,           0,           0,         569,\n};\n\nstatic const uint16_t ud_itab__531[] = {\n  /*  0 */         570,           0,           0,         571,\n};\n\nstatic const uint16_t ud_itab__532[] = {\n  /*  0 */         572,           0,           0,         573,\n};\n\nstatic const uint16_t ud_itab__533[] = {\n  /*  0 */         574,           0,           0,         575,\n};\n\nstatic const uint16_t ud_itab__534[] = {\n  /*  0 */         576,           0,           0,         577,\n};\n\nstatic const uint16_t ud_itab__535[] = {\n  /*  0 */           0,         578,         579,         580,\n};\n\nstatic const uint16_t ud_itab__536[] = {\n  /*  0 */         581,           0,           0,         582,\n};\n\nstatic const uint16_t ud_itab__537[] = {\n  /*  0 */         583,           0,           0,         584,\n};\n\nstatic const uint16_t ud_itab__538[] = {\n  /*  0 */         585,           0,           0,         586,\n};\n\nstatic const uint16_t ud_itab__539[] = {\n  /*  0 */         587,           0,           0,         588,\n};\n\nstatic const uint16_t ud_itab__540[] = {\n  /*  0 */         589,           0,           0,         590,\n};\n\nstatic const uint16_t ud_itab__541[] = {\n  /*  0 */         591,           0,           0,         592,\n};\n\nstatic const uint16_t ud_itab__542[] = {\n  /*  0 */         593,           0,           0,         594,\n};\n\nstatic const uint16_t ud_itab__543[] = {\n  /*  0 */         595,           0,           0,         596,\n};\n\nstatic const uint16_t ud_itab__544[] = {\n  /*  0 */         597,           0,           0,         598,\n};\n\nstatic const uint16_t ud_itab__545[] = {\n  /*  0 */           0,         599,           0,           0,\n};\n\nstatic const uint16_t ud_itab__546[] = {\n  /*  0 */         600,           0,           0,         601,\n};\n\nstatic const uint16_t ud_itab__547[] = {\n  /*  0 */         602,           0,           0,         603,\n};\n\nstatic const uint16_t ud_itab__548[] = {\n  /*  0 */         604,           0,           0,         605,\n};\n\nstatic const uint16_t ud_itab__549[] = {\n  /*  0 */         606,           0,           0,         607,\n};\n\nstatic const uint16_t ud_itab__550[] = {\n  /*  0 */         608,           0,           0,         609,\n};\n\nstatic const uint16_t ud_itab__551[] = {\n  /*  0 */         610,           0,           0,         611,\n};\n\nstatic const uint16_t ud_itab__554[] = {\n  /*  0 */           0,         612,\n};\n\nstatic const uint16_t ud_itab__555[] = {\n  /*  0 */           0,         613,\n};\n\nstatic const uint16_t ud_itab__553[] = {\n  /*  0 */  GROUP(554),           0,           0,  GROUP(555),\n};\n\nstatic const uint16_t ud_itab__552[] = {\n  /*  0 */           0,  GROUP(553),\n};\n\nstatic const uint16_t ud_itab__556[] = {\n  /*  0 */         614,           0,           0,         615,\n};\n\nstatic const uint16_t ud_itab__557[] = {\n  /*  0 */         616,           0,           0,         617,\n};\n\nstatic const uint16_t ud_itab__558[] = {\n  /*  0 */         618,           0,           0,         619,\n};\n\nstatic const uint16_t ud_itab__559[] = {\n  /*  0 */         620,           0,           0,         621,\n};\n\nstatic const uint16_t ud_itab__560[] = {\n  /*  0 */         622,           0,           0,         623,\n};\n\nstatic const uint16_t ud_itab__561[] = {\n  /*  0 */         624,           0,           0,         625,\n};\n\nstatic const uint16_t ud_itab__562[] = {\n  /*  0 */         626,           0,           0,         627,\n};\n\nstatic const uint16_t ud_itab__4[] = {\n  /*  0 */    GROUP(5),   GROUP(12),   GROUP(87),   GROUP(88),\n  /*  4 */           0,   GROUP(89),   GROUP(90),   GROUP(91),\n  /*  8 */   GROUP(92),   GROUP(93),           0,   GROUP(94),\n  /*  c */           0,   GROUP(95),  GROUP(104),  GROUP(105),\n  /* 10 */  GROUP(106),  GROUP(107),  GROUP(108),  GROUP(118),\n  /* 14 */  GROUP(119),  GROUP(120),  GROUP(121),  GROUP(129),\n  /* 18 */  GROUP(130),  GROUP(135),  GROUP(136),  GROUP(137),\n  /* 1c */  GROUP(138),  GROUP(139),  GROUP(140),  GROUP(141),\n  /* 20 */  GROUP(142),  GROUP(143),  GROUP(144),  GROUP(145),\n  /* 24 */           0,           0,           0,           0,\n  /* 28 */  GROUP(146),  GROUP(147),  GROUP(148),  GROUP(149),\n  /* 2c */  GROUP(150),  GROUP(151),  GROUP(152),  GROUP(153),\n  /* 30 */  GROUP(154),  GROUP(155),  GROUP(156),  GROUP(157),\n  /* 34 */  GROUP(158),  GROUP(161),           0,  GROUP(164),\n  /* 38 */  GROUP(165),           0,  GROUP(225),           0,\n  /* 3c */           0,           0,           0,           0,\n  /* 40 */  GROUP(252),  GROUP(253),  GROUP(254),  GROUP(255),\n  /* 44 */  GROUP(256),  GROUP(257),  GROUP(258),  GROUP(259),\n  /* 48 */  GROUP(260),  GROUP(261),  GROUP(262),  GROUP(263),\n  /* 4c */  GROUP(264),  GROUP(265),  GROUP(266),  GROUP(267),\n  /* 50 */  GROUP(268),  GROUP(269),  GROUP(270),  GROUP(271),\n  /* 54 */  GROUP(272),  GROUP(273),  GROUP(274),  GROUP(275),\n  /* 58 */  GROUP(276),  GROUP(277),  GROUP(278),  GROUP(279),\n  /* 5c */  GROUP(280),  GROUP(281),  GROUP(282),  GROUP(283),\n  /* 60 */  GROUP(284),  GROUP(285),  GROUP(286),  GROUP(287),\n  /* 64 */  GROUP(288),  GROUP(289),  GROUP(290),  GROUP(291),\n  /* 68 */  GROUP(292),  GROUP(293),  GROUP(294),  GROUP(295),\n  /* 6c */  GROUP(296),  GROUP(297),  GROUP(298),  GROUP(299),\n  /* 70 */  GROUP(300),  GROUP(301),  GROUP(305),  GROUP(309),\n  /* 74 */  GROUP(314),  GROUP(315),  GROUP(316),  GROUP(317),\n  /* 78 */  GROUP(318),  GROUP(320),           0,           0,\n  /* 7c */  GROUP(322),  GROUP(323),  GROUP(324),  GROUP(325),\n  /* 80 */  GROUP(326),  GROUP(327),  GROUP(328),  GROUP(329),\n  /* 84 */  GROUP(330),  GROUP(331),  GROUP(332),  GROUP(333),\n  /* 88 */  GROUP(334),  GROUP(335),  GROUP(336),  GROUP(337),\n  /* 8c */  GROUP(338),  GROUP(339),  GROUP(340),  GROUP(341),\n  /* 90 */  GROUP(342),  GROUP(343),  GROUP(344),  GROUP(345),\n  /* 94 */  GROUP(346),  GROUP(347),  GROUP(348),  GROUP(349),\n  /* 98 */  GROUP(350),  GROUP(351),  GROUP(352),  GROUP(353),\n  /* 9c */  GROUP(354),  GROUP(355),  GROUP(356),  GROUP(357),\n  /* a0 */  GROUP(358),  GROUP(359),  GROUP(360),  GROUP(361),\n  /* a4 */  GROUP(362),  GROUP(363),  GROUP(364),  GROUP(375),\n  /* a8 */  GROUP(395),  GROUP(396),  GROUP(397),  GROUP(398),\n  /* ac */  GROUP(399),  GROUP(400),  GROUP(401),  GROUP(469),\n  /* b0 */  GROUP(470),  GROUP(471),  GROUP(472),  GROUP(473),\n  /* b4 */  GROUP(474),  GROUP(475),  GROUP(476),  GROUP(477),\n  /* b8 */  GROUP(478),           0,  GROUP(479),  GROUP(484),\n  /* bc */  GROUP(485),  GROUP(486),  GROUP(487),  GROUP(488),\n  /* c0 */  GROUP(489),  GROUP(490),  GROUP(491),  GROUP(492),\n  /* c4 */  GROUP(493),  GROUP(494),  GROUP(495),  GROUP(496),\n  /* c8 */  GROUP(505),  GROUP(506),  GROUP(507),  GROUP(508),\n  /* cc */  GROUP(509),  GROUP(510),  GROUP(511),  GROUP(512),\n  /* d0 */  GROUP(513),  GROUP(514),  GROUP(515),  GROUP(516),\n  /* d4 */  GROUP(517),  GROUP(518),  GROUP(519),  GROUP(520),\n  /* d8 */  GROUP(521),  GROUP(522),  GROUP(523),  GROUP(524),\n  /* dc */  GROUP(525),  GROUP(526),  GROUP(527),  GROUP(528),\n  /* e0 */  GROUP(529),  GROUP(530),  GROUP(531),  GROUP(532),\n  /* e4 */  GROUP(533),  GROUP(534),  GROUP(535),  GROUP(536),\n  /* e8 */  GROUP(537),  GROUP(538),  GROUP(539),  GROUP(540),\n  /* ec */  GROUP(541),  GROUP(542),  GROUP(543),  GROUP(544),\n  /* f0 */  GROUP(545),  GROUP(546),  GROUP(547),  GROUP(548),\n  /* f4 */  GROUP(549),  GROUP(550),  GROUP(551),  GROUP(552),\n  /* f8 */  GROUP(556),  GROUP(557),  GROUP(558),  GROUP(559),\n  /* fc */  GROUP(560),  GROUP(561),  GROUP(562),           0,\n};\n\nstatic const uint16_t ud_itab__563[] = {\n  /*  0 */         634,           0,\n};\n\nstatic const uint16_t ud_itab__564[] = {\n  /*  0 */         635,           0,\n};\n\nstatic const uint16_t ud_itab__565[] = {\n  /*  0 */         642,           0,\n};\n\nstatic const uint16_t ud_itab__566[] = {\n  /*  0 */         643,           0,\n};\n\nstatic const uint16_t ud_itab__567[] = {\n  /*  0 */         650,           0,\n};\n\nstatic const uint16_t ud_itab__568[] = {\n  /*  0 */         657,           0,\n};\n\nstatic const uint16_t ud_itab__569[] = {\n  /*  0 */         664,           0,\n};\n\nstatic const uint16_t ud_itab__570[] = {\n  /*  0 */         671,           0,\n};\n\nstatic const uint16_t ud_itab__572[] = {\n  /*  0 */         704,           0,\n};\n\nstatic const uint16_t ud_itab__573[] = {\n  /*  0 */         705,           0,\n};\n\nstatic const uint16_t ud_itab__571[] = {\n  /*  0 */  GROUP(572),  GROUP(573),           0,\n};\n\nstatic const uint16_t ud_itab__575[] = {\n  /*  0 */         706,           0,\n};\n\nstatic const uint16_t ud_itab__576[] = {\n  /*  0 */         707,           0,\n};\n\nstatic const uint16_t ud_itab__574[] = {\n  /*  0 */  GROUP(575),  GROUP(576),           0,\n};\n\nstatic const uint16_t ud_itab__577[] = {\n  /*  0 */         708,           0,\n};\n\nstatic const uint16_t ud_itab__578[] = {\n  /*  0 */         709,         710,\n};\n\nstatic const uint16_t ud_itab__579[] = {\n  /*  0 */         716,         717,           0,\n};\n\nstatic const uint16_t ud_itab__580[] = {\n  /*  0 */         719,         720,           0,\n};\n\nstatic const uint16_t ud_itab__581[] = {\n  /*  0 */         737,         738,         739,         740,\n  /*  4 */         741,         742,         743,         744,\n};\n\nstatic const uint16_t ud_itab__582[] = {\n  /*  0 */         745,         746,         747,         748,\n  /*  4 */         749,         750,         751,         752,\n};\n\nstatic const uint16_t ud_itab__584[] = {\n  /*  0 */         753,           0,\n};\n\nstatic const uint16_t ud_itab__585[] = {\n  /*  0 */         754,           0,\n};\n\nstatic const uint16_t ud_itab__586[] = {\n  /*  0 */         755,           0,\n};\n\nstatic const uint16_t ud_itab__587[] = {\n  /*  0 */         756,           0,\n};\n\nstatic const uint16_t ud_itab__588[] = {\n  /*  0 */         757,           0,\n};\n\nstatic const uint16_t ud_itab__589[] = {\n  /*  0 */         758,           0,\n};\n\nstatic const uint16_t ud_itab__590[] = {\n  /*  0 */         759,           0,\n};\n\nstatic const uint16_t ud_itab__591[] = {\n  /*  0 */         760,           0,\n};\n\nstatic const uint16_t ud_itab__583[] = {\n  /*  0 */  GROUP(584),  GROUP(585),  GROUP(586),  GROUP(587),\n  /*  4 */  GROUP(588),  GROUP(589),  GROUP(590),  GROUP(591),\n};\n\nstatic const uint16_t ud_itab__592[] = {\n  /*  0 */         761,         762,         763,         764,\n  /*  4 */         765,         766,         767,         768,\n};\n\nstatic const uint16_t ud_itab__593[] = {\n  /*  0 */         780,           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__594[] = {\n  /*  0 */         789,         790,         791,\n};\n\nstatic const uint16_t ud_itab__595[] = {\n  /*  0 */         792,         793,         794,\n};\n\nstatic const uint16_t ud_itab__596[] = {\n  /*  0 */         795,           0,\n};\n\nstatic const uint16_t ud_itab__598[] = {\n  /*  0 */         797,         798,\n};\n\nstatic const uint16_t ud_itab__599[] = {\n  /*  0 */         799,         800,\n};\n\nstatic const uint16_t ud_itab__600[] = {\n  /*  0 */           0,         801,\n};\n\nstatic const uint16_t ud_itab__597[] = {\n  /*  0 */  GROUP(598),  GROUP(599),  GROUP(600),\n};\n\nstatic const uint16_t ud_itab__602[] = {\n  /*  0 */         802,           0,\n};\n\nstatic const uint16_t ud_itab__603[] = {\n  /*  0 */         803,         804,\n};\n\nstatic const uint16_t ud_itab__604[] = {\n  /*  0 */           0,         805,\n};\n\nstatic const uint16_t ud_itab__601[] = {\n  /*  0 */  GROUP(602),  GROUP(603),  GROUP(604),\n};\n\nstatic const uint16_t ud_itab__605[] = {\n  /*  0 */         813,         814,         815,\n};\n\nstatic const uint16_t ud_itab__606[] = {\n  /*  0 */         817,         818,         819,\n};\n\nstatic const uint16_t ud_itab__607[] = {\n  /*  0 */         823,         824,         825,\n};\n\nstatic const uint16_t ud_itab__608[] = {\n  /*  0 */         827,         828,         829,\n};\n\nstatic const uint16_t ud_itab__609[] = {\n  /*  0 */         831,         832,         833,\n};\n\nstatic const uint16_t ud_itab__610[] = {\n  /*  0 */         850,         851,         852,         853,\n  /*  4 */         854,         855,         856,         857,\n};\n\nstatic const uint16_t ud_itab__611[] = {\n  /*  0 */         858,         859,         860,         861,\n  /*  4 */         862,         863,         864,         865,\n};\n\nstatic const uint16_t ud_itab__612[] = {\n  /*  0 */         868,           0,\n};\n\nstatic const uint16_t ud_itab__613[] = {\n  /*  0 */         869,           0,\n};\n\nstatic const uint16_t ud_itab__614[] = {\n  /*  0 */         870,           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__615[] = {\n  /*  0 */         871,           0,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__616[] = {\n  /*  0 */         878,           0,\n};\n\nstatic const uint16_t ud_itab__617[] = {\n  /*  0 */         879,         880,         881,\n};\n\nstatic const uint16_t ud_itab__618[] = {\n  /*  0 */         882,         883,         884,         885,\n  /*  4 */         886,         887,         888,         889,\n};\n\nstatic const uint16_t ud_itab__619[] = {\n  /*  0 */         890,         891,         892,         893,\n  /*  4 */         894,         895,         896,         897,\n};\n\nstatic const uint16_t ud_itab__620[] = {\n  /*  0 */         898,         899,         900,         901,\n  /*  4 */         902,         903,         904,         905,\n};\n\nstatic const uint16_t ud_itab__621[] = {\n  /*  0 */         906,         907,         908,         909,\n  /*  4 */         910,         911,         912,         913,\n};\n\nstatic const uint16_t ud_itab__622[] = {\n  /*  0 */         914,           0,\n};\n\nstatic const uint16_t ud_itab__623[] = {\n  /*  0 */         915,           0,\n};\n\nstatic const uint16_t ud_itab__624[] = {\n  /*  0 */         916,           0,\n};\n\nstatic const uint16_t ud_itab__627[] = {\n  /*  0 */         918,           0,\n};\n\nstatic const uint16_t ud_itab__628[] = {\n  /*  0 */         919,           0,\n};\n\nstatic const uint16_t ud_itab__629[] = {\n  /*  0 */         920,           0,\n};\n\nstatic const uint16_t ud_itab__630[] = {\n  /*  0 */         921,           0,\n};\n\nstatic const uint16_t ud_itab__631[] = {\n  /*  0 */         922,           0,\n};\n\nstatic const uint16_t ud_itab__632[] = {\n  /*  0 */         923,           0,\n};\n\nstatic const uint16_t ud_itab__633[] = {\n  /*  0 */         924,           0,\n};\n\nstatic const uint16_t ud_itab__634[] = {\n  /*  0 */         925,           0,\n};\n\nstatic const uint16_t ud_itab__626[] = {\n  /*  0 */  GROUP(627),  GROUP(628),  GROUP(629),  GROUP(630),\n  /*  4 */  GROUP(631),  GROUP(632),  GROUP(633),  GROUP(634),\n};\n\nstatic const uint16_t ud_itab__636[] = {\n  /*  0 */           0,         926,\n};\n\nstatic const uint16_t ud_itab__637[] = {\n  /*  0 */           0,         927,\n};\n\nstatic const uint16_t ud_itab__638[] = {\n  /*  0 */           0,         928,\n};\n\nstatic const uint16_t ud_itab__639[] = {\n  /*  0 */           0,         929,\n};\n\nstatic const uint16_t ud_itab__640[] = {\n  /*  0 */           0,         930,\n};\n\nstatic const uint16_t ud_itab__641[] = {\n  /*  0 */           0,         931,\n};\n\nstatic const uint16_t ud_itab__642[] = {\n  /*  0 */           0,         932,\n};\n\nstatic const uint16_t ud_itab__643[] = {\n  /*  0 */           0,         933,\n};\n\nstatic const uint16_t ud_itab__644[] = {\n  /*  0 */           0,         934,\n};\n\nstatic const uint16_t ud_itab__645[] = {\n  /*  0 */           0,         935,\n};\n\nstatic const uint16_t ud_itab__646[] = {\n  /*  0 */           0,         936,\n};\n\nstatic const uint16_t ud_itab__647[] = {\n  /*  0 */           0,         937,\n};\n\nstatic const uint16_t ud_itab__648[] = {\n  /*  0 */           0,         938,\n};\n\nstatic const uint16_t ud_itab__649[] = {\n  /*  0 */           0,         939,\n};\n\nstatic const uint16_t ud_itab__650[] = {\n  /*  0 */           0,         940,\n};\n\nstatic const uint16_t ud_itab__651[] = {\n  /*  0 */           0,         941,\n};\n\nstatic const uint16_t ud_itab__652[] = {\n  /*  0 */           0,         942,\n};\n\nstatic const uint16_t ud_itab__653[] = {\n  /*  0 */           0,         943,\n};\n\nstatic const uint16_t ud_itab__654[] = {\n  /*  0 */           0,         944,\n};\n\nstatic const uint16_t ud_itab__655[] = {\n  /*  0 */           0,         945,\n};\n\nstatic const uint16_t ud_itab__656[] = {\n  /*  0 */           0,         946,\n};\n\nstatic const uint16_t ud_itab__657[] = {\n  /*  0 */           0,         947,\n};\n\nstatic const uint16_t ud_itab__658[] = {\n  /*  0 */           0,         948,\n};\n\nstatic const uint16_t ud_itab__659[] = {\n  /*  0 */           0,         949,\n};\n\nstatic const uint16_t ud_itab__660[] = {\n  /*  0 */           0,         950,\n};\n\nstatic const uint16_t ud_itab__661[] = {\n  /*  0 */           0,         951,\n};\n\nstatic const uint16_t ud_itab__662[] = {\n  /*  0 */           0,         952,\n};\n\nstatic const uint16_t ud_itab__663[] = {\n  /*  0 */           0,         953,\n};\n\nstatic const uint16_t ud_itab__664[] = {\n  /*  0 */           0,         954,\n};\n\nstatic const uint16_t ud_itab__665[] = {\n  /*  0 */           0,         955,\n};\n\nstatic const uint16_t ud_itab__666[] = {\n  /*  0 */           0,         956,\n};\n\nstatic const uint16_t ud_itab__667[] = {\n  /*  0 */           0,         957,\n};\n\nstatic const uint16_t ud_itab__668[] = {\n  /*  0 */           0,         958,\n};\n\nstatic const uint16_t ud_itab__669[] = {\n  /*  0 */           0,         959,\n};\n\nstatic const uint16_t ud_itab__670[] = {\n  /*  0 */           0,         960,\n};\n\nstatic const uint16_t ud_itab__671[] = {\n  /*  0 */           0,         961,\n};\n\nstatic const uint16_t ud_itab__672[] = {\n  /*  0 */           0,         962,\n};\n\nstatic const uint16_t ud_itab__673[] = {\n  /*  0 */           0,         963,\n};\n\nstatic const uint16_t ud_itab__674[] = {\n  /*  0 */           0,         964,\n};\n\nstatic const uint16_t ud_itab__675[] = {\n  /*  0 */           0,         965,\n};\n\nstatic const uint16_t ud_itab__676[] = {\n  /*  0 */           0,         966,\n};\n\nstatic const uint16_t ud_itab__677[] = {\n  /*  0 */           0,         967,\n};\n\nstatic const uint16_t ud_itab__678[] = {\n  /*  0 */           0,         968,\n};\n\nstatic const uint16_t ud_itab__679[] = {\n  /*  0 */           0,         969,\n};\n\nstatic const uint16_t ud_itab__680[] = {\n  /*  0 */           0,         970,\n};\n\nstatic const uint16_t ud_itab__681[] = {\n  /*  0 */           0,         971,\n};\n\nstatic const uint16_t ud_itab__682[] = {\n  /*  0 */           0,         972,\n};\n\nstatic const uint16_t ud_itab__683[] = {\n  /*  0 */           0,         973,\n};\n\nstatic const uint16_t ud_itab__684[] = {\n  /*  0 */           0,         974,\n};\n\nstatic const uint16_t ud_itab__685[] = {\n  /*  0 */           0,         975,\n};\n\nstatic const uint16_t ud_itab__686[] = {\n  /*  0 */           0,         976,\n};\n\nstatic const uint16_t ud_itab__687[] = {\n  /*  0 */           0,         977,\n};\n\nstatic const uint16_t ud_itab__688[] = {\n  /*  0 */           0,         978,\n};\n\nstatic const uint16_t ud_itab__689[] = {\n  /*  0 */           0,         979,\n};\n\nstatic const uint16_t ud_itab__690[] = {\n  /*  0 */           0,         980,\n};\n\nstatic const uint16_t ud_itab__691[] = {\n  /*  0 */           0,         981,\n};\n\nstatic const uint16_t ud_itab__692[] = {\n  /*  0 */           0,         982,\n};\n\nstatic const uint16_t ud_itab__693[] = {\n  /*  0 */           0,         983,\n};\n\nstatic const uint16_t ud_itab__694[] = {\n  /*  0 */           0,         984,\n};\n\nstatic const uint16_t ud_itab__695[] = {\n  /*  0 */           0,         985,\n};\n\nstatic const uint16_t ud_itab__696[] = {\n  /*  0 */           0,         986,\n};\n\nstatic const uint16_t ud_itab__697[] = {\n  /*  0 */           0,         987,\n};\n\nstatic const uint16_t ud_itab__698[] = {\n  /*  0 */           0,         988,\n};\n\nstatic const uint16_t ud_itab__699[] = {\n  /*  0 */           0,         989,\n};\n\nstatic const uint16_t ud_itab__635[] = {\n  /*  0 */  GROUP(636),  GROUP(637),  GROUP(638),  GROUP(639),\n  /*  4 */  GROUP(640),  GROUP(641),  GROUP(642),  GROUP(643),\n  /*  8 */  GROUP(644),  GROUP(645),  GROUP(646),  GROUP(647),\n  /*  c */  GROUP(648),  GROUP(649),  GROUP(650),  GROUP(651),\n  /* 10 */  GROUP(652),  GROUP(653),  GROUP(654),  GROUP(655),\n  /* 14 */  GROUP(656),  GROUP(657),  GROUP(658),  GROUP(659),\n  /* 18 */  GROUP(660),  GROUP(661),  GROUP(662),  GROUP(663),\n  /* 1c */  GROUP(664),  GROUP(665),  GROUP(666),  GROUP(667),\n  /* 20 */  GROUP(668),  GROUP(669),  GROUP(670),  GROUP(671),\n  /* 24 */  GROUP(672),  GROUP(673),  GROUP(674),  GROUP(675),\n  /* 28 */  GROUP(676),  GROUP(677),  GROUP(678),  GROUP(679),\n  /* 2c */  GROUP(680),  GROUP(681),  GROUP(682),  GROUP(683),\n  /* 30 */  GROUP(684),  GROUP(685),  GROUP(686),  GROUP(687),\n  /* 34 */  GROUP(688),  GROUP(689),  GROUP(690),  GROUP(691),\n  /* 38 */  GROUP(692),  GROUP(693),  GROUP(694),  GROUP(695),\n  /* 3c */  GROUP(696),  GROUP(697),  GROUP(698),  GROUP(699),\n};\n\nstatic const uint16_t ud_itab__625[] = {\n  /*  0 */  GROUP(626),  GROUP(635),\n};\n\nstatic const uint16_t ud_itab__702[] = {\n  /*  0 */         990,           0,\n};\n\nstatic const uint16_t ud_itab__703[] = {\n  /*  0 */         991,           0,\n};\n\nstatic const uint16_t ud_itab__704[] = {\n  /*  0 */         992,           0,\n};\n\nstatic const uint16_t ud_itab__705[] = {\n  /*  0 */         993,           0,\n};\n\nstatic const uint16_t ud_itab__706[] = {\n  /*  0 */         994,           0,\n};\n\nstatic const uint16_t ud_itab__707[] = {\n  /*  0 */         995,           0,\n};\n\nstatic const uint16_t ud_itab__708[] = {\n  /*  0 */         996,           0,\n};\n\nstatic const uint16_t ud_itab__701[] = {\n  /*  0 */  GROUP(702),           0,  GROUP(703),  GROUP(704),\n  /*  4 */  GROUP(705),  GROUP(706),  GROUP(707),  GROUP(708),\n};\n\nstatic const uint16_t ud_itab__710[] = {\n  /*  0 */           0,         997,\n};\n\nstatic const uint16_t ud_itab__711[] = {\n  /*  0 */           0,         998,\n};\n\nstatic const uint16_t ud_itab__712[] = {\n  /*  0 */           0,         999,\n};\n\nstatic const uint16_t ud_itab__713[] = {\n  /*  0 */           0,        1000,\n};\n\nstatic const uint16_t ud_itab__714[] = {\n  /*  0 */           0,        1001,\n};\n\nstatic const uint16_t ud_itab__715[] = {\n  /*  0 */           0,        1002,\n};\n\nstatic const uint16_t ud_itab__716[] = {\n  /*  0 */           0,        1003,\n};\n\nstatic const uint16_t ud_itab__717[] = {\n  /*  0 */           0,        1004,\n};\n\nstatic const uint16_t ud_itab__718[] = {\n  /*  0 */           0,        1005,\n};\n\nstatic const uint16_t ud_itab__719[] = {\n  /*  0 */           0,        1006,\n};\n\nstatic const uint16_t ud_itab__720[] = {\n  /*  0 */           0,        1007,\n};\n\nstatic const uint16_t ud_itab__721[] = {\n  /*  0 */           0,        1008,\n};\n\nstatic const uint16_t ud_itab__722[] = {\n  /*  0 */           0,        1009,\n};\n\nstatic const uint16_t ud_itab__723[] = {\n  /*  0 */           0,        1010,\n};\n\nstatic const uint16_t ud_itab__724[] = {\n  /*  0 */           0,        1011,\n};\n\nstatic const uint16_t ud_itab__725[] = {\n  /*  0 */           0,        1012,\n};\n\nstatic const uint16_t ud_itab__726[] = {\n  /*  0 */           0,        1013,\n};\n\nstatic const uint16_t ud_itab__727[] = {\n  /*  0 */           0,        1014,\n};\n\nstatic const uint16_t ud_itab__728[] = {\n  /*  0 */           0,        1015,\n};\n\nstatic const uint16_t ud_itab__729[] = {\n  /*  0 */           0,        1016,\n};\n\nstatic const uint16_t ud_itab__730[] = {\n  /*  0 */           0,        1017,\n};\n\nstatic const uint16_t ud_itab__731[] = {\n  /*  0 */           0,        1018,\n};\n\nstatic const uint16_t ud_itab__732[] = {\n  /*  0 */           0,        1019,\n};\n\nstatic const uint16_t ud_itab__733[] = {\n  /*  0 */           0,        1020,\n};\n\nstatic const uint16_t ud_itab__734[] = {\n  /*  0 */           0,        1021,\n};\n\nstatic const uint16_t ud_itab__735[] = {\n  /*  0 */           0,        1022,\n};\n\nstatic const uint16_t ud_itab__736[] = {\n  /*  0 */           0,        1023,\n};\n\nstatic const uint16_t ud_itab__737[] = {\n  /*  0 */           0,        1024,\n};\n\nstatic const uint16_t ud_itab__738[] = {\n  /*  0 */           0,        1025,\n};\n\nstatic const uint16_t ud_itab__739[] = {\n  /*  0 */           0,        1026,\n};\n\nstatic const uint16_t ud_itab__740[] = {\n  /*  0 */           0,        1027,\n};\n\nstatic const uint16_t ud_itab__741[] = {\n  /*  0 */           0,        1028,\n};\n\nstatic const uint16_t ud_itab__742[] = {\n  /*  0 */           0,        1029,\n};\n\nstatic const uint16_t ud_itab__743[] = {\n  /*  0 */           0,        1030,\n};\n\nstatic const uint16_t ud_itab__744[] = {\n  /*  0 */           0,        1031,\n};\n\nstatic const uint16_t ud_itab__745[] = {\n  /*  0 */           0,        1032,\n};\n\nstatic const uint16_t ud_itab__746[] = {\n  /*  0 */           0,        1033,\n};\n\nstatic const uint16_t ud_itab__747[] = {\n  /*  0 */           0,        1034,\n};\n\nstatic const uint16_t ud_itab__748[] = {\n  /*  0 */           0,        1035,\n};\n\nstatic const uint16_t ud_itab__749[] = {\n  /*  0 */           0,        1036,\n};\n\nstatic const uint16_t ud_itab__750[] = {\n  /*  0 */           0,        1037,\n};\n\nstatic const uint16_t ud_itab__751[] = {\n  /*  0 */           0,        1038,\n};\n\nstatic const uint16_t ud_itab__752[] = {\n  /*  0 */           0,        1039,\n};\n\nstatic const uint16_t ud_itab__753[] = {\n  /*  0 */           0,        1040,\n};\n\nstatic const uint16_t ud_itab__754[] = {\n  /*  0 */           0,        1041,\n};\n\nstatic const uint16_t ud_itab__755[] = {\n  /*  0 */           0,        1042,\n};\n\nstatic const uint16_t ud_itab__756[] = {\n  /*  0 */           0,        1043,\n};\n\nstatic const uint16_t ud_itab__757[] = {\n  /*  0 */           0,        1044,\n};\n\nstatic const uint16_t ud_itab__758[] = {\n  /*  0 */           0,        1045,\n};\n\nstatic const uint16_t ud_itab__759[] = {\n  /*  0 */           0,        1046,\n};\n\nstatic const uint16_t ud_itab__760[] = {\n  /*  0 */           0,        1047,\n};\n\nstatic const uint16_t ud_itab__761[] = {\n  /*  0 */           0,        1048,\n};\n\nstatic const uint16_t ud_itab__709[] = {\n  /*  0 */  GROUP(710),  GROUP(711),  GROUP(712),  GROUP(713),\n  /*  4 */  GROUP(714),  GROUP(715),  GROUP(716),  GROUP(717),\n  /*  8 */  GROUP(718),  GROUP(719),  GROUP(720),  GROUP(721),\n  /*  c */  GROUP(722),  GROUP(723),  GROUP(724),  GROUP(725),\n  /* 10 */  GROUP(726),           0,           0,           0,\n  /* 14 */           0,           0,           0,           0,\n  /* 18 */  GROUP(727),  GROUP(728),  GROUP(729),  GROUP(730),\n  /* 1c */  GROUP(731),  GROUP(732),  GROUP(733),  GROUP(734),\n  /* 20 */  GROUP(735),  GROUP(736),           0,           0,\n  /* 24 */  GROUP(737),  GROUP(738),           0,           0,\n  /* 28 */  GROUP(739),  GROUP(740),  GROUP(741),  GROUP(742),\n  /* 2c */  GROUP(743),  GROUP(744),  GROUP(745),           0,\n  /* 30 */  GROUP(746),  GROUP(747),  GROUP(748),  GROUP(749),\n  /* 34 */  GROUP(750),  GROUP(751),  GROUP(752),  GROUP(753),\n  /* 38 */  GROUP(754),  GROUP(755),  GROUP(756),  GROUP(757),\n  /* 3c */  GROUP(758),  GROUP(759),  GROUP(760),  GROUP(761),\n};\n\nstatic const uint16_t ud_itab__700[] = {\n  /*  0 */  GROUP(701),  GROUP(709),\n};\n\nstatic const uint16_t ud_itab__764[] = {\n  /*  0 */        1049,           0,\n};\n\nstatic const uint16_t ud_itab__765[] = {\n  /*  0 */        1050,           0,\n};\n\nstatic const uint16_t ud_itab__766[] = {\n  /*  0 */        1051,           0,\n};\n\nstatic const uint16_t ud_itab__767[] = {\n  /*  0 */        1052,           0,\n};\n\nstatic const uint16_t ud_itab__768[] = {\n  /*  0 */        1053,           0,\n};\n\nstatic const uint16_t ud_itab__769[] = {\n  /*  0 */        1054,           0,\n};\n\nstatic const uint16_t ud_itab__770[] = {\n  /*  0 */        1055,           0,\n};\n\nstatic const uint16_t ud_itab__771[] = {\n  /*  0 */        1056,           0,\n};\n\nstatic const uint16_t ud_itab__763[] = {\n  /*  0 */  GROUP(764),  GROUP(765),  GROUP(766),  GROUP(767),\n  /*  4 */  GROUP(768),  GROUP(769),  GROUP(770),  GROUP(771),\n};\n\nstatic const uint16_t ud_itab__773[] = {\n  /*  0 */           0,        1057,\n};\n\nstatic const uint16_t ud_itab__774[] = {\n  /*  0 */           0,        1058,\n};\n\nstatic const uint16_t ud_itab__775[] = {\n  /*  0 */           0,        1059,\n};\n\nstatic const uint16_t ud_itab__776[] = {\n  /*  0 */           0,        1060,\n};\n\nstatic const uint16_t ud_itab__777[] = {\n  /*  0 */           0,        1061,\n};\n\nstatic const uint16_t ud_itab__778[] = {\n  /*  0 */           0,        1062,\n};\n\nstatic const uint16_t ud_itab__779[] = {\n  /*  0 */           0,        1063,\n};\n\nstatic const uint16_t ud_itab__780[] = {\n  /*  0 */           0,        1064,\n};\n\nstatic const uint16_t ud_itab__781[] = {\n  /*  0 */           0,        1065,\n};\n\nstatic const uint16_t ud_itab__782[] = {\n  /*  0 */           0,        1066,\n};\n\nstatic const uint16_t ud_itab__783[] = {\n  /*  0 */           0,        1067,\n};\n\nstatic const uint16_t ud_itab__784[] = {\n  /*  0 */           0,        1068,\n};\n\nstatic const uint16_t ud_itab__785[] = {\n  /*  0 */           0,        1069,\n};\n\nstatic const uint16_t ud_itab__786[] = {\n  /*  0 */           0,        1070,\n};\n\nstatic const uint16_t ud_itab__787[] = {\n  /*  0 */           0,        1071,\n};\n\nstatic const uint16_t ud_itab__788[] = {\n  /*  0 */           0,        1072,\n};\n\nstatic const uint16_t ud_itab__789[] = {\n  /*  0 */           0,        1073,\n};\n\nstatic const uint16_t ud_itab__790[] = {\n  /*  0 */           0,        1074,\n};\n\nstatic const uint16_t ud_itab__791[] = {\n  /*  0 */           0,        1075,\n};\n\nstatic const uint16_t ud_itab__792[] = {\n  /*  0 */           0,        1076,\n};\n\nstatic const uint16_t ud_itab__793[] = {\n  /*  0 */           0,        1077,\n};\n\nstatic const uint16_t ud_itab__794[] = {\n  /*  0 */           0,        1078,\n};\n\nstatic const uint16_t ud_itab__795[] = {\n  /*  0 */           0,        1079,\n};\n\nstatic const uint16_t ud_itab__796[] = {\n  /*  0 */           0,        1080,\n};\n\nstatic const uint16_t ud_itab__797[] = {\n  /*  0 */           0,        1081,\n};\n\nstatic const uint16_t ud_itab__798[] = {\n  /*  0 */           0,        1082,\n};\n\nstatic const uint16_t ud_itab__799[] = {\n  /*  0 */           0,        1083,\n};\n\nstatic const uint16_t ud_itab__800[] = {\n  /*  0 */           0,        1084,\n};\n\nstatic const uint16_t ud_itab__801[] = {\n  /*  0 */           0,        1085,\n};\n\nstatic const uint16_t ud_itab__802[] = {\n  /*  0 */           0,        1086,\n};\n\nstatic const uint16_t ud_itab__803[] = {\n  /*  0 */           0,        1087,\n};\n\nstatic const uint16_t ud_itab__804[] = {\n  /*  0 */           0,        1088,\n};\n\nstatic const uint16_t ud_itab__805[] = {\n  /*  0 */           0,        1089,\n};\n\nstatic const uint16_t ud_itab__772[] = {\n  /*  0 */  GROUP(773),  GROUP(774),  GROUP(775),  GROUP(776),\n  /*  4 */  GROUP(777),  GROUP(778),  GROUP(779),  GROUP(780),\n  /*  8 */  GROUP(781),  GROUP(782),  GROUP(783),  GROUP(784),\n  /*  c */  GROUP(785),  GROUP(786),  GROUP(787),  GROUP(788),\n  /* 10 */  GROUP(789),  GROUP(790),  GROUP(791),  GROUP(792),\n  /* 14 */  GROUP(793),  GROUP(794),  GROUP(795),  GROUP(796),\n  /* 18 */  GROUP(797),  GROUP(798),  GROUP(799),  GROUP(800),\n  /* 1c */  GROUP(801),  GROUP(802),  GROUP(803),  GROUP(804),\n  /* 20 */           0,           0,           0,           0,\n  /* 24 */           0,           0,           0,           0,\n  /* 28 */           0,  GROUP(805),           0,           0,\n  /* 2c */           0,           0,           0,           0,\n  /* 30 */           0,           0,           0,           0,\n  /* 34 */           0,           0,           0,           0,\n  /* 38 */           0,           0,           0,           0,\n  /* 3c */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__762[] = {\n  /*  0 */  GROUP(763),  GROUP(772),\n};\n\nstatic const uint16_t ud_itab__808[] = {\n  /*  0 */        1090,           0,\n};\n\nstatic const uint16_t ud_itab__809[] = {\n  /*  0 */        1091,           0,\n};\n\nstatic const uint16_t ud_itab__810[] = {\n  /*  0 */        1092,           0,\n};\n\nstatic const uint16_t ud_itab__811[] = {\n  /*  0 */        1093,           0,\n};\n\nstatic const uint16_t ud_itab__812[] = {\n  /*  0 */        1094,           0,\n};\n\nstatic const uint16_t ud_itab__813[] = {\n  /*  0 */        1095,           0,\n};\n\nstatic const uint16_t ud_itab__807[] = {\n  /*  0 */  GROUP(808),  GROUP(809),  GROUP(810),  GROUP(811),\n  /*  4 */           0,  GROUP(812),           0,  GROUP(813),\n};\n\nstatic const uint16_t ud_itab__815[] = {\n  /*  0 */           0,        1096,\n};\n\nstatic const uint16_t ud_itab__816[] = {\n  /*  0 */           0,        1097,\n};\n\nstatic const uint16_t ud_itab__817[] = {\n  /*  0 */           0,        1098,\n};\n\nstatic const uint16_t ud_itab__818[] = {\n  /*  0 */           0,        1099,\n};\n\nstatic const uint16_t ud_itab__819[] = {\n  /*  0 */           0,        1100,\n};\n\nstatic const uint16_t ud_itab__820[] = {\n  /*  0 */           0,        1101,\n};\n\nstatic const uint16_t ud_itab__821[] = {\n  /*  0 */           0,        1102,\n};\n\nstatic const uint16_t ud_itab__822[] = {\n  /*  0 */           0,        1103,\n};\n\nstatic const uint16_t ud_itab__823[] = {\n  /*  0 */           0,        1104,\n};\n\nstatic const uint16_t ud_itab__824[] = {\n  /*  0 */           0,        1105,\n};\n\nstatic const uint16_t ud_itab__825[] = {\n  /*  0 */           0,        1106,\n};\n\nstatic const uint16_t ud_itab__826[] = {\n  /*  0 */           0,        1107,\n};\n\nstatic const uint16_t ud_itab__827[] = {\n  /*  0 */           0,        1108,\n};\n\nstatic const uint16_t ud_itab__828[] = {\n  /*  0 */           0,        1109,\n};\n\nstatic const uint16_t ud_itab__829[] = {\n  /*  0 */           0,        1110,\n};\n\nstatic const uint16_t ud_itab__830[] = {\n  /*  0 */           0,        1111,\n};\n\nstatic const uint16_t ud_itab__831[] = {\n  /*  0 */           0,        1112,\n};\n\nstatic const uint16_t ud_itab__832[] = {\n  /*  0 */           0,        1113,\n};\n\nstatic const uint16_t ud_itab__833[] = {\n  /*  0 */           0,        1114,\n};\n\nstatic const uint16_t ud_itab__834[] = {\n  /*  0 */           0,        1115,\n};\n\nstatic const uint16_t ud_itab__835[] = {\n  /*  0 */           0,        1116,\n};\n\nstatic const uint16_t ud_itab__836[] = {\n  /*  0 */           0,        1117,\n};\n\nstatic const uint16_t ud_itab__837[] = {\n  /*  0 */           0,        1118,\n};\n\nstatic const uint16_t ud_itab__838[] = {\n  /*  0 */           0,        1119,\n};\n\nstatic const uint16_t ud_itab__839[] = {\n  /*  0 */           0,        1120,\n};\n\nstatic const uint16_t ud_itab__840[] = {\n  /*  0 */           0,        1121,\n};\n\nstatic const uint16_t ud_itab__841[] = {\n  /*  0 */           0,        1122,\n};\n\nstatic const uint16_t ud_itab__842[] = {\n  /*  0 */           0,        1123,\n};\n\nstatic const uint16_t ud_itab__843[] = {\n  /*  0 */           0,        1124,\n};\n\nstatic const uint16_t ud_itab__844[] = {\n  /*  0 */           0,        1125,\n};\n\nstatic const uint16_t ud_itab__845[] = {\n  /*  0 */           0,        1126,\n};\n\nstatic const uint16_t ud_itab__846[] = {\n  /*  0 */           0,        1127,\n};\n\nstatic const uint16_t ud_itab__847[] = {\n  /*  0 */           0,        1128,\n};\n\nstatic const uint16_t ud_itab__848[] = {\n  /*  0 */           0,        1129,\n};\n\nstatic const uint16_t ud_itab__849[] = {\n  /*  0 */           0,        1130,\n};\n\nstatic const uint16_t ud_itab__850[] = {\n  /*  0 */           0,        1131,\n};\n\nstatic const uint16_t ud_itab__851[] = {\n  /*  0 */           0,        1132,\n};\n\nstatic const uint16_t ud_itab__852[] = {\n  /*  0 */           0,        1133,\n};\n\nstatic const uint16_t ud_itab__853[] = {\n  /*  0 */           0,        1134,\n};\n\nstatic const uint16_t ud_itab__854[] = {\n  /*  0 */           0,        1135,\n};\n\nstatic const uint16_t ud_itab__855[] = {\n  /*  0 */           0,        1136,\n};\n\nstatic const uint16_t ud_itab__856[] = {\n  /*  0 */           0,        1137,\n};\n\nstatic const uint16_t ud_itab__857[] = {\n  /*  0 */           0,        1138,\n};\n\nstatic const uint16_t ud_itab__858[] = {\n  /*  0 */           0,        1139,\n};\n\nstatic const uint16_t ud_itab__859[] = {\n  /*  0 */           0,        1140,\n};\n\nstatic const uint16_t ud_itab__860[] = {\n  /*  0 */           0,        1141,\n};\n\nstatic const uint16_t ud_itab__861[] = {\n  /*  0 */           0,        1142,\n};\n\nstatic const uint16_t ud_itab__862[] = {\n  /*  0 */           0,        1143,\n};\n\nstatic const uint16_t ud_itab__863[] = {\n  /*  0 */           0,        1144,\n};\n\nstatic const uint16_t ud_itab__864[] = {\n  /*  0 */           0,        1145,\n};\n\nstatic const uint16_t ud_itab__814[] = {\n  /*  0 */  GROUP(815),  GROUP(816),  GROUP(817),  GROUP(818),\n  /*  4 */  GROUP(819),  GROUP(820),  GROUP(821),  GROUP(822),\n  /*  8 */  GROUP(823),  GROUP(824),  GROUP(825),  GROUP(826),\n  /*  c */  GROUP(827),  GROUP(828),  GROUP(829),  GROUP(830),\n  /* 10 */  GROUP(831),  GROUP(832),  GROUP(833),  GROUP(834),\n  /* 14 */  GROUP(835),  GROUP(836),  GROUP(837),  GROUP(838),\n  /* 18 */  GROUP(839),  GROUP(840),  GROUP(841),  GROUP(842),\n  /* 1c */  GROUP(843),  GROUP(844),  GROUP(845),  GROUP(846),\n  /* 20 */           0,           0,  GROUP(847),  GROUP(848),\n  /* 24 */           0,           0,           0,           0,\n  /* 28 */  GROUP(849),  GROUP(850),  GROUP(851),  GROUP(852),\n  /* 2c */  GROUP(853),  GROUP(854),  GROUP(855),  GROUP(856),\n  /* 30 */  GROUP(857),  GROUP(858),  GROUP(859),  GROUP(860),\n  /* 34 */  GROUP(861),  GROUP(862),  GROUP(863),  GROUP(864),\n  /* 38 */           0,           0,           0,           0,\n  /* 3c */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__806[] = {\n  /*  0 */  GROUP(807),  GROUP(814),\n};\n\nstatic const uint16_t ud_itab__867[] = {\n  /*  0 */        1146,           0,\n};\n\nstatic const uint16_t ud_itab__868[] = {\n  /*  0 */        1147,           0,\n};\n\nstatic const uint16_t ud_itab__869[] = {\n  /*  0 */        1148,           0,\n};\n\nstatic const uint16_t ud_itab__870[] = {\n  /*  0 */        1149,           0,\n};\n\nstatic const uint16_t ud_itab__871[] = {\n  /*  0 */        1150,           0,\n};\n\nstatic const uint16_t ud_itab__872[] = {\n  /*  0 */        1151,           0,\n};\n\nstatic const uint16_t ud_itab__873[] = {\n  /*  0 */        1152,           0,\n};\n\nstatic const uint16_t ud_itab__874[] = {\n  /*  0 */        1153,           0,\n};\n\nstatic const uint16_t ud_itab__866[] = {\n  /*  0 */  GROUP(867),  GROUP(868),  GROUP(869),  GROUP(870),\n  /*  4 */  GROUP(871),  GROUP(872),  GROUP(873),  GROUP(874),\n};\n\nstatic const uint16_t ud_itab__876[] = {\n  /*  0 */           0,        1154,\n};\n\nstatic const uint16_t ud_itab__877[] = {\n  /*  0 */           0,        1155,\n};\n\nstatic const uint16_t ud_itab__878[] = {\n  /*  0 */           0,        1156,\n};\n\nstatic const uint16_t ud_itab__879[] = {\n  /*  0 */           0,        1157,\n};\n\nstatic const uint16_t ud_itab__880[] = {\n  /*  0 */           0,        1158,\n};\n\nstatic const uint16_t ud_itab__881[] = {\n  /*  0 */           0,        1159,\n};\n\nstatic const uint16_t ud_itab__882[] = {\n  /*  0 */           0,        1160,\n};\n\nstatic const uint16_t ud_itab__883[] = {\n  /*  0 */           0,        1161,\n};\n\nstatic const uint16_t ud_itab__884[] = {\n  /*  0 */           0,        1162,\n};\n\nstatic const uint16_t ud_itab__885[] = {\n  /*  0 */           0,        1163,\n};\n\nstatic const uint16_t ud_itab__886[] = {\n  /*  0 */           0,        1164,\n};\n\nstatic const uint16_t ud_itab__887[] = {\n  /*  0 */           0,        1165,\n};\n\nstatic const uint16_t ud_itab__888[] = {\n  /*  0 */           0,        1166,\n};\n\nstatic const uint16_t ud_itab__889[] = {\n  /*  0 */           0,        1167,\n};\n\nstatic const uint16_t ud_itab__890[] = {\n  /*  0 */           0,        1168,\n};\n\nstatic const uint16_t ud_itab__891[] = {\n  /*  0 */           0,        1169,\n};\n\nstatic const uint16_t ud_itab__892[] = {\n  /*  0 */           0,        1170,\n};\n\nstatic const uint16_t ud_itab__893[] = {\n  /*  0 */           0,        1171,\n};\n\nstatic const uint16_t ud_itab__894[] = {\n  /*  0 */           0,        1172,\n};\n\nstatic const uint16_t ud_itab__895[] = {\n  /*  0 */           0,        1173,\n};\n\nstatic const uint16_t ud_itab__896[] = {\n  /*  0 */           0,        1174,\n};\n\nstatic const uint16_t ud_itab__897[] = {\n  /*  0 */           0,        1175,\n};\n\nstatic const uint16_t ud_itab__898[] = {\n  /*  0 */           0,        1176,\n};\n\nstatic const uint16_t ud_itab__899[] = {\n  /*  0 */           0,        1177,\n};\n\nstatic const uint16_t ud_itab__900[] = {\n  /*  0 */           0,        1178,\n};\n\nstatic const uint16_t ud_itab__901[] = {\n  /*  0 */           0,        1179,\n};\n\nstatic const uint16_t ud_itab__902[] = {\n  /*  0 */           0,        1180,\n};\n\nstatic const uint16_t ud_itab__903[] = {\n  /*  0 */           0,        1181,\n};\n\nstatic const uint16_t ud_itab__904[] = {\n  /*  0 */           0,        1182,\n};\n\nstatic const uint16_t ud_itab__905[] = {\n  /*  0 */           0,        1183,\n};\n\nstatic const uint16_t ud_itab__906[] = {\n  /*  0 */           0,        1184,\n};\n\nstatic const uint16_t ud_itab__907[] = {\n  /*  0 */           0,        1185,\n};\n\nstatic const uint16_t ud_itab__908[] = {\n  /*  0 */           0,        1186,\n};\n\nstatic const uint16_t ud_itab__909[] = {\n  /*  0 */           0,        1187,\n};\n\nstatic const uint16_t ud_itab__910[] = {\n  /*  0 */           0,        1188,\n};\n\nstatic const uint16_t ud_itab__911[] = {\n  /*  0 */           0,        1189,\n};\n\nstatic const uint16_t ud_itab__912[] = {\n  /*  0 */           0,        1190,\n};\n\nstatic const uint16_t ud_itab__913[] = {\n  /*  0 */           0,        1191,\n};\n\nstatic const uint16_t ud_itab__914[] = {\n  /*  0 */           0,        1192,\n};\n\nstatic const uint16_t ud_itab__915[] = {\n  /*  0 */           0,        1193,\n};\n\nstatic const uint16_t ud_itab__916[] = {\n  /*  0 */           0,        1194,\n};\n\nstatic const uint16_t ud_itab__917[] = {\n  /*  0 */           0,        1195,\n};\n\nstatic const uint16_t ud_itab__918[] = {\n  /*  0 */           0,        1196,\n};\n\nstatic const uint16_t ud_itab__919[] = {\n  /*  0 */           0,        1197,\n};\n\nstatic const uint16_t ud_itab__920[] = {\n  /*  0 */           0,        1198,\n};\n\nstatic const uint16_t ud_itab__921[] = {\n  /*  0 */           0,        1199,\n};\n\nstatic const uint16_t ud_itab__922[] = {\n  /*  0 */           0,        1200,\n};\n\nstatic const uint16_t ud_itab__923[] = {\n  /*  0 */           0,        1201,\n};\n\nstatic const uint16_t ud_itab__924[] = {\n  /*  0 */           0,        1202,\n};\n\nstatic const uint16_t ud_itab__925[] = {\n  /*  0 */           0,        1203,\n};\n\nstatic const uint16_t ud_itab__926[] = {\n  /*  0 */           0,        1204,\n};\n\nstatic const uint16_t ud_itab__927[] = {\n  /*  0 */           0,        1205,\n};\n\nstatic const uint16_t ud_itab__928[] = {\n  /*  0 */           0,        1206,\n};\n\nstatic const uint16_t ud_itab__929[] = {\n  /*  0 */           0,        1207,\n};\n\nstatic const uint16_t ud_itab__930[] = {\n  /*  0 */           0,        1208,\n};\n\nstatic const uint16_t ud_itab__931[] = {\n  /*  0 */           0,        1209,\n};\n\nstatic const uint16_t ud_itab__932[] = {\n  /*  0 */           0,        1210,\n};\n\nstatic const uint16_t ud_itab__933[] = {\n  /*  0 */           0,        1211,\n};\n\nstatic const uint16_t ud_itab__934[] = {\n  /*  0 */           0,        1212,\n};\n\nstatic const uint16_t ud_itab__935[] = {\n  /*  0 */           0,        1213,\n};\n\nstatic const uint16_t ud_itab__936[] = {\n  /*  0 */           0,        1214,\n};\n\nstatic const uint16_t ud_itab__937[] = {\n  /*  0 */           0,        1215,\n};\n\nstatic const uint16_t ud_itab__938[] = {\n  /*  0 */           0,        1216,\n};\n\nstatic const uint16_t ud_itab__939[] = {\n  /*  0 */           0,        1217,\n};\n\nstatic const uint16_t ud_itab__875[] = {\n  /*  0 */  GROUP(876),  GROUP(877),  GROUP(878),  GROUP(879),\n  /*  4 */  GROUP(880),  GROUP(881),  GROUP(882),  GROUP(883),\n  /*  8 */  GROUP(884),  GROUP(885),  GROUP(886),  GROUP(887),\n  /*  c */  GROUP(888),  GROUP(889),  GROUP(890),  GROUP(891),\n  /* 10 */  GROUP(892),  GROUP(893),  GROUP(894),  GROUP(895),\n  /* 14 */  GROUP(896),  GROUP(897),  GROUP(898),  GROUP(899),\n  /* 18 */  GROUP(900),  GROUP(901),  GROUP(902),  GROUP(903),\n  /* 1c */  GROUP(904),  GROUP(905),  GROUP(906),  GROUP(907),\n  /* 20 */  GROUP(908),  GROUP(909),  GROUP(910),  GROUP(911),\n  /* 24 */  GROUP(912),  GROUP(913),  GROUP(914),  GROUP(915),\n  /* 28 */  GROUP(916),  GROUP(917),  GROUP(918),  GROUP(919),\n  /* 2c */  GROUP(920),  GROUP(921),  GROUP(922),  GROUP(923),\n  /* 30 */  GROUP(924),  GROUP(925),  GROUP(926),  GROUP(927),\n  /* 34 */  GROUP(928),  GROUP(929),  GROUP(930),  GROUP(931),\n  /* 38 */  GROUP(932),  GROUP(933),  GROUP(934),  GROUP(935),\n  /* 3c */  GROUP(936),  GROUP(937),  GROUP(938),  GROUP(939),\n};\n\nstatic const uint16_t ud_itab__865[] = {\n  /*  0 */  GROUP(866),  GROUP(875),\n};\n\nstatic const uint16_t ud_itab__942[] = {\n  /*  0 */        1218,           0,\n};\n\nstatic const uint16_t ud_itab__943[] = {\n  /*  0 */        1219,           0,\n};\n\nstatic const uint16_t ud_itab__944[] = {\n  /*  0 */        1220,           0,\n};\n\nstatic const uint16_t ud_itab__945[] = {\n  /*  0 */        1221,           0,\n};\n\nstatic const uint16_t ud_itab__946[] = {\n  /*  0 */        1222,           0,\n};\n\nstatic const uint16_t ud_itab__947[] = {\n  /*  0 */        1223,           0,\n};\n\nstatic const uint16_t ud_itab__948[] = {\n  /*  0 */        1224,           0,\n};\n\nstatic const uint16_t ud_itab__941[] = {\n  /*  0 */  GROUP(942),  GROUP(943),  GROUP(944),  GROUP(945),\n  /*  4 */  GROUP(946),           0,  GROUP(947),  GROUP(948),\n};\n\nstatic const uint16_t ud_itab__950[] = {\n  /*  0 */           0,        1225,\n};\n\nstatic const uint16_t ud_itab__951[] = {\n  /*  0 */           0,        1226,\n};\n\nstatic const uint16_t ud_itab__952[] = {\n  /*  0 */           0,        1227,\n};\n\nstatic const uint16_t ud_itab__953[] = {\n  /*  0 */           0,        1228,\n};\n\nstatic const uint16_t ud_itab__954[] = {\n  /*  0 */           0,        1229,\n};\n\nstatic const uint16_t ud_itab__955[] = {\n  /*  0 */           0,        1230,\n};\n\nstatic const uint16_t ud_itab__956[] = {\n  /*  0 */           0,        1231,\n};\n\nstatic const uint16_t ud_itab__957[] = {\n  /*  0 */           0,        1232,\n};\n\nstatic const uint16_t ud_itab__958[] = {\n  /*  0 */           0,        1233,\n};\n\nstatic const uint16_t ud_itab__959[] = {\n  /*  0 */           0,        1234,\n};\n\nstatic const uint16_t ud_itab__960[] = {\n  /*  0 */           0,        1235,\n};\n\nstatic const uint16_t ud_itab__961[] = {\n  /*  0 */           0,        1236,\n};\n\nstatic const uint16_t ud_itab__962[] = {\n  /*  0 */           0,        1237,\n};\n\nstatic const uint16_t ud_itab__963[] = {\n  /*  0 */           0,        1238,\n};\n\nstatic const uint16_t ud_itab__964[] = {\n  /*  0 */           0,        1239,\n};\n\nstatic const uint16_t ud_itab__965[] = {\n  /*  0 */           0,        1240,\n};\n\nstatic const uint16_t ud_itab__966[] = {\n  /*  0 */           0,        1241,\n};\n\nstatic const uint16_t ud_itab__967[] = {\n  /*  0 */           0,        1242,\n};\n\nstatic const uint16_t ud_itab__968[] = {\n  /*  0 */           0,        1243,\n};\n\nstatic const uint16_t ud_itab__969[] = {\n  /*  0 */           0,        1244,\n};\n\nstatic const uint16_t ud_itab__970[] = {\n  /*  0 */           0,        1245,\n};\n\nstatic const uint16_t ud_itab__971[] = {\n  /*  0 */           0,        1246,\n};\n\nstatic const uint16_t ud_itab__972[] = {\n  /*  0 */           0,        1247,\n};\n\nstatic const uint16_t ud_itab__973[] = {\n  /*  0 */           0,        1248,\n};\n\nstatic const uint16_t ud_itab__974[] = {\n  /*  0 */           0,        1249,\n};\n\nstatic const uint16_t ud_itab__975[] = {\n  /*  0 */           0,        1250,\n};\n\nstatic const uint16_t ud_itab__976[] = {\n  /*  0 */           0,        1251,\n};\n\nstatic const uint16_t ud_itab__977[] = {\n  /*  0 */           0,        1252,\n};\n\nstatic const uint16_t ud_itab__978[] = {\n  /*  0 */           0,        1253,\n};\n\nstatic const uint16_t ud_itab__979[] = {\n  /*  0 */           0,        1254,\n};\n\nstatic const uint16_t ud_itab__980[] = {\n  /*  0 */           0,        1255,\n};\n\nstatic const uint16_t ud_itab__981[] = {\n  /*  0 */           0,        1256,\n};\n\nstatic const uint16_t ud_itab__982[] = {\n  /*  0 */           0,        1257,\n};\n\nstatic const uint16_t ud_itab__983[] = {\n  /*  0 */           0,        1258,\n};\n\nstatic const uint16_t ud_itab__984[] = {\n  /*  0 */           0,        1259,\n};\n\nstatic const uint16_t ud_itab__985[] = {\n  /*  0 */           0,        1260,\n};\n\nstatic const uint16_t ud_itab__986[] = {\n  /*  0 */           0,        1261,\n};\n\nstatic const uint16_t ud_itab__987[] = {\n  /*  0 */           0,        1262,\n};\n\nstatic const uint16_t ud_itab__988[] = {\n  /*  0 */           0,        1263,\n};\n\nstatic const uint16_t ud_itab__989[] = {\n  /*  0 */           0,        1264,\n};\n\nstatic const uint16_t ud_itab__990[] = {\n  /*  0 */           0,        1265,\n};\n\nstatic const uint16_t ud_itab__991[] = {\n  /*  0 */           0,        1266,\n};\n\nstatic const uint16_t ud_itab__992[] = {\n  /*  0 */           0,        1267,\n};\n\nstatic const uint16_t ud_itab__993[] = {\n  /*  0 */           0,        1268,\n};\n\nstatic const uint16_t ud_itab__994[] = {\n  /*  0 */           0,        1269,\n};\n\nstatic const uint16_t ud_itab__995[] = {\n  /*  0 */           0,        1270,\n};\n\nstatic const uint16_t ud_itab__996[] = {\n  /*  0 */           0,        1271,\n};\n\nstatic const uint16_t ud_itab__997[] = {\n  /*  0 */           0,        1272,\n};\n\nstatic const uint16_t ud_itab__949[] = {\n  /*  0 */  GROUP(950),  GROUP(951),  GROUP(952),  GROUP(953),\n  /*  4 */  GROUP(954),  GROUP(955),  GROUP(956),  GROUP(957),\n  /*  8 */  GROUP(958),  GROUP(959),  GROUP(960),  GROUP(961),\n  /*  c */  GROUP(962),  GROUP(963),  GROUP(964),  GROUP(965),\n  /* 10 */  GROUP(966),  GROUP(967),  GROUP(968),  GROUP(969),\n  /* 14 */  GROUP(970),  GROUP(971),  GROUP(972),  GROUP(973),\n  /* 18 */  GROUP(974),  GROUP(975),  GROUP(976),  GROUP(977),\n  /* 1c */  GROUP(978),  GROUP(979),  GROUP(980),  GROUP(981),\n  /* 20 */  GROUP(982),  GROUP(983),  GROUP(984),  GROUP(985),\n  /* 24 */  GROUP(986),  GROUP(987),  GROUP(988),  GROUP(989),\n  /* 28 */  GROUP(990),  GROUP(991),  GROUP(992),  GROUP(993),\n  /* 2c */  GROUP(994),  GROUP(995),  GROUP(996),  GROUP(997),\n  /* 30 */           0,           0,           0,           0,\n  /* 34 */           0,           0,           0,           0,\n  /* 38 */           0,           0,           0,           0,\n  /* 3c */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__940[] = {\n  /*  0 */  GROUP(941),  GROUP(949),\n};\n\nstatic const uint16_t ud_itab__1000[] = {\n  /*  0 */        1273,           0,\n};\n\nstatic const uint16_t ud_itab__1001[] = {\n  /*  0 */        1274,           0,\n};\n\nstatic const uint16_t ud_itab__1002[] = {\n  /*  0 */        1275,           0,\n};\n\nstatic const uint16_t ud_itab__1003[] = {\n  /*  0 */        1276,           0,\n};\n\nstatic const uint16_t ud_itab__1004[] = {\n  /*  0 */        1277,           0,\n};\n\nstatic const uint16_t ud_itab__1005[] = {\n  /*  0 */        1278,           0,\n};\n\nstatic const uint16_t ud_itab__1006[] = {\n  /*  0 */        1279,           0,\n};\n\nstatic const uint16_t ud_itab__1007[] = {\n  /*  0 */        1280,           0,\n};\n\nstatic const uint16_t ud_itab__999[] = {\n  /*  0 */ GROUP(1000), GROUP(1001), GROUP(1002), GROUP(1003),\n  /*  4 */ GROUP(1004), GROUP(1005), GROUP(1006), GROUP(1007),\n};\n\nstatic const uint16_t ud_itab__1009[] = {\n  /*  0 */           0,        1281,\n};\n\nstatic const uint16_t ud_itab__1010[] = {\n  /*  0 */           0,        1282,\n};\n\nstatic const uint16_t ud_itab__1011[] = {\n  /*  0 */           0,        1283,\n};\n\nstatic const uint16_t ud_itab__1012[] = {\n  /*  0 */           0,        1284,\n};\n\nstatic const uint16_t ud_itab__1013[] = {\n  /*  0 */           0,        1285,\n};\n\nstatic const uint16_t ud_itab__1014[] = {\n  /*  0 */           0,        1286,\n};\n\nstatic const uint16_t ud_itab__1015[] = {\n  /*  0 */           0,        1287,\n};\n\nstatic const uint16_t ud_itab__1016[] = {\n  /*  0 */           0,        1288,\n};\n\nstatic const uint16_t ud_itab__1017[] = {\n  /*  0 */           0,        1289,\n};\n\nstatic const uint16_t ud_itab__1018[] = {\n  /*  0 */           0,        1290,\n};\n\nstatic const uint16_t ud_itab__1019[] = {\n  /*  0 */           0,        1291,\n};\n\nstatic const uint16_t ud_itab__1020[] = {\n  /*  0 */           0,        1292,\n};\n\nstatic const uint16_t ud_itab__1021[] = {\n  /*  0 */           0,        1293,\n};\n\nstatic const uint16_t ud_itab__1022[] = {\n  /*  0 */           0,        1294,\n};\n\nstatic const uint16_t ud_itab__1023[] = {\n  /*  0 */           0,        1295,\n};\n\nstatic const uint16_t ud_itab__1024[] = {\n  /*  0 */           0,        1296,\n};\n\nstatic const uint16_t ud_itab__1025[] = {\n  /*  0 */           0,        1297,\n};\n\nstatic const uint16_t ud_itab__1026[] = {\n  /*  0 */           0,        1298,\n};\n\nstatic const uint16_t ud_itab__1027[] = {\n  /*  0 */           0,        1299,\n};\n\nstatic const uint16_t ud_itab__1028[] = {\n  /*  0 */           0,        1300,\n};\n\nstatic const uint16_t ud_itab__1029[] = {\n  /*  0 */           0,        1301,\n};\n\nstatic const uint16_t ud_itab__1030[] = {\n  /*  0 */           0,        1302,\n};\n\nstatic const uint16_t ud_itab__1031[] = {\n  /*  0 */           0,        1303,\n};\n\nstatic const uint16_t ud_itab__1032[] = {\n  /*  0 */           0,        1304,\n};\n\nstatic const uint16_t ud_itab__1033[] = {\n  /*  0 */           0,        1305,\n};\n\nstatic const uint16_t ud_itab__1034[] = {\n  /*  0 */           0,        1306,\n};\n\nstatic const uint16_t ud_itab__1035[] = {\n  /*  0 */           0,        1307,\n};\n\nstatic const uint16_t ud_itab__1036[] = {\n  /*  0 */           0,        1308,\n};\n\nstatic const uint16_t ud_itab__1037[] = {\n  /*  0 */           0,        1309,\n};\n\nstatic const uint16_t ud_itab__1038[] = {\n  /*  0 */           0,        1310,\n};\n\nstatic const uint16_t ud_itab__1039[] = {\n  /*  0 */           0,        1311,\n};\n\nstatic const uint16_t ud_itab__1040[] = {\n  /*  0 */           0,        1312,\n};\n\nstatic const uint16_t ud_itab__1041[] = {\n  /*  0 */           0,        1313,\n};\n\nstatic const uint16_t ud_itab__1042[] = {\n  /*  0 */           0,        1314,\n};\n\nstatic const uint16_t ud_itab__1043[] = {\n  /*  0 */           0,        1315,\n};\n\nstatic const uint16_t ud_itab__1044[] = {\n  /*  0 */           0,        1316,\n};\n\nstatic const uint16_t ud_itab__1045[] = {\n  /*  0 */           0,        1317,\n};\n\nstatic const uint16_t ud_itab__1046[] = {\n  /*  0 */           0,        1318,\n};\n\nstatic const uint16_t ud_itab__1047[] = {\n  /*  0 */           0,        1319,\n};\n\nstatic const uint16_t ud_itab__1048[] = {\n  /*  0 */           0,        1320,\n};\n\nstatic const uint16_t ud_itab__1049[] = {\n  /*  0 */           0,        1321,\n};\n\nstatic const uint16_t ud_itab__1050[] = {\n  /*  0 */           0,        1322,\n};\n\nstatic const uint16_t ud_itab__1051[] = {\n  /*  0 */           0,        1323,\n};\n\nstatic const uint16_t ud_itab__1052[] = {\n  /*  0 */           0,        1324,\n};\n\nstatic const uint16_t ud_itab__1053[] = {\n  /*  0 */           0,        1325,\n};\n\nstatic const uint16_t ud_itab__1054[] = {\n  /*  0 */           0,        1326,\n};\n\nstatic const uint16_t ud_itab__1055[] = {\n  /*  0 */           0,        1327,\n};\n\nstatic const uint16_t ud_itab__1056[] = {\n  /*  0 */           0,        1328,\n};\n\nstatic const uint16_t ud_itab__1057[] = {\n  /*  0 */           0,        1329,\n};\n\nstatic const uint16_t ud_itab__1058[] = {\n  /*  0 */           0,        1330,\n};\n\nstatic const uint16_t ud_itab__1059[] = {\n  /*  0 */           0,        1331,\n};\n\nstatic const uint16_t ud_itab__1060[] = {\n  /*  0 */           0,        1332,\n};\n\nstatic const uint16_t ud_itab__1061[] = {\n  /*  0 */           0,        1333,\n};\n\nstatic const uint16_t ud_itab__1062[] = {\n  /*  0 */           0,        1334,\n};\n\nstatic const uint16_t ud_itab__1063[] = {\n  /*  0 */           0,        1335,\n};\n\nstatic const uint16_t ud_itab__1064[] = {\n  /*  0 */           0,        1336,\n};\n\nstatic const uint16_t ud_itab__1065[] = {\n  /*  0 */           0,        1337,\n};\n\nstatic const uint16_t ud_itab__1008[] = {\n  /*  0 */ GROUP(1009), GROUP(1010), GROUP(1011), GROUP(1012),\n  /*  4 */ GROUP(1013), GROUP(1014), GROUP(1015), GROUP(1016),\n  /*  8 */ GROUP(1017), GROUP(1018), GROUP(1019), GROUP(1020),\n  /*  c */ GROUP(1021), GROUP(1022), GROUP(1023), GROUP(1024),\n  /* 10 */ GROUP(1025), GROUP(1026), GROUP(1027), GROUP(1028),\n  /* 14 */ GROUP(1029), GROUP(1030), GROUP(1031), GROUP(1032),\n  /* 18 */           0, GROUP(1033),           0,           0,\n  /* 1c */           0,           0,           0,           0,\n  /* 20 */ GROUP(1034), GROUP(1035), GROUP(1036), GROUP(1037),\n  /* 24 */ GROUP(1038), GROUP(1039), GROUP(1040), GROUP(1041),\n  /* 28 */ GROUP(1042), GROUP(1043), GROUP(1044), GROUP(1045),\n  /* 2c */ GROUP(1046), GROUP(1047), GROUP(1048), GROUP(1049),\n  /* 30 */ GROUP(1050), GROUP(1051), GROUP(1052), GROUP(1053),\n  /* 34 */ GROUP(1054), GROUP(1055), GROUP(1056), GROUP(1057),\n  /* 38 */ GROUP(1058), GROUP(1059), GROUP(1060), GROUP(1061),\n  /* 3c */ GROUP(1062), GROUP(1063), GROUP(1064), GROUP(1065),\n};\n\nstatic const uint16_t ud_itab__998[] = {\n  /*  0 */  GROUP(999), GROUP(1008),\n};\n\nstatic const uint16_t ud_itab__1068[] = {\n  /*  0 */        1338,           0,\n};\n\nstatic const uint16_t ud_itab__1069[] = {\n  /*  0 */        1339,           0,\n};\n\nstatic const uint16_t ud_itab__1070[] = {\n  /*  0 */        1340,           0,\n};\n\nstatic const uint16_t ud_itab__1071[] = {\n  /*  0 */        1341,           0,\n};\n\nstatic const uint16_t ud_itab__1072[] = {\n  /*  0 */        1342,           0,\n};\n\nstatic const uint16_t ud_itab__1073[] = {\n  /*  0 */        1343,           0,\n};\n\nstatic const uint16_t ud_itab__1074[] = {\n  /*  0 */        1344,           0,\n};\n\nstatic const uint16_t ud_itab__1075[] = {\n  /*  0 */        1345,           0,\n};\n\nstatic const uint16_t ud_itab__1067[] = {\n  /*  0 */ GROUP(1068), GROUP(1069), GROUP(1070), GROUP(1071),\n  /*  4 */ GROUP(1072), GROUP(1073), GROUP(1074), GROUP(1075),\n};\n\nstatic const uint16_t ud_itab__1077[] = {\n  /*  0 */           0,        1346,\n};\n\nstatic const uint16_t ud_itab__1078[] = {\n  /*  0 */           0,        1347,\n};\n\nstatic const uint16_t ud_itab__1079[] = {\n  /*  0 */           0,        1348,\n};\n\nstatic const uint16_t ud_itab__1080[] = {\n  /*  0 */           0,        1349,\n};\n\nstatic const uint16_t ud_itab__1081[] = {\n  /*  0 */           0,        1350,\n};\n\nstatic const uint16_t ud_itab__1082[] = {\n  /*  0 */           0,        1351,\n};\n\nstatic const uint16_t ud_itab__1083[] = {\n  /*  0 */           0,        1352,\n};\n\nstatic const uint16_t ud_itab__1084[] = {\n  /*  0 */           0,        1353,\n};\n\nstatic const uint16_t ud_itab__1085[] = {\n  /*  0 */           0,        1354,\n};\n\nstatic const uint16_t ud_itab__1086[] = {\n  /*  0 */           0,        1355,\n};\n\nstatic const uint16_t ud_itab__1087[] = {\n  /*  0 */           0,        1356,\n};\n\nstatic const uint16_t ud_itab__1088[] = {\n  /*  0 */           0,        1357,\n};\n\nstatic const uint16_t ud_itab__1089[] = {\n  /*  0 */           0,        1358,\n};\n\nstatic const uint16_t ud_itab__1090[] = {\n  /*  0 */           0,        1359,\n};\n\nstatic const uint16_t ud_itab__1091[] = {\n  /*  0 */           0,        1360,\n};\n\nstatic const uint16_t ud_itab__1092[] = {\n  /*  0 */           0,        1361,\n};\n\nstatic const uint16_t ud_itab__1093[] = {\n  /*  0 */           0,        1362,\n};\n\nstatic const uint16_t ud_itab__1094[] = {\n  /*  0 */           0,        1363,\n};\n\nstatic const uint16_t ud_itab__1095[] = {\n  /*  0 */           0,        1364,\n};\n\nstatic const uint16_t ud_itab__1096[] = {\n  /*  0 */           0,        1365,\n};\n\nstatic const uint16_t ud_itab__1097[] = {\n  /*  0 */           0,        1366,\n};\n\nstatic const uint16_t ud_itab__1098[] = {\n  /*  0 */           0,        1367,\n};\n\nstatic const uint16_t ud_itab__1099[] = {\n  /*  0 */           0,        1368,\n};\n\nstatic const uint16_t ud_itab__1100[] = {\n  /*  0 */           0,        1369,\n};\n\nstatic const uint16_t ud_itab__1101[] = {\n  /*  0 */           0,        1370,\n};\n\nstatic const uint16_t ud_itab__1102[] = {\n  /*  0 */           0,        1371,\n};\n\nstatic const uint16_t ud_itab__1103[] = {\n  /*  0 */           0,        1372,\n};\n\nstatic const uint16_t ud_itab__1104[] = {\n  /*  0 */           0,        1373,\n};\n\nstatic const uint16_t ud_itab__1105[] = {\n  /*  0 */           0,        1374,\n};\n\nstatic const uint16_t ud_itab__1106[] = {\n  /*  0 */           0,        1375,\n};\n\nstatic const uint16_t ud_itab__1107[] = {\n  /*  0 */           0,        1376,\n};\n\nstatic const uint16_t ud_itab__1108[] = {\n  /*  0 */           0,        1377,\n};\n\nstatic const uint16_t ud_itab__1109[] = {\n  /*  0 */           0,        1378,\n};\n\nstatic const uint16_t ud_itab__1110[] = {\n  /*  0 */           0,        1379,\n};\n\nstatic const uint16_t ud_itab__1111[] = {\n  /*  0 */           0,        1380,\n};\n\nstatic const uint16_t ud_itab__1112[] = {\n  /*  0 */           0,        1381,\n};\n\nstatic const uint16_t ud_itab__1113[] = {\n  /*  0 */           0,        1382,\n};\n\nstatic const uint16_t ud_itab__1114[] = {\n  /*  0 */           0,        1383,\n};\n\nstatic const uint16_t ud_itab__1115[] = {\n  /*  0 */           0,        1384,\n};\n\nstatic const uint16_t ud_itab__1116[] = {\n  /*  0 */           0,        1385,\n};\n\nstatic const uint16_t ud_itab__1117[] = {\n  /*  0 */           0,        1386,\n};\n\nstatic const uint16_t ud_itab__1118[] = {\n  /*  0 */           0,        1387,\n};\n\nstatic const uint16_t ud_itab__1119[] = {\n  /*  0 */           0,        1388,\n};\n\nstatic const uint16_t ud_itab__1120[] = {\n  /*  0 */           0,        1389,\n};\n\nstatic const uint16_t ud_itab__1121[] = {\n  /*  0 */           0,        1390,\n};\n\nstatic const uint16_t ud_itab__1122[] = {\n  /*  0 */           0,        1391,\n};\n\nstatic const uint16_t ud_itab__1123[] = {\n  /*  0 */           0,        1392,\n};\n\nstatic const uint16_t ud_itab__1124[] = {\n  /*  0 */           0,        1393,\n};\n\nstatic const uint16_t ud_itab__1125[] = {\n  /*  0 */           0,        1394,\n};\n\nstatic const uint16_t ud_itab__1076[] = {\n  /*  0 */ GROUP(1077), GROUP(1078), GROUP(1079), GROUP(1080),\n  /*  4 */ GROUP(1081), GROUP(1082), GROUP(1083), GROUP(1084),\n  /*  8 */ GROUP(1085), GROUP(1086), GROUP(1087), GROUP(1088),\n  /*  c */ GROUP(1089), GROUP(1090), GROUP(1091), GROUP(1092),\n  /* 10 */ GROUP(1093), GROUP(1094), GROUP(1095), GROUP(1096),\n  /* 14 */ GROUP(1097), GROUP(1098), GROUP(1099), GROUP(1100),\n  /* 18 */ GROUP(1101), GROUP(1102), GROUP(1103), GROUP(1104),\n  /* 1c */ GROUP(1105), GROUP(1106), GROUP(1107), GROUP(1108),\n  /* 20 */ GROUP(1109),           0,           0,           0,\n  /* 24 */           0,           0,           0,           0,\n  /* 28 */ GROUP(1110), GROUP(1111), GROUP(1112), GROUP(1113),\n  /* 2c */ GROUP(1114), GROUP(1115), GROUP(1116), GROUP(1117),\n  /* 30 */ GROUP(1118), GROUP(1119), GROUP(1120), GROUP(1121),\n  /* 34 */ GROUP(1122), GROUP(1123), GROUP(1124), GROUP(1125),\n  /* 38 */           0,           0,           0,           0,\n  /* 3c */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__1066[] = {\n  /*  0 */ GROUP(1067), GROUP(1076),\n};\n\nstatic const uint16_t ud_itab__1126[] = {\n  /*  0 */        1398,        1399,        1400,\n};\n\nstatic const uint16_t ud_itab__1127[] = {\n  /*  0 */        1407,           0,\n};\n\nstatic const uint16_t ud_itab__1128[] = {\n  /*  0 */        1419,        1420,        1421,        1422,\n  /*  4 */        1423,        1424,        1425,        1426,\n};\n\nstatic const uint16_t ud_itab__1129[] = {\n  /*  0 */        1427,        1428,        1429,        1430,\n  /*  4 */        1431,        1432,        1433,        1434,\n};\n\nstatic const uint16_t ud_itab__1130[] = {\n  /*  0 */        1441,        1442,           0,           0,\n  /*  4 */           0,           0,           0,           0,\n};\n\nstatic const uint16_t ud_itab__1132[] = {\n  /*  0 */        1445,        1446,\n};\n\nstatic const uint16_t ud_itab__1131[] = {\n  /*  0 */        1443,        1444, GROUP(1132),        1447,\n  /*  4 */        1448,        1449,        1450,           0,\n};\n\nconst uint16_t ud_itab__0[] = {\n  /*  0 */           1,           2,           3,           4,\n  /*  4 */           5,           6,    GROUP(1),    GROUP(2),\n  /*  8 */           9,          10,          11,          12,\n  /*  c */          13,          14,    GROUP(3),    GROUP(4),\n  /* 10 */         628,         629,         630,         631,\n  /* 14 */         632,         633,  GROUP(563),  GROUP(564),\n  /* 18 */         636,         637,         638,         639,\n  /* 1c */         640,         641,  GROUP(565),  GROUP(566),\n  /* 20 */         644,         645,         646,         647,\n  /* 24 */         648,         649,           0,  GROUP(567),\n  /* 28 */         651,         652,         653,         654,\n  /* 2c */         655,         656,           0,  GROUP(568),\n  /* 30 */         658,         659,         660,         661,\n  /* 34 */         662,         663,           0,  GROUP(569),\n  /* 38 */         665,         666,         667,         668,\n  /* 3c */         669,         670,           0,  GROUP(570),\n  /* 40 */         672,         673,         674,         675,\n  /* 44 */         676,         677,         678,         679,\n  /* 48 */         680,         681,         682,         683,\n  /* 4c */         684,         685,         686,         687,\n  /* 50 */         688,         689,         690,         691,\n  /* 54 */         692,         693,         694,         695,\n  /* 58 */         696,         697,         698,         699,\n  /* 5c */         700,         701,         702,         703,\n  /* 60 */  GROUP(571),  GROUP(574),  GROUP(577),  GROUP(578),\n  /* 64 */           0,           0,           0,           0,\n  /* 68 */         711,         712,         713,         714,\n  /* 6c */         715,  GROUP(579),         718,  GROUP(580),\n  /* 70 */         721,         722,         723,         724,\n  /* 74 */         725,         726,         727,         728,\n  /* 78 */         729,         730,         731,         732,\n  /* 7c */         733,         734,         735,         736,\n  /* 80 */  GROUP(581),  GROUP(582),  GROUP(583),  GROUP(592),\n  /* 84 */         769,         770,         771,         772,\n  /* 88 */         773,         774,         775,         776,\n  /* 8c */         777,         778,         779,  GROUP(593),\n  /* 90 */         781,         782,         783,         784,\n  /* 94 */         785,         786,         787,         788,\n  /* 98 */  GROUP(594),  GROUP(595),  GROUP(596),         796,\n  /* 9c */  GROUP(597),  GROUP(601),         806,         807,\n  /* a0 */         808,         809,         810,         811,\n  /* a4 */         812,  GROUP(605),         816,  GROUP(606),\n  /* a8 */         820,         821,         822,  GROUP(607),\n  /* ac */         826,  GROUP(608),         830,  GROUP(609),\n  /* b0 */         834,         835,         836,         837,\n  /* b4 */         838,         839,         840,         841,\n  /* b8 */         842,         843,         844,         845,\n  /* bc */         846,         847,         848,         849,\n  /* c0 */  GROUP(610),  GROUP(611),         866,         867,\n  /* c4 */  GROUP(612),  GROUP(613),  GROUP(614),  GROUP(615),\n  /* c8 */         872,         873,         874,         875,\n  /* cc */         876,         877,  GROUP(616),  GROUP(617),\n  /* d0 */  GROUP(618),  GROUP(619),  GROUP(620),  GROUP(621),\n  /* d4 */  GROUP(622),  GROUP(623),  GROUP(624),         917,\n  /* d8 */  GROUP(625),  GROUP(700),  GROUP(762),  GROUP(806),\n  /* dc */  GROUP(865),  GROUP(940),  GROUP(998), GROUP(1066),\n  /* e0 */        1395,        1396,        1397, GROUP(1126),\n  /* e4 */        1401,        1402,        1403,        1404,\n  /* e8 */        1405,        1406, GROUP(1127),        1408,\n  /* ec */        1409,        1410,        1411,        1412,\n  /* f0 */        1413,        1414,        1415,        1416,\n  /* f4 */        1417,        1418, GROUP(1128), GROUP(1129),\n  /* f8 */        1435,        1436,        1437,        1438,\n  /* fc */        1439,        1440, GROUP(1130), GROUP(1131),\n};\n\n\nstruct ud_lookup_table_list_entry ud_lookup_table_list[] = {\n    /* 000 */ { ud_itab__0, UD_TAB__OPC_TABLE, \"table0\" },\n    /* 001 */ { ud_itab__1, UD_TAB__OPC_MODE, \"/m\" },\n    /* 002 */ { ud_itab__2, UD_TAB__OPC_MODE, \"/m\" },\n    /* 003 */ { ud_itab__3, UD_TAB__OPC_MODE, \"/m\" },\n    /* 004 */ { ud_itab__4, UD_TAB__OPC_TABLE, \"0f\" },\n    /* 005 */ { ud_itab__5, UD_TAB__OPC_REG, \"/reg\" },\n    /* 006 */ { ud_itab__6, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 007 */ { ud_itab__7, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 008 */ { ud_itab__8, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 009 */ { ud_itab__9, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 010 */ { ud_itab__10, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 011 */ { ud_itab__11, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 012 */ { ud_itab__12, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 013 */ { ud_itab__13, UD_TAB__OPC_REG, \"/reg\" },\n    /* 014 */ { ud_itab__14, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 015 */ { ud_itab__15, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 016 */ { ud_itab__16, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 017 */ { ud_itab__17, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 018 */ { ud_itab__18, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 019 */ { ud_itab__19, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 020 */ { ud_itab__20, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 021 */ { ud_itab__21, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 022 */ { ud_itab__22, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 023 */ { ud_itab__23, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 024 */ { ud_itab__24, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 025 */ { ud_itab__25, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 026 */ { ud_itab__26, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 027 */ { ud_itab__27, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 028 */ { ud_itab__28, UD_TAB__OPC_REG, \"/reg\" },\n    /* 029 */ { ud_itab__29, UD_TAB__OPC_RM, \"/rm\" },\n    /* 030 */ { ud_itab__30, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 031 */ { ud_itab__31, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 032 */ { ud_itab__32, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 033 */ { ud_itab__33, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 034 */ { ud_itab__34, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 035 */ { ud_itab__35, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 036 */ { ud_itab__36, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 037 */ { ud_itab__37, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 038 */ { ud_itab__38, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 039 */ { ud_itab__39, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 040 */ { ud_itab__40, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 041 */ { ud_itab__41, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 042 */ { ud_itab__42, UD_TAB__OPC_RM, \"/rm\" },\n    /* 043 */ { ud_itab__43, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 044 */ { ud_itab__44, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 045 */ { ud_itab__45, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 046 */ { ud_itab__46, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 047 */ { ud_itab__47, UD_TAB__OPC_RM, \"/rm\" },\n    /* 048 */ { ud_itab__48, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 049 */ { ud_itab__49, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 050 */ { ud_itab__50, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 051 */ { ud_itab__51, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 052 */ { ud_itab__52, UD_TAB__OPC_RM, \"/rm\" },\n    /* 053 */ { ud_itab__53, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 054 */ { ud_itab__54, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 055 */ { ud_itab__55, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 056 */ { ud_itab__56, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 057 */ { ud_itab__57, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 058 */ { ud_itab__58, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 059 */ { ud_itab__59, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 060 */ { ud_itab__60, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 061 */ { ud_itab__61, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 062 */ { ud_itab__62, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 063 */ { ud_itab__63, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 064 */ { ud_itab__64, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 065 */ { ud_itab__65, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 066 */ { ud_itab__66, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 067 */ { ud_itab__67, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 068 */ { ud_itab__68, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 069 */ { ud_itab__69, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 070 */ { ud_itab__70, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 071 */ { ud_itab__71, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 072 */ { ud_itab__72, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 073 */ { ud_itab__73, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 074 */ { ud_itab__74, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 075 */ { ud_itab__75, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 076 */ { ud_itab__76, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 077 */ { ud_itab__77, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 078 */ { ud_itab__78, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 079 */ { ud_itab__79, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 080 */ { ud_itab__80, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 081 */ { ud_itab__81, UD_TAB__OPC_RM, \"/rm\" },\n    /* 082 */ { ud_itab__82, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 083 */ { ud_itab__83, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 084 */ { ud_itab__84, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 085 */ { ud_itab__85, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 086 */ { ud_itab__86, UD_TAB__OPC_VENDOR, \"amd\" },\n    /* 087 */ { ud_itab__87, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 088 */ { ud_itab__88, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 089 */ { ud_itab__89, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 090 */ { ud_itab__90, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 091 */ { ud_itab__91, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 092 */ { ud_itab__92, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 093 */ { ud_itab__93, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 094 */ { ud_itab__94, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 095 */ { ud_itab__95, UD_TAB__OPC_REG, \"/reg\" },\n    /* 096 */ { ud_itab__96, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 097 */ { ud_itab__97, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 098 */ { ud_itab__98, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 099 */ { ud_itab__99, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 100 */ { ud_itab__100, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 101 */ { ud_itab__101, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 102 */ { ud_itab__102, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 103 */ { ud_itab__103, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 104 */ { ud_itab__104, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 105 */ { ud_itab__105, UD_TAB__OPC_3DNOW, \"/3dnow\" },\n    /* 106 */ { ud_itab__106, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 107 */ { ud_itab__107, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 108 */ { ud_itab__108, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 109 */ { ud_itab__109, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 110 */ { ud_itab__110, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 111 */ { ud_itab__111, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 112 */ { ud_itab__112, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 113 */ { ud_itab__113, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 114 */ { ud_itab__114, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 115 */ { ud_itab__115, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 116 */ { ud_itab__116, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 117 */ { ud_itab__117, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 118 */ { ud_itab__118, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 119 */ { ud_itab__119, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 120 */ { ud_itab__120, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 121 */ { ud_itab__121, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 122 */ { ud_itab__122, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 123 */ { ud_itab__123, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 124 */ { ud_itab__124, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 125 */ { ud_itab__125, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 126 */ { ud_itab__126, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 127 */ { ud_itab__127, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 128 */ { ud_itab__128, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 129 */ { ud_itab__129, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 130 */ { ud_itab__130, UD_TAB__OPC_REG, \"/reg\" },\n    /* 131 */ { ud_itab__131, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 132 */ { ud_itab__132, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 133 */ { ud_itab__133, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 134 */ { ud_itab__134, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 135 */ { ud_itab__135, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 136 */ { ud_itab__136, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 137 */ { ud_itab__137, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 138 */ { ud_itab__138, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 139 */ { ud_itab__139, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 140 */ { ud_itab__140, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 141 */ { ud_itab__141, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 142 */ { ud_itab__142, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 143 */ { ud_itab__143, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 144 */ { ud_itab__144, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 145 */ { ud_itab__145, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 146 */ { ud_itab__146, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 147 */ { ud_itab__147, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 148 */ { ud_itab__148, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 149 */ { ud_itab__149, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 150 */ { ud_itab__150, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 151 */ { ud_itab__151, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 152 */ { ud_itab__152, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 153 */ { ud_itab__153, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 154 */ { ud_itab__154, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 155 */ { ud_itab__155, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 156 */ { ud_itab__156, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 157 */ { ud_itab__157, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 158 */ { ud_itab__158, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 159 */ { ud_itab__159, UD_TAB__OPC_MODE, \"/m\" },\n    /* 160 */ { ud_itab__160, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 161 */ { ud_itab__161, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 162 */ { ud_itab__162, UD_TAB__OPC_MODE, \"/m\" },\n    /* 163 */ { ud_itab__163, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 164 */ { ud_itab__164, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 165 */ { ud_itab__165, UD_TAB__OPC_TABLE, \"38\" },\n    /* 166 */ { ud_itab__166, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 167 */ { ud_itab__167, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 168 */ { ud_itab__168, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 169 */ { ud_itab__169, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 170 */ { ud_itab__170, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 171 */ { ud_itab__171, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 172 */ { ud_itab__172, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 173 */ { ud_itab__173, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 174 */ { ud_itab__174, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 175 */ { ud_itab__175, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 176 */ { ud_itab__176, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 177 */ { ud_itab__177, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 178 */ { ud_itab__178, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 179 */ { ud_itab__179, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 180 */ { ud_itab__180, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 181 */ { ud_itab__181, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 182 */ { ud_itab__182, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 183 */ { ud_itab__183, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 184 */ { ud_itab__184, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 185 */ { ud_itab__185, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 186 */ { ud_itab__186, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 187 */ { ud_itab__187, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 188 */ { ud_itab__188, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 189 */ { ud_itab__189, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 190 */ { ud_itab__190, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 191 */ { ud_itab__191, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 192 */ { ud_itab__192, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 193 */ { ud_itab__193, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 194 */ { ud_itab__194, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 195 */ { ud_itab__195, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 196 */ { ud_itab__196, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 197 */ { ud_itab__197, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 198 */ { ud_itab__198, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 199 */ { ud_itab__199, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 200 */ { ud_itab__200, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 201 */ { ud_itab__201, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 202 */ { ud_itab__202, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 203 */ { ud_itab__203, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 204 */ { ud_itab__204, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 205 */ { ud_itab__205, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 206 */ { ud_itab__206, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 207 */ { ud_itab__207, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 208 */ { ud_itab__208, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 209 */ { ud_itab__209, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 210 */ { ud_itab__210, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 211 */ { ud_itab__211, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 212 */ { ud_itab__212, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 213 */ { ud_itab__213, UD_TAB__OPC_MODE, \"/m\" },\n    /* 214 */ { ud_itab__214, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 215 */ { ud_itab__215, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 216 */ { ud_itab__216, UD_TAB__OPC_MODE, \"/m\" },\n    /* 217 */ { ud_itab__217, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 218 */ { ud_itab__218, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 219 */ { ud_itab__219, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 220 */ { ud_itab__220, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 221 */ { ud_itab__221, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 222 */ { ud_itab__222, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 223 */ { ud_itab__223, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 224 */ { ud_itab__224, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 225 */ { ud_itab__225, UD_TAB__OPC_TABLE, \"3a\" },\n    /* 226 */ { ud_itab__226, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 227 */ { ud_itab__227, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 228 */ { ud_itab__228, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 229 */ { ud_itab__229, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 230 */ { ud_itab__230, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 231 */ { ud_itab__231, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 232 */ { ud_itab__232, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 233 */ { ud_itab__233, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 234 */ { ud_itab__234, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 235 */ { ud_itab__235, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 236 */ { ud_itab__236, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 237 */ { ud_itab__237, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 238 */ { ud_itab__238, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 239 */ { ud_itab__239, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 240 */ { ud_itab__240, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 241 */ { ud_itab__241, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 242 */ { ud_itab__242, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 243 */ { ud_itab__243, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 244 */ { ud_itab__244, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 245 */ { ud_itab__245, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 246 */ { ud_itab__246, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 247 */ { ud_itab__247, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 248 */ { ud_itab__248, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 249 */ { ud_itab__249, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 250 */ { ud_itab__250, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 251 */ { ud_itab__251, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 252 */ { ud_itab__252, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 253 */ { ud_itab__253, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 254 */ { ud_itab__254, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 255 */ { ud_itab__255, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 256 */ { ud_itab__256, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 257 */ { ud_itab__257, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 258 */ { ud_itab__258, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 259 */ { ud_itab__259, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 260 */ { ud_itab__260, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 261 */ { ud_itab__261, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 262 */ { ud_itab__262, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 263 */ { ud_itab__263, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 264 */ { ud_itab__264, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 265 */ { ud_itab__265, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 266 */ { ud_itab__266, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 267 */ { ud_itab__267, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 268 */ { ud_itab__268, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 269 */ { ud_itab__269, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 270 */ { ud_itab__270, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 271 */ { ud_itab__271, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 272 */ { ud_itab__272, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 273 */ { ud_itab__273, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 274 */ { ud_itab__274, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 275 */ { ud_itab__275, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 276 */ { ud_itab__276, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 277 */ { ud_itab__277, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 278 */ { ud_itab__278, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 279 */ { ud_itab__279, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 280 */ { ud_itab__280, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 281 */ { ud_itab__281, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 282 */ { ud_itab__282, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 283 */ { ud_itab__283, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 284 */ { ud_itab__284, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 285 */ { ud_itab__285, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 286 */ { ud_itab__286, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 287 */ { ud_itab__287, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 288 */ { ud_itab__288, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 289 */ { ud_itab__289, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 290 */ { ud_itab__290, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 291 */ { ud_itab__291, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 292 */ { ud_itab__292, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 293 */ { ud_itab__293, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 294 */ { ud_itab__294, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 295 */ { ud_itab__295, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 296 */ { ud_itab__296, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 297 */ { ud_itab__297, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 298 */ { ud_itab__298, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 299 */ { ud_itab__299, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 300 */ { ud_itab__300, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 301 */ { ud_itab__301, UD_TAB__OPC_REG, \"/reg\" },\n    /* 302 */ { ud_itab__302, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 303 */ { ud_itab__303, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 304 */ { ud_itab__304, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 305 */ { ud_itab__305, UD_TAB__OPC_REG, \"/reg\" },\n    /* 306 */ { ud_itab__306, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 307 */ { ud_itab__307, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 308 */ { ud_itab__308, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 309 */ { ud_itab__309, UD_TAB__OPC_REG, \"/reg\" },\n    /* 310 */ { ud_itab__310, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 311 */ { ud_itab__311, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 312 */ { ud_itab__312, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 313 */ { ud_itab__313, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 314 */ { ud_itab__314, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 315 */ { ud_itab__315, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 316 */ { ud_itab__316, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 317 */ { ud_itab__317, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 318 */ { ud_itab__318, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 319 */ { ud_itab__319, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 320 */ { ud_itab__320, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 321 */ { ud_itab__321, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 322 */ { ud_itab__322, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 323 */ { ud_itab__323, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 324 */ { ud_itab__324, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 325 */ { ud_itab__325, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 326 */ { ud_itab__326, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 327 */ { ud_itab__327, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 328 */ { ud_itab__328, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 329 */ { ud_itab__329, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 330 */ { ud_itab__330, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 331 */ { ud_itab__331, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 332 */ { ud_itab__332, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 333 */ { ud_itab__333, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 334 */ { ud_itab__334, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 335 */ { ud_itab__335, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 336 */ { ud_itab__336, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 337 */ { ud_itab__337, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 338 */ { ud_itab__338, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 339 */ { ud_itab__339, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 340 */ { ud_itab__340, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 341 */ { ud_itab__341, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 342 */ { ud_itab__342, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 343 */ { ud_itab__343, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 344 */ { ud_itab__344, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 345 */ { ud_itab__345, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 346 */ { ud_itab__346, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 347 */ { ud_itab__347, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 348 */ { ud_itab__348, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 349 */ { ud_itab__349, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 350 */ { ud_itab__350, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 351 */ { ud_itab__351, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 352 */ { ud_itab__352, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 353 */ { ud_itab__353, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 354 */ { ud_itab__354, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 355 */ { ud_itab__355, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 356 */ { ud_itab__356, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 357 */ { ud_itab__357, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 358 */ { ud_itab__358, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 359 */ { ud_itab__359, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 360 */ { ud_itab__360, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 361 */ { ud_itab__361, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 362 */ { ud_itab__362, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 363 */ { ud_itab__363, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 364 */ { ud_itab__364, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 365 */ { ud_itab__365, UD_TAB__OPC_REG, \"/reg\" },\n    /* 366 */ { ud_itab__366, UD_TAB__OPC_RM, \"/rm\" },\n    /* 367 */ { ud_itab__367, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 368 */ { ud_itab__368, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 369 */ { ud_itab__369, UD_TAB__OPC_RM, \"/rm\" },\n    /* 370 */ { ud_itab__370, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 371 */ { ud_itab__371, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 372 */ { ud_itab__372, UD_TAB__OPC_RM, \"/rm\" },\n    /* 373 */ { ud_itab__373, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 374 */ { ud_itab__374, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 375 */ { ud_itab__375, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 376 */ { ud_itab__376, UD_TAB__OPC_REG, \"/reg\" },\n    /* 377 */ { ud_itab__377, UD_TAB__OPC_RM, \"/rm\" },\n    /* 378 */ { ud_itab__378, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 379 */ { ud_itab__379, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 380 */ { ud_itab__380, UD_TAB__OPC_RM, \"/rm\" },\n    /* 381 */ { ud_itab__381, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 382 */ { ud_itab__382, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 383 */ { ud_itab__383, UD_TAB__OPC_RM, \"/rm\" },\n    /* 384 */ { ud_itab__384, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 385 */ { ud_itab__385, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 386 */ { ud_itab__386, UD_TAB__OPC_RM, \"/rm\" },\n    /* 387 */ { ud_itab__387, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 388 */ { ud_itab__388, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 389 */ { ud_itab__389, UD_TAB__OPC_RM, \"/rm\" },\n    /* 390 */ { ud_itab__390, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 391 */ { ud_itab__391, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 392 */ { ud_itab__392, UD_TAB__OPC_RM, \"/rm\" },\n    /* 393 */ { ud_itab__393, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 394 */ { ud_itab__394, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 395 */ { ud_itab__395, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 396 */ { ud_itab__396, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 397 */ { ud_itab__397, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 398 */ { ud_itab__398, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 399 */ { ud_itab__399, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 400 */ { ud_itab__400, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 401 */ { ud_itab__401, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 402 */ { ud_itab__402, UD_TAB__OPC_REG, \"/reg\" },\n    /* 403 */ { ud_itab__403, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 404 */ { ud_itab__404, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 405 */ { ud_itab__405, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 406 */ { ud_itab__406, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 407 */ { ud_itab__407, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 408 */ { ud_itab__408, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 409 */ { ud_itab__409, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 410 */ { ud_itab__410, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 411 */ { ud_itab__411, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 412 */ { ud_itab__412, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 413 */ { ud_itab__413, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 414 */ { ud_itab__414, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 415 */ { ud_itab__415, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 416 */ { ud_itab__416, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 417 */ { ud_itab__417, UD_TAB__OPC_REG, \"/reg\" },\n    /* 418 */ { ud_itab__418, UD_TAB__OPC_RM, \"/rm\" },\n    /* 419 */ { ud_itab__419, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 420 */ { ud_itab__420, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 421 */ { ud_itab__421, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 422 */ { ud_itab__422, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 423 */ { ud_itab__423, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 424 */ { ud_itab__424, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 425 */ { ud_itab__425, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 426 */ { ud_itab__426, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 427 */ { ud_itab__427, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 428 */ { ud_itab__428, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 429 */ { ud_itab__429, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 430 */ { ud_itab__430, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 431 */ { ud_itab__431, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 432 */ { ud_itab__432, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 433 */ { ud_itab__433, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 434 */ { ud_itab__434, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 435 */ { ud_itab__435, UD_TAB__OPC_RM, \"/rm\" },\n    /* 436 */ { ud_itab__436, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 437 */ { ud_itab__437, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 438 */ { ud_itab__438, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 439 */ { ud_itab__439, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 440 */ { ud_itab__440, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 441 */ { ud_itab__441, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 442 */ { ud_itab__442, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 443 */ { ud_itab__443, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 444 */ { ud_itab__444, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 445 */ { ud_itab__445, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 446 */ { ud_itab__446, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 447 */ { ud_itab__447, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 448 */ { ud_itab__448, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 449 */ { ud_itab__449, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 450 */ { ud_itab__450, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 451 */ { ud_itab__451, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 452 */ { ud_itab__452, UD_TAB__OPC_RM, \"/rm\" },\n    /* 453 */ { ud_itab__453, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 454 */ { ud_itab__454, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 455 */ { ud_itab__455, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 456 */ { ud_itab__456, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 457 */ { ud_itab__457, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 458 */ { ud_itab__458, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 459 */ { ud_itab__459, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 460 */ { ud_itab__460, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 461 */ { ud_itab__461, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 462 */ { ud_itab__462, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 463 */ { ud_itab__463, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 464 */ { ud_itab__464, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 465 */ { ud_itab__465, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 466 */ { ud_itab__466, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 467 */ { ud_itab__467, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 468 */ { ud_itab__468, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 469 */ { ud_itab__469, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 470 */ { ud_itab__470, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 471 */ { ud_itab__471, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 472 */ { ud_itab__472, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 473 */ { ud_itab__473, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 474 */ { ud_itab__474, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 475 */ { ud_itab__475, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 476 */ { ud_itab__476, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 477 */ { ud_itab__477, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 478 */ { ud_itab__478, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 479 */ { ud_itab__479, UD_TAB__OPC_REG, \"/reg\" },\n    /* 480 */ { ud_itab__480, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 481 */ { ud_itab__481, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 482 */ { ud_itab__482, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 483 */ { ud_itab__483, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 484 */ { ud_itab__484, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 485 */ { ud_itab__485, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 486 */ { ud_itab__486, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 487 */ { ud_itab__487, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 488 */ { ud_itab__488, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 489 */ { ud_itab__489, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 490 */ { ud_itab__490, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 491 */ { ud_itab__491, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 492 */ { ud_itab__492, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 493 */ { ud_itab__493, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 494 */ { ud_itab__494, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 495 */ { ud_itab__495, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 496 */ { ud_itab__496, UD_TAB__OPC_REG, \"/reg\" },\n    /* 497 */ { ud_itab__497, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 498 */ { ud_itab__498, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 499 */ { ud_itab__499, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 500 */ { ud_itab__500, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 501 */ { ud_itab__501, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 502 */ { ud_itab__502, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 503 */ { ud_itab__503, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 504 */ { ud_itab__504, UD_TAB__OPC_VENDOR, \"intel\" },\n    /* 505 */ { ud_itab__505, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 506 */ { ud_itab__506, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 507 */ { ud_itab__507, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 508 */ { ud_itab__508, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 509 */ { ud_itab__509, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 510 */ { ud_itab__510, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 511 */ { ud_itab__511, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 512 */ { ud_itab__512, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 513 */ { ud_itab__513, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 514 */ { ud_itab__514, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 515 */ { ud_itab__515, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 516 */ { ud_itab__516, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 517 */ { ud_itab__517, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 518 */ { ud_itab__518, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 519 */ { ud_itab__519, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 520 */ { ud_itab__520, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 521 */ { ud_itab__521, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 522 */ { ud_itab__522, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 523 */ { ud_itab__523, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 524 */ { ud_itab__524, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 525 */ { ud_itab__525, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 526 */ { ud_itab__526, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 527 */ { ud_itab__527, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 528 */ { ud_itab__528, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 529 */ { ud_itab__529, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 530 */ { ud_itab__530, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 531 */ { ud_itab__531, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 532 */ { ud_itab__532, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 533 */ { ud_itab__533, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 534 */ { ud_itab__534, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 535 */ { ud_itab__535, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 536 */ { ud_itab__536, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 537 */ { ud_itab__537, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 538 */ { ud_itab__538, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 539 */ { ud_itab__539, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 540 */ { ud_itab__540, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 541 */ { ud_itab__541, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 542 */ { ud_itab__542, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 543 */ { ud_itab__543, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 544 */ { ud_itab__544, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 545 */ { ud_itab__545, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 546 */ { ud_itab__546, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 547 */ { ud_itab__547, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 548 */ { ud_itab__548, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 549 */ { ud_itab__549, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 550 */ { ud_itab__550, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 551 */ { ud_itab__551, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 552 */ { ud_itab__552, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 553 */ { ud_itab__553, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 554 */ { ud_itab__554, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 555 */ { ud_itab__555, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 556 */ { ud_itab__556, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 557 */ { ud_itab__557, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 558 */ { ud_itab__558, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 559 */ { ud_itab__559, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 560 */ { ud_itab__560, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 561 */ { ud_itab__561, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 562 */ { ud_itab__562, UD_TAB__OPC_SSE, \"/sse\" },\n    /* 563 */ { ud_itab__563, UD_TAB__OPC_MODE, \"/m\" },\n    /* 564 */ { ud_itab__564, UD_TAB__OPC_MODE, \"/m\" },\n    /* 565 */ { ud_itab__565, UD_TAB__OPC_MODE, \"/m\" },\n    /* 566 */ { ud_itab__566, UD_TAB__OPC_MODE, \"/m\" },\n    /* 567 */ { ud_itab__567, UD_TAB__OPC_MODE, \"/m\" },\n    /* 568 */ { ud_itab__568, UD_TAB__OPC_MODE, \"/m\" },\n    /* 569 */ { ud_itab__569, UD_TAB__OPC_MODE, \"/m\" },\n    /* 570 */ { ud_itab__570, UD_TAB__OPC_MODE, \"/m\" },\n    /* 571 */ { ud_itab__571, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 572 */ { ud_itab__572, UD_TAB__OPC_MODE, \"/m\" },\n    /* 573 */ { ud_itab__573, UD_TAB__OPC_MODE, \"/m\" },\n    /* 574 */ { ud_itab__574, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 575 */ { ud_itab__575, UD_TAB__OPC_MODE, \"/m\" },\n    /* 576 */ { ud_itab__576, UD_TAB__OPC_MODE, \"/m\" },\n    /* 577 */ { ud_itab__577, UD_TAB__OPC_MODE, \"/m\" },\n    /* 578 */ { ud_itab__578, UD_TAB__OPC_MODE, \"/m\" },\n    /* 579 */ { ud_itab__579, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 580 */ { ud_itab__580, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 581 */ { ud_itab__581, UD_TAB__OPC_REG, \"/reg\" },\n    /* 582 */ { ud_itab__582, UD_TAB__OPC_REG, \"/reg\" },\n    /* 583 */ { ud_itab__583, UD_TAB__OPC_REG, \"/reg\" },\n    /* 584 */ { ud_itab__584, UD_TAB__OPC_MODE, \"/m\" },\n    /* 585 */ { ud_itab__585, UD_TAB__OPC_MODE, \"/m\" },\n    /* 586 */ { ud_itab__586, UD_TAB__OPC_MODE, \"/m\" },\n    /* 587 */ { ud_itab__587, UD_TAB__OPC_MODE, \"/m\" },\n    /* 588 */ { ud_itab__588, UD_TAB__OPC_MODE, \"/m\" },\n    /* 589 */ { ud_itab__589, UD_TAB__OPC_MODE, \"/m\" },\n    /* 590 */ { ud_itab__590, UD_TAB__OPC_MODE, \"/m\" },\n    /* 591 */ { ud_itab__591, UD_TAB__OPC_MODE, \"/m\" },\n    /* 592 */ { ud_itab__592, UD_TAB__OPC_REG, \"/reg\" },\n    /* 593 */ { ud_itab__593, UD_TAB__OPC_REG, \"/reg\" },\n    /* 594 */ { ud_itab__594, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 595 */ { ud_itab__595, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 596 */ { ud_itab__596, UD_TAB__OPC_MODE, \"/m\" },\n    /* 597 */ { ud_itab__597, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 598 */ { ud_itab__598, UD_TAB__OPC_MODE, \"/m\" },\n    /* 599 */ { ud_itab__599, UD_TAB__OPC_MODE, \"/m\" },\n    /* 600 */ { ud_itab__600, UD_TAB__OPC_MODE, \"/m\" },\n    /* 601 */ { ud_itab__601, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 602 */ { ud_itab__602, UD_TAB__OPC_MODE, \"/m\" },\n    /* 603 */ { ud_itab__603, UD_TAB__OPC_MODE, \"/m\" },\n    /* 604 */ { ud_itab__604, UD_TAB__OPC_MODE, \"/m\" },\n    /* 605 */ { ud_itab__605, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 606 */ { ud_itab__606, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 607 */ { ud_itab__607, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 608 */ { ud_itab__608, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 609 */ { ud_itab__609, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 610 */ { ud_itab__610, UD_TAB__OPC_REG, \"/reg\" },\n    /* 611 */ { ud_itab__611, UD_TAB__OPC_REG, \"/reg\" },\n    /* 612 */ { ud_itab__612, UD_TAB__OPC_MODE, \"/m\" },\n    /* 613 */ { ud_itab__613, UD_TAB__OPC_MODE, \"/m\" },\n    /* 614 */ { ud_itab__614, UD_TAB__OPC_REG, \"/reg\" },\n    /* 615 */ { ud_itab__615, UD_TAB__OPC_REG, \"/reg\" },\n    /* 616 */ { ud_itab__616, UD_TAB__OPC_MODE, \"/m\" },\n    /* 617 */ { ud_itab__617, UD_TAB__OPC_OSIZE, \"/o\" },\n    /* 618 */ { ud_itab__618, UD_TAB__OPC_REG, \"/reg\" },\n    /* 619 */ { ud_itab__619, UD_TAB__OPC_REG, \"/reg\" },\n    /* 620 */ { ud_itab__620, UD_TAB__OPC_REG, \"/reg\" },\n    /* 621 */ { ud_itab__621, UD_TAB__OPC_REG, \"/reg\" },\n    /* 622 */ { ud_itab__622, UD_TAB__OPC_MODE, \"/m\" },\n    /* 623 */ { ud_itab__623, UD_TAB__OPC_MODE, \"/m\" },\n    /* 624 */ { ud_itab__624, UD_TAB__OPC_MODE, \"/m\" },\n    /* 625 */ { ud_itab__625, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 626 */ { ud_itab__626, UD_TAB__OPC_REG, \"/reg\" },\n    /* 627 */ { ud_itab__627, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 628 */ { ud_itab__628, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 629 */ { ud_itab__629, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 630 */ { ud_itab__630, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 631 */ { ud_itab__631, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 632 */ { ud_itab__632, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 633 */ { ud_itab__633, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 634 */ { ud_itab__634, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 635 */ { ud_itab__635, UD_TAB__OPC_X87, \"/x87\" },\n    /* 636 */ { ud_itab__636, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 637 */ { ud_itab__637, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 638 */ { ud_itab__638, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 639 */ { ud_itab__639, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 640 */ { ud_itab__640, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 641 */ { ud_itab__641, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 642 */ { ud_itab__642, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 643 */ { ud_itab__643, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 644 */ { ud_itab__644, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 645 */ { ud_itab__645, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 646 */ { ud_itab__646, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 647 */ { ud_itab__647, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 648 */ { ud_itab__648, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 649 */ { ud_itab__649, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 650 */ { ud_itab__650, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 651 */ { ud_itab__651, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 652 */ { ud_itab__652, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 653 */ { ud_itab__653, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 654 */ { ud_itab__654, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 655 */ { ud_itab__655, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 656 */ { ud_itab__656, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 657 */ { ud_itab__657, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 658 */ { ud_itab__658, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 659 */ { ud_itab__659, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 660 */ { ud_itab__660, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 661 */ { ud_itab__661, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 662 */ { ud_itab__662, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 663 */ { ud_itab__663, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 664 */ { ud_itab__664, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 665 */ { ud_itab__665, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 666 */ { ud_itab__666, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 667 */ { ud_itab__667, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 668 */ { ud_itab__668, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 669 */ { ud_itab__669, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 670 */ { ud_itab__670, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 671 */ { ud_itab__671, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 672 */ { ud_itab__672, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 673 */ { ud_itab__673, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 674 */ { ud_itab__674, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 675 */ { ud_itab__675, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 676 */ { ud_itab__676, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 677 */ { ud_itab__677, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 678 */ { ud_itab__678, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 679 */ { ud_itab__679, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 680 */ { ud_itab__680, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 681 */ { ud_itab__681, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 682 */ { ud_itab__682, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 683 */ { ud_itab__683, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 684 */ { ud_itab__684, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 685 */ { ud_itab__685, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 686 */ { ud_itab__686, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 687 */ { ud_itab__687, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 688 */ { ud_itab__688, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 689 */ { ud_itab__689, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 690 */ { ud_itab__690, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 691 */ { ud_itab__691, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 692 */ { ud_itab__692, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 693 */ { ud_itab__693, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 694 */ { ud_itab__694, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 695 */ { ud_itab__695, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 696 */ { ud_itab__696, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 697 */ { ud_itab__697, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 698 */ { ud_itab__698, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 699 */ { ud_itab__699, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 700 */ { ud_itab__700, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 701 */ { ud_itab__701, UD_TAB__OPC_REG, \"/reg\" },\n    /* 702 */ { ud_itab__702, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 703 */ { ud_itab__703, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 704 */ { ud_itab__704, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 705 */ { ud_itab__705, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 706 */ { ud_itab__706, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 707 */ { ud_itab__707, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 708 */ { ud_itab__708, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 709 */ { ud_itab__709, UD_TAB__OPC_X87, \"/x87\" },\n    /* 710 */ { ud_itab__710, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 711 */ { ud_itab__711, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 712 */ { ud_itab__712, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 713 */ { ud_itab__713, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 714 */ { ud_itab__714, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 715 */ { ud_itab__715, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 716 */ { ud_itab__716, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 717 */ { ud_itab__717, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 718 */ { ud_itab__718, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 719 */ { ud_itab__719, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 720 */ { ud_itab__720, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 721 */ { ud_itab__721, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 722 */ { ud_itab__722, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 723 */ { ud_itab__723, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 724 */ { ud_itab__724, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 725 */ { ud_itab__725, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 726 */ { ud_itab__726, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 727 */ { ud_itab__727, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 728 */ { ud_itab__728, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 729 */ { ud_itab__729, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 730 */ { ud_itab__730, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 731 */ { ud_itab__731, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 732 */ { ud_itab__732, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 733 */ { ud_itab__733, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 734 */ { ud_itab__734, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 735 */ { ud_itab__735, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 736 */ { ud_itab__736, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 737 */ { ud_itab__737, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 738 */ { ud_itab__738, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 739 */ { ud_itab__739, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 740 */ { ud_itab__740, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 741 */ { ud_itab__741, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 742 */ { ud_itab__742, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 743 */ { ud_itab__743, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 744 */ { ud_itab__744, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 745 */ { ud_itab__745, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 746 */ { ud_itab__746, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 747 */ { ud_itab__747, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 748 */ { ud_itab__748, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 749 */ { ud_itab__749, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 750 */ { ud_itab__750, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 751 */ { ud_itab__751, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 752 */ { ud_itab__752, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 753 */ { ud_itab__753, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 754 */ { ud_itab__754, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 755 */ { ud_itab__755, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 756 */ { ud_itab__756, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 757 */ { ud_itab__757, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 758 */ { ud_itab__758, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 759 */ { ud_itab__759, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 760 */ { ud_itab__760, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 761 */ { ud_itab__761, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 762 */ { ud_itab__762, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 763 */ { ud_itab__763, UD_TAB__OPC_REG, \"/reg\" },\n    /* 764 */ { ud_itab__764, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 765 */ { ud_itab__765, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 766 */ { ud_itab__766, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 767 */ { ud_itab__767, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 768 */ { ud_itab__768, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 769 */ { ud_itab__769, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 770 */ { ud_itab__770, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 771 */ { ud_itab__771, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 772 */ { ud_itab__772, UD_TAB__OPC_X87, \"/x87\" },\n    /* 773 */ { ud_itab__773, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 774 */ { ud_itab__774, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 775 */ { ud_itab__775, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 776 */ { ud_itab__776, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 777 */ { ud_itab__777, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 778 */ { ud_itab__778, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 779 */ { ud_itab__779, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 780 */ { ud_itab__780, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 781 */ { ud_itab__781, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 782 */ { ud_itab__782, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 783 */ { ud_itab__783, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 784 */ { ud_itab__784, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 785 */ { ud_itab__785, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 786 */ { ud_itab__786, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 787 */ { ud_itab__787, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 788 */ { ud_itab__788, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 789 */ { ud_itab__789, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 790 */ { ud_itab__790, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 791 */ { ud_itab__791, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 792 */ { ud_itab__792, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 793 */ { ud_itab__793, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 794 */ { ud_itab__794, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 795 */ { ud_itab__795, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 796 */ { ud_itab__796, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 797 */ { ud_itab__797, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 798 */ { ud_itab__798, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 799 */ { ud_itab__799, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 800 */ { ud_itab__800, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 801 */ { ud_itab__801, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 802 */ { ud_itab__802, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 803 */ { ud_itab__803, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 804 */ { ud_itab__804, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 805 */ { ud_itab__805, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 806 */ { ud_itab__806, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 807 */ { ud_itab__807, UD_TAB__OPC_REG, \"/reg\" },\n    /* 808 */ { ud_itab__808, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 809 */ { ud_itab__809, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 810 */ { ud_itab__810, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 811 */ { ud_itab__811, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 812 */ { ud_itab__812, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 813 */ { ud_itab__813, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 814 */ { ud_itab__814, UD_TAB__OPC_X87, \"/x87\" },\n    /* 815 */ { ud_itab__815, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 816 */ { ud_itab__816, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 817 */ { ud_itab__817, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 818 */ { ud_itab__818, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 819 */ { ud_itab__819, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 820 */ { ud_itab__820, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 821 */ { ud_itab__821, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 822 */ { ud_itab__822, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 823 */ { ud_itab__823, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 824 */ { ud_itab__824, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 825 */ { ud_itab__825, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 826 */ { ud_itab__826, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 827 */ { ud_itab__827, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 828 */ { ud_itab__828, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 829 */ { ud_itab__829, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 830 */ { ud_itab__830, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 831 */ { ud_itab__831, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 832 */ { ud_itab__832, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 833 */ { ud_itab__833, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 834 */ { ud_itab__834, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 835 */ { ud_itab__835, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 836 */ { ud_itab__836, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 837 */ { ud_itab__837, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 838 */ { ud_itab__838, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 839 */ { ud_itab__839, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 840 */ { ud_itab__840, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 841 */ { ud_itab__841, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 842 */ { ud_itab__842, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 843 */ { ud_itab__843, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 844 */ { ud_itab__844, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 845 */ { ud_itab__845, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 846 */ { ud_itab__846, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 847 */ { ud_itab__847, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 848 */ { ud_itab__848, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 849 */ { ud_itab__849, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 850 */ { ud_itab__850, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 851 */ { ud_itab__851, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 852 */ { ud_itab__852, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 853 */ { ud_itab__853, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 854 */ { ud_itab__854, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 855 */ { ud_itab__855, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 856 */ { ud_itab__856, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 857 */ { ud_itab__857, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 858 */ { ud_itab__858, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 859 */ { ud_itab__859, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 860 */ { ud_itab__860, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 861 */ { ud_itab__861, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 862 */ { ud_itab__862, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 863 */ { ud_itab__863, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 864 */ { ud_itab__864, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 865 */ { ud_itab__865, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 866 */ { ud_itab__866, UD_TAB__OPC_REG, \"/reg\" },\n    /* 867 */ { ud_itab__867, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 868 */ { ud_itab__868, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 869 */ { ud_itab__869, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 870 */ { ud_itab__870, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 871 */ { ud_itab__871, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 872 */ { ud_itab__872, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 873 */ { ud_itab__873, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 874 */ { ud_itab__874, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 875 */ { ud_itab__875, UD_TAB__OPC_X87, \"/x87\" },\n    /* 876 */ { ud_itab__876, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 877 */ { ud_itab__877, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 878 */ { ud_itab__878, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 879 */ { ud_itab__879, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 880 */ { ud_itab__880, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 881 */ { ud_itab__881, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 882 */ { ud_itab__882, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 883 */ { ud_itab__883, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 884 */ { ud_itab__884, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 885 */ { ud_itab__885, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 886 */ { ud_itab__886, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 887 */ { ud_itab__887, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 888 */ { ud_itab__888, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 889 */ { ud_itab__889, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 890 */ { ud_itab__890, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 891 */ { ud_itab__891, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 892 */ { ud_itab__892, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 893 */ { ud_itab__893, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 894 */ { ud_itab__894, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 895 */ { ud_itab__895, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 896 */ { ud_itab__896, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 897 */ { ud_itab__897, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 898 */ { ud_itab__898, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 899 */ { ud_itab__899, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 900 */ { ud_itab__900, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 901 */ { ud_itab__901, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 902 */ { ud_itab__902, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 903 */ { ud_itab__903, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 904 */ { ud_itab__904, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 905 */ { ud_itab__905, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 906 */ { ud_itab__906, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 907 */ { ud_itab__907, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 908 */ { ud_itab__908, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 909 */ { ud_itab__909, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 910 */ { ud_itab__910, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 911 */ { ud_itab__911, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 912 */ { ud_itab__912, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 913 */ { ud_itab__913, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 914 */ { ud_itab__914, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 915 */ { ud_itab__915, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 916 */ { ud_itab__916, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 917 */ { ud_itab__917, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 918 */ { ud_itab__918, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 919 */ { ud_itab__919, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 920 */ { ud_itab__920, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 921 */ { ud_itab__921, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 922 */ { ud_itab__922, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 923 */ { ud_itab__923, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 924 */ { ud_itab__924, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 925 */ { ud_itab__925, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 926 */ { ud_itab__926, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 927 */ { ud_itab__927, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 928 */ { ud_itab__928, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 929 */ { ud_itab__929, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 930 */ { ud_itab__930, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 931 */ { ud_itab__931, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 932 */ { ud_itab__932, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 933 */ { ud_itab__933, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 934 */ { ud_itab__934, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 935 */ { ud_itab__935, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 936 */ { ud_itab__936, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 937 */ { ud_itab__937, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 938 */ { ud_itab__938, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 939 */ { ud_itab__939, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 940 */ { ud_itab__940, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 941 */ { ud_itab__941, UD_TAB__OPC_REG, \"/reg\" },\n    /* 942 */ { ud_itab__942, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 943 */ { ud_itab__943, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 944 */ { ud_itab__944, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 945 */ { ud_itab__945, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 946 */ { ud_itab__946, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 947 */ { ud_itab__947, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 948 */ { ud_itab__948, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 949 */ { ud_itab__949, UD_TAB__OPC_X87, \"/x87\" },\n    /* 950 */ { ud_itab__950, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 951 */ { ud_itab__951, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 952 */ { ud_itab__952, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 953 */ { ud_itab__953, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 954 */ { ud_itab__954, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 955 */ { ud_itab__955, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 956 */ { ud_itab__956, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 957 */ { ud_itab__957, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 958 */ { ud_itab__958, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 959 */ { ud_itab__959, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 960 */ { ud_itab__960, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 961 */ { ud_itab__961, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 962 */ { ud_itab__962, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 963 */ { ud_itab__963, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 964 */ { ud_itab__964, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 965 */ { ud_itab__965, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 966 */ { ud_itab__966, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 967 */ { ud_itab__967, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 968 */ { ud_itab__968, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 969 */ { ud_itab__969, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 970 */ { ud_itab__970, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 971 */ { ud_itab__971, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 972 */ { ud_itab__972, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 973 */ { ud_itab__973, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 974 */ { ud_itab__974, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 975 */ { ud_itab__975, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 976 */ { ud_itab__976, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 977 */ { ud_itab__977, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 978 */ { ud_itab__978, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 979 */ { ud_itab__979, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 980 */ { ud_itab__980, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 981 */ { ud_itab__981, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 982 */ { ud_itab__982, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 983 */ { ud_itab__983, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 984 */ { ud_itab__984, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 985 */ { ud_itab__985, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 986 */ { ud_itab__986, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 987 */ { ud_itab__987, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 988 */ { ud_itab__988, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 989 */ { ud_itab__989, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 990 */ { ud_itab__990, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 991 */ { ud_itab__991, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 992 */ { ud_itab__992, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 993 */ { ud_itab__993, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 994 */ { ud_itab__994, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 995 */ { ud_itab__995, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 996 */ { ud_itab__996, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 997 */ { ud_itab__997, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 998 */ { ud_itab__998, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 999 */ { ud_itab__999, UD_TAB__OPC_REG, \"/reg\" },\n    /* 1000 */ { ud_itab__1000, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1001 */ { ud_itab__1001, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1002 */ { ud_itab__1002, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1003 */ { ud_itab__1003, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1004 */ { ud_itab__1004, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1005 */ { ud_itab__1005, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1006 */ { ud_itab__1006, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1007 */ { ud_itab__1007, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1008 */ { ud_itab__1008, UD_TAB__OPC_X87, \"/x87\" },\n    /* 1009 */ { ud_itab__1009, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1010 */ { ud_itab__1010, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1011 */ { ud_itab__1011, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1012 */ { ud_itab__1012, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1013 */ { ud_itab__1013, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1014 */ { ud_itab__1014, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1015 */ { ud_itab__1015, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1016 */ { ud_itab__1016, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1017 */ { ud_itab__1017, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1018 */ { ud_itab__1018, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1019 */ { ud_itab__1019, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1020 */ { ud_itab__1020, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1021 */ { ud_itab__1021, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1022 */ { ud_itab__1022, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1023 */ { ud_itab__1023, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1024 */ { ud_itab__1024, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1025 */ { ud_itab__1025, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1026 */ { ud_itab__1026, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1027 */ { ud_itab__1027, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1028 */ { ud_itab__1028, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1029 */ { ud_itab__1029, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1030 */ { ud_itab__1030, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1031 */ { ud_itab__1031, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1032 */ { ud_itab__1032, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1033 */ { ud_itab__1033, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1034 */ { ud_itab__1034, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1035 */ { ud_itab__1035, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1036 */ { ud_itab__1036, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1037 */ { ud_itab__1037, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1038 */ { ud_itab__1038, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1039 */ { ud_itab__1039, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1040 */ { ud_itab__1040, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1041 */ { ud_itab__1041, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1042 */ { ud_itab__1042, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1043 */ { ud_itab__1043, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1044 */ { ud_itab__1044, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1045 */ { ud_itab__1045, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1046 */ { ud_itab__1046, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1047 */ { ud_itab__1047, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1048 */ { ud_itab__1048, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1049 */ { ud_itab__1049, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1050 */ { ud_itab__1050, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1051 */ { ud_itab__1051, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1052 */ { ud_itab__1052, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1053 */ { ud_itab__1053, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1054 */ { ud_itab__1054, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1055 */ { ud_itab__1055, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1056 */ { ud_itab__1056, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1057 */ { ud_itab__1057, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1058 */ { ud_itab__1058, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1059 */ { ud_itab__1059, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1060 */ { ud_itab__1060, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1061 */ { ud_itab__1061, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1062 */ { ud_itab__1062, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1063 */ { ud_itab__1063, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1064 */ { ud_itab__1064, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1065 */ { ud_itab__1065, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1066 */ { ud_itab__1066, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1067 */ { ud_itab__1067, UD_TAB__OPC_REG, \"/reg\" },\n    /* 1068 */ { ud_itab__1068, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1069 */ { ud_itab__1069, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1070 */ { ud_itab__1070, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1071 */ { ud_itab__1071, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1072 */ { ud_itab__1072, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1073 */ { ud_itab__1073, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1074 */ { ud_itab__1074, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1075 */ { ud_itab__1075, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1076 */ { ud_itab__1076, UD_TAB__OPC_X87, \"/x87\" },\n    /* 1077 */ { ud_itab__1077, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1078 */ { ud_itab__1078, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1079 */ { ud_itab__1079, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1080 */ { ud_itab__1080, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1081 */ { ud_itab__1081, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1082 */ { ud_itab__1082, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1083 */ { ud_itab__1083, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1084 */ { ud_itab__1084, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1085 */ { ud_itab__1085, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1086 */ { ud_itab__1086, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1087 */ { ud_itab__1087, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1088 */ { ud_itab__1088, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1089 */ { ud_itab__1089, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1090 */ { ud_itab__1090, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1091 */ { ud_itab__1091, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1092 */ { ud_itab__1092, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1093 */ { ud_itab__1093, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1094 */ { ud_itab__1094, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1095 */ { ud_itab__1095, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1096 */ { ud_itab__1096, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1097 */ { ud_itab__1097, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1098 */ { ud_itab__1098, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1099 */ { ud_itab__1099, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1100 */ { ud_itab__1100, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1101 */ { ud_itab__1101, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1102 */ { ud_itab__1102, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1103 */ { ud_itab__1103, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1104 */ { ud_itab__1104, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1105 */ { ud_itab__1105, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1106 */ { ud_itab__1106, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1107 */ { ud_itab__1107, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1108 */ { ud_itab__1108, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1109 */ { ud_itab__1109, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1110 */ { ud_itab__1110, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1111 */ { ud_itab__1111, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1112 */ { ud_itab__1112, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1113 */ { ud_itab__1113, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1114 */ { ud_itab__1114, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1115 */ { ud_itab__1115, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1116 */ { ud_itab__1116, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1117 */ { ud_itab__1117, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1118 */ { ud_itab__1118, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1119 */ { ud_itab__1119, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1120 */ { ud_itab__1120, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1121 */ { ud_itab__1121, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1122 */ { ud_itab__1122, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1123 */ { ud_itab__1123, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1124 */ { ud_itab__1124, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1125 */ { ud_itab__1125, UD_TAB__OPC_MOD, \"/mod\" },\n    /* 1126 */ { ud_itab__1126, UD_TAB__OPC_ASIZE, \"/a\" },\n    /* 1127 */ { ud_itab__1127, UD_TAB__OPC_MODE, \"/m\" },\n    /* 1128 */ { ud_itab__1128, UD_TAB__OPC_REG, \"/reg\" },\n    /* 1129 */ { ud_itab__1129, UD_TAB__OPC_REG, \"/reg\" },\n    /* 1130 */ { ud_itab__1130, UD_TAB__OPC_REG, \"/reg\" },\n    /* 1131 */ { ud_itab__1131, UD_TAB__OPC_REG, \"/reg\" },\n    /* 1132 */ { ud_itab__1132, UD_TAB__OPC_MODE, \"/m\" },\n};\n\n/* itab entry operand definitions (for readability) */\n#define O_AL      { OP_AL,       SZ_B     }\n#define O_AX      { OP_AX,       SZ_W     }\n#define O_Av      { OP_A,        SZ_V     }\n#define O_C       { OP_C,        SZ_NA    }\n#define O_CL      { OP_CL,       SZ_B     }\n#define O_CS      { OP_CS,       SZ_NA    }\n#define O_CX      { OP_CX,       SZ_W     }\n#define O_D       { OP_D,        SZ_NA    }\n#define O_DL      { OP_DL,       SZ_B     }\n#define O_DS      { OP_DS,       SZ_NA    }\n#define O_DX      { OP_DX,       SZ_W     }\n#define O_E       { OP_E,        SZ_NA    }\n#define O_ES      { OP_ES,       SZ_NA    }\n#define O_Eb      { OP_E,        SZ_B     }\n#define O_Ed      { OP_E,        SZ_D     }\n#define O_Eq      { OP_E,        SZ_Q     }\n#define O_Ev      { OP_E,        SZ_V     }\n#define O_Ew      { OP_E,        SZ_W     }\n#define O_Ey      { OP_E,        SZ_Y     }\n#define O_Ez      { OP_E,        SZ_Z     }\n#define O_FS      { OP_FS,       SZ_NA    }\n#define O_Fv      { OP_F,        SZ_V     }\n#define O_G       { OP_G,        SZ_NA    }\n#define O_GS      { OP_GS,       SZ_NA    }\n#define O_Gb      { OP_G,        SZ_B     }\n#define O_Gd      { OP_G,        SZ_D     }\n#define O_Gq      { OP_G,        SZ_Q     }\n#define O_Gv      { OP_G,        SZ_V     }\n#define O_Gw      { OP_G,        SZ_W     }\n#define O_Gy      { OP_G,        SZ_Y     }\n#define O_Gz      { OP_G,        SZ_Z     }\n#define O_I1      { OP_I1,       SZ_NA    }\n#define O_I3      { OP_I3,       SZ_NA    }\n#define O_Ib      { OP_I,        SZ_B     }\n#define O_Iv      { OP_I,        SZ_V     }\n#define O_Iw      { OP_I,        SZ_W     }\n#define O_Iz      { OP_I,        SZ_Z     }\n#define O_Jb      { OP_J,        SZ_B     }\n#define O_Jv      { OP_J,        SZ_V     }\n#define O_Jz      { OP_J,        SZ_Z     }\n#define O_M       { OP_M,        SZ_NA    }\n#define O_Mb      { OP_M,        SZ_B     }\n#define O_MbRd    { OP_MR,       SZ_BD    }\n#define O_MbRv    { OP_MR,       SZ_BV    }\n#define O_Md      { OP_M,        SZ_D     }\n#define O_MdRy    { OP_MR,       SZ_DY    }\n#define O_MdU     { OP_MU,       SZ_DO    }\n#define O_Mo      { OP_M,        SZ_O     }\n#define O_Mq      { OP_M,        SZ_Q     }\n#define O_MqU     { OP_MU,       SZ_QO    }\n#define O_Ms      { OP_M,        SZ_W     }\n#define O_Mt      { OP_M,        SZ_T     }\n#define O_Mv      { OP_M,        SZ_V     }\n#define O_Mw      { OP_M,        SZ_W     }\n#define O_MwRd    { OP_MR,       SZ_WD    }\n#define O_MwRv    { OP_MR,       SZ_WV    }\n#define O_MwRy    { OP_MR,       SZ_WY    }\n#define O_MwU     { OP_MU,       SZ_WO    }\n#define O_N       { OP_N,        SZ_Q     }\n#define O_NONE    { OP_NONE,     SZ_NA    }\n#define O_Ob      { OP_O,        SZ_B     }\n#define O_Ov      { OP_O,        SZ_V     }\n#define O_Ow      { OP_O,        SZ_W     }\n#define O_P       { OP_P,        SZ_Q     }\n#define O_Q       { OP_Q,        SZ_Q     }\n#define O_R       { OP_R,        SZ_RDQ   }\n#define O_R0b     { OP_R0,       SZ_B     }\n#define O_R0v     { OP_R0,       SZ_V     }\n#define O_R0w     { OP_R0,       SZ_W     }\n#define O_R0y     { OP_R0,       SZ_Y     }\n#define O_R0z     { OP_R0,       SZ_Z     }\n#define O_R1b     { OP_R1,       SZ_B     }\n#define O_R1v     { OP_R1,       SZ_V     }\n#define O_R1w     { OP_R1,       SZ_W     }\n#define O_R1y     { OP_R1,       SZ_Y     }\n#define O_R1z     { OP_R1,       SZ_Z     }\n#define O_R2b     { OP_R2,       SZ_B     }\n#define O_R2v     { OP_R2,       SZ_V     }\n#define O_R2w     { OP_R2,       SZ_W     }\n#define O_R2y     { OP_R2,       SZ_Y     }\n#define O_R2z     { OP_R2,       SZ_Z     }\n#define O_R3b     { OP_R3,       SZ_B     }\n#define O_R3v     { OP_R3,       SZ_V     }\n#define O_R3w     { OP_R3,       SZ_W     }\n#define O_R3y     { OP_R3,       SZ_Y     }\n#define O_R3z     { OP_R3,       SZ_Z     }\n#define O_R4b     { OP_R4,       SZ_B     }\n#define O_R4v     { OP_R4,       SZ_V     }\n#define O_R4w     { OP_R4,       SZ_W     }\n#define O_R4y     { OP_R4,       SZ_Y     }\n#define O_R4z     { OP_R4,       SZ_Z     }\n#define O_R5b     { OP_R5,       SZ_B     }\n#define O_R5v     { OP_R5,       SZ_V     }\n#define O_R5w     { OP_R5,       SZ_W     }\n#define O_R5y     { OP_R5,       SZ_Y     }\n#define O_R5z     { OP_R5,       SZ_Z     }\n#define O_R6b     { OP_R6,       SZ_B     }\n#define O_R6v     { OP_R6,       SZ_V     }\n#define O_R6w     { OP_R6,       SZ_W     }\n#define O_R6y     { OP_R6,       SZ_Y     }\n#define O_R6z     { OP_R6,       SZ_Z     }\n#define O_R7b     { OP_R7,       SZ_B     }\n#define O_R7v     { OP_R7,       SZ_V     }\n#define O_R7w     { OP_R7,       SZ_W     }\n#define O_R7y     { OP_R7,       SZ_Y     }\n#define O_R7z     { OP_R7,       SZ_Z     }\n#define O_S       { OP_S,        SZ_NA    }\n#define O_SS      { OP_SS,       SZ_NA    }\n#define O_ST0     { OP_ST0,      SZ_NA    }\n#define O_ST1     { OP_ST1,      SZ_NA    }\n#define O_ST2     { OP_ST2,      SZ_NA    }\n#define O_ST3     { OP_ST3,      SZ_NA    }\n#define O_ST4     { OP_ST4,      SZ_NA    }\n#define O_ST5     { OP_ST5,      SZ_NA    }\n#define O_ST6     { OP_ST6,      SZ_NA    }\n#define O_ST7     { OP_ST7,      SZ_NA    }\n#define O_U       { OP_U,        SZ_O     }\n#define O_V       { OP_V,        SZ_O     }\n#define O_W       { OP_W,        SZ_O     }\n#define O_eAX     { OP_eAX,      SZ_Z     }\n#define O_eCX     { OP_eCX,      SZ_Z     }\n#define O_eDX     { OP_eDX,      SZ_Z     }\n#define O_rAX     { OP_rAX,      SZ_V     }\n#define O_rCX     { OP_rCX,      SZ_V     }\n#define O_rDX     { OP_rDX,      SZ_V     }\n#define O_sIb     { OP_sI,       SZ_B     }\n#define O_sIv     { OP_sI,       SZ_V     }\n#define O_sIz     { OP_sI,       SZ_Z     }\n\nstruct ud_itab_entry ud_itab[] = {\n  /* 0000 */ { UD_Iinvalid, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0001 */ { UD_Iadd, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0002 */ { UD_Iadd, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0003 */ { UD_Iadd, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0004 */ { UD_Iadd, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0005 */ { UD_Iadd, O_AL, O_Ib, O_NONE, P_none },\n  /* 0006 */ { UD_Iadd, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0007 */ { UD_Ipush, O_ES, O_NONE, O_NONE, P_inv64 },\n  /* 0008 */ { UD_Ipop, O_ES, O_NONE, O_NONE, P_inv64 },\n  /* 0009 */ { UD_Ior, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0010 */ { UD_Ior, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0011 */ { UD_Ior, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0012 */ { UD_Ior, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0013 */ { UD_Ior, O_AL, O_Ib, O_NONE, P_none },\n  /* 0014 */ { UD_Ior, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0015 */ { UD_Ipush, O_CS, O_NONE, O_NONE, P_inv64 },\n  /* 0016 */ { UD_Isldt, O_MwRv, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0017 */ { UD_Istr, O_MwRv, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0018 */ { UD_Illdt, O_Ew, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0019 */ { UD_Iltr, O_Ew, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0020 */ { UD_Iverr, O_Ew, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0021 */ { UD_Iverw, O_Ew, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0022 */ { UD_Isgdt, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0023 */ { UD_Isidt, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0024 */ { UD_Ilgdt, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0025 */ { UD_Ilidt, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0026 */ { UD_Ismsw, O_MwRv, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0027 */ { UD_Ilmsw, O_Ew, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0028 */ { UD_Iinvlpg, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0029 */ { UD_Ivmcall, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0030 */ { UD_Ivmlaunch, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0031 */ { UD_Ivmresume, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0032 */ { UD_Ivmxoff, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0033 */ { UD_Imonitor, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0034 */ { UD_Imwait, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0035 */ { UD_Ixgetbv, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0036 */ { UD_Ixsetbv, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0037 */ { UD_Ivmrun, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0038 */ { UD_Ivmmcall, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0039 */ { UD_Ivmload, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0040 */ { UD_Ivmsave, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0041 */ { UD_Istgi, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0042 */ { UD_Iclgi, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0043 */ { UD_Iskinit, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0044 */ { UD_Iinvlpga, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0045 */ { UD_Ismsw, O_MwRv, O_NONE, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0046 */ { UD_Ilmsw, O_Ew, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0047 */ { UD_Iswapgs, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0048 */ { UD_Irdtscp, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0049 */ { UD_Ilar, O_Gv, O_Ew, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0050 */ { UD_Ilsl, O_Gv, O_Ew, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0051 */ { UD_Isyscall, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0052 */ { UD_Iclts, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0053 */ { UD_Isysret, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0054 */ { UD_Iinvd, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0055 */ { UD_Iwbinvd, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0056 */ { UD_Iud2, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0057 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0058 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0059 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0060 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0061 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0062 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0063 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0064 */ { UD_Iprefetch, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0065 */ { UD_Ifemms, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0066 */ { UD_Ipi2fw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0067 */ { UD_Ipi2fd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0068 */ { UD_Ipf2iw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0069 */ { UD_Ipf2id, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0070 */ { UD_Ipfnacc, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0071 */ { UD_Ipfpnacc, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0072 */ { UD_Ipfcmpge, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0073 */ { UD_Ipfmin, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0074 */ { UD_Ipfrcp, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0075 */ { UD_Ipfrsqrt, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0076 */ { UD_Ipfsub, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0077 */ { UD_Ipfadd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0078 */ { UD_Ipfcmpgt, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0079 */ { UD_Ipfmax, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0080 */ { UD_Ipfrcpit1, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0081 */ { UD_Ipfrsqit1, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0082 */ { UD_Ipfsubr, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0083 */ { UD_Ipfacc, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0084 */ { UD_Ipfcmpeq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0085 */ { UD_Ipfmul, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0086 */ { UD_Ipfrcpit2, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0087 */ { UD_Ipmulhrw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0088 */ { UD_Ipswapd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0089 */ { UD_Ipavgusb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0090 */ { UD_Imovups, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0091 */ { UD_Imovsd, O_V, O_W, O_NONE, P_str|P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0092 */ { UD_Imovss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0093 */ { UD_Imovupd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0094 */ { UD_Imovups, O_W, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0095 */ { UD_Imovsd, O_W, O_V, O_NONE, P_str|P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0096 */ { UD_Imovss, O_W, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0097 */ { UD_Imovupd, O_W, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0098 */ { UD_Imovlps, O_V, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0099 */ { UD_Imovddup, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0100 */ { UD_Imovsldup, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0101 */ { UD_Imovlpd, O_V, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0102 */ { UD_Imovhlps, O_V, O_U, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0103 */ { UD_Imovddup, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0104 */ { UD_Imovsldup, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0105 */ { UD_Imovlps, O_M, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0106 */ { UD_Imovlpd, O_M, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0107 */ { UD_Iunpcklps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0108 */ { UD_Iunpcklpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0109 */ { UD_Iunpckhps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0110 */ { UD_Iunpckhpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0111 */ { UD_Imovhps, O_V, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0112 */ { UD_Imovshdup, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0113 */ { UD_Imovhpd, O_V, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0114 */ { UD_Imovlhps, O_V, O_U, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0115 */ { UD_Imovshdup, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0116 */ { UD_Imovhps, O_M, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0117 */ { UD_Imovhpd, O_M, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0118 */ { UD_Iprefetchnta, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0119 */ { UD_Iprefetcht0, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0120 */ { UD_Iprefetcht1, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0121 */ { UD_Iprefetcht2, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0122 */ { UD_Inop, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0123 */ { UD_Inop, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0124 */ { UD_Inop, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0125 */ { UD_Inop, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0126 */ { UD_Inop, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0127 */ { UD_Inop, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0128 */ { UD_Inop, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0129 */ { UD_Imov, O_R, O_C, O_NONE, P_rexr|P_rexw|P_rexb },\n  /* 0130 */ { UD_Imov, O_R, O_D, O_NONE, P_rexr|P_rexw|P_rexb },\n  /* 0131 */ { UD_Imov, O_C, O_R, O_NONE, P_rexr|P_rexw|P_rexb },\n  /* 0132 */ { UD_Imov, O_D, O_R, O_NONE, P_rexr|P_rexw|P_rexb },\n  /* 0133 */ { UD_Imovaps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0134 */ { UD_Imovapd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0135 */ { UD_Imovaps, O_W, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0136 */ { UD_Imovapd, O_W, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0137 */ { UD_Icvtpi2ps, O_V, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0138 */ { UD_Icvtsi2sd, O_V, O_Ey, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0139 */ { UD_Icvtsi2ss, O_V, O_Ey, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0140 */ { UD_Icvtpi2pd, O_V, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0141 */ { UD_Imovntps, O_M, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0142 */ { UD_Imovntpd, O_M, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0143 */ { UD_Icvttps2pi, O_P, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0144 */ { UD_Icvttsd2si, O_Gy, O_W, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0145 */ { UD_Icvttss2si, O_Gy, O_W, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0146 */ { UD_Icvttpd2pi, O_P, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0147 */ { UD_Icvtps2pi, O_P, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0148 */ { UD_Icvtsd2si, O_Gy, O_W, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0149 */ { UD_Icvtss2si, O_Gy, O_W, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0150 */ { UD_Icvtpd2pi, O_P, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0151 */ { UD_Iucomiss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0152 */ { UD_Iucomisd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0153 */ { UD_Icomiss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0154 */ { UD_Icomisd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0155 */ { UD_Iwrmsr, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0156 */ { UD_Irdtsc, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0157 */ { UD_Irdmsr, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0158 */ { UD_Irdpmc, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0159 */ { UD_Isysenter, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0160 */ { UD_Isysenter, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0161 */ { UD_Isysexit, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0162 */ { UD_Isysexit, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0163 */ { UD_Igetsec, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0164 */ { UD_Ipshufb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0165 */ { UD_Ipshufb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0166 */ { UD_Iphaddw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0167 */ { UD_Iphaddw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0168 */ { UD_Iphaddd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0169 */ { UD_Iphaddd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0170 */ { UD_Iphaddsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0171 */ { UD_Iphaddsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0172 */ { UD_Ipmaddubsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0173 */ { UD_Ipmaddubsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0174 */ { UD_Iphsubw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0175 */ { UD_Iphsubw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0176 */ { UD_Iphsubd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0177 */ { UD_Iphsubd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0178 */ { UD_Iphsubsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0179 */ { UD_Iphsubsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0180 */ { UD_Ipsignb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0181 */ { UD_Ipsignb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0182 */ { UD_Ipsignw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0183 */ { UD_Ipsignw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0184 */ { UD_Ipsignd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0185 */ { UD_Ipsignd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0186 */ { UD_Ipmulhrsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0187 */ { UD_Ipmulhrsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0188 */ { UD_Ipblendvb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0189 */ { UD_Iblendvps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0190 */ { UD_Iblendvpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0191 */ { UD_Iptest, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0192 */ { UD_Ipabsb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0193 */ { UD_Ipabsb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0194 */ { UD_Ipabsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0195 */ { UD_Ipabsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0196 */ { UD_Ipabsd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0197 */ { UD_Ipabsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0198 */ { UD_Ipmovsxbw, O_V, O_MqU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0199 */ { UD_Ipmovsxbd, O_V, O_MdU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0200 */ { UD_Ipmovsxbq, O_V, O_MwU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0201 */ { UD_Ipmovsxwd, O_V, O_MqU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0202 */ { UD_Ipmovsxwq, O_V, O_MdU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0203 */ { UD_Ipmovsxdq, O_V, O_MqU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0204 */ { UD_Ipmuldq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0205 */ { UD_Ipcmpeqq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0206 */ { UD_Imovntdqa, O_V, O_Mo, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0207 */ { UD_Ipackusdw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0208 */ { UD_Ipmovzxbw, O_V, O_MqU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0209 */ { UD_Ipmovzxbd, O_V, O_MdU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0210 */ { UD_Ipmovzxbq, O_V, O_MwU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0211 */ { UD_Ipmovzxwd, O_V, O_MqU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0212 */ { UD_Ipmovzxwq, O_V, O_MdU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0213 */ { UD_Ipmovzxdq, O_V, O_MqU, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0214 */ { UD_Ipcmpgtq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0215 */ { UD_Ipminsb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0216 */ { UD_Ipminsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0217 */ { UD_Ipminuw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0218 */ { UD_Ipminud, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0219 */ { UD_Ipmaxsb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0220 */ { UD_Ipmaxsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0221 */ { UD_Ipmaxuw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0222 */ { UD_Ipmaxud, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0223 */ { UD_Ipmulld, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0224 */ { UD_Iphminposuw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0225 */ { UD_Iinvept, O_Gq, O_Mo, O_NONE, P_none },\n  /* 0226 */ { UD_Iinvvpid, O_Gq, O_Mo, O_NONE, P_none },\n  /* 0227 */ { UD_Iaesimc, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0228 */ { UD_Iaesenc, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0229 */ { UD_Iaesenclast, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0230 */ { UD_Iaesdec, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0231 */ { UD_Iaesdeclast, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0232 */ { UD_Imovbe, O_Gv, O_Mv, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0233 */ { UD_Icrc32, O_Gy, O_Eb, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0234 */ { UD_Imovbe, O_Mv, O_Gv, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0235 */ { UD_Icrc32, O_Gy, O_Ev, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0236 */ { UD_Iroundps, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0237 */ { UD_Iroundpd, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0238 */ { UD_Iroundss, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0239 */ { UD_Iroundsd, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0240 */ { UD_Iblendps, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0241 */ { UD_Iblendpd, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0242 */ { UD_Ipblendw, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0243 */ { UD_Ipalignr, O_P, O_Q, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0244 */ { UD_Ipalignr, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0245 */ { UD_Ipextrb, O_MbRv, O_V, O_Ib, P_aso|P_rexx|P_rexr|P_rexb|P_def64 },\n  /* 0246 */ { UD_Ipextrw, O_MwRd, O_V, O_Ib, P_aso|P_rexx|P_rexr|P_rexb },\n  /* 0247 */ { UD_Ipextrd, O_Ed, O_V, O_Ib, P_aso|P_rexr|P_rexx|P_rexw|P_rexb },\n  /* 0248 */ { UD_Ipextrd, O_Ed, O_V, O_Ib, P_aso|P_rexr|P_rexx|P_rexw|P_rexb },\n  /* 0249 */ { UD_Ipextrq, O_Eq, O_V, O_Ib, P_aso|P_rexr|P_rexw|P_rexb|P_def64 },\n  /* 0250 */ { UD_Iextractps, O_MdRy, O_V, O_Ib, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0251 */ { UD_Ipinsrb, O_V, O_MbRd, O_Ib, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0252 */ { UD_Iinsertps, O_V, O_Md, O_Ib, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0253 */ { UD_Ipinsrd, O_V, O_Ed, O_Ib, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0254 */ { UD_Ipinsrd, O_V, O_Ed, O_Ib, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0255 */ { UD_Ipinsrq, O_V, O_Eq, O_Ib, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0256 */ { UD_Idpps, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0257 */ { UD_Idppd, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0258 */ { UD_Impsadbw, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0259 */ { UD_Ipclmulqdq, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0260 */ { UD_Ipcmpestrm, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0261 */ { UD_Ipcmpestri, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0262 */ { UD_Ipcmpistrm, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0263 */ { UD_Ipcmpistri, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0264 */ { UD_Iaeskeygenassist, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0265 */ { UD_Icmovo, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0266 */ { UD_Icmovno, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0267 */ { UD_Icmovb, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0268 */ { UD_Icmovae, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0269 */ { UD_Icmovz, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0270 */ { UD_Icmovnz, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0271 */ { UD_Icmovbe, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0272 */ { UD_Icmova, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0273 */ { UD_Icmovs, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0274 */ { UD_Icmovns, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0275 */ { UD_Icmovp, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0276 */ { UD_Icmovnp, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0277 */ { UD_Icmovl, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0278 */ { UD_Icmovge, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0279 */ { UD_Icmovle, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0280 */ { UD_Icmovg, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0281 */ { UD_Imovmskps, O_Gd, O_U, O_NONE, P_oso|P_rexr|P_rexb },\n  /* 0282 */ { UD_Imovmskpd, O_Gd, O_U, O_NONE, P_oso|P_rexr|P_rexb },\n  /* 0283 */ { UD_Isqrtps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0284 */ { UD_Isqrtsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0285 */ { UD_Isqrtss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0286 */ { UD_Isqrtpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0287 */ { UD_Irsqrtps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0288 */ { UD_Irsqrtss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0289 */ { UD_Ircpps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0290 */ { UD_Ircpss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0291 */ { UD_Iandps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0292 */ { UD_Iandpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0293 */ { UD_Iandnps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0294 */ { UD_Iandnpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0295 */ { UD_Iorps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0296 */ { UD_Iorpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0297 */ { UD_Ixorps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0298 */ { UD_Ixorpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0299 */ { UD_Iaddps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0300 */ { UD_Iaddsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0301 */ { UD_Iaddss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0302 */ { UD_Iaddpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0303 */ { UD_Imulps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0304 */ { UD_Imulsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0305 */ { UD_Imulss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0306 */ { UD_Imulpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0307 */ { UD_Icvtps2pd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0308 */ { UD_Icvtsd2ss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0309 */ { UD_Icvtss2sd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0310 */ { UD_Icvtpd2ps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0311 */ { UD_Icvtdq2ps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0312 */ { UD_Icvttps2dq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0313 */ { UD_Icvtps2dq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0314 */ { UD_Isubps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0315 */ { UD_Isubsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0316 */ { UD_Isubss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0317 */ { UD_Isubpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0318 */ { UD_Iminps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0319 */ { UD_Iminsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0320 */ { UD_Iminss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0321 */ { UD_Iminpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0322 */ { UD_Idivps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0323 */ { UD_Idivsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0324 */ { UD_Idivss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0325 */ { UD_Idivpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0326 */ { UD_Imaxps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0327 */ { UD_Imaxsd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0328 */ { UD_Imaxss, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0329 */ { UD_Imaxpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0330 */ { UD_Ipunpcklbw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0331 */ { UD_Ipunpcklbw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0332 */ { UD_Ipunpcklwd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0333 */ { UD_Ipunpcklwd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0334 */ { UD_Ipunpckldq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0335 */ { UD_Ipunpckldq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0336 */ { UD_Ipacksswb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0337 */ { UD_Ipacksswb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0338 */ { UD_Ipcmpgtb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0339 */ { UD_Ipcmpgtb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0340 */ { UD_Ipcmpgtw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0341 */ { UD_Ipcmpgtw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0342 */ { UD_Ipcmpgtd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0343 */ { UD_Ipcmpgtd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0344 */ { UD_Ipackuswb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0345 */ { UD_Ipackuswb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0346 */ { UD_Ipunpckhbw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0347 */ { UD_Ipunpckhbw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0348 */ { UD_Ipunpckhwd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0349 */ { UD_Ipunpckhwd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0350 */ { UD_Ipunpckhdq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0351 */ { UD_Ipunpckhdq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0352 */ { UD_Ipackssdw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0353 */ { UD_Ipackssdw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0354 */ { UD_Ipunpcklqdq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0355 */ { UD_Ipunpckhqdq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0356 */ { UD_Imovd, O_P, O_Ey, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0357 */ { UD_Imovd, O_V, O_Ey, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0358 */ { UD_Imovq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0359 */ { UD_Imovdqu, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0360 */ { UD_Imovdqa, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0361 */ { UD_Ipshufw, O_P, O_Q, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0362 */ { UD_Ipshuflw, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0363 */ { UD_Ipshufhw, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0364 */ { UD_Ipshufd, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0365 */ { UD_Ipsrlw, O_N, O_Ib, O_NONE, P_none },\n  /* 0366 */ { UD_Ipsrlw, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0367 */ { UD_Ipsraw, O_N, O_Ib, O_NONE, P_none },\n  /* 0368 */ { UD_Ipsraw, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0369 */ { UD_Ipsllw, O_N, O_Ib, O_NONE, P_none },\n  /* 0370 */ { UD_Ipsllw, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0371 */ { UD_Ipsrld, O_N, O_Ib, O_NONE, P_none },\n  /* 0372 */ { UD_Ipsrld, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0373 */ { UD_Ipsrad, O_N, O_Ib, O_NONE, P_none },\n  /* 0374 */ { UD_Ipsrad, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0375 */ { UD_Ipslld, O_N, O_Ib, O_NONE, P_none },\n  /* 0376 */ { UD_Ipslld, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0377 */ { UD_Ipsrlq, O_N, O_Ib, O_NONE, P_none },\n  /* 0378 */ { UD_Ipsrlq, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0379 */ { UD_Ipsrldq, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0380 */ { UD_Ipsllq, O_N, O_Ib, O_NONE, P_none },\n  /* 0381 */ { UD_Ipsllq, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0382 */ { UD_Ipslldq, O_U, O_Ib, O_NONE, P_rexb },\n  /* 0383 */ { UD_Ipcmpeqb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0384 */ { UD_Ipcmpeqb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0385 */ { UD_Ipcmpeqw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0386 */ { UD_Ipcmpeqw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0387 */ { UD_Ipcmpeqd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0388 */ { UD_Ipcmpeqd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0389 */ { UD_Iemms, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0390 */ { UD_Ivmread, O_Ey, O_Gy, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_def64 },\n  /* 0391 */ { UD_Ivmwrite, O_Gy, O_Ey, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_def64 },\n  /* 0392 */ { UD_Ihaddps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0393 */ { UD_Ihaddpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0394 */ { UD_Ihsubps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0395 */ { UD_Ihsubpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0396 */ { UD_Imovd, O_Ey, O_P, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0397 */ { UD_Imovq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0398 */ { UD_Imovd, O_Ey, O_V, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0399 */ { UD_Imovq, O_Q, O_P, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0400 */ { UD_Imovdqu, O_W, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0401 */ { UD_Imovdqa, O_W, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0402 */ { UD_Ijo, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0403 */ { UD_Ijno, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0404 */ { UD_Ijb, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0405 */ { UD_Ijae, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0406 */ { UD_Ijz, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0407 */ { UD_Ijnz, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0408 */ { UD_Ijbe, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0409 */ { UD_Ija, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0410 */ { UD_Ijs, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0411 */ { UD_Ijns, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0412 */ { UD_Ijp, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0413 */ { UD_Ijnp, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0414 */ { UD_Ijl, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0415 */ { UD_Ijge, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0416 */ { UD_Ijle, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0417 */ { UD_Ijg, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0418 */ { UD_Iseto, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0419 */ { UD_Isetno, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0420 */ { UD_Isetb, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0421 */ { UD_Isetae, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0422 */ { UD_Isetz, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0423 */ { UD_Isetnz, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0424 */ { UD_Isetbe, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0425 */ { UD_Iseta, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0426 */ { UD_Isets, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0427 */ { UD_Isetns, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0428 */ { UD_Isetp, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0429 */ { UD_Isetnp, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0430 */ { UD_Isetl, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0431 */ { UD_Isetge, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0432 */ { UD_Isetle, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0433 */ { UD_Isetg, O_Eb, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0434 */ { UD_Ipush, O_FS, O_NONE, O_NONE, P_none },\n  /* 0435 */ { UD_Ipop, O_FS, O_NONE, O_NONE, P_none },\n  /* 0436 */ { UD_Icpuid, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0437 */ { UD_Ibt, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0438 */ { UD_Ishld, O_Ev, O_Gv, O_Ib, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0439 */ { UD_Ishld, O_Ev, O_Gv, O_CL, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0440 */ { UD_Imontmul, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0441 */ { UD_Ixsha1, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0442 */ { UD_Ixsha256, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0443 */ { UD_Ixstore, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0444 */ { UD_Ixcryptecb, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0445 */ { UD_Ixcryptcbc, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0446 */ { UD_Ixcryptctr, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0447 */ { UD_Ixcryptcfb, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0448 */ { UD_Ixcryptofb, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0449 */ { UD_Ipush, O_GS, O_NONE, O_NONE, P_none },\n  /* 0450 */ { UD_Ipop, O_GS, O_NONE, O_NONE, P_none },\n  /* 0451 */ { UD_Irsm, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0452 */ { UD_Ibts, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0453 */ { UD_Ishrd, O_Ev, O_Gv, O_Ib, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0454 */ { UD_Ishrd, O_Ev, O_Gv, O_CL, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0455 */ { UD_Ifxsave, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0456 */ { UD_Ifxrstor, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0457 */ { UD_Ildmxcsr, O_Md, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0458 */ { UD_Istmxcsr, O_Md, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0459 */ { UD_Ixsave, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0460 */ { UD_Ixrstor, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0461 */ { UD_Iclflush, O_M, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0462 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0463 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0464 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0465 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0466 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0467 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0468 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0469 */ { UD_Ilfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0470 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0471 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0472 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0473 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0474 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0475 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0476 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0477 */ { UD_Imfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0478 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0479 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0480 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0481 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0482 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0483 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0484 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0485 */ { UD_Isfence, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0486 */ { UD_Iimul, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0487 */ { UD_Icmpxchg, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0488 */ { UD_Icmpxchg, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0489 */ { UD_Ilss, O_Gv, O_M, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0490 */ { UD_Ibtr, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0491 */ { UD_Ilfs, O_Gz, O_M, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0492 */ { UD_Ilgs, O_Gz, O_M, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0493 */ { UD_Imovzx, O_Gv, O_Eb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0494 */ { UD_Imovzx, O_Gy, O_Ew, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0495 */ { UD_Ipopcnt, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexr|P_rexw|P_rexx|P_rexb },\n  /* 0496 */ { UD_Ibt, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0497 */ { UD_Ibts, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0498 */ { UD_Ibtr, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0499 */ { UD_Ibtc, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0500 */ { UD_Ibtc, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0501 */ { UD_Ibsf, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0502 */ { UD_Ibsr, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0503 */ { UD_Imovsx, O_Gv, O_Eb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0504 */ { UD_Imovsx, O_Gy, O_Ew, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0505 */ { UD_Ixadd, O_Eb, O_Gb, O_NONE, P_aso|P_oso|P_rexr|P_rexx|P_rexb },\n  /* 0506 */ { UD_Ixadd, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0507 */ { UD_Icmpps, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0508 */ { UD_Icmpsd, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0509 */ { UD_Icmpss, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0510 */ { UD_Icmppd, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0511 */ { UD_Imovnti, O_M, O_Gy, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0512 */ { UD_Ipinsrw, O_P, O_MwRy, O_Ib, P_aso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 },\n  /* 0513 */ { UD_Ipinsrw, O_V, O_MwRy, O_Ib, P_aso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 },\n  /* 0514 */ { UD_Ipextrw, O_Gd, O_N, O_Ib, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0515 */ { UD_Ipextrw, O_Gd, O_U, O_Ib, P_aso|P_rexr|P_rexb },\n  /* 0516 */ { UD_Ishufps, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0517 */ { UD_Ishufpd, O_V, O_W, O_Ib, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0518 */ { UD_Icmpxchg8b, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0519 */ { UD_Icmpxchg8b, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0520 */ { UD_Icmpxchg16b, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0521 */ { UD_Ivmptrld, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0522 */ { UD_Ivmxon, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0523 */ { UD_Ivmclear, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0524 */ { UD_Ivmptrst, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0525 */ { UD_Ibswap, O_R0y, O_NONE, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0526 */ { UD_Ibswap, O_R1y, O_NONE, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0527 */ { UD_Ibswap, O_R2y, O_NONE, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0528 */ { UD_Ibswap, O_R3y, O_NONE, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0529 */ { UD_Ibswap, O_R4y, O_NONE, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0530 */ { UD_Ibswap, O_R5y, O_NONE, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0531 */ { UD_Ibswap, O_R6y, O_NONE, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0532 */ { UD_Ibswap, O_R7y, O_NONE, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0533 */ { UD_Iaddsubps, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0534 */ { UD_Iaddsubpd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0535 */ { UD_Ipsrlw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0536 */ { UD_Ipsrlw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0537 */ { UD_Ipsrld, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0538 */ { UD_Ipsrld, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0539 */ { UD_Ipsrlq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0540 */ { UD_Ipsrlq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0541 */ { UD_Ipaddq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0542 */ { UD_Ipaddq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0543 */ { UD_Ipmullw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0544 */ { UD_Ipmullw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0545 */ { UD_Imovdq2q, O_P, O_U, O_NONE, P_aso|P_rexb },\n  /* 0546 */ { UD_Imovq2dq, O_V, O_N, O_NONE, P_aso|P_rexr },\n  /* 0547 */ { UD_Imovq, O_W, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0548 */ { UD_Ipmovmskb, O_Gd, O_N, O_NONE, P_oso|P_rexr|P_rexb },\n  /* 0549 */ { UD_Ipmovmskb, O_Gd, O_U, O_NONE, P_rexr|P_rexb },\n  /* 0550 */ { UD_Ipsubusb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0551 */ { UD_Ipsubusb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0552 */ { UD_Ipsubusw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0553 */ { UD_Ipsubusw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0554 */ { UD_Ipminub, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0555 */ { UD_Ipminub, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0556 */ { UD_Ipand, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0557 */ { UD_Ipand, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0558 */ { UD_Ipaddusb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0559 */ { UD_Ipaddusb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0560 */ { UD_Ipaddusw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0561 */ { UD_Ipaddusw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0562 */ { UD_Ipmaxub, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0563 */ { UD_Ipmaxub, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0564 */ { UD_Ipandn, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0565 */ { UD_Ipandn, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0566 */ { UD_Ipavgb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0567 */ { UD_Ipavgb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0568 */ { UD_Ipsraw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0569 */ { UD_Ipsraw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0570 */ { UD_Ipsrad, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0571 */ { UD_Ipsrad, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0572 */ { UD_Ipavgw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0573 */ { UD_Ipavgw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0574 */ { UD_Ipmulhuw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0575 */ { UD_Ipmulhuw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0576 */ { UD_Ipmulhw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0577 */ { UD_Ipmulhw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0578 */ { UD_Icvtpd2dq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0579 */ { UD_Icvtdq2pd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0580 */ { UD_Icvttpd2dq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0581 */ { UD_Imovntq, O_M, O_P, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0582 */ { UD_Imovntdq, O_M, O_V, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0583 */ { UD_Ipsubsb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0584 */ { UD_Ipsubsb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0585 */ { UD_Ipsubsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0586 */ { UD_Ipsubsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0587 */ { UD_Ipminsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0588 */ { UD_Ipminsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0589 */ { UD_Ipor, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0590 */ { UD_Ipor, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0591 */ { UD_Ipaddsb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0592 */ { UD_Ipaddsb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0593 */ { UD_Ipaddsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0594 */ { UD_Ipaddsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0595 */ { UD_Ipmaxsw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0596 */ { UD_Ipmaxsw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0597 */ { UD_Ipxor, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0598 */ { UD_Ipxor, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0599 */ { UD_Ilddqu, O_V, O_M, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0600 */ { UD_Ipsllw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0601 */ { UD_Ipsllw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0602 */ { UD_Ipslld, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0603 */ { UD_Ipslld, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0604 */ { UD_Ipsllq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0605 */ { UD_Ipsllq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0606 */ { UD_Ipmuludq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0607 */ { UD_Ipmuludq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0608 */ { UD_Ipmaddwd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0609 */ { UD_Ipmaddwd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0610 */ { UD_Ipsadbw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0611 */ { UD_Ipsadbw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0612 */ { UD_Imaskmovq, O_P, O_N, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0613 */ { UD_Imaskmovdqu, O_V, O_U, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0614 */ { UD_Ipsubb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0615 */ { UD_Ipsubb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0616 */ { UD_Ipsubw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0617 */ { UD_Ipsubw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0618 */ { UD_Ipsubd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0619 */ { UD_Ipsubd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0620 */ { UD_Ipsubq, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0621 */ { UD_Ipsubq, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0622 */ { UD_Ipaddb, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0623 */ { UD_Ipaddb, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0624 */ { UD_Ipaddw, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0625 */ { UD_Ipaddw, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0626 */ { UD_Ipaddd, O_P, O_Q, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0627 */ { UD_Ipaddd, O_V, O_W, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0628 */ { UD_Iadc, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0629 */ { UD_Iadc, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0630 */ { UD_Iadc, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0631 */ { UD_Iadc, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0632 */ { UD_Iadc, O_AL, O_Ib, O_NONE, P_none },\n  /* 0633 */ { UD_Iadc, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0634 */ { UD_Ipush, O_SS, O_NONE, O_NONE, P_inv64 },\n  /* 0635 */ { UD_Ipop, O_SS, O_NONE, O_NONE, P_inv64 },\n  /* 0636 */ { UD_Isbb, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0637 */ { UD_Isbb, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0638 */ { UD_Isbb, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0639 */ { UD_Isbb, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0640 */ { UD_Isbb, O_AL, O_Ib, O_NONE, P_none },\n  /* 0641 */ { UD_Isbb, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0642 */ { UD_Ipush, O_DS, O_NONE, O_NONE, P_inv64 },\n  /* 0643 */ { UD_Ipop, O_DS, O_NONE, O_NONE, P_inv64 },\n  /* 0644 */ { UD_Iand, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0645 */ { UD_Iand, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0646 */ { UD_Iand, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0647 */ { UD_Iand, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0648 */ { UD_Iand, O_AL, O_Ib, O_NONE, P_none },\n  /* 0649 */ { UD_Iand, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0650 */ { UD_Idaa, O_NONE, O_NONE, O_NONE, P_inv64 },\n  /* 0651 */ { UD_Isub, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0652 */ { UD_Isub, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0653 */ { UD_Isub, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0654 */ { UD_Isub, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0655 */ { UD_Isub, O_AL, O_Ib, O_NONE, P_none },\n  /* 0656 */ { UD_Isub, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0657 */ { UD_Idas, O_NONE, O_NONE, O_NONE, P_inv64 },\n  /* 0658 */ { UD_Ixor, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0659 */ { UD_Ixor, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0660 */ { UD_Ixor, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0661 */ { UD_Ixor, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0662 */ { UD_Ixor, O_AL, O_Ib, O_NONE, P_none },\n  /* 0663 */ { UD_Ixor, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0664 */ { UD_Iaaa, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0665 */ { UD_Icmp, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0666 */ { UD_Icmp, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0667 */ { UD_Icmp, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0668 */ { UD_Icmp, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0669 */ { UD_Icmp, O_AL, O_Ib, O_NONE, P_none },\n  /* 0670 */ { UD_Icmp, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0671 */ { UD_Iaas, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0672 */ { UD_Iinc, O_R0z, O_NONE, O_NONE, P_oso },\n  /* 0673 */ { UD_Iinc, O_R1z, O_NONE, O_NONE, P_oso },\n  /* 0674 */ { UD_Iinc, O_R2z, O_NONE, O_NONE, P_oso },\n  /* 0675 */ { UD_Iinc, O_R3z, O_NONE, O_NONE, P_oso },\n  /* 0676 */ { UD_Iinc, O_R4z, O_NONE, O_NONE, P_oso },\n  /* 0677 */ { UD_Iinc, O_R5z, O_NONE, O_NONE, P_oso },\n  /* 0678 */ { UD_Iinc, O_R6z, O_NONE, O_NONE, P_oso },\n  /* 0679 */ { UD_Iinc, O_R7z, O_NONE, O_NONE, P_oso },\n  /* 0680 */ { UD_Idec, O_R0z, O_NONE, O_NONE, P_oso },\n  /* 0681 */ { UD_Idec, O_R1z, O_NONE, O_NONE, P_oso },\n  /* 0682 */ { UD_Idec, O_R2z, O_NONE, O_NONE, P_oso },\n  /* 0683 */ { UD_Idec, O_R3z, O_NONE, O_NONE, P_oso },\n  /* 0684 */ { UD_Idec, O_R4z, O_NONE, O_NONE, P_oso },\n  /* 0685 */ { UD_Idec, O_R5z, O_NONE, O_NONE, P_oso },\n  /* 0686 */ { UD_Idec, O_R6z, O_NONE, O_NONE, P_oso },\n  /* 0687 */ { UD_Idec, O_R7z, O_NONE, O_NONE, P_oso },\n  /* 0688 */ { UD_Ipush, O_R0v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0689 */ { UD_Ipush, O_R1v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0690 */ { UD_Ipush, O_R2v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0691 */ { UD_Ipush, O_R3v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0692 */ { UD_Ipush, O_R4v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0693 */ { UD_Ipush, O_R5v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0694 */ { UD_Ipush, O_R6v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0695 */ { UD_Ipush, O_R7v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0696 */ { UD_Ipop, O_R0v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0697 */ { UD_Ipop, O_R1v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0698 */ { UD_Ipop, O_R2v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0699 */ { UD_Ipop, O_R3v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0700 */ { UD_Ipop, O_R4v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0701 */ { UD_Ipop, O_R5v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0702 */ { UD_Ipop, O_R6v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0703 */ { UD_Ipop, O_R7v, O_NONE, O_NONE, P_oso|P_rexb|P_def64 },\n  /* 0704 */ { UD_Ipusha, O_NONE, O_NONE, O_NONE, P_oso|P_inv64 },\n  /* 0705 */ { UD_Ipushad, O_NONE, O_NONE, O_NONE, P_oso|P_inv64 },\n  /* 0706 */ { UD_Ipopa, O_NONE, O_NONE, O_NONE, P_oso|P_inv64 },\n  /* 0707 */ { UD_Ipopad, O_NONE, O_NONE, O_NONE, P_oso|P_inv64 },\n  /* 0708 */ { UD_Ibound, O_Gv, O_M, O_NONE, P_aso|P_oso },\n  /* 0709 */ { UD_Iarpl, O_Ew, O_Gw, O_NONE, P_aso },\n  /* 0710 */ { UD_Imovsxd, O_Gq, O_Ed, O_NONE, P_aso|P_oso|P_rexw|P_rexx|P_rexr|P_rexb },\n  /* 0711 */ { UD_Ipush, O_sIz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0712 */ { UD_Iimul, O_Gv, O_Ev, O_Iz, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0713 */ { UD_Ipush, O_sIb, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0714 */ { UD_Iimul, O_Gv, O_Ev, O_sIb, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0715 */ { UD_Iinsb, O_NONE, O_NONE, O_NONE, P_str|P_seg },\n  /* 0716 */ { UD_Iinsw, O_NONE, O_NONE, O_NONE, P_str|P_oso|P_seg },\n  /* 0717 */ { UD_Iinsd, O_NONE, O_NONE, O_NONE, P_str|P_oso|P_seg },\n  /* 0718 */ { UD_Ioutsb, O_NONE, O_NONE, O_NONE, P_str|P_seg },\n  /* 0719 */ { UD_Ioutsw, O_NONE, O_NONE, O_NONE, P_str|P_oso|P_seg },\n  /* 0720 */ { UD_Ioutsd, O_NONE, O_NONE, O_NONE, P_str|P_oso|P_seg },\n  /* 0721 */ { UD_Ijo, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0722 */ { UD_Ijno, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0723 */ { UD_Ijb, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0724 */ { UD_Ijae, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0725 */ { UD_Ijz, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0726 */ { UD_Ijnz, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0727 */ { UD_Ijbe, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0728 */ { UD_Ija, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0729 */ { UD_Ijs, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0730 */ { UD_Ijns, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0731 */ { UD_Ijp, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0732 */ { UD_Ijnp, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0733 */ { UD_Ijl, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0734 */ { UD_Ijge, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0735 */ { UD_Ijle, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0736 */ { UD_Ijg, O_Jb, O_NONE, O_NONE, P_none },\n  /* 0737 */ { UD_Iadd, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0738 */ { UD_Ior, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0739 */ { UD_Iadc, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0740 */ { UD_Isbb, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0741 */ { UD_Iand, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0742 */ { UD_Isub, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0743 */ { UD_Ixor, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0744 */ { UD_Icmp, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0745 */ { UD_Iadd, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0746 */ { UD_Ior, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0747 */ { UD_Iadc, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0748 */ { UD_Isbb, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0749 */ { UD_Iand, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0750 */ { UD_Isub, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0751 */ { UD_Ixor, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0752 */ { UD_Icmp, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0753 */ { UD_Iadd, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 },\n  /* 0754 */ { UD_Ior, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0755 */ { UD_Iadc, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 },\n  /* 0756 */ { UD_Isbb, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 },\n  /* 0757 */ { UD_Iand, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 },\n  /* 0758 */ { UD_Isub, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 },\n  /* 0759 */ { UD_Ixor, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 },\n  /* 0760 */ { UD_Icmp, O_Eb, O_Ib, O_NONE, P_aso|P_rexr|P_rexx|P_rexb|P_inv64 },\n  /* 0761 */ { UD_Iadd, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0762 */ { UD_Ior, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0763 */ { UD_Iadc, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0764 */ { UD_Isbb, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0765 */ { UD_Iand, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0766 */ { UD_Isub, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0767 */ { UD_Ixor, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0768 */ { UD_Icmp, O_Ev, O_sIb, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0769 */ { UD_Itest, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0770 */ { UD_Itest, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0771 */ { UD_Ixchg, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0772 */ { UD_Ixchg, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0773 */ { UD_Imov, O_Eb, O_Gb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0774 */ { UD_Imov, O_Ev, O_Gv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0775 */ { UD_Imov, O_Gb, O_Eb, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0776 */ { UD_Imov, O_Gv, O_Ev, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0777 */ { UD_Imov, O_MwRv, O_S, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0778 */ { UD_Ilea, O_Gv, O_M, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0779 */ { UD_Imov, O_S, O_MwRv, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0780 */ { UD_Ipop, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 },\n  /* 0781 */ { UD_Ixchg, O_R0v, O_rAX, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0782 */ { UD_Ixchg, O_R1v, O_rAX, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0783 */ { UD_Ixchg, O_R2v, O_rAX, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0784 */ { UD_Ixchg, O_R3v, O_rAX, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0785 */ { UD_Ixchg, O_R4v, O_rAX, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0786 */ { UD_Ixchg, O_R5v, O_rAX, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0787 */ { UD_Ixchg, O_R6v, O_rAX, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0788 */ { UD_Ixchg, O_R7v, O_rAX, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0789 */ { UD_Icbw, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0790 */ { UD_Icwde, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0791 */ { UD_Icdqe, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0792 */ { UD_Icwd, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0793 */ { UD_Icdq, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0794 */ { UD_Icqo, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0795 */ { UD_Icall, O_Av, O_NONE, O_NONE, P_oso },\n  /* 0796 */ { UD_Iwait, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0797 */ { UD_Ipushfw, O_NONE, O_NONE, O_NONE, P_oso },\n  /* 0798 */ { UD_Ipushfw, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_def64 },\n  /* 0799 */ { UD_Ipushfd, O_NONE, O_NONE, O_NONE, P_oso },\n  /* 0800 */ { UD_Ipushfq, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_def64 },\n  /* 0801 */ { UD_Ipushfq, O_NONE, O_NONE, O_NONE, P_oso|P_rexw|P_def64 },\n  /* 0802 */ { UD_Ipopfw, O_NONE, O_NONE, O_NONE, P_oso },\n  /* 0803 */ { UD_Ipopfd, O_NONE, O_NONE, O_NONE, P_oso },\n  /* 0804 */ { UD_Ipopfq, O_NONE, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0805 */ { UD_Ipopfq, O_NONE, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 0806 */ { UD_Isahf, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0807 */ { UD_Ilahf, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0808 */ { UD_Imov, O_AL, O_Ob, O_NONE, P_none },\n  /* 0809 */ { UD_Imov, O_rAX, O_Ov, O_NONE, P_aso|P_oso|P_rexw },\n  /* 0810 */ { UD_Imov, O_Ob, O_AL, O_NONE, P_none },\n  /* 0811 */ { UD_Imov, O_Ov, O_rAX, O_NONE, P_aso|P_oso|P_rexw },\n  /* 0812 */ { UD_Imovsb, O_NONE, O_NONE, O_NONE, P_str|P_seg },\n  /* 0813 */ { UD_Imovsw, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0814 */ { UD_Imovsd, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0815 */ { UD_Imovsq, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0816 */ { UD_Icmpsb, O_NONE, O_NONE, O_NONE, P_strz|P_seg },\n  /* 0817 */ { UD_Icmpsw, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw|P_seg },\n  /* 0818 */ { UD_Icmpsd, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw|P_seg },\n  /* 0819 */ { UD_Icmpsq, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw|P_seg },\n  /* 0820 */ { UD_Itest, O_AL, O_Ib, O_NONE, P_none },\n  /* 0821 */ { UD_Itest, O_rAX, O_sIz, O_NONE, P_oso|P_rexw },\n  /* 0822 */ { UD_Istosb, O_NONE, O_NONE, O_NONE, P_str|P_seg },\n  /* 0823 */ { UD_Istosw, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0824 */ { UD_Istosd, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0825 */ { UD_Istosq, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0826 */ { UD_Ilodsb, O_NONE, O_NONE, O_NONE, P_str|P_seg },\n  /* 0827 */ { UD_Ilodsw, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0828 */ { UD_Ilodsd, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0829 */ { UD_Ilodsq, O_NONE, O_NONE, O_NONE, P_str|P_seg|P_oso|P_rexw },\n  /* 0830 */ { UD_Iscasb, O_NONE, O_NONE, O_NONE, P_strz },\n  /* 0831 */ { UD_Iscasw, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw },\n  /* 0832 */ { UD_Iscasd, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw },\n  /* 0833 */ { UD_Iscasq, O_NONE, O_NONE, O_NONE, P_strz|P_oso|P_rexw },\n  /* 0834 */ { UD_Imov, O_R0b, O_Ib, O_NONE, P_rexb },\n  /* 0835 */ { UD_Imov, O_R1b, O_Ib, O_NONE, P_rexb },\n  /* 0836 */ { UD_Imov, O_R2b, O_Ib, O_NONE, P_rexb },\n  /* 0837 */ { UD_Imov, O_R3b, O_Ib, O_NONE, P_rexb },\n  /* 0838 */ { UD_Imov, O_R4b, O_Ib, O_NONE, P_rexb },\n  /* 0839 */ { UD_Imov, O_R5b, O_Ib, O_NONE, P_rexb },\n  /* 0840 */ { UD_Imov, O_R6b, O_Ib, O_NONE, P_rexb },\n  /* 0841 */ { UD_Imov, O_R7b, O_Ib, O_NONE, P_rexb },\n  /* 0842 */ { UD_Imov, O_R0v, O_Iv, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0843 */ { UD_Imov, O_R1v, O_Iv, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0844 */ { UD_Imov, O_R2v, O_Iv, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0845 */ { UD_Imov, O_R3v, O_Iv, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0846 */ { UD_Imov, O_R4v, O_Iv, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0847 */ { UD_Imov, O_R5v, O_Iv, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0848 */ { UD_Imov, O_R6v, O_Iv, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0849 */ { UD_Imov, O_R7v, O_Iv, O_NONE, P_oso|P_rexw|P_rexb },\n  /* 0850 */ { UD_Irol, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0851 */ { UD_Iror, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0852 */ { UD_Ircl, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0853 */ { UD_Ircr, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0854 */ { UD_Ishl, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0855 */ { UD_Ishr, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0856 */ { UD_Ishl, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0857 */ { UD_Isar, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0858 */ { UD_Irol, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0859 */ { UD_Iror, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0860 */ { UD_Ircl, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0861 */ { UD_Ircr, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0862 */ { UD_Ishl, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0863 */ { UD_Ishr, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0864 */ { UD_Ishl, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0865 */ { UD_Isar, O_Ev, O_Ib, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0866 */ { UD_Iret, O_Iw, O_NONE, O_NONE, P_none },\n  /* 0867 */ { UD_Iret, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0868 */ { UD_Iles, O_Gv, O_M, O_NONE, P_aso|P_oso },\n  /* 0869 */ { UD_Ilds, O_Gv, O_M, O_NONE, P_aso|P_oso },\n  /* 0870 */ { UD_Imov, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0871 */ { UD_Imov, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0872 */ { UD_Ienter, O_Iw, O_Ib, O_NONE, P_def64 },\n  /* 0873 */ { UD_Ileave, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0874 */ { UD_Iretf, O_Iw, O_NONE, O_NONE, P_none },\n  /* 0875 */ { UD_Iretf, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0876 */ { UD_Iint3, O_NONE, O_NONE, O_NONE, P_none },\n  /* 0877 */ { UD_Iint, O_Ib, O_NONE, O_NONE, P_none },\n  /* 0878 */ { UD_Iinto, O_NONE, O_NONE, O_NONE, P_inv64 },\n  /* 0879 */ { UD_Iiretw, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0880 */ { UD_Iiretd, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0881 */ { UD_Iiretq, O_NONE, O_NONE, O_NONE, P_oso|P_rexw },\n  /* 0882 */ { UD_Irol, O_Eb, O_I1, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0883 */ { UD_Iror, O_Eb, O_I1, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0884 */ { UD_Ircl, O_Eb, O_I1, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0885 */ { UD_Ircr, O_Eb, O_I1, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0886 */ { UD_Ishl, O_Eb, O_I1, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0887 */ { UD_Ishr, O_Eb, O_I1, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0888 */ { UD_Ishl, O_Eb, O_I1, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0889 */ { UD_Isar, O_Eb, O_I1, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0890 */ { UD_Irol, O_Ev, O_I1, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0891 */ { UD_Iror, O_Ev, O_I1, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0892 */ { UD_Ircl, O_Ev, O_I1, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0893 */ { UD_Ircr, O_Ev, O_I1, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0894 */ { UD_Ishl, O_Ev, O_I1, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0895 */ { UD_Ishr, O_Ev, O_I1, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0896 */ { UD_Ishl, O_Ev, O_I1, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0897 */ { UD_Isar, O_Ev, O_I1, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0898 */ { UD_Irol, O_Eb, O_CL, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0899 */ { UD_Iror, O_Eb, O_CL, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0900 */ { UD_Ircl, O_Eb, O_CL, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0901 */ { UD_Ircr, O_Eb, O_CL, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0902 */ { UD_Ishl, O_Eb, O_CL, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0903 */ { UD_Ishr, O_Eb, O_CL, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0904 */ { UD_Ishl, O_Eb, O_CL, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0905 */ { UD_Isar, O_Eb, O_CL, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0906 */ { UD_Irol, O_Ev, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0907 */ { UD_Iror, O_Ev, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0908 */ { UD_Ircl, O_Ev, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0909 */ { UD_Ircr, O_Ev, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0910 */ { UD_Ishl, O_Ev, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0911 */ { UD_Ishr, O_Ev, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0912 */ { UD_Ishl, O_Ev, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0913 */ { UD_Isar, O_Ev, O_CL, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 0914 */ { UD_Iaam, O_Ib, O_NONE, O_NONE, P_none },\n  /* 0915 */ { UD_Iaad, O_Ib, O_NONE, O_NONE, P_none },\n  /* 0916 */ { UD_Isalc, O_NONE, O_NONE, O_NONE, P_inv64 },\n  /* 0917 */ { UD_Ixlatb, O_NONE, O_NONE, O_NONE, P_rexw|P_seg },\n  /* 0918 */ { UD_Ifadd, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0919 */ { UD_Ifmul, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0920 */ { UD_Ifcom, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0921 */ { UD_Ifcomp, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0922 */ { UD_Ifsub, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0923 */ { UD_Ifsubr, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0924 */ { UD_Ifdiv, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0925 */ { UD_Ifdivr, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0926 */ { UD_Ifadd, O_ST0, O_ST0, O_NONE, P_none },\n  /* 0927 */ { UD_Ifadd, O_ST0, O_ST1, O_NONE, P_none },\n  /* 0928 */ { UD_Ifadd, O_ST0, O_ST2, O_NONE, P_none },\n  /* 0929 */ { UD_Ifadd, O_ST0, O_ST3, O_NONE, P_none },\n  /* 0930 */ { UD_Ifadd, O_ST0, O_ST4, O_NONE, P_none },\n  /* 0931 */ { UD_Ifadd, O_ST0, O_ST5, O_NONE, P_none },\n  /* 0932 */ { UD_Ifadd, O_ST0, O_ST6, O_NONE, P_none },\n  /* 0933 */ { UD_Ifadd, O_ST0, O_ST7, O_NONE, P_none },\n  /* 0934 */ { UD_Ifmul, O_ST0, O_ST0, O_NONE, P_none },\n  /* 0935 */ { UD_Ifmul, O_ST0, O_ST1, O_NONE, P_none },\n  /* 0936 */ { UD_Ifmul, O_ST0, O_ST2, O_NONE, P_none },\n  /* 0937 */ { UD_Ifmul, O_ST0, O_ST3, O_NONE, P_none },\n  /* 0938 */ { UD_Ifmul, O_ST0, O_ST4, O_NONE, P_none },\n  /* 0939 */ { UD_Ifmul, O_ST0, O_ST5, O_NONE, P_none },\n  /* 0940 */ { UD_Ifmul, O_ST0, O_ST6, O_NONE, P_none },\n  /* 0941 */ { UD_Ifmul, O_ST0, O_ST7, O_NONE, P_none },\n  /* 0942 */ { UD_Ifcom, O_ST0, O_ST0, O_NONE, P_none },\n  /* 0943 */ { UD_Ifcom, O_ST0, O_ST1, O_NONE, P_none },\n  /* 0944 */ { UD_Ifcom, O_ST0, O_ST2, O_NONE, P_none },\n  /* 0945 */ { UD_Ifcom, O_ST0, O_ST3, O_NONE, P_none },\n  /* 0946 */ { UD_Ifcom, O_ST0, O_ST4, O_NONE, P_none },\n  /* 0947 */ { UD_Ifcom, O_ST0, O_ST5, O_NONE, P_none },\n  /* 0948 */ { UD_Ifcom, O_ST0, O_ST6, O_NONE, P_none },\n  /* 0949 */ { UD_Ifcom, O_ST0, O_ST7, O_NONE, P_none },\n  /* 0950 */ { UD_Ifcomp, O_ST0, O_ST0, O_NONE, P_none },\n  /* 0951 */ { UD_Ifcomp, O_ST0, O_ST1, O_NONE, P_none },\n  /* 0952 */ { UD_Ifcomp, O_ST0, O_ST2, O_NONE, P_none },\n  /* 0953 */ { UD_Ifcomp, O_ST0, O_ST3, O_NONE, P_none },\n  /* 0954 */ { UD_Ifcomp, O_ST0, O_ST4, O_NONE, P_none },\n  /* 0955 */ { UD_Ifcomp, O_ST0, O_ST5, O_NONE, P_none },\n  /* 0956 */ { UD_Ifcomp, O_ST0, O_ST6, O_NONE, P_none },\n  /* 0957 */ { UD_Ifcomp, O_ST0, O_ST7, O_NONE, P_none },\n  /* 0958 */ { UD_Ifsub, O_ST0, O_ST0, O_NONE, P_none },\n  /* 0959 */ { UD_Ifsub, O_ST0, O_ST1, O_NONE, P_none },\n  /* 0960 */ { UD_Ifsub, O_ST0, O_ST2, O_NONE, P_none },\n  /* 0961 */ { UD_Ifsub, O_ST0, O_ST3, O_NONE, P_none },\n  /* 0962 */ { UD_Ifsub, O_ST0, O_ST4, O_NONE, P_none },\n  /* 0963 */ { UD_Ifsub, O_ST0, O_ST5, O_NONE, P_none },\n  /* 0964 */ { UD_Ifsub, O_ST0, O_ST6, O_NONE, P_none },\n  /* 0965 */ { UD_Ifsub, O_ST0, O_ST7, O_NONE, P_none },\n  /* 0966 */ { UD_Ifsubr, O_ST0, O_ST0, O_NONE, P_none },\n  /* 0967 */ { UD_Ifsubr, O_ST0, O_ST1, O_NONE, P_none },\n  /* 0968 */ { UD_Ifsubr, O_ST0, O_ST2, O_NONE, P_none },\n  /* 0969 */ { UD_Ifsubr, O_ST0, O_ST3, O_NONE, P_none },\n  /* 0970 */ { UD_Ifsubr, O_ST0, O_ST4, O_NONE, P_none },\n  /* 0971 */ { UD_Ifsubr, O_ST0, O_ST5, O_NONE, P_none },\n  /* 0972 */ { UD_Ifsubr, O_ST0, O_ST6, O_NONE, P_none },\n  /* 0973 */ { UD_Ifsubr, O_ST0, O_ST7, O_NONE, P_none },\n  /* 0974 */ { UD_Ifdiv, O_ST0, O_ST0, O_NONE, P_none },\n  /* 0975 */ { UD_Ifdiv, O_ST0, O_ST1, O_NONE, P_none },\n  /* 0976 */ { UD_Ifdiv, O_ST0, O_ST2, O_NONE, P_none },\n  /* 0977 */ { UD_Ifdiv, O_ST0, O_ST3, O_NONE, P_none },\n  /* 0978 */ { UD_Ifdiv, O_ST0, O_ST4, O_NONE, P_none },\n  /* 0979 */ { UD_Ifdiv, O_ST0, O_ST5, O_NONE, P_none },\n  /* 0980 */ { UD_Ifdiv, O_ST0, O_ST6, O_NONE, P_none },\n  /* 0981 */ { UD_Ifdiv, O_ST0, O_ST7, O_NONE, P_none },\n  /* 0982 */ { UD_Ifdivr, O_ST0, O_ST0, O_NONE, P_none },\n  /* 0983 */ { UD_Ifdivr, O_ST0, O_ST1, O_NONE, P_none },\n  /* 0984 */ { UD_Ifdivr, O_ST0, O_ST2, O_NONE, P_none },\n  /* 0985 */ { UD_Ifdivr, O_ST0, O_ST3, O_NONE, P_none },\n  /* 0986 */ { UD_Ifdivr, O_ST0, O_ST4, O_NONE, P_none },\n  /* 0987 */ { UD_Ifdivr, O_ST0, O_ST5, O_NONE, P_none },\n  /* 0988 */ { UD_Ifdivr, O_ST0, O_ST6, O_NONE, P_none },\n  /* 0989 */ { UD_Ifdivr, O_ST0, O_ST7, O_NONE, P_none },\n  /* 0990 */ { UD_Ifld, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0991 */ { UD_Ifst, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0992 */ { UD_Ifstp, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0993 */ { UD_Ifldenv, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0994 */ { UD_Ifldcw, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0995 */ { UD_Ifnstenv, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0996 */ { UD_Ifnstcw, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 0997 */ { UD_Ifld, O_ST0, O_NONE, O_NONE, P_none },\n  /* 0998 */ { UD_Ifld, O_ST1, O_NONE, O_NONE, P_none },\n  /* 0999 */ { UD_Ifld, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1000 */ { UD_Ifld, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1001 */ { UD_Ifld, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1002 */ { UD_Ifld, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1003 */ { UD_Ifld, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1004 */ { UD_Ifld, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1005 */ { UD_Ifxch, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1006 */ { UD_Ifxch, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1007 */ { UD_Ifxch, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1008 */ { UD_Ifxch, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1009 */ { UD_Ifxch, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1010 */ { UD_Ifxch, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1011 */ { UD_Ifxch, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1012 */ { UD_Ifxch, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1013 */ { UD_Ifnop, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1014 */ { UD_Ifstp1, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1015 */ { UD_Ifstp1, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1016 */ { UD_Ifstp1, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1017 */ { UD_Ifstp1, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1018 */ { UD_Ifstp1, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1019 */ { UD_Ifstp1, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1020 */ { UD_Ifstp1, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1021 */ { UD_Ifstp1, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1022 */ { UD_Ifchs, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1023 */ { UD_Ifabs, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1024 */ { UD_Iftst, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1025 */ { UD_Ifxam, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1026 */ { UD_Ifld1, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1027 */ { UD_Ifldl2t, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1028 */ { UD_Ifldl2e, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1029 */ { UD_Ifldpi, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1030 */ { UD_Ifldlg2, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1031 */ { UD_Ifldln2, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1032 */ { UD_Ifldz, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1033 */ { UD_If2xm1, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1034 */ { UD_Ifyl2x, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1035 */ { UD_Ifptan, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1036 */ { UD_Ifpatan, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1037 */ { UD_Ifxtract, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1038 */ { UD_Ifprem1, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1039 */ { UD_Ifdecstp, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1040 */ { UD_Ifincstp, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1041 */ { UD_Ifprem, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1042 */ { UD_Ifyl2xp1, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1043 */ { UD_Ifsqrt, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1044 */ { UD_Ifsincos, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1045 */ { UD_Ifrndint, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1046 */ { UD_Ifscale, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1047 */ { UD_Ifsin, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1048 */ { UD_Ifcos, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1049 */ { UD_Ifiadd, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1050 */ { UD_Ifimul, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1051 */ { UD_Ificom, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1052 */ { UD_Ificomp, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1053 */ { UD_Ifisub, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1054 */ { UD_Ifisubr, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1055 */ { UD_Ifidiv, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1056 */ { UD_Ifidivr, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1057 */ { UD_Ifcmovb, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1058 */ { UD_Ifcmovb, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1059 */ { UD_Ifcmovb, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1060 */ { UD_Ifcmovb, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1061 */ { UD_Ifcmovb, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1062 */ { UD_Ifcmovb, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1063 */ { UD_Ifcmovb, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1064 */ { UD_Ifcmovb, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1065 */ { UD_Ifcmove, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1066 */ { UD_Ifcmove, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1067 */ { UD_Ifcmove, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1068 */ { UD_Ifcmove, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1069 */ { UD_Ifcmove, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1070 */ { UD_Ifcmove, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1071 */ { UD_Ifcmove, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1072 */ { UD_Ifcmove, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1073 */ { UD_Ifcmovbe, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1074 */ { UD_Ifcmovbe, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1075 */ { UD_Ifcmovbe, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1076 */ { UD_Ifcmovbe, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1077 */ { UD_Ifcmovbe, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1078 */ { UD_Ifcmovbe, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1079 */ { UD_Ifcmovbe, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1080 */ { UD_Ifcmovbe, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1081 */ { UD_Ifcmovu, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1082 */ { UD_Ifcmovu, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1083 */ { UD_Ifcmovu, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1084 */ { UD_Ifcmovu, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1085 */ { UD_Ifcmovu, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1086 */ { UD_Ifcmovu, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1087 */ { UD_Ifcmovu, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1088 */ { UD_Ifcmovu, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1089 */ { UD_Ifucompp, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1090 */ { UD_Ifild, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1091 */ { UD_Ifisttp, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1092 */ { UD_Ifist, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1093 */ { UD_Ifistp, O_Md, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1094 */ { UD_Ifld, O_Mt, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1095 */ { UD_Ifstp, O_Mt, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1096 */ { UD_Ifcmovnb, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1097 */ { UD_Ifcmovnb, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1098 */ { UD_Ifcmovnb, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1099 */ { UD_Ifcmovnb, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1100 */ { UD_Ifcmovnb, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1101 */ { UD_Ifcmovnb, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1102 */ { UD_Ifcmovnb, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1103 */ { UD_Ifcmovnb, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1104 */ { UD_Ifcmovne, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1105 */ { UD_Ifcmovne, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1106 */ { UD_Ifcmovne, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1107 */ { UD_Ifcmovne, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1108 */ { UD_Ifcmovne, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1109 */ { UD_Ifcmovne, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1110 */ { UD_Ifcmovne, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1111 */ { UD_Ifcmovne, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1112 */ { UD_Ifcmovnbe, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1113 */ { UD_Ifcmovnbe, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1114 */ { UD_Ifcmovnbe, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1115 */ { UD_Ifcmovnbe, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1116 */ { UD_Ifcmovnbe, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1117 */ { UD_Ifcmovnbe, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1118 */ { UD_Ifcmovnbe, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1119 */ { UD_Ifcmovnbe, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1120 */ { UD_Ifcmovnu, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1121 */ { UD_Ifcmovnu, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1122 */ { UD_Ifcmovnu, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1123 */ { UD_Ifcmovnu, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1124 */ { UD_Ifcmovnu, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1125 */ { UD_Ifcmovnu, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1126 */ { UD_Ifcmovnu, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1127 */ { UD_Ifcmovnu, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1128 */ { UD_Ifclex, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1129 */ { UD_Ifninit, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1130 */ { UD_Ifucomi, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1131 */ { UD_Ifucomi, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1132 */ { UD_Ifucomi, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1133 */ { UD_Ifucomi, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1134 */ { UD_Ifucomi, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1135 */ { UD_Ifucomi, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1136 */ { UD_Ifucomi, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1137 */ { UD_Ifucomi, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1138 */ { UD_Ifcomi, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1139 */ { UD_Ifcomi, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1140 */ { UD_Ifcomi, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1141 */ { UD_Ifcomi, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1142 */ { UD_Ifcomi, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1143 */ { UD_Ifcomi, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1144 */ { UD_Ifcomi, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1145 */ { UD_Ifcomi, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1146 */ { UD_Ifadd, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1147 */ { UD_Ifmul, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1148 */ { UD_Ifcom, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1149 */ { UD_Ifcomp, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1150 */ { UD_Ifsub, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1151 */ { UD_Ifsubr, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1152 */ { UD_Ifdiv, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1153 */ { UD_Ifdivr, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1154 */ { UD_Ifadd, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1155 */ { UD_Ifadd, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1156 */ { UD_Ifadd, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1157 */ { UD_Ifadd, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1158 */ { UD_Ifadd, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1159 */ { UD_Ifadd, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1160 */ { UD_Ifadd, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1161 */ { UD_Ifadd, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1162 */ { UD_Ifmul, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1163 */ { UD_Ifmul, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1164 */ { UD_Ifmul, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1165 */ { UD_Ifmul, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1166 */ { UD_Ifmul, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1167 */ { UD_Ifmul, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1168 */ { UD_Ifmul, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1169 */ { UD_Ifmul, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1170 */ { UD_Ifcom2, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1171 */ { UD_Ifcom2, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1172 */ { UD_Ifcom2, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1173 */ { UD_Ifcom2, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1174 */ { UD_Ifcom2, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1175 */ { UD_Ifcom2, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1176 */ { UD_Ifcom2, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1177 */ { UD_Ifcom2, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1178 */ { UD_Ifcomp3, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1179 */ { UD_Ifcomp3, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1180 */ { UD_Ifcomp3, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1181 */ { UD_Ifcomp3, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1182 */ { UD_Ifcomp3, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1183 */ { UD_Ifcomp3, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1184 */ { UD_Ifcomp3, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1185 */ { UD_Ifcomp3, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1186 */ { UD_Ifsubr, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1187 */ { UD_Ifsubr, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1188 */ { UD_Ifsubr, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1189 */ { UD_Ifsubr, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1190 */ { UD_Ifsubr, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1191 */ { UD_Ifsubr, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1192 */ { UD_Ifsubr, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1193 */ { UD_Ifsubr, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1194 */ { UD_Ifsub, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1195 */ { UD_Ifsub, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1196 */ { UD_Ifsub, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1197 */ { UD_Ifsub, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1198 */ { UD_Ifsub, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1199 */ { UD_Ifsub, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1200 */ { UD_Ifsub, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1201 */ { UD_Ifsub, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1202 */ { UD_Ifdivr, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1203 */ { UD_Ifdivr, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1204 */ { UD_Ifdivr, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1205 */ { UD_Ifdivr, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1206 */ { UD_Ifdivr, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1207 */ { UD_Ifdivr, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1208 */ { UD_Ifdivr, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1209 */ { UD_Ifdivr, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1210 */ { UD_Ifdiv, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1211 */ { UD_Ifdiv, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1212 */ { UD_Ifdiv, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1213 */ { UD_Ifdiv, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1214 */ { UD_Ifdiv, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1215 */ { UD_Ifdiv, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1216 */ { UD_Ifdiv, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1217 */ { UD_Ifdiv, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1218 */ { UD_Ifld, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1219 */ { UD_Ifisttp, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1220 */ { UD_Ifst, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1221 */ { UD_Ifstp, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1222 */ { UD_Ifrstor, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1223 */ { UD_Ifnsave, O_M, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1224 */ { UD_Ifnstsw, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1225 */ { UD_Iffree, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1226 */ { UD_Iffree, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1227 */ { UD_Iffree, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1228 */ { UD_Iffree, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1229 */ { UD_Iffree, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1230 */ { UD_Iffree, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1231 */ { UD_Iffree, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1232 */ { UD_Iffree, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1233 */ { UD_Ifxch4, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1234 */ { UD_Ifxch4, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1235 */ { UD_Ifxch4, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1236 */ { UD_Ifxch4, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1237 */ { UD_Ifxch4, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1238 */ { UD_Ifxch4, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1239 */ { UD_Ifxch4, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1240 */ { UD_Ifxch4, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1241 */ { UD_Ifst, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1242 */ { UD_Ifst, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1243 */ { UD_Ifst, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1244 */ { UD_Ifst, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1245 */ { UD_Ifst, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1246 */ { UD_Ifst, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1247 */ { UD_Ifst, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1248 */ { UD_Ifst, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1249 */ { UD_Ifstp, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1250 */ { UD_Ifstp, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1251 */ { UD_Ifstp, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1252 */ { UD_Ifstp, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1253 */ { UD_Ifstp, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1254 */ { UD_Ifstp, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1255 */ { UD_Ifstp, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1256 */ { UD_Ifstp, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1257 */ { UD_Ifucom, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1258 */ { UD_Ifucom, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1259 */ { UD_Ifucom, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1260 */ { UD_Ifucom, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1261 */ { UD_Ifucom, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1262 */ { UD_Ifucom, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1263 */ { UD_Ifucom, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1264 */ { UD_Ifucom, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1265 */ { UD_Ifucomp, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1266 */ { UD_Ifucomp, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1267 */ { UD_Ifucomp, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1268 */ { UD_Ifucomp, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1269 */ { UD_Ifucomp, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1270 */ { UD_Ifucomp, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1271 */ { UD_Ifucomp, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1272 */ { UD_Ifucomp, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1273 */ { UD_Ifiadd, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1274 */ { UD_Ifimul, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1275 */ { UD_Ificom, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1276 */ { UD_Ificomp, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1277 */ { UD_Ifisub, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1278 */ { UD_Ifisubr, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1279 */ { UD_Ifidiv, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1280 */ { UD_Ifidivr, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1281 */ { UD_Ifaddp, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1282 */ { UD_Ifaddp, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1283 */ { UD_Ifaddp, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1284 */ { UD_Ifaddp, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1285 */ { UD_Ifaddp, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1286 */ { UD_Ifaddp, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1287 */ { UD_Ifaddp, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1288 */ { UD_Ifaddp, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1289 */ { UD_Ifmulp, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1290 */ { UD_Ifmulp, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1291 */ { UD_Ifmulp, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1292 */ { UD_Ifmulp, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1293 */ { UD_Ifmulp, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1294 */ { UD_Ifmulp, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1295 */ { UD_Ifmulp, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1296 */ { UD_Ifmulp, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1297 */ { UD_Ifcomp5, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1298 */ { UD_Ifcomp5, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1299 */ { UD_Ifcomp5, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1300 */ { UD_Ifcomp5, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1301 */ { UD_Ifcomp5, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1302 */ { UD_Ifcomp5, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1303 */ { UD_Ifcomp5, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1304 */ { UD_Ifcomp5, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1305 */ { UD_Ifcompp, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1306 */ { UD_Ifsubrp, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1307 */ { UD_Ifsubrp, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1308 */ { UD_Ifsubrp, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1309 */ { UD_Ifsubrp, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1310 */ { UD_Ifsubrp, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1311 */ { UD_Ifsubrp, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1312 */ { UD_Ifsubrp, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1313 */ { UD_Ifsubrp, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1314 */ { UD_Ifsubp, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1315 */ { UD_Ifsubp, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1316 */ { UD_Ifsubp, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1317 */ { UD_Ifsubp, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1318 */ { UD_Ifsubp, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1319 */ { UD_Ifsubp, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1320 */ { UD_Ifsubp, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1321 */ { UD_Ifsubp, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1322 */ { UD_Ifdivrp, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1323 */ { UD_Ifdivrp, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1324 */ { UD_Ifdivrp, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1325 */ { UD_Ifdivrp, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1326 */ { UD_Ifdivrp, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1327 */ { UD_Ifdivrp, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1328 */ { UD_Ifdivrp, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1329 */ { UD_Ifdivrp, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1330 */ { UD_Ifdivp, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1331 */ { UD_Ifdivp, O_ST1, O_ST0, O_NONE, P_none },\n  /* 1332 */ { UD_Ifdivp, O_ST2, O_ST0, O_NONE, P_none },\n  /* 1333 */ { UD_Ifdivp, O_ST3, O_ST0, O_NONE, P_none },\n  /* 1334 */ { UD_Ifdivp, O_ST4, O_ST0, O_NONE, P_none },\n  /* 1335 */ { UD_Ifdivp, O_ST5, O_ST0, O_NONE, P_none },\n  /* 1336 */ { UD_Ifdivp, O_ST6, O_ST0, O_NONE, P_none },\n  /* 1337 */ { UD_Ifdivp, O_ST7, O_ST0, O_NONE, P_none },\n  /* 1338 */ { UD_Ifild, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1339 */ { UD_Ifisttp, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1340 */ { UD_Ifist, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1341 */ { UD_Ifistp, O_Mw, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1342 */ { UD_Ifbld, O_Mt, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1343 */ { UD_Ifild, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1344 */ { UD_Ifbstp, O_Mt, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1345 */ { UD_Ifistp, O_Mq, O_NONE, O_NONE, P_aso|P_rexr|P_rexx|P_rexb },\n  /* 1346 */ { UD_Iffreep, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1347 */ { UD_Iffreep, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1348 */ { UD_Iffreep, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1349 */ { UD_Iffreep, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1350 */ { UD_Iffreep, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1351 */ { UD_Iffreep, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1352 */ { UD_Iffreep, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1353 */ { UD_Iffreep, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1354 */ { UD_Ifxch7, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1355 */ { UD_Ifxch7, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1356 */ { UD_Ifxch7, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1357 */ { UD_Ifxch7, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1358 */ { UD_Ifxch7, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1359 */ { UD_Ifxch7, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1360 */ { UD_Ifxch7, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1361 */ { UD_Ifxch7, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1362 */ { UD_Ifstp8, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1363 */ { UD_Ifstp8, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1364 */ { UD_Ifstp8, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1365 */ { UD_Ifstp8, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1366 */ { UD_Ifstp8, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1367 */ { UD_Ifstp8, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1368 */ { UD_Ifstp8, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1369 */ { UD_Ifstp8, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1370 */ { UD_Ifstp9, O_ST0, O_NONE, O_NONE, P_none },\n  /* 1371 */ { UD_Ifstp9, O_ST1, O_NONE, O_NONE, P_none },\n  /* 1372 */ { UD_Ifstp9, O_ST2, O_NONE, O_NONE, P_none },\n  /* 1373 */ { UD_Ifstp9, O_ST3, O_NONE, O_NONE, P_none },\n  /* 1374 */ { UD_Ifstp9, O_ST4, O_NONE, O_NONE, P_none },\n  /* 1375 */ { UD_Ifstp9, O_ST5, O_NONE, O_NONE, P_none },\n  /* 1376 */ { UD_Ifstp9, O_ST6, O_NONE, O_NONE, P_none },\n  /* 1377 */ { UD_Ifstp9, O_ST7, O_NONE, O_NONE, P_none },\n  /* 1378 */ { UD_Ifnstsw, O_AX, O_NONE, O_NONE, P_none },\n  /* 1379 */ { UD_Ifucomip, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1380 */ { UD_Ifucomip, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1381 */ { UD_Ifucomip, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1382 */ { UD_Ifucomip, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1383 */ { UD_Ifucomip, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1384 */ { UD_Ifucomip, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1385 */ { UD_Ifucomip, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1386 */ { UD_Ifucomip, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1387 */ { UD_Ifcomip, O_ST0, O_ST0, O_NONE, P_none },\n  /* 1388 */ { UD_Ifcomip, O_ST0, O_ST1, O_NONE, P_none },\n  /* 1389 */ { UD_Ifcomip, O_ST0, O_ST2, O_NONE, P_none },\n  /* 1390 */ { UD_Ifcomip, O_ST0, O_ST3, O_NONE, P_none },\n  /* 1391 */ { UD_Ifcomip, O_ST0, O_ST4, O_NONE, P_none },\n  /* 1392 */ { UD_Ifcomip, O_ST0, O_ST5, O_NONE, P_none },\n  /* 1393 */ { UD_Ifcomip, O_ST0, O_ST6, O_NONE, P_none },\n  /* 1394 */ { UD_Ifcomip, O_ST0, O_ST7, O_NONE, P_none },\n  /* 1395 */ { UD_Iloopne, O_Jb, O_NONE, O_NONE, P_none },\n  /* 1396 */ { UD_Iloope, O_Jb, O_NONE, O_NONE, P_none },\n  /* 1397 */ { UD_Iloop, O_Jb, O_NONE, O_NONE, P_none },\n  /* 1398 */ { UD_Ijcxz, O_Jb, O_NONE, O_NONE, P_aso },\n  /* 1399 */ { UD_Ijecxz, O_Jb, O_NONE, O_NONE, P_aso },\n  /* 1400 */ { UD_Ijrcxz, O_Jb, O_NONE, O_NONE, P_aso },\n  /* 1401 */ { UD_Iin, O_AL, O_Ib, O_NONE, P_none },\n  /* 1402 */ { UD_Iin, O_eAX, O_Ib, O_NONE, P_oso },\n  /* 1403 */ { UD_Iout, O_Ib, O_AL, O_NONE, P_none },\n  /* 1404 */ { UD_Iout, O_Ib, O_eAX, O_NONE, P_oso },\n  /* 1405 */ { UD_Icall, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 1406 */ { UD_Ijmp, O_Jz, O_NONE, O_NONE, P_oso|P_def64 },\n  /* 1407 */ { UD_Ijmp, O_Av, O_NONE, O_NONE, P_oso },\n  /* 1408 */ { UD_Ijmp, O_Jb, O_NONE, O_NONE, P_def64 },\n  /* 1409 */ { UD_Iin, O_AL, O_DX, O_NONE, P_none },\n  /* 1410 */ { UD_Iin, O_eAX, O_DX, O_NONE, P_oso },\n  /* 1411 */ { UD_Iout, O_DX, O_AL, O_NONE, P_none },\n  /* 1412 */ { UD_Iout, O_DX, O_eAX, O_NONE, P_oso },\n  /* 1413 */ { UD_Ilock, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1414 */ { UD_Iint1, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1415 */ { UD_Irepne, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1416 */ { UD_Irep, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1417 */ { UD_Ihlt, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1418 */ { UD_Icmc, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1419 */ { UD_Itest, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1420 */ { UD_Itest, O_Eb, O_Ib, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1421 */ { UD_Inot, O_Eb, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1422 */ { UD_Ineg, O_Eb, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1423 */ { UD_Imul, O_Eb, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1424 */ { UD_Iimul, O_Eb, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1425 */ { UD_Idiv, O_Eb, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1426 */ { UD_Iidiv, O_Eb, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1427 */ { UD_Itest, O_Ev, O_sIz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1428 */ { UD_Itest, O_Ev, O_Iz, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1429 */ { UD_Inot, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1430 */ { UD_Ineg, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1431 */ { UD_Imul, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1432 */ { UD_Iimul, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1433 */ { UD_Idiv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1434 */ { UD_Iidiv, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1435 */ { UD_Iclc, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1436 */ { UD_Istc, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1437 */ { UD_Icli, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1438 */ { UD_Isti, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1439 */ { UD_Icld, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1440 */ { UD_Istd, O_NONE, O_NONE, O_NONE, P_none },\n  /* 1441 */ { UD_Iinc, O_Eb, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1442 */ { UD_Idec, O_Eb, O_NONE, O_NONE, P_aso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1443 */ { UD_Iinc, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1444 */ { UD_Idec, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1445 */ { UD_Icall, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1446 */ { UD_Icall, O_Eq, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 },\n  /* 1447 */ { UD_Icall, O_Fv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1448 */ { UD_Ijmp, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 },\n  /* 1449 */ { UD_Ijmp, O_Fv, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb },\n  /* 1450 */ { UD_Ipush, O_Ev, O_NONE, O_NONE, P_aso|P_oso|P_rexw|P_rexr|P_rexx|P_rexb|P_def64 },\n};\n\n\nconst char * ud_mnemonics_str[] = {\n\"invalid\",\n    \"3dnow\",\n    \"none\",\n    \"db\",\n    \"pause\",\n    \"aaa\",\n    \"aad\",\n    \"aam\",\n    \"aas\",\n    \"adc\",\n    \"add\",\n    \"addpd\",\n    \"addps\",\n    \"addsd\",\n    \"addss\",\n    \"and\",\n    \"andpd\",\n    \"andps\",\n    \"andnpd\",\n    \"andnps\",\n    \"arpl\",\n    \"movsxd\",\n    \"bound\",\n    \"bsf\",\n    \"bsr\",\n    \"bswap\",\n    \"bt\",\n    \"btc\",\n    \"btr\",\n    \"bts\",\n    \"call\",\n    \"cbw\",\n    \"cwde\",\n    \"cdqe\",\n    \"clc\",\n    \"cld\",\n    \"clflush\",\n    \"clgi\",\n    \"cli\",\n    \"clts\",\n    \"cmc\",\n    \"cmovo\",\n    \"cmovno\",\n    \"cmovb\",\n    \"cmovae\",\n    \"cmovz\",\n    \"cmovnz\",\n    \"cmovbe\",\n    \"cmova\",\n    \"cmovs\",\n    \"cmovns\",\n    \"cmovp\",\n    \"cmovnp\",\n    \"cmovl\",\n    \"cmovge\",\n    \"cmovle\",\n    \"cmovg\",\n    \"cmp\",\n    \"cmppd\",\n    \"cmpps\",\n    \"cmpsb\",\n    \"cmpsw\",\n    \"cmpsd\",\n    \"cmpsq\",\n    \"cmpss\",\n    \"cmpxchg\",\n    \"cmpxchg8b\",\n    \"cmpxchg16b\",\n    \"comisd\",\n    \"comiss\",\n    \"cpuid\",\n    \"cvtdq2pd\",\n    \"cvtdq2ps\",\n    \"cvtpd2dq\",\n    \"cvtpd2pi\",\n    \"cvtpd2ps\",\n    \"cvtpi2ps\",\n    \"cvtpi2pd\",\n    \"cvtps2dq\",\n    \"cvtps2pi\",\n    \"cvtps2pd\",\n    \"cvtsd2si\",\n    \"cvtsd2ss\",\n    \"cvtsi2ss\",\n    \"cvtss2si\",\n    \"cvtss2sd\",\n    \"cvttpd2pi\",\n    \"cvttpd2dq\",\n    \"cvttps2dq\",\n    \"cvttps2pi\",\n    \"cvttsd2si\",\n    \"cvtsi2sd\",\n    \"cvttss2si\",\n    \"cwd\",\n    \"cdq\",\n    \"cqo\",\n    \"daa\",\n    \"das\",\n    \"dec\",\n    \"div\",\n    \"divpd\",\n    \"divps\",\n    \"divsd\",\n    \"divss\",\n    \"emms\",\n    \"enter\",\n    \"f2xm1\",\n    \"fabs\",\n    \"fadd\",\n    \"faddp\",\n    \"fbld\",\n    \"fbstp\",\n    \"fchs\",\n    \"fclex\",\n    \"fcmovb\",\n    \"fcmove\",\n    \"fcmovbe\",\n    \"fcmovu\",\n    \"fcmovnb\",\n    \"fcmovne\",\n    \"fcmovnbe\",\n    \"fcmovnu\",\n    \"fucomi\",\n    \"fcom\",\n    \"fcom2\",\n    \"fcomp3\",\n    \"fcomi\",\n    \"fucomip\",\n    \"fcomip\",\n    \"fcomp\",\n    \"fcomp5\",\n    \"fcompp\",\n    \"fcos\",\n    \"fdecstp\",\n    \"fdiv\",\n    \"fdivp\",\n    \"fdivr\",\n    \"fdivrp\",\n    \"femms\",\n    \"ffree\",\n    \"ffreep\",\n    \"ficom\",\n    \"ficomp\",\n    \"fild\",\n    \"fincstp\",\n    \"fninit\",\n    \"fiadd\",\n    \"fidivr\",\n    \"fidiv\",\n    \"fisub\",\n    \"fisubr\",\n    \"fist\",\n    \"fistp\",\n    \"fisttp\",\n    \"fld\",\n    \"fld1\",\n    \"fldl2t\",\n    \"fldl2e\",\n    \"fldpi\",\n    \"fldlg2\",\n    \"fldln2\",\n    \"fldz\",\n    \"fldcw\",\n    \"fldenv\",\n    \"fmul\",\n    \"fmulp\",\n    \"fimul\",\n    \"fnop\",\n    \"fpatan\",\n    \"fprem\",\n    \"fprem1\",\n    \"fptan\",\n    \"frndint\",\n    \"frstor\",\n    \"fnsave\",\n    \"fscale\",\n    \"fsin\",\n    \"fsincos\",\n    \"fsqrt\",\n    \"fstp\",\n    \"fstp1\",\n    \"fstp8\",\n    \"fstp9\",\n    \"fst\",\n    \"fnstcw\",\n    \"fnstenv\",\n    \"fnstsw\",\n    \"fsub\",\n    \"fsubp\",\n    \"fsubr\",\n    \"fsubrp\",\n    \"ftst\",\n    \"fucom\",\n    \"fucomp\",\n    \"fucompp\",\n    \"fxam\",\n    \"fxch\",\n    \"fxch4\",\n    \"fxch7\",\n    \"fxrstor\",\n    \"fxsave\",\n    \"fxtract\",\n    \"fyl2x\",\n    \"fyl2xp1\",\n    \"hlt\",\n    \"idiv\",\n    \"in\",\n    \"imul\",\n    \"inc\",\n    \"insb\",\n    \"insw\",\n    \"insd\",\n    \"int1\",\n    \"int3\",\n    \"int\",\n    \"into\",\n    \"invd\",\n    \"invept\",\n    \"invlpg\",\n    \"invlpga\",\n    \"invvpid\",\n    \"iretw\",\n    \"iretd\",\n    \"iretq\",\n    \"jo\",\n    \"jno\",\n    \"jb\",\n    \"jae\",\n    \"jz\",\n    \"jnz\",\n    \"jbe\",\n    \"ja\",\n    \"js\",\n    \"jns\",\n    \"jp\",\n    \"jnp\",\n    \"jl\",\n    \"jge\",\n    \"jle\",\n    \"jg\",\n    \"jcxz\",\n    \"jecxz\",\n    \"jrcxz\",\n    \"jmp\",\n    \"lahf\",\n    \"lar\",\n    \"lddqu\",\n    \"ldmxcsr\",\n    \"lds\",\n    \"lea\",\n    \"les\",\n    \"lfs\",\n    \"lgs\",\n    \"lidt\",\n    \"lss\",\n    \"leave\",\n    \"lfence\",\n    \"lgdt\",\n    \"lldt\",\n    \"lmsw\",\n    \"lock\",\n    \"lodsb\",\n    \"lodsw\",\n    \"lodsd\",\n    \"lodsq\",\n    \"loopne\",\n    \"loope\",\n    \"loop\",\n    \"lsl\",\n    \"ltr\",\n    \"maskmovq\",\n    \"maxpd\",\n    \"maxps\",\n    \"maxsd\",\n    \"maxss\",\n    \"mfence\",\n    \"minpd\",\n    \"minps\",\n    \"minsd\",\n    \"minss\",\n    \"monitor\",\n    \"montmul\",\n    \"mov\",\n    \"movapd\",\n    \"movaps\",\n    \"movd\",\n    \"movhpd\",\n    \"movhps\",\n    \"movlhps\",\n    \"movlpd\",\n    \"movlps\",\n    \"movhlps\",\n    \"movmskpd\",\n    \"movmskps\",\n    \"movntdq\",\n    \"movnti\",\n    \"movntpd\",\n    \"movntps\",\n    \"movntq\",\n    \"movq\",\n    \"movsb\",\n    \"movsw\",\n    \"movsd\",\n    \"movsq\",\n    \"movss\",\n    \"movsx\",\n    \"movupd\",\n    \"movups\",\n    \"movzx\",\n    \"mul\",\n    \"mulpd\",\n    \"mulps\",\n    \"mulsd\",\n    \"mulss\",\n    \"mwait\",\n    \"neg\",\n    \"nop\",\n    \"not\",\n    \"or\",\n    \"orpd\",\n    \"orps\",\n    \"out\",\n    \"outsb\",\n    \"outsw\",\n    \"outsd\",\n    \"packsswb\",\n    \"packssdw\",\n    \"packuswb\",\n    \"paddb\",\n    \"paddw\",\n    \"paddd\",\n    \"paddsb\",\n    \"paddsw\",\n    \"paddusb\",\n    \"paddusw\",\n    \"pand\",\n    \"pandn\",\n    \"pavgb\",\n    \"pavgw\",\n    \"pcmpeqb\",\n    \"pcmpeqw\",\n    \"pcmpeqd\",\n    \"pcmpgtb\",\n    \"pcmpgtw\",\n    \"pcmpgtd\",\n    \"pextrb\",\n    \"pextrd\",\n    \"pextrq\",\n    \"pextrw\",\n    \"pinsrb\",\n    \"pinsrw\",\n    \"pinsrd\",\n    \"pinsrq\",\n    \"pmaddwd\",\n    \"pmaxsw\",\n    \"pmaxub\",\n    \"pminsw\",\n    \"pminub\",\n    \"pmovmskb\",\n    \"pmulhuw\",\n    \"pmulhw\",\n    \"pmullw\",\n    \"pop\",\n    \"popa\",\n    \"popad\",\n    \"popfw\",\n    \"popfd\",\n    \"popfq\",\n    \"por\",\n    \"prefetch\",\n    \"prefetchnta\",\n    \"prefetcht0\",\n    \"prefetcht1\",\n    \"prefetcht2\",\n    \"psadbw\",\n    \"pshufw\",\n    \"psllw\",\n    \"pslld\",\n    \"psllq\",\n    \"psraw\",\n    \"psrad\",\n    \"psrlw\",\n    \"psrld\",\n    \"psrlq\",\n    \"psubb\",\n    \"psubw\",\n    \"psubd\",\n    \"psubsb\",\n    \"psubsw\",\n    \"psubusb\",\n    \"psubusw\",\n    \"punpckhbw\",\n    \"punpckhwd\",\n    \"punpckhdq\",\n    \"punpcklbw\",\n    \"punpcklwd\",\n    \"punpckldq\",\n    \"pi2fw\",\n    \"pi2fd\",\n    \"pf2iw\",\n    \"pf2id\",\n    \"pfnacc\",\n    \"pfpnacc\",\n    \"pfcmpge\",\n    \"pfmin\",\n    \"pfrcp\",\n    \"pfrsqrt\",\n    \"pfsub\",\n    \"pfadd\",\n    \"pfcmpgt\",\n    \"pfmax\",\n    \"pfrcpit1\",\n    \"pfrsqit1\",\n    \"pfsubr\",\n    \"pfacc\",\n    \"pfcmpeq\",\n    \"pfmul\",\n    \"pfrcpit2\",\n    \"pmulhrw\",\n    \"pswapd\",\n    \"pavgusb\",\n    \"push\",\n    \"pusha\",\n    \"pushad\",\n    \"pushfw\",\n    \"pushfd\",\n    \"pushfq\",\n    \"pxor\",\n    \"rcl\",\n    \"rcr\",\n    \"rol\",\n    \"ror\",\n    \"rcpps\",\n    \"rcpss\",\n    \"rdmsr\",\n    \"rdpmc\",\n    \"rdtsc\",\n    \"rdtscp\",\n    \"repne\",\n    \"rep\",\n    \"ret\",\n    \"retf\",\n    \"rsm\",\n    \"rsqrtps\",\n    \"rsqrtss\",\n    \"sahf\",\n    \"salc\",\n    \"sar\",\n    \"shl\",\n    \"shr\",\n    \"sbb\",\n    \"scasb\",\n    \"scasw\",\n    \"scasd\",\n    \"scasq\",\n    \"seto\",\n    \"setno\",\n    \"setb\",\n    \"setae\",\n    \"setz\",\n    \"setnz\",\n    \"setbe\",\n    \"seta\",\n    \"sets\",\n    \"setns\",\n    \"setp\",\n    \"setnp\",\n    \"setl\",\n    \"setge\",\n    \"setle\",\n    \"setg\",\n    \"sfence\",\n    \"sgdt\",\n    \"shld\",\n    \"shrd\",\n    \"shufpd\",\n    \"shufps\",\n    \"sidt\",\n    \"sldt\",\n    \"smsw\",\n    \"sqrtps\",\n    \"sqrtpd\",\n    \"sqrtsd\",\n    \"sqrtss\",\n    \"stc\",\n    \"std\",\n    \"stgi\",\n    \"sti\",\n    \"skinit\",\n    \"stmxcsr\",\n    \"stosb\",\n    \"stosw\",\n    \"stosd\",\n    \"stosq\",\n    \"str\",\n    \"sub\",\n    \"subpd\",\n    \"subps\",\n    \"subsd\",\n    \"subss\",\n    \"swapgs\",\n    \"syscall\",\n    \"sysenter\",\n    \"sysexit\",\n    \"sysret\",\n    \"test\",\n    \"ucomisd\",\n    \"ucomiss\",\n    \"ud2\",\n    \"unpckhpd\",\n    \"unpckhps\",\n    \"unpcklps\",\n    \"unpcklpd\",\n    \"verr\",\n    \"verw\",\n    \"vmcall\",\n    \"vmclear\",\n    \"vmxon\",\n    \"vmptrld\",\n    \"vmptrst\",\n    \"vmlaunch\",\n    \"vmresume\",\n    \"vmxoff\",\n    \"vmread\",\n    \"vmwrite\",\n    \"vmrun\",\n    \"vmmcall\",\n    \"vmload\",\n    \"vmsave\",\n    \"wait\",\n    \"wbinvd\",\n    \"wrmsr\",\n    \"xadd\",\n    \"xchg\",\n    \"xgetbv\",\n    \"xlatb\",\n    \"xor\",\n    \"xorpd\",\n    \"xorps\",\n    \"xcryptecb\",\n    \"xcryptcbc\",\n    \"xcryptctr\",\n    \"xcryptcfb\",\n    \"xcryptofb\",\n    \"xrstor\",\n    \"xsave\",\n    \"xsetbv\",\n    \"xsha1\",\n    \"xsha256\",\n    \"xstore\",\n    \"aesdec\",\n    \"aesdeclast\",\n    \"aesenc\",\n    \"aesenclast\",\n    \"aesimc\",\n    \"aeskeygenassist\",\n    \"pclmulqdq\",\n    \"getsec\",\n    \"movdqa\",\n    \"maskmovdqu\",\n    \"movdq2q\",\n    \"movdqu\",\n    \"movq2dq\",\n    \"paddq\",\n    \"psubq\",\n    \"pmuludq\",\n    \"pshufhw\",\n    \"pshuflw\",\n    \"pshufd\",\n    \"pslldq\",\n    \"psrldq\",\n    \"punpckhqdq\",\n    \"punpcklqdq\",\n    \"addsubpd\",\n    \"addsubps\",\n    \"haddpd\",\n    \"haddps\",\n    \"hsubpd\",\n    \"hsubps\",\n    \"movddup\",\n    \"movshdup\",\n    \"movsldup\",\n    \"pabsb\",\n    \"pabsw\",\n    \"pabsd\",\n    \"pshufb\",\n    \"phaddw\",\n    \"phaddd\",\n    \"phaddsw\",\n    \"pmaddubsw\",\n    \"phsubw\",\n    \"phsubd\",\n    \"phsubsw\",\n    \"psignb\",\n    \"psignd\",\n    \"psignw\",\n    \"pmulhrsw\",\n    \"palignr\",\n    \"pblendvb\",\n    \"pmuldq\",\n    \"pminsb\",\n    \"pminsd\",\n    \"pminuw\",\n    \"pminud\",\n    \"pmaxsb\",\n    \"pmaxsd\",\n    \"pmaxud\",\n    \"pmaxuw\",\n    \"pmulld\",\n    \"phminposuw\",\n    \"roundps\",\n    \"roundpd\",\n    \"roundss\",\n    \"roundsd\",\n    \"blendpd\",\n    \"pblendw\",\n    \"blendps\",\n    \"blendvpd\",\n    \"blendvps\",\n    \"dpps\",\n    \"dppd\",\n    \"mpsadbw\",\n    \"extractps\",\n    \"insertps\",\n    \"movntdqa\",\n    \"packusdw\",\n    \"pmovsxbw\",\n    \"pmovsxbd\",\n    \"pmovsxbq\",\n    \"pmovsxwd\",\n    \"pmovsxwq\",\n    \"pmovsxdq\",\n    \"pmovzxbw\",\n    \"pmovzxbd\",\n    \"pmovzxbq\",\n    \"pmovzxwd\",\n    \"pmovzxwq\",\n    \"pmovzxdq\",\n    \"pcmpeqq\",\n    \"popcnt\",\n    \"ptest\",\n    \"pcmpestri\",\n    \"pcmpestrm\",\n    \"pcmpgtq\",\n    \"pcmpistri\",\n    \"pcmpistrm\",\n    \"movbe\",\n    \"crc32\"\n};\n"
  },
  {
    "path": "dis/itab.h",
    "content": "#ifndef UD_ITAB_H\n#define UD_ITAB_H\n\n/* itab.h -- generated by udis86:scripts/ud_itab.py, do no edit */\n\n/* ud_table_type -- lookup table types (see decode.c) */\nenum ud_table_type {\n    UD_TAB__OPC_TABLE,\n    UD_TAB__OPC_X87,\n    UD_TAB__OPC_MOD,\n    UD_TAB__OPC_VEX_M,\n    UD_TAB__OPC_VEX_P,\n    UD_TAB__OPC_RM,\n    UD_TAB__OPC_VENDOR,\n    UD_TAB__OPC_OSIZE,\n    UD_TAB__OPC_MODE,\n    UD_TAB__OPC_3DNOW,\n    UD_TAB__OPC_REG,\n    UD_TAB__OPC_ASIZE,\n    UD_TAB__OPC_SSE\n};\n\n/* ud_mnemonic -- mnemonic constants */\nenum ud_mnemonic_code {\n    UD_Iinvalid,\n    UD_I3dnow,\n    UD_Inone,\n    UD_Idb,\n    UD_Ipause,\n    UD_Iaaa,\n    UD_Iaad,\n    UD_Iaam,\n    UD_Iaas,\n    UD_Iadc,\n    UD_Iadd,\n    UD_Iaddpd,\n    UD_Iaddps,\n    UD_Iaddsd,\n    UD_Iaddss,\n    UD_Iand,\n    UD_Iandpd,\n    UD_Iandps,\n    UD_Iandnpd,\n    UD_Iandnps,\n    UD_Iarpl,\n    UD_Imovsxd,\n    UD_Ibound,\n    UD_Ibsf,\n    UD_Ibsr,\n    UD_Ibswap,\n    UD_Ibt,\n    UD_Ibtc,\n    UD_Ibtr,\n    UD_Ibts,\n    UD_Icall,\n    UD_Icbw,\n    UD_Icwde,\n    UD_Icdqe,\n    UD_Iclc,\n    UD_Icld,\n    UD_Iclflush,\n    UD_Iclgi,\n    UD_Icli,\n    UD_Iclts,\n    UD_Icmc,\n    UD_Icmovo,\n    UD_Icmovno,\n    UD_Icmovb,\n    UD_Icmovae,\n    UD_Icmovz,\n    UD_Icmovnz,\n    UD_Icmovbe,\n    UD_Icmova,\n    UD_Icmovs,\n    UD_Icmovns,\n    UD_Icmovp,\n    UD_Icmovnp,\n    UD_Icmovl,\n    UD_Icmovge,\n    UD_Icmovle,\n    UD_Icmovg,\n    UD_Icmp,\n    UD_Icmppd,\n    UD_Icmpps,\n    UD_Icmpsb,\n    UD_Icmpsw,\n    UD_Icmpsd,\n    UD_Icmpsq,\n    UD_Icmpss,\n    UD_Icmpxchg,\n    UD_Icmpxchg8b,\n    UD_Icmpxchg16b,\n    UD_Icomisd,\n    UD_Icomiss,\n    UD_Icpuid,\n    UD_Icvtdq2pd,\n    UD_Icvtdq2ps,\n    UD_Icvtpd2dq,\n    UD_Icvtpd2pi,\n    UD_Icvtpd2ps,\n    UD_Icvtpi2ps,\n    UD_Icvtpi2pd,\n    UD_Icvtps2dq,\n    UD_Icvtps2pi,\n    UD_Icvtps2pd,\n    UD_Icvtsd2si,\n    UD_Icvtsd2ss,\n    UD_Icvtsi2ss,\n    UD_Icvtss2si,\n    UD_Icvtss2sd,\n    UD_Icvttpd2pi,\n    UD_Icvttpd2dq,\n    UD_Icvttps2dq,\n    UD_Icvttps2pi,\n    UD_Icvttsd2si,\n    UD_Icvtsi2sd,\n    UD_Icvttss2si,\n    UD_Icwd,\n    UD_Icdq,\n    UD_Icqo,\n    UD_Idaa,\n    UD_Idas,\n    UD_Idec,\n    UD_Idiv,\n    UD_Idivpd,\n    UD_Idivps,\n    UD_Idivsd,\n    UD_Idivss,\n    UD_Iemms,\n    UD_Ienter,\n    UD_If2xm1,\n    UD_Ifabs,\n    UD_Ifadd,\n    UD_Ifaddp,\n    UD_Ifbld,\n    UD_Ifbstp,\n    UD_Ifchs,\n    UD_Ifclex,\n    UD_Ifcmovb,\n    UD_Ifcmove,\n    UD_Ifcmovbe,\n    UD_Ifcmovu,\n    UD_Ifcmovnb,\n    UD_Ifcmovne,\n    UD_Ifcmovnbe,\n    UD_Ifcmovnu,\n    UD_Ifucomi,\n    UD_Ifcom,\n    UD_Ifcom2,\n    UD_Ifcomp3,\n    UD_Ifcomi,\n    UD_Ifucomip,\n    UD_Ifcomip,\n    UD_Ifcomp,\n    UD_Ifcomp5,\n    UD_Ifcompp,\n    UD_Ifcos,\n    UD_Ifdecstp,\n    UD_Ifdiv,\n    UD_Ifdivp,\n    UD_Ifdivr,\n    UD_Ifdivrp,\n    UD_Ifemms,\n    UD_Iffree,\n    UD_Iffreep,\n    UD_Ificom,\n    UD_Ificomp,\n    UD_Ifild,\n    UD_Ifincstp,\n    UD_Ifninit,\n    UD_Ifiadd,\n    UD_Ifidivr,\n    UD_Ifidiv,\n    UD_Ifisub,\n    UD_Ifisubr,\n    UD_Ifist,\n    UD_Ifistp,\n    UD_Ifisttp,\n    UD_Ifld,\n    UD_Ifld1,\n    UD_Ifldl2t,\n    UD_Ifldl2e,\n    UD_Ifldpi,\n    UD_Ifldlg2,\n    UD_Ifldln2,\n    UD_Ifldz,\n    UD_Ifldcw,\n    UD_Ifldenv,\n    UD_Ifmul,\n    UD_Ifmulp,\n    UD_Ifimul,\n    UD_Ifnop,\n    UD_Ifpatan,\n    UD_Ifprem,\n    UD_Ifprem1,\n    UD_Ifptan,\n    UD_Ifrndint,\n    UD_Ifrstor,\n    UD_Ifnsave,\n    UD_Ifscale,\n    UD_Ifsin,\n    UD_Ifsincos,\n    UD_Ifsqrt,\n    UD_Ifstp,\n    UD_Ifstp1,\n    UD_Ifstp8,\n    UD_Ifstp9,\n    UD_Ifst,\n    UD_Ifnstcw,\n    UD_Ifnstenv,\n    UD_Ifnstsw,\n    UD_Ifsub,\n    UD_Ifsubp,\n    UD_Ifsubr,\n    UD_Ifsubrp,\n    UD_Iftst,\n    UD_Ifucom,\n    UD_Ifucomp,\n    UD_Ifucompp,\n    UD_Ifxam,\n    UD_Ifxch,\n    UD_Ifxch4,\n    UD_Ifxch7,\n    UD_Ifxrstor,\n    UD_Ifxsave,\n    UD_Ifxtract,\n    UD_Ifyl2x,\n    UD_Ifyl2xp1,\n    UD_Ihlt,\n    UD_Iidiv,\n    UD_Iin,\n    UD_Iimul,\n    UD_Iinc,\n    UD_Iinsb,\n    UD_Iinsw,\n    UD_Iinsd,\n    UD_Iint1,\n    UD_Iint3,\n    UD_Iint,\n    UD_Iinto,\n    UD_Iinvd,\n    UD_Iinvept,\n    UD_Iinvlpg,\n    UD_Iinvlpga,\n    UD_Iinvvpid,\n    UD_Iiretw,\n    UD_Iiretd,\n    UD_Iiretq,\n    UD_Ijo,\n    UD_Ijno,\n    UD_Ijb,\n    UD_Ijae,\n    UD_Ijz,\n    UD_Ijnz,\n    UD_Ijbe,\n    UD_Ija,\n    UD_Ijs,\n    UD_Ijns,\n    UD_Ijp,\n    UD_Ijnp,\n    UD_Ijl,\n    UD_Ijge,\n    UD_Ijle,\n    UD_Ijg,\n    UD_Ijcxz,\n    UD_Ijecxz,\n    UD_Ijrcxz,\n    UD_Ijmp,\n    UD_Ilahf,\n    UD_Ilar,\n    UD_Ilddqu,\n    UD_Ildmxcsr,\n    UD_Ilds,\n    UD_Ilea,\n    UD_Iles,\n    UD_Ilfs,\n    UD_Ilgs,\n    UD_Ilidt,\n    UD_Ilss,\n    UD_Ileave,\n    UD_Ilfence,\n    UD_Ilgdt,\n    UD_Illdt,\n    UD_Ilmsw,\n    UD_Ilock,\n    UD_Ilodsb,\n    UD_Ilodsw,\n    UD_Ilodsd,\n    UD_Ilodsq,\n    UD_Iloopne,\n    UD_Iloope,\n    UD_Iloop,\n    UD_Ilsl,\n    UD_Iltr,\n    UD_Imaskmovq,\n    UD_Imaxpd,\n    UD_Imaxps,\n    UD_Imaxsd,\n    UD_Imaxss,\n    UD_Imfence,\n    UD_Iminpd,\n    UD_Iminps,\n    UD_Iminsd,\n    UD_Iminss,\n    UD_Imonitor,\n    UD_Imontmul,\n    UD_Imov,\n    UD_Imovapd,\n    UD_Imovaps,\n    UD_Imovd,\n    UD_Imovhpd,\n    UD_Imovhps,\n    UD_Imovlhps,\n    UD_Imovlpd,\n    UD_Imovlps,\n    UD_Imovhlps,\n    UD_Imovmskpd,\n    UD_Imovmskps,\n    UD_Imovntdq,\n    UD_Imovnti,\n    UD_Imovntpd,\n    UD_Imovntps,\n    UD_Imovntq,\n    UD_Imovq,\n    UD_Imovsb,\n    UD_Imovsw,\n    UD_Imovsd,\n    UD_Imovsq,\n    UD_Imovss,\n    UD_Imovsx,\n    UD_Imovupd,\n    UD_Imovups,\n    UD_Imovzx,\n    UD_Imul,\n    UD_Imulpd,\n    UD_Imulps,\n    UD_Imulsd,\n    UD_Imulss,\n    UD_Imwait,\n    UD_Ineg,\n    UD_Inop,\n    UD_Inot,\n    UD_Ior,\n    UD_Iorpd,\n    UD_Iorps,\n    UD_Iout,\n    UD_Ioutsb,\n    UD_Ioutsw,\n    UD_Ioutsd,\n    UD_Ipacksswb,\n    UD_Ipackssdw,\n    UD_Ipackuswb,\n    UD_Ipaddb,\n    UD_Ipaddw,\n    UD_Ipaddd,\n    UD_Ipaddsb,\n    UD_Ipaddsw,\n    UD_Ipaddusb,\n    UD_Ipaddusw,\n    UD_Ipand,\n    UD_Ipandn,\n    UD_Ipavgb,\n    UD_Ipavgw,\n    UD_Ipcmpeqb,\n    UD_Ipcmpeqw,\n    UD_Ipcmpeqd,\n    UD_Ipcmpgtb,\n    UD_Ipcmpgtw,\n    UD_Ipcmpgtd,\n    UD_Ipextrb,\n    UD_Ipextrd,\n    UD_Ipextrq,\n    UD_Ipextrw,\n    UD_Ipinsrb,\n    UD_Ipinsrw,\n    UD_Ipinsrd,\n    UD_Ipinsrq,\n    UD_Ipmaddwd,\n    UD_Ipmaxsw,\n    UD_Ipmaxub,\n    UD_Ipminsw,\n    UD_Ipminub,\n    UD_Ipmovmskb,\n    UD_Ipmulhuw,\n    UD_Ipmulhw,\n    UD_Ipmullw,\n    UD_Ipop,\n    UD_Ipopa,\n    UD_Ipopad,\n    UD_Ipopfw,\n    UD_Ipopfd,\n    UD_Ipopfq,\n    UD_Ipor,\n    UD_Iprefetch,\n    UD_Iprefetchnta,\n    UD_Iprefetcht0,\n    UD_Iprefetcht1,\n    UD_Iprefetcht2,\n    UD_Ipsadbw,\n    UD_Ipshufw,\n    UD_Ipsllw,\n    UD_Ipslld,\n    UD_Ipsllq,\n    UD_Ipsraw,\n    UD_Ipsrad,\n    UD_Ipsrlw,\n    UD_Ipsrld,\n    UD_Ipsrlq,\n    UD_Ipsubb,\n    UD_Ipsubw,\n    UD_Ipsubd,\n    UD_Ipsubsb,\n    UD_Ipsubsw,\n    UD_Ipsubusb,\n    UD_Ipsubusw,\n    UD_Ipunpckhbw,\n    UD_Ipunpckhwd,\n    UD_Ipunpckhdq,\n    UD_Ipunpcklbw,\n    UD_Ipunpcklwd,\n    UD_Ipunpckldq,\n    UD_Ipi2fw,\n    UD_Ipi2fd,\n    UD_Ipf2iw,\n    UD_Ipf2id,\n    UD_Ipfnacc,\n    UD_Ipfpnacc,\n    UD_Ipfcmpge,\n    UD_Ipfmin,\n    UD_Ipfrcp,\n    UD_Ipfrsqrt,\n    UD_Ipfsub,\n    UD_Ipfadd,\n    UD_Ipfcmpgt,\n    UD_Ipfmax,\n    UD_Ipfrcpit1,\n    UD_Ipfrsqit1,\n    UD_Ipfsubr,\n    UD_Ipfacc,\n    UD_Ipfcmpeq,\n    UD_Ipfmul,\n    UD_Ipfrcpit2,\n    UD_Ipmulhrw,\n    UD_Ipswapd,\n    UD_Ipavgusb,\n    UD_Ipush,\n    UD_Ipusha,\n    UD_Ipushad,\n    UD_Ipushfw,\n    UD_Ipushfd,\n    UD_Ipushfq,\n    UD_Ipxor,\n    UD_Ircl,\n    UD_Ircr,\n    UD_Irol,\n    UD_Iror,\n    UD_Ircpps,\n    UD_Ircpss,\n    UD_Irdmsr,\n    UD_Irdpmc,\n    UD_Irdtsc,\n    UD_Irdtscp,\n    UD_Irepne,\n    UD_Irep,\n    UD_Iret,\n    UD_Iretf,\n    UD_Irsm,\n    UD_Irsqrtps,\n    UD_Irsqrtss,\n    UD_Isahf,\n    UD_Isalc,\n    UD_Isar,\n    UD_Ishl,\n    UD_Ishr,\n    UD_Isbb,\n    UD_Iscasb,\n    UD_Iscasw,\n    UD_Iscasd,\n    UD_Iscasq,\n    UD_Iseto,\n    UD_Isetno,\n    UD_Isetb,\n    UD_Isetae,\n    UD_Isetz,\n    UD_Isetnz,\n    UD_Isetbe,\n    UD_Iseta,\n    UD_Isets,\n    UD_Isetns,\n    UD_Isetp,\n    UD_Isetnp,\n    UD_Isetl,\n    UD_Isetge,\n    UD_Isetle,\n    UD_Isetg,\n    UD_Isfence,\n    UD_Isgdt,\n    UD_Ishld,\n    UD_Ishrd,\n    UD_Ishufpd,\n    UD_Ishufps,\n    UD_Isidt,\n    UD_Isldt,\n    UD_Ismsw,\n    UD_Isqrtps,\n    UD_Isqrtpd,\n    UD_Isqrtsd,\n    UD_Isqrtss,\n    UD_Istc,\n    UD_Istd,\n    UD_Istgi,\n    UD_Isti,\n    UD_Iskinit,\n    UD_Istmxcsr,\n    UD_Istosb,\n    UD_Istosw,\n    UD_Istosd,\n    UD_Istosq,\n    UD_Istr,\n    UD_Isub,\n    UD_Isubpd,\n    UD_Isubps,\n    UD_Isubsd,\n    UD_Isubss,\n    UD_Iswapgs,\n    UD_Isyscall,\n    UD_Isysenter,\n    UD_Isysexit,\n    UD_Isysret,\n    UD_Itest,\n    UD_Iucomisd,\n    UD_Iucomiss,\n    UD_Iud2,\n    UD_Iunpckhpd,\n    UD_Iunpckhps,\n    UD_Iunpcklps,\n    UD_Iunpcklpd,\n    UD_Iverr,\n    UD_Iverw,\n    UD_Ivmcall,\n    UD_Ivmclear,\n    UD_Ivmxon,\n    UD_Ivmptrld,\n    UD_Ivmptrst,\n    UD_Ivmlaunch,\n    UD_Ivmresume,\n    UD_Ivmxoff,\n    UD_Ivmread,\n    UD_Ivmwrite,\n    UD_Ivmrun,\n    UD_Ivmmcall,\n    UD_Ivmload,\n    UD_Ivmsave,\n    UD_Iwait,\n    UD_Iwbinvd,\n    UD_Iwrmsr,\n    UD_Ixadd,\n    UD_Ixchg,\n    UD_Ixgetbv,\n    UD_Ixlatb,\n    UD_Ixor,\n    UD_Ixorpd,\n    UD_Ixorps,\n    UD_Ixcryptecb,\n    UD_Ixcryptcbc,\n    UD_Ixcryptctr,\n    UD_Ixcryptcfb,\n    UD_Ixcryptofb,\n    UD_Ixrstor,\n    UD_Ixsave,\n    UD_Ixsetbv,\n    UD_Ixsha1,\n    UD_Ixsha256,\n    UD_Ixstore,\n    UD_Iaesdec,\n    UD_Iaesdeclast,\n    UD_Iaesenc,\n    UD_Iaesenclast,\n    UD_Iaesimc,\n    UD_Iaeskeygenassist,\n    UD_Ipclmulqdq,\n    UD_Igetsec,\n    UD_Imovdqa,\n    UD_Imaskmovdqu,\n    UD_Imovdq2q,\n    UD_Imovdqu,\n    UD_Imovq2dq,\n    UD_Ipaddq,\n    UD_Ipsubq,\n    UD_Ipmuludq,\n    UD_Ipshufhw,\n    UD_Ipshuflw,\n    UD_Ipshufd,\n    UD_Ipslldq,\n    UD_Ipsrldq,\n    UD_Ipunpckhqdq,\n    UD_Ipunpcklqdq,\n    UD_Iaddsubpd,\n    UD_Iaddsubps,\n    UD_Ihaddpd,\n    UD_Ihaddps,\n    UD_Ihsubpd,\n    UD_Ihsubps,\n    UD_Imovddup,\n    UD_Imovshdup,\n    UD_Imovsldup,\n    UD_Ipabsb,\n    UD_Ipabsw,\n    UD_Ipabsd,\n    UD_Ipshufb,\n    UD_Iphaddw,\n    UD_Iphaddd,\n    UD_Iphaddsw,\n    UD_Ipmaddubsw,\n    UD_Iphsubw,\n    UD_Iphsubd,\n    UD_Iphsubsw,\n    UD_Ipsignb,\n    UD_Ipsignd,\n    UD_Ipsignw,\n    UD_Ipmulhrsw,\n    UD_Ipalignr,\n    UD_Ipblendvb,\n    UD_Ipmuldq,\n    UD_Ipminsb,\n    UD_Ipminsd,\n    UD_Ipminuw,\n    UD_Ipminud,\n    UD_Ipmaxsb,\n    UD_Ipmaxsd,\n    UD_Ipmaxud,\n    UD_Ipmaxuw,\n    UD_Ipmulld,\n    UD_Iphminposuw,\n    UD_Iroundps,\n    UD_Iroundpd,\n    UD_Iroundss,\n    UD_Iroundsd,\n    UD_Iblendpd,\n    UD_Ipblendw,\n    UD_Iblendps,\n    UD_Iblendvpd,\n    UD_Iblendvps,\n    UD_Idpps,\n    UD_Idppd,\n    UD_Impsadbw,\n    UD_Iextractps,\n    UD_Iinsertps,\n    UD_Imovntdqa,\n    UD_Ipackusdw,\n    UD_Ipmovsxbw,\n    UD_Ipmovsxbd,\n    UD_Ipmovsxbq,\n    UD_Ipmovsxwd,\n    UD_Ipmovsxwq,\n    UD_Ipmovsxdq,\n    UD_Ipmovzxbw,\n    UD_Ipmovzxbd,\n    UD_Ipmovzxbq,\n    UD_Ipmovzxwd,\n    UD_Ipmovzxwq,\n    UD_Ipmovzxdq,\n    UD_Ipcmpeqq,\n    UD_Ipopcnt,\n    UD_Iptest,\n    UD_Ipcmpestri,\n    UD_Ipcmpestrm,\n    UD_Ipcmpgtq,\n    UD_Ipcmpistri,\n    UD_Ipcmpistrm,\n    UD_Imovbe,\n    UD_Icrc32,\n    UD_MAX_MNEMONIC_CODE\n} UD_ATTR_PACKED;\n\nextern const char * ud_mnemonics_str[];\n\n#endif /* UD_ITAB_H */\n"
  },
  {
    "path": "dis/main.c",
    "content": "#include <stdio.h>\n\n#include <dos.h>\n#include \"types.h\"\n#include \"extern.h\"\n\nextern char far *get_ptr_1(char far* x,int b);\n#pragma aux get_ptr_1 = \\\n    \"mov ax,1401h\"       \\\n    \"int 0f0h\"            \\\n    parm   [cx dx] [bx] \\\n    value     [ds si]    \\\n    modify    [ax];\n\n\n\nchar dsr[100];\nchar far * fpp = 0;\nchar sz = 0;\nint im = 0;\nint ty = 0;\nint hook(struct ud_t *ud_obj)\n{\n        char a1 = UD_EOI;\n      \n        if (!fpp)       \n                return UD_EOI;\n        if (im >= sz)\n                return UD_EOI;\n\t\tim++;\n\t\ta1 = fpp[im];\n        return a1;\n}\n\nint main(int argc,char** argv)\n{\n\n        ud_t ud_obj;\n\t\tchar rb = 0;\n\n\n\t\tif (!fpp)\n\t\t{\n\t\t\tfpp = get_ptr_1(0,0);\n\t\t\tif (!fpp)\n\t\t\t\treturn UD_EOI;\n\t\t\tty = fpp[0];\n\t\t\tud_set_mode(&ud_obj, ty);\n\t\t\tsz = fpp[1];\n\t\t\tim = 1;\n\t\t}\n\n\n        ud_init(&ud_obj);\n        ud_set_input_hook(&ud_obj, hook);\n        ud_set_syntax(&ud_obj, UD_SYN_INTEL);\n\t\tfor (;;)\n\t\t{\n\t\t\trb = ud_disassemble(&ud_obj);\n\t\t\tif (!rb)\n\t\t\t\tbreak;\n\t\t\tsprintf(dsr, \"%s\", ud_insn_asm(&ud_obj));\n\t\t\tget_ptr_1(dsr, rb);\n\t\t\tbreak;\n\t\t}\n\n        //printf(\"kkk\");\n   // return 0;\n\n//    ud_set_input_buffer(&ud_obj, \"\\x90\\x90\\x90\\x90\", 4);\n   //ud_set_input_file(&ud_obj, stdin);\n   // ud_set_mode(&ud_obj, 64);\n\n\n    return 0;\n}\n"
  },
  {
    "path": "dis/stderr.txt",
    "content": ""
  },
  {
    "path": "dis/stdout.txt",
    "content": "DOSBox version 0.74-2\nCopyright 2002-2018 DOSBox Team, published under GNU GPL.\n---\nSDL_Init: Starting up with SDL windib video driver.\n          Try to update your video card and directx drivers!\nCONFIG:Loading primary settings from config file G:\\progs\\dosbox\\woa86FA.tmp\n\"vga\" is not a valid value for variable: machine.\nIt might now be reset it to default value: svga_s3\nMemory sizes above 31 MB are NOT recommended.\nStick with the default values unless you are absolutely certain.\nMIDI:win32 selected Microsoft GS Wavetable Synth\nMIDI:Opened device:win32\n"
  },
  {
    "path": "dis/syn-att.c",
    "content": "/* udis86 - libudis86/syn-att.c\n *\n * Copyright (c) 2002-2009 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"types.h\"\n#include \"extern.h\"\n#include \"decode.h\"\n#include \"itab.h\"\n#include \"syn.h\"\n#include \"udint.h\"\n\n/* -----------------------------------------------------------------------------\n * opr_cast() - Prints an operand cast.\n * -----------------------------------------------------------------------------\n */\nstatic void \nopr_cast(struct ud* u, struct ud_operand* op)\n{\n  switch(op->size) {\n  case 16 : case 32 :\n    ud_asmprintf(u, \"*\");   break;\n  default: break;\n  }\n}\n\n/* -----------------------------------------------------------------------------\n * gen_operand() - Generates assembly output for each operand.\n * -----------------------------------------------------------------------------\n */\nstatic void \ngen_operand(struct ud* u, struct ud_operand* op)\n{\n  switch(op->type) {\n  case UD_OP_CONST:\n    ud_asmprintf(u, \"$0x%x\", op->lval.udword);\n    break;\n\n  case UD_OP_REG:\n    ud_asmprintf(u, \"%%%s\", ud_reg_tab[op->base - UD_R_AL]);\n    break;\n\n  case UD_OP_MEM:\n    if (u->br_far) {\n        opr_cast(u, op);\n    }\n    if (u->pfx_seg) {\n      ud_asmprintf(u, \"%%%s:\", ud_reg_tab[u->pfx_seg - UD_R_AL]);\n    }\n    if (op->offset != 0) { \n      ud_syn_print_mem_disp(u, op, 0);\n    }\n    if (op->base) {\n      ud_asmprintf(u, \"(%%%s\", ud_reg_tab[op->base - UD_R_AL]);\n    }\n    if (op->index) {\n      if (op->base) {\n        ud_asmprintf(u, \",\");\n      } else {\n        ud_asmprintf(u, \"(\");\n      }\n      ud_asmprintf(u, \"%%%s\", ud_reg_tab[op->index - UD_R_AL]);\n    }\n    if (op->scale) {\n      ud_asmprintf(u, \",%d\", op->scale);\n    }\n    if (op->base || op->index) {\n      ud_asmprintf(u, \")\");\n    }\n    break;\n\n  case UD_OP_IMM:\n    ud_asmprintf(u, \"$\");\n    ud_syn_print_imm(u, op);\n    break;\n\n  case UD_OP_JIMM:\n    ud_syn_print_addr(u, ud_syn_rel_target(u, op));\n    break;\n\n  case UD_OP_PTR:\n    switch (op->size) {\n      case 32:\n        ud_asmprintf(u, \"$0x%x, $0x%x\", op->lval.ptr.seg, \n          op->lval.ptr.off & 0xFFFF);\n        break;\n      case 48:\n        ud_asmprintf(u, \"$0x%x, $0x%x\", op->lval.ptr.seg, \n          op->lval.ptr.off);\n        break;\n    }\n    break;\n      \n  default: return;\n  }\n}\n\n/* =============================================================================\n * translates to AT&T syntax \n * =============================================================================\n */\nextern void \nud_translate_att(struct ud *u)\n{\n  int size = 0;\n  int star = 0;\n\n  /* check if P_OSO prefix is used */\n  if (! P_OSO(u->itab_entry->prefix) && u->pfx_opr) {\n  switch (u->dis_mode) {\n    case 16: \n      ud_asmprintf(u, \"o32 \");\n      break;\n    case 32:\n    case 64:\n      ud_asmprintf(u, \"o16 \");\n      break;\n  }\n  }\n\n  /* check if P_ASO prefix was used */\n  if (! P_ASO(u->itab_entry->prefix) && u->pfx_adr) {\n  switch (u->dis_mode) {\n    case 16: \n      ud_asmprintf(u, \"a32 \");\n      break;\n    case 32:\n      ud_asmprintf(u, \"a16 \");\n      break;\n    case 64:\n      ud_asmprintf(u, \"a32 \");\n      break;\n  }\n  }\n\n  if (u->pfx_lock)\n    ud_asmprintf(u,  \"lock \");\n  if (u->pfx_rep) {\n    ud_asmprintf(u, \"rep \");\n  } else if (u->pfx_rep) {\n    ud_asmprintf(u, \"repe \");\n  } else if (u->pfx_repne) {\n    ud_asmprintf(u, \"repne \");\n  }\n\n  /* special instructions */\n  switch (u->mnemonic) {\n  case UD_Iretf: \n    ud_asmprintf(u, \"lret \"); \n    break;\n  case UD_Idb:\n    ud_asmprintf(u, \".byte 0x%x\", u->operand[0].lval.ubyte);\n    return;\n  case UD_Ijmp:\n  case UD_Icall:\n    if (u->br_far) ud_asmprintf(u,  \"l\");\n        if (u->operand[0].type == UD_OP_REG) {\n          star = 1;\n        }\n    ud_asmprintf(u, \"%s\", ud_lookup_mnemonic(u->mnemonic));\n    break;\n  case UD_Ibound:\n  case UD_Ienter:\n    if (u->operand[0].type != UD_NONE)\n      gen_operand(u, &u->operand[0]);\n    if (u->operand[1].type != UD_NONE) {\n      ud_asmprintf(u, \",\");\n      gen_operand(u, &u->operand[1]);\n    }\n    return;\n  default:\n    ud_asmprintf(u, \"%s\", ud_lookup_mnemonic(u->mnemonic));\n  }\n\n  if (size == 8)\n  ud_asmprintf(u, \"b\");\n  else if (size == 16)\n  ud_asmprintf(u, \"w\");\n  else if (size == 64)\n  ud_asmprintf(u, \"q\");\n\n  if (star) {\n    ud_asmprintf(u, \" *\");\n  } else {\n    ud_asmprintf(u, \" \");\n  }\n\n  if (u->operand[2].type != UD_NONE) {\n  gen_operand(u, &u->operand[2]);\n  ud_asmprintf(u, \", \");\n  }\n\n  if (u->operand[1].type != UD_NONE) {\n  gen_operand(u, &u->operand[1]);\n  ud_asmprintf(u, \", \");\n  }\n\n  if (u->operand[0].type != UD_NONE)\n  gen_operand(u, &u->operand[0]);\n}\n\n/*\nvim: set ts=2 sw=2 expandtab\n*/\n"
  },
  {
    "path": "dis/syn-intel.c",
    "content": "/* udis86 - libudis86/syn-intel.c\n *\n * Copyright (c) 2002-2013 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"types.h\"\n#include \"extern.h\"\n#include \"decode.h\"\n#include \"itab.h\"\n#include \"syn.h\"\n#include \"udint.h\"\n\n/* -----------------------------------------------------------------------------\n * opr_cast() - Prints an operand cast.\n * -----------------------------------------------------------------------------\n */\nstatic void \nopr_cast(struct ud* u, struct ud_operand* op)\n{\n  if (u->br_far) {\n    ud_asmprintf(u, \"far \"); \n  }\n  switch(op->size) {\n  case  8: ud_asmprintf(u, \"byte \" ); break;\n  case 16: ud_asmprintf(u, \"word \" ); break;\n  case 32: ud_asmprintf(u, \"dword \"); break;\n  case 64: ud_asmprintf(u, \"qword \"); break;\n  case 80: ud_asmprintf(u, \"tword \"); break;\n  default: break;\n  }\n}\n\n/* -----------------------------------------------------------------------------\n * gen_operand() - Generates assembly output for each operand.\n * -----------------------------------------------------------------------------\n */\nstatic void gen_operand(struct ud* u, struct ud_operand* op, int syn_cast)\n{\n  switch(op->type) {\n  case UD_OP_REG:\n    ud_asmprintf(u, \"%s\", ud_reg_tab[op->base - UD_R_AL]);\n    break;\n\n  case UD_OP_MEM:\n    if (syn_cast) {\n      opr_cast(u, op);\n    }\n    ud_asmprintf(u, \"[\");\n    if (u->pfx_seg) {\n      ud_asmprintf(u, \"%s:\", ud_reg_tab[u->pfx_seg - UD_R_AL]);\n    }\n    if (op->base) {\n      ud_asmprintf(u, \"%s\", ud_reg_tab[op->base - UD_R_AL]);\n    }\n    if (op->index) {\n      ud_asmprintf(u, \"%s%s\", op->base != UD_NONE? \"+\" : \"\",\n                              ud_reg_tab[op->index - UD_R_AL]);\n      if (op->scale) {\n        ud_asmprintf(u, \"*%d\", op->scale);\n      }\n    }\n    if (op->offset != 0) {\n      ud_syn_print_mem_disp(u, op, (op->base  != UD_NONE || \n                                    op->index != UD_NONE) ? 1 : 0);\n    }\n    ud_asmprintf(u, \"]\");\n    break;\n      \n  case UD_OP_IMM:\n    ud_syn_print_imm(u, op);\n    break;\n\n\n  case UD_OP_JIMM:\n    ud_syn_print_addr(u, ud_syn_rel_target(u, op));\n    break;\n\n  case UD_OP_PTR:\n    switch (op->size) {\n      case 32:\n        ud_asmprintf(u, \"word 0x%x:0x%x\", op->lval.ptr.seg, \n          op->lval.ptr.off & 0xFFFF);\n        break;\n      case 48:\n        ud_asmprintf(u, \"dword 0x%x:0x%x\", op->lval.ptr.seg, \n          op->lval.ptr.off);\n        break;\n    }\n    break;\n\n  case UD_OP_CONST:\n    if (syn_cast) opr_cast(u, op);\n    ud_asmprintf(u, \"%d\", op->lval.udword);\n    break;\n\n  default: return;\n  }\n}\n\n/* =============================================================================\n * translates to intel syntax \n * =============================================================================\n */\nextern void\nud_translate_intel(struct ud* u)\n{\n  /* check if P_OSO prefix is used */\n  if (!P_OSO(u->itab_entry->prefix) && u->pfx_opr) {\n    switch (u->dis_mode) {\n    case 16: ud_asmprintf(u, \"o32 \"); break;\n    case 32:\n    case 64: ud_asmprintf(u, \"o16 \"); break;\n    }\n  }\n\n  /* check if P_ASO prefix was used */\n  if (!P_ASO(u->itab_entry->prefix) && u->pfx_adr) {\n    switch (u->dis_mode) {\n    case 16: ud_asmprintf(u, \"a32 \"); break;\n    case 32: ud_asmprintf(u, \"a16 \"); break;\n    case 64: ud_asmprintf(u, \"a32 \"); break;\n    }\n  }\n\n  if (u->pfx_seg &&\n      u->operand[0].type != UD_OP_MEM &&\n      u->operand[1].type != UD_OP_MEM ) {\n    ud_asmprintf(u, \"%s \", ud_reg_tab[u->pfx_seg - UD_R_AL]);\n  }\n\n  if (u->pfx_lock) {\n    ud_asmprintf(u, \"lock \");\n  }\n  if (u->pfx_rep) {\n    ud_asmprintf(u, \"rep \");\n  } else if (u->pfx_repe) {\n    ud_asmprintf(u, \"repe \");\n  } else if (u->pfx_repne) {\n    ud_asmprintf(u, \"repne \");\n  }\n\n  /* print the instruction mnemonic */\n  ud_asmprintf(u, \"%s\", ud_lookup_mnemonic(u->mnemonic));\n\n  if (u->operand[0].type != UD_NONE) {\n    int cast = 0;\n    ud_asmprintf(u, \" \");\n    if (u->operand[0].type == UD_OP_MEM) {\n      if (u->operand[1].type == UD_OP_IMM   ||\n          u->operand[1].type == UD_OP_CONST ||\n          u->operand[1].type == UD_NONE     ||\n          (u->operand[0].size != u->operand[1].size && \n           u->operand[1].type != UD_OP_REG)) {\n          cast = 1;\n      } else if (u->operand[1].type == UD_OP_REG &&\n                 u->operand[1].base == UD_R_CL) {\n          switch (u->mnemonic) {\n          case UD_Ircl:\n          case UD_Irol:\n          case UD_Iror:\n          case UD_Ircr:\n          case UD_Ishl:\n          case UD_Ishr:\n          case UD_Isar:\n              cast = 1;\n              break;\n          default: break;\n          }\n      }\n    }\n    gen_operand(u, &u->operand[0], cast);\n  }\n\n  if (u->operand[1].type != UD_NONE) {\n    int cast = 0;\n    ud_asmprintf(u, \", \");\n    if (u->operand[1].type == UD_OP_MEM &&\n        u->operand[0].size != u->operand[1].size && \n        !ud_opr_is_sreg(&u->operand[0])) {\n      cast = 1;\n    }\n    gen_operand(u, &u->operand[1], cast);\n  }\n\n  if (u->operand[2].type != UD_NONE) {\n    ud_asmprintf(u, \", \");\n    gen_operand(u, &u->operand[2], 0);\n  }\n}\n\n/*\nvim: set ts=2 sw=2 expandtab\n*/\n"
  },
  {
    "path": "dis/syn.c",
    "content": "/* udis86 - libudis86/syn.c\n *\n * Copyright (c) 2002-2013 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#include \"types.h\"\n#include \"decode.h\"\n#include \"syn.h\"\n#include \"udint.h\"\n\n/* -----------------------------------------------------------------------------\n * Intel Register Table - Order Matters (types.h)!\n * -----------------------------------------------------------------------------\n */\nconst char* ud_reg_tab[] = \n{\n  \"al\",   \"cl\",   \"dl\",   \"bl\",\n  \"ah\",   \"ch\",   \"dh\",   \"bh\",\n  \"spl\",  \"bpl\",    \"sil\",    \"dil\",\n  \"r8b\",  \"r9b\",    \"r10b\",   \"r11b\",\n  \"r12b\", \"r13b\",   \"r14b\",   \"r15b\",\n\n  \"ax\",   \"cx\",   \"dx\",   \"bx\",\n  \"sp\",   \"bp\",   \"si\",   \"di\",\n  \"r8w\",  \"r9w\",    \"r10w\",   \"r11w\",\n  \"r12w\", \"r13w\"  , \"r14w\",   \"r15w\",\n  \n  \"eax\",  \"ecx\",    \"edx\",    \"ebx\",\n  \"esp\",  \"ebp\",    \"esi\",    \"edi\",\n  \"r8d\",  \"r9d\",    \"r10d\",   \"r11d\",\n  \"r12d\", \"r13d\",   \"r14d\",   \"r15d\",\n  \n  \"rax\",  \"rcx\",    \"rdx\",    \"rbx\",\n  \"rsp\",  \"rbp\",    \"rsi\",    \"rdi\",\n  \"r8\",   \"r9\",   \"r10\",    \"r11\",\n  \"r12\",  \"r13\",    \"r14\",    \"r15\",\n\n  \"es\",   \"cs\",   \"ss\",   \"ds\",\n  \"fs\",   \"gs\", \n\n  \"cr0\",  \"cr1\",    \"cr2\",    \"cr3\",\n  \"cr4\",  \"cr5\",    \"cr6\",    \"cr7\",\n  \"cr8\",  \"cr9\",    \"cr10\",   \"cr11\",\n  \"cr12\", \"cr13\",   \"cr14\",   \"cr15\",\n  \n  \"dr0\",  \"dr1\",    \"dr2\",    \"dr3\",\n  \"dr4\",  \"dr5\",    \"dr6\",    \"dr7\",\n  \"dr8\",  \"dr9\",    \"dr10\",   \"dr11\",\n  \"dr12\", \"dr13\",   \"dr14\",   \"dr15\",\n\n  \"mm0\",  \"mm1\",    \"mm2\",    \"mm3\",\n  \"mm4\",  \"mm5\",    \"mm6\",    \"mm7\",\n\n  \"st0\",  \"st1\",    \"st2\",    \"st3\",\n  \"st4\",  \"st5\",    \"st6\",    \"st7\", \n\n  \"xmm0\", \"xmm1\",   \"xmm2\",   \"xmm3\",\n  \"xmm4\", \"xmm5\",   \"xmm6\",   \"xmm7\",\n  \"xmm8\", \"xmm9\",   \"xmm10\",  \"xmm11\",\n  \"xmm12\",  \"xmm13\",  \"xmm14\",  \"xmm15\",\n\n  \"rip\"\n};\n\n\nuint64_t\nud_syn_rel_target(struct ud *u, struct ud_operand *opr)\n{\n  const uint64_t trunc_mask = 0xffffffffffffffffull >> (64 - u->opr_mode);\n  switch (opr->size) {\n  case 8 : return (u->pc + opr->lval.sbyte)  & trunc_mask;\n  case 16: return (u->pc + opr->lval.sword)  & trunc_mask;\n  case 32: return (u->pc + opr->lval.sdword) & trunc_mask;\n  default: UD_ASSERT(!\"invalid relative offset size.\");\n    return 0ull;\n  }\n}\n\n\n/*\n * asmprintf\n *    Printf style function for printing translated assembly\n *    output. Returns the number of characters written and\n *    moves the buffer pointer forward. On an overflow,\n *    returns a negative number and truncates the output.\n */\nint\nud_asmprintf(struct ud *u, const char *fmt, ...)\n{\n  int ret;\n  int avail;\n  va_list ap;\n  va_start(ap, fmt);\n  avail = u->asm_buf_size - u->asm_buf_fill - 1 /* nullchar */;\n  ret = vsnprintf((char*) u->asm_buf + u->asm_buf_fill, avail, fmt, ap);\n  if (ret < 0 || ret > avail) {\n      u->asm_buf_fill = u->asm_buf_size - 1;\n  } else {\n      u->asm_buf_fill += ret;\n  }\n  va_end(ap);\n  return ret;\n}\n\n\nvoid\nud_syn_print_addr(struct ud *u, uint64_t addr)\n{\n  const char *name = NULL;\n  if (u->sym_resolver) {\n    int64_t offset = 0;\n    name = u->sym_resolver(u, addr, &offset);\n    if (name) {\n      if (offset) {\n        ud_asmprintf(u, \"%s%+\" FMT64 \"d\", name, offset);\n      } else {\n        ud_asmprintf(u, \"%s\", name);\n      }\n      return;\n    }\n  }\n  ud_asmprintf(u, \"0x%\" FMT64 \"x\", addr);\n}\n\n\nvoid\nud_syn_print_imm(struct ud* u, const struct ud_operand *op)\n{\n  uint64_t v;\n  if (op->_oprcode == OP_sI && op->size != u->opr_mode) {\n    if (op->size == 8) {\n      v = (int64_t)op->lval.sbyte;\n    } else {\n      UD_ASSERT(op->size == 32);\n      v = (int64_t)op->lval.sdword;\n    }\n    if (u->opr_mode < 64) {\n      v = v & ((1ull << u->opr_mode) - 1ull);\n    }\n  } else {\n    switch (op->size) {\n    case 8 : v = op->lval.ubyte;  break;\n    case 16: v = op->lval.uword;  break;\n    case 32: v = op->lval.udword; break;\n    case 64: v = op->lval.uqword; break;\n    default: UD_ASSERT(!\"invalid offset\"); v = 0; /* keep cc happy */\n    }\n  }\n  ud_asmprintf(u, \"0x%\" FMT64 \"x\", v);\n}\n\n\nvoid\nud_syn_print_mem_disp(struct ud* u, const struct ud_operand *op, int sign)\n{\n  UD_ASSERT(op->offset != 0);\n if (op->base == UD_NONE && op->index == UD_NONE) {\n    uint64_t v;\n    UD_ASSERT(op->scale == UD_NONE && op->offset != 8);\n    /* unsigned mem-offset */\n    switch (op->offset) {\n    case 16: v = op->lval.uword;  break;\n    case 32: v = op->lval.udword; break;\n    case 64: v = op->lval.uqword; break;\n    default: UD_ASSERT(!\"invalid offset\"); v = 0; /* keep cc happy */\n    }\n    ud_asmprintf(u, \"0x%\" FMT64 \"x\", v);\n  } else {\n    int64_t v;\n    UD_ASSERT(op->offset != 64);\n    switch (op->offset) {\n    case 8 : v = op->lval.sbyte;  break;\n    case 16: v = op->lval.sword;  break;\n    case 32: v = op->lval.sdword; break;\n    default: UD_ASSERT(!\"invalid offset\"); v = 0; /* keep cc happy */\n    }\n    if (v < 0) {\n      ud_asmprintf(u, \"-0x%\" FMT64 \"x\", -v);\n    } else if (v > 0) {\n      ud_asmprintf(u, \"%s0x%\" FMT64 \"x\", sign? \"+\" : \"\", v);\n    }\n  }\n}\n\n/*\nvim: set ts=2 sw=2 expandtab\n*/\n"
  },
  {
    "path": "dis/syn.h",
    "content": "/* udis86 - libudis86/syn.h\n *\n * Copyright (c) 2002-2009\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef UD_SYN_H\n#define UD_SYN_H\n\n#include \"types.h\"\n#ifndef __UD_STANDALONE__\n# include <stdarg.h>\n#endif /* __UD_STANDALONE__ */\n\nextern const char* ud_reg_tab[];\n\nuint64_t ud_syn_rel_target(struct ud*, struct ud_operand*);\n\n#ifdef __GNUC__\nint ud_asmprintf(struct ud *u, const char *fmt, ...)\n    __attribute__ ((format (printf, 2, 3)));\n#else\nint ud_asmprintf(struct ud *u, const char *fmt, ...);\n#endif\n\nvoid ud_syn_print_addr(struct ud *u, uint64_t addr);\nvoid ud_syn_print_imm(struct ud* u, const struct ud_operand *op);\nvoid ud_syn_print_mem_disp(struct ud* u, const struct ud_operand *, int sign);\n\n#endif /* UD_SYN_H */\n\n/*\nvim: set ts=2 sw=2 expandtab\n*/\n"
  },
  {
    "path": "dis/types.h",
    "content": "/* udis86 - libudis86/types.h\n *\n * Copyright (c) 2002-2013 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef UD_TYPES_H\n#define UD_TYPES_H\n\n#ifdef __KERNEL__\n  /* -D__KERNEL__ is automatically passed on the command line when\n     building something as part of the Linux kernel */\n# include <linux/kernel.h>\n# include <linux/string.h>\n# ifndef __UD_STANDALONE__\n#  define __UD_STANDALONE__ 1\n#endif\n#endif /* __KERNEL__ */\n\n#if defined(_MSC_VER) || defined(__BORLANDC__)\n# include <stdint.h>\n# include <stdio.h>\n# define inline __inline /* MS Visual Studio requires __inline \n                            instead of inline for C code */\n#elif !defined(__UD_STANDALONE__)\n# include <stdio.h>\n# include <inttypes.h>\n#endif /* !__UD_STANDALONE__ */\n\n/* gcc specific extensions */\n#ifdef __GNUC__\n# define UD_ATTR_PACKED __attribute__((packed))\n#else\n# define UD_ATTR_PACKED\n#endif /* UD_ATTR_PACKED */\n\n\n/* -----------------------------------------------------------------------------\n * All possible \"types\" of objects in udis86. Order is Important!\n * -----------------------------------------------------------------------------\n */\nenum ud_type\n{\n  UD_NONE,\n\n  /* 8 bit GPRs */\n  UD_R_AL,  UD_R_CL,  UD_R_DL,  UD_R_BL,\n  UD_R_AH,  UD_R_CH,  UD_R_DH,  UD_R_BH,\n  UD_R_SPL, UD_R_BPL, UD_R_SIL, UD_R_DIL,\n  UD_R_R8B, UD_R_R9B, UD_R_R10B,  UD_R_R11B,\n  UD_R_R12B,  UD_R_R13B,  UD_R_R14B,  UD_R_R15B,\n\n  /* 16 bit GPRs */\n  UD_R_AX,  UD_R_CX,  UD_R_DX,  UD_R_BX,\n  UD_R_SP,  UD_R_BP,  UD_R_SI,  UD_R_DI,\n  UD_R_R8W, UD_R_R9W, UD_R_R10W,  UD_R_R11W,\n  UD_R_R12W,  UD_R_R13W,  UD_R_R14W,  UD_R_R15W,\n  \n  /* 32 bit GPRs */\n  UD_R_EAX, UD_R_ECX, UD_R_EDX, UD_R_EBX,\n  UD_R_ESP, UD_R_EBP, UD_R_ESI, UD_R_EDI,\n  UD_R_R8D, UD_R_R9D, UD_R_R10D,  UD_R_R11D,\n  UD_R_R12D,  UD_R_R13D,  UD_R_R14D,  UD_R_R15D,\n  \n  /* 64 bit GPRs */\n  UD_R_RAX, UD_R_RCX, UD_R_RDX, UD_R_RBX,\n  UD_R_RSP, UD_R_RBP, UD_R_RSI, UD_R_RDI,\n  UD_R_R8,  UD_R_R9,  UD_R_R10, UD_R_R11,\n  UD_R_R12, UD_R_R13, UD_R_R14, UD_R_R15,\n\n  /* segment registers */\n  UD_R_ES,  UD_R_CS,  UD_R_SS,  UD_R_DS,\n  UD_R_FS,  UD_R_GS,  \n\n  /* control registers*/\n  UD_R_CR0, UD_R_CR1, UD_R_CR2, UD_R_CR3,\n  UD_R_CR4, UD_R_CR5, UD_R_CR6, UD_R_CR7,\n  UD_R_CR8, UD_R_CR9, UD_R_CR10,  UD_R_CR11,\n  UD_R_CR12,  UD_R_CR13,  UD_R_CR14,  UD_R_CR15,\n  \n  /* debug registers */\n  UD_R_DR0, UD_R_DR1, UD_R_DR2, UD_R_DR3,\n  UD_R_DR4, UD_R_DR5, UD_R_DR6, UD_R_DR7,\n  UD_R_DR8, UD_R_DR9, UD_R_DR10,  UD_R_DR11,\n  UD_R_DR12,  UD_R_DR13,  UD_R_DR14,  UD_R_DR15,\n\n  /* mmx registers */\n  UD_R_MM0, UD_R_MM1, UD_R_MM2, UD_R_MM3,\n  UD_R_MM4, UD_R_MM5, UD_R_MM6, UD_R_MM7,\n\n  /* x87 registers */\n  UD_R_ST0, UD_R_ST1, UD_R_ST2, UD_R_ST3,\n  UD_R_ST4, UD_R_ST5, UD_R_ST6, UD_R_ST7, \n\n  /* extended multimedia registers */\n  UD_R_XMM0,  UD_R_XMM1,  UD_R_XMM2,  UD_R_XMM3,\n  UD_R_XMM4,  UD_R_XMM5,  UD_R_XMM6,  UD_R_XMM7,\n  UD_R_XMM8,  UD_R_XMM9,  UD_R_XMM10, UD_R_XMM11,\n  UD_R_XMM12, UD_R_XMM13, UD_R_XMM14, UD_R_XMM15,\n\n  UD_R_RIP,\n\n  /* Operand Types */\n  UD_OP_REG,  UD_OP_MEM,  UD_OP_PTR,  UD_OP_IMM,  \n  UD_OP_JIMM, UD_OP_CONST\n};\n\n#include \"itab.h\"\n\nunion ud_lval {\n  int8_t     sbyte;\n  uint8_t    ubyte;\n  int16_t    sword;\n  uint16_t   uword;\n  int32_t    sdword;\n  uint32_t   udword;\n  int64_t    sqword;\n  uint64_t   uqword;\n  struct {\n    uint16_t seg;\n    uint32_t off;\n  } ptr;\n};\n\n/* -----------------------------------------------------------------------------\n * struct ud_operand - Disassembled instruction Operand.\n * -----------------------------------------------------------------------------\n */\nstruct ud_operand {\n  enum ud_type    type;\n  uint8_t         size;\n  enum ud_type    base;\n  enum ud_type    index;\n  uint8_t         scale;  \n  uint8_t         offset;\n  union ud_lval   lval;\n  /*\n   * internal use only\n   */\n  uint64_t        _legacy; /* this will be removed in 1.8 */\n  uint8_t         _oprcode;\n};\n\n/* -----------------------------------------------------------------------------\n * struct ud - The udis86 object.\n * -----------------------------------------------------------------------------\n */\nstruct ud\n{\n  /*\n   * input buffering\n   */\n  int       (*inp_hook) (struct ud*);\n#ifndef __UD_STANDALONE__\n  FILE*     inp_file;\n#endif\n  const uint8_t* inp_buf;\n  size_t    inp_buf_size;\n  size_t    inp_buf_index;\n  uint8_t   inp_curr;\n  size_t    inp_ctr;\n  uint8_t   inp_sess[64];\n  int       inp_end;\n\n  void      (*translator)(struct ud*);\n  uint64_t  insn_offset;\n  char      insn_hexcode[64];\n\n  /*\n   * Assembly output buffer\n   */\n  char     *asm_buf;\n  size_t    asm_buf_size;\n  size_t    asm_buf_fill;\n  char      asm_buf_int[128];\n\n  /*\n   * Symbol resolver for use in the translation phase.\n   */\n  const char* (*sym_resolver)(struct ud*, uint64_t addr, int64_t *offset);\n\n  uint8_t   dis_mode;\n  uint64_t  pc;\n  uint8_t   vendor;\n  enum ud_mnemonic_code mnemonic;\n  struct ud_operand operand[3];\n  uint8_t   error;\n  uint8_t   pfx_rex;\n  uint8_t   pfx_seg;\n  uint8_t   pfx_opr;\n  uint8_t   pfx_adr;\n  uint8_t   pfx_lock;\n  uint8_t   pfx_str;\n  uint8_t   pfx_rep;\n  uint8_t   pfx_repe;\n  uint8_t   pfx_repne;\n  uint8_t   opr_mode;\n  uint8_t   adr_mode;\n  uint8_t   br_far;\n  uint8_t   br_near;\n  uint8_t   have_modrm;\n  uint8_t   modrm;\n  uint8_t   primary_opcode;\n  void *    user_opaque_data;\n  struct ud_itab_entry * itab_entry;\n  struct ud_lookup_table_list_entry *le;\n};\n\n/* -----------------------------------------------------------------------------\n * Type-definitions\n * -----------------------------------------------------------------------------\n */\ntypedef enum ud_type          ud_type_t;\ntypedef enum ud_mnemonic_code ud_mnemonic_code_t;\n\ntypedef struct ud             ud_t;\ntypedef struct ud_operand     ud_operand_t;\n\n#define UD_SYN_INTEL          ud_translate_intel\n#define UD_SYN_ATT            ud_translate_att\n#define UD_EOI                (-1)\n#define UD_INP_CACHE_SZ       32\n#define UD_VENDOR_AMD         0\n#define UD_VENDOR_INTEL       1\n#define UD_VENDOR_ANY         2\n\n#endif\n\n/*\nvim: set ts=2 sw=2 expandtab\n*/\n"
  },
  {
    "path": "dis/udint.h",
    "content": "/* udis86 - libudis86/udint.h -- definitions for internal use only\n * \n * Copyright (c) 2002-2009 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n#ifndef _UDINT_H_\n#define _UDINT_H_\n\n#ifdef HAVE_CONFIG_H\n# include <config.h>\n#endif /* HAVE_CONFIG_H */\n\n#if defined(UD_DEBUG) && HAVE_ASSERT_H\n# include <assert.h>\n# define UD_ASSERT(_x) assert(_x)\n#else\n# define UD_ASSERT(_x)\n#endif /* !HAVE_ASSERT_H */\n\n#if defined(UD_DEBUG)\n  #define UDERR(u, msg) \\\n    do { \\\n      (u)->error = 1; \\\n      fprintf(stderr, \"decode-error: %s:%d: %s\", \\\n              __FILE__, __LINE__, (msg)); \\\n    } while (0)\n#else\n  #define UDERR(u, m) \\\n    do { \\\n      (u)->error = 1; \\\n    } while (0)\n#endif /* !LOGERR */\n\n#define UD_RETURN_ON_ERROR(u) \\\n  do { \\\n    if ((u)->error != 0) { \\\n      return (u)->error; \\\n    } \\\n  } while (0)\n\n#define UD_RETURN_WITH_ERROR(u, m) \\\n  do { \\\n    UDERR(u, m); \\\n    return (u)->error; \\\n  } while (0)\n\n#ifndef __UD_STANDALONE__\n# define UD_NON_STANDALONE(x) x\n#else\n# define UD_NON_STANDALONE(x)\n#endif\n\n/* printf formatting int64 specifier */\n#ifdef FMT64\n# undef FMT64\n#endif\n#if defined(_MSC_VER) || defined(__BORLANDC__)\n# define FMT64 \"I64\"\n#else\n# if defined(__APPLE__)\n#  define FMT64 \"ll\"\n# elif defined(__amd64__) || defined(__x86_64__)\n#  define FMT64 \"l\"\n# else \n#  define FMT64 \"ll\"\n# endif /* !x64 */\n#endif\n\n#endif /* _UDINT_H_ */\n"
  },
  {
    "path": "dis/udis86.c",
    "content": "/* udis86 - libudis86/udis86.c\n *\n * Copyright (c) 2002-2013 Vivek Thampi\n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without modification, \n * are permitted provided that the following conditions are met:\n * \n *     * Redistributions of source code must retain the above copyright notice, \n *       this list of conditions and the following disclaimer.\n *     * Redistributions in binary form must reproduce the above copyright notice, \n *       this list of conditions and the following disclaimer in the documentation \n *       and/or other materials provided with the distribution.\n * \n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \n * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR \n * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES \n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; \n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \n * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS \n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include \"udint.h\"\n#include \"extern.h\"\n#include \"decode.h\"\n\n#if !defined(__UD_STANDALONE__)\n# if HAVE_STRING_H\n#  include <string.h>\n# endif\n#endif /* !__UD_STANDALONE__ */\n\nstatic void ud_inp_init(struct ud *u);\n\n/* =============================================================================\n * ud_init\n *    Initializes ud_t object.\n * =============================================================================\n */\nextern void \nud_init(struct ud* u)\n{\n  memset((void*)u, 0, sizeof(struct ud));\n  ud_set_mode(u, 16);\n  u->mnemonic = UD_Iinvalid;\n  ud_set_pc(u, 0);\n#ifndef __UD_STANDALONE__\n  ud_set_input_file(u, stdin);\n#endif /* __UD_STANDALONE__ */\n\n  ud_set_asm_buffer(u, u->asm_buf_int, sizeof(u->asm_buf_int));\n}\n\n\n/* =============================================================================\n * ud_disassemble\n *    Disassembles one instruction and returns the number of \n *    bytes disassembled. A zero means end of disassembly.\n * =============================================================================\n */\nextern unsigned int\nud_disassemble(struct ud* u)\n{\n  int len;\n  if (u->inp_end) {\n    return 0;\n  }\n  if ((len = ud_decode(u)) > 0) {\n    if (u->translator != NULL) {\n      u->asm_buf[0] = '\\0';\n      u->translator(u);\n    }\n  }\n  return len;\n}\n\n\n/* =============================================================================\n * ud_set_mode() - Set Disassemly Mode.\n * =============================================================================\n */\nextern void \nud_set_mode(struct ud* u, uint8_t m)\n{\n  switch(m) {\n  case 16:\n  case 32:\n  case 64: u->dis_mode = m ; return;\n  default: u->dis_mode = 16; return;\n  }\n}\n\n/* =============================================================================\n * ud_set_vendor() - Set vendor.\n * =============================================================================\n */\nextern void \nud_set_vendor(struct ud* u, unsigned v)\n{\n  switch(v) {\n  case UD_VENDOR_INTEL:\n    u->vendor = v;\n    break;\n  case UD_VENDOR_ANY:\n    u->vendor = v;\n    break;\n  default:\n    u->vendor = UD_VENDOR_AMD;\n  }\n}\n\n/* =============================================================================\n * ud_set_pc() - Sets code origin. \n * =============================================================================\n */\nextern void \nud_set_pc(struct ud* u, uint64_t o)\n{\n  u->pc = o;\n}\n\n/* =============================================================================\n * ud_set_syntax() - Sets the output syntax.\n * =============================================================================\n */\nextern void \nud_set_syntax(struct ud* u, void (*t)(struct ud*))\n{\n  u->translator = t;\n}\n\n/* =============================================================================\n * ud_insn() - returns the disassembled instruction\n * =============================================================================\n */\nconst char* \nud_insn_asm(const struct ud* u) \n{\n  return u->asm_buf;\n}\n\n/* =============================================================================\n * ud_insn_offset() - Returns the offset.\n * =============================================================================\n */\nuint64_t\nud_insn_off(const struct ud* u) \n{\n  return u->insn_offset;\n}\n\n\n/* =============================================================================\n * ud_insn_hex() - Returns hex form of disassembled instruction.\n * =============================================================================\n */\nconst char* \nud_insn_hex(struct ud* u) \n{\n  u->insn_hexcode[0] = 0;\n  if (!u->error) {\n    unsigned int i;\n    const unsigned char *src_ptr = ud_insn_ptr(u);\n    char* src_hex;\n    src_hex = (char*) u->insn_hexcode;\n    /* for each byte used to decode instruction */\n    for (i = 0; i < ud_insn_len(u) && i < sizeof(u->insn_hexcode) / 2;\n         ++i, ++src_ptr) {\n      sprintf(src_hex, \"%02x\", *src_ptr & 0xFF);\n      src_hex += 2;\n    }\n  }\n  return u->insn_hexcode;\n}\n\n\n/* =============================================================================\n * ud_insn_ptr\n *    Returns a pointer to buffer containing the bytes that were\n *    disassembled.\n * =============================================================================\n */\nextern const uint8_t* \nud_insn_ptr(const struct ud* u) \n{\n  return (u->inp_buf == NULL) ? \n            u->inp_sess : u->inp_buf + (u->inp_buf_index - u->inp_ctr);\n}\n\n\n/* =============================================================================\n * ud_insn_len\n *    Returns the count of bytes disassembled.\n * =============================================================================\n */\nextern unsigned int \nud_insn_len(const struct ud* u) \n{\n  return u->inp_ctr;\n}\n\n\n/* =============================================================================\n * ud_insn_get_opr\n *    Return the operand struct representing the nth operand of\n *    the currently disassembled instruction. Returns NULL if\n *    there's no such operand.\n * =============================================================================\n */\nconst struct ud_operand*\nud_insn_opr(const struct ud *u, unsigned int n)\n{\n  if (n > 2 || u->operand[n].type == UD_NONE) {\n    return NULL; \n  } else {\n    return &u->operand[n];\n  }\n}\n\n\n/* =============================================================================\n * ud_opr_is_sreg\n *    Returns non-zero if the given operand is of a segment register type.\n * =============================================================================\n */\nint\nud_opr_is_sreg(const struct ud_operand *opr)\n{\n  return opr->type == UD_OP_REG && \n         opr->base >= UD_R_ES   &&\n         opr->base <= UD_R_GS;\n}\n\n\n/* =============================================================================\n * ud_opr_is_sreg\n *    Returns non-zero if the given operand is of a general purpose\n *    register type.\n * =============================================================================\n */\nint\nud_opr_is_gpr(const struct ud_operand *opr)\n{\n  return opr->type == UD_OP_REG && \n         opr->base >= UD_R_AL   &&\n         opr->base <= UD_R_R15;\n}\n\n\n/* =============================================================================\n * ud_set_user_opaque_data\n * ud_get_user_opaque_data\n *    Get/set user opaqute data pointer\n * =============================================================================\n */\nvoid\nud_set_user_opaque_data(struct ud * u, void* opaque)\n{\n  u->user_opaque_data = opaque;\n}\n\nvoid*\nud_get_user_opaque_data(const struct ud *u)\n{\n  return u->user_opaque_data;\n}\n\n\n/* =============================================================================\n * ud_set_asm_buffer\n *    Allow the user to set an assembler output buffer. If `buf` is NULL,\n *    we switch back to the internal buffer.\n * =============================================================================\n */\nvoid\nud_set_asm_buffer(struct ud *u, char *buf, size_t size)\n{\n  if (buf == NULL) {\n    ud_set_asm_buffer(u, u->asm_buf_int, sizeof(u->asm_buf_int));\n  } else {\n    u->asm_buf = buf;\n    u->asm_buf_size = size;\n  }\n}\n\n\n/* =============================================================================\n * ud_set_sym_resolver\n *    Set symbol resolver for relative targets used in the translation\n *    phase.\n *\n *    The resolver is a function that takes a uint64_t address and returns a\n *    symbolic name for the that address. The function also takes a second\n *    argument pointing to an integer that the client can optionally set to a\n *    non-zero value for offsetted targets. (symbol+offset) The function may\n *    also return NULL, in which case the translator only prints the target\n *    address.\n *\n *    The function pointer maybe NULL which resets symbol resolution.\n * =============================================================================\n */\nvoid\nud_set_sym_resolver(struct ud *u, const char* (*resolver)(struct ud*, \n                                                          uint64_t addr,\n                                                          int64_t *offset))\n{\n  u->sym_resolver = resolver;\n}\n\n\n/* =============================================================================\n * ud_insn_mnemonic\n *    Return the current instruction mnemonic.\n * =============================================================================\n */\nenum ud_mnemonic_code\nud_insn_mnemonic(const struct ud *u)\n{\n  return u->mnemonic;\n}\n\n\n/* =============================================================================\n * ud_lookup_mnemonic\n *    Looks up mnemonic code in the mnemonic string table.\n *    Returns NULL if the mnemonic code is invalid.\n * =============================================================================\n */\nconst char*\nud_lookup_mnemonic(enum ud_mnemonic_code c)\n{\n  if (c < UD_MAX_MNEMONIC_CODE) {\n    return ud_mnemonics_str[c];\n  } else {\n    return NULL;\n  }\n}\n\n\n/* \n * ud_inp_init\n *    Initializes the input system.\n */\nstatic void\nud_inp_init(struct ud *u)\n{\n  u->inp_hook      = NULL;\n  u->inp_buf       = NULL;\n  u->inp_buf_size  = 0;\n  u->inp_buf_index = 0;\n  u->inp_curr      = 0;\n  u->inp_ctr       = 0;\n  u->inp_end       = 0;\n  UD_NON_STANDALONE(u->inp_file = NULL);\n}\n\n\n/* =============================================================================\n * ud_inp_set_hook\n *    Sets input hook.\n * =============================================================================\n */\nvoid \nud_set_input_hook(register struct ud* u, int (*hook)(struct ud*))\n{\n  ud_inp_init(u);\n  u->inp_hook = hook;\n}\n\n/* =============================================================================\n * ud_inp_set_buffer\n *    Set buffer as input.\n * =============================================================================\n */\nvoid \nud_set_input_buffer(register struct ud* u, const uint8_t* buf, size_t len)\n{\n  ud_inp_init(u);\n  u->inp_buf = buf;\n  u->inp_buf_size = len;\n  u->inp_buf_index = 0;\n}\n\n\n#ifndef __UD_STANDALONE__\n/* =============================================================================\n * ud_input_set_file\n *    Set FILE as input.\n * =============================================================================\n */\nstatic int \ninp_file_hook(struct ud* u)\n{\n  return fgetc(u->inp_file);\n}\n\nvoid \nud_set_input_file(register struct ud* u, FILE* f)\n{\n  ud_inp_init(u);\n  u->inp_hook = inp_file_hook;\n  u->inp_file = f;\n}\n#endif /* __UD_STANDALONE__ */\n\n\n/* =============================================================================\n * ud_input_skip\n *    Skip n input bytes.\n * ============================================================================\n */\nvoid \nud_input_skip(struct ud* u, size_t n)\n{\n  if (u->inp_end) {\n    return;\n  }\n  if (u->inp_buf == NULL) {\n    while (n--) {\n      int c = u->inp_hook(u);\n      if (c == UD_EOI) {\n        goto eoi;\n      }\n    }\n    return;\n  } else {\n    if (n > u->inp_buf_size ||\n        u->inp_buf_index > u->inp_buf_size - n) {\n      u->inp_buf_index = u->inp_buf_size; \n      goto eoi;\n    }\n    u->inp_buf_index += n; \n    return;\n  }\neoi:\n  u->inp_end = 1;\n  UDERR(u, \"cannot skip, eoi received\\b\");\n  return;\n}\n\n\n/* =============================================================================\n * ud_input_end\n *    Returns non-zero on end-of-input.\n * =============================================================================\n */\nint\nud_input_end(const struct ud *u)\n{\n  return u->inp_end;\n}\n\n/* vim:set ts=2 sw=2 expandtab */\n"
  },
  {
    "path": "dis/udis86.err",
    "content": "udis86.c(47): Warning! W131: No prototype found for function 'memset'\n"
  },
  {
    "path": "dmmic.asm",
    "content": "FORMAT MZ\n\ninclude 'config.asm'\n\nmacro linear reg,trg,seg\n\t{\n\txor reg,reg\n\tmov reg,seg\n\tshl reg,4\n\tadd reg,trg\n\t}\n\nmacro rinear reg,trg,seg\n\t{\n\txor reg,reg\n\tmov reg,seg\n\tshl reg,16\n\tadd reg,trg\n\t}\n\n; --- Thread Stacks\nSEGMENT STACKS\n\nstx1 dw 100 dup (?)\nstx1e:\n\nstx2 dw 100 dup(0)\nstx2e:\n\nstx3 dw 1000 dup(0)\nstx3e:\n\nstx4 dw 1000 dup(0)\nstx4e:\n\nstx5 dw 1000 dup(0)\nstx5e:\n\nstx6 dw 1000 dup(0)\nstx6e:\n\nstx7 dw 1000 dup(0)\nstx7e:\n\nstx8 dw 1000 dup(0)\nstx8e:\n\nstx9 dw 1000 dup(0)\nstx9e:\n\nnop\n\n\n; ---- Unrestricted vm Mode Thread\nSEGMENT T16 USE16\n\nv0:\n\nsti\n\nmov ax,0x0900\nint 0xF0\n\nmov si,MAIN16\nshl esi,16\nmov dx,m4\nmov bp,0x0900\nmov ax,0x0421\nint 0xF0\n\n; Unlock mutex\nmov ax,MAIN16\nmov es,ax\nmov di,mut1\nmov ax,0x0503\nint 0xF0\n\nvmcall\n\n\n; ---- Protected Mode Thread\nSEGMENT T32 USE32\n\nrt2:\n\n; Int 0xF0 works also in protected mode\nmov ax,0\nint 0xF0\n\n; DOS call\nmov bp,0x0900\nxor esi,esi\nmov si,MAIN16\nshl esi,16\nmov dx,m2 \nmov ax,0x421\nint 0xF0\n\n; Unlock mutex\nmov ax,0x0503\nlinear edi,mut1,MAIN16\nint 0xF0\n\nretf\n\n\n; Virtualized PM Thread (from Virtualized Paged Mode or Unrestricted Mode )\nv1:\n\n; Int 0xF0 works also in protected mode (but CPUID not in virtualization)\n\t\nxchg bx,bx\n\n; DOS call\nmov bp,0x0900\nxor esi,esi\nmov si,MAIN16\nshl esi,16\nmov dx,m1\nmov ax,0x421\n;int 0xF0 ;Not Yet\n\n; Unlock mutex\n\nmov ax,0x0503\nlinear edi,mut1,MAIN16\nint 0xF0\n\nretf\n\n\n\n; ---- Long Mode Thread\nSEGMENT T64 USE64\n\n; Virtualized LM Thread (from Unrestricted Mode )\nv3:\n\nxchg bx,bx\nnop\nnop\nvmcall\n\n\nrt3:\n\nnop\nnop\nnop\nnop\nnop\n\n; Int 0xF0 works also in long mode\nmov ax,0\nint 0xF0\n\n; DOS call\nxor rsi,rsi\nmov si,MAIN16\nshl rsi,16\nmov rdx,m3\nmov rax,0x0900\nint 0x21\n\n; Unlock mutex\nmov ax,0x0503\nlinear rdi,mut1,MAIN16\nint 0xF0\n\n\nret\n\n; Virtualized LM Thread\nv2:\n\nvmcall\n\n\n\nSEGMENT MAIN16 USE16\nORG 0h\n\nm1 db \"[real] \",\"$\";\nm2 db \"[protected] \",\"$\";\nm3 db \"[long] \",\"$\";\nm4 db \"[virtualized real]\",\"$\";\ncrlf db 0dh,0ah,\"$\"\n\nmut1 db 0\ndhvalue db 0\n\ninclude \"reqdmmi.asm\"\n\n; Real mode thread\nrt1:\n\nsti\npush cs\npop si\nshl esi,16\nmov dx,m1\nmov bp,0x0900\nmov ax,0x0421\nint 0xF0\n\n\n; unlock mut\npush cs\npop es\nmov di,mut1\nmov ax,0x0503\nint 0xF0\n\nretf\n\n\n\nmain:\n\nif RESIDENT = 0\n\tmov ax,0x4c00\n\tint 0x21\nend if\n\n\nRequireDMMI\n\n; dl = num of cpus\n; dh = virtualization mode\nmov [cs:dhvalue],dh\n\n; enter unreal\nmov ax,0x0900\nint 0xF0\n\n\n; init mut\npush cs\npop es\nmov di,mut1\nmov ax,0x0500\nint 0xF0\n\n\nrepeat 4\n\t; lock mut \n\tpush cs\n\tpop es\n\tmov di,mut1\n\tmov ax,0x0502\n\tint 0xF0\nend repeat\n\n; run a real mode thread\npush cs\npop es\nmov dx,rt1\nmov cx,STACKS\nmov gs,cx\nmov cx,stx1e\nmov ax,0x0100\nmov ebx,1\nint 0xF0\n\n; run a protected thread\npush cs\npop es\nmov ax,0x0101\nmov ebx,3\nlinear ecx,stx3e,STACKS\nlinear edx,rt2,T32\nint 0xF0\n\n; run a long thread\npush cs\npop es\nmov ax,0x0102\nmov ebx,4\nlinear ecx,stx4e,STACKS\nlinear edx,rt3,T64\nint 0xF0\n\n; run a virtualized paged protected mode thread\n\ncmp [cs:dhvalue],2\nje .useUnr\n\ncmp [cs:dhvalue],1\nje .usePmV\n\n; No virtualization supported\n; Release one mutex\npush cs\npop es\nmov di,mut1\nmov ax,0x0503\nint 0xF0\njmp .AfterV\n\n.usePmV:\npush cs\npop es\nmov ax,0x0103\nmov ebx,0x107\nlinear edi,stx6e,STACKS\nlinear ecx,stx7e,STACKS\nlinear edx,v1,T32\nint 0xF0\njmp .AfterV\n\n; run a virtualized unrestricted guest -> real mode thread\n.useUnr:\npush cs\npop es\nmov ax,0x0103\nmov ebx,0x007\nrinear edi,stx8e,STACKS\nlinear ecx,stx9e,STACKS\nrinear edx,v0,T16\nmov esi,0 ; Mode 0 -> Real mode\nint 0xF0\n\n; Virtualized Unrestricted Guest -> protected mode thread\npush cs\npop es\nmov ax,0x0103\nmov ebx,0x007\nlinear ecx,stx3e,STACKS\nlinear edx,v1,T32\nmov esi,1 ; Mode 1 -> Protected mode\n;int 0xF0\n\n; Virtualized Unrestricted Guest -> long mode thread\npush cs\npop es\nmov ax,0x0103\nmov ebx,0x007\nlinear ecx,stx3e,STACKS\nlinear edx,v3,T64\nmov esi,2 ; Mode 2 -> Long mode\n;int 0xF0 ; Not working yet because MSR writing causes VMEXIT, (we haven't yet defined MSR bitmaps in VMX)\n\n\n\n.AfterV:\n\n; wait mut\npush cs\npop es\nmov di,mut1\nmov ax,0x0504\nint 0xF0\n\npush cs\npop ds\nmov ax,0x0900\nmov dx,crlf\nint 0x21\n\nmov ax,0x4c00\nint 0x21\n\nentry MAIN16:main"
  },
  {
    "path": "dos32.asm",
    "content": "USE32\n\ncalldos32:\n\n\n\nretf"
  },
  {
    "path": "dpmi/DPMI.PRO",
    "content": "; Profile for DPMI.LOD\n;\n; Options currently in effect are\n\n\n;\n; Default options are\n\n; dpmimem=616,1024,4096,32,32,1,2048 ; Set DPMI memory options\n; sharedmem=16\t\t; Set the Shared Memory size to nnnn MB\n\n;\n; All possible options recognized by DPMI.LOD are\n\n; debug=cli\t\t; Don't disable interrupts on CLI in PM\n; debug=dpmierr \t; Signal INT 01h on each DPMI error\n; debug=dpmilock\t; Check for InDOS when paging\n; debug=dpminewsel\t; Force new selector on all allocates\n; debug=dpmiphys\t; Disable checks in DPMI_GETP2L\n; debug=dpmisel \t; Signal INT 01h on each LAST_DPMI_xS error\n; debug=dpmispurnt\t; Signal INT 01h on spurious NT task switches\n; debug=dpmistart\t; Signal INT 01h on DPMI client startup\n; debug=dpmistd \t; Force KRNL386 to come up in standard mode\n; debug=dpmiterm\t; Signal INT 01h if we free resources upon termination\n; debug=dpmiv100\t; Force DPMI version 1.00 even if Rational Systems-based app\n; debug=nodebug \t; Disable hooks for INTs 01h and 03h for debugging purposes\n; debug=nokeyb\t\t; Disable hook\tfor INT  09h\t       for debugging purposes\n; debug=nonmi\t\t; Disable hook\tfor INT  02h\t       for debugging purposes\n; debug=nowrap\t\t; Trap even boundary stack wraps at 0000\n; dpmimem=lll,sss,bbb,ccc,hhh,ppp,ddd ; Set DPMI memory options:      Min   Def\n;\t\t\t  lll = # LDT entries\t\t\t       32   616\n;\t\t\t  sss = byte size of the HPDA stack\t      512  1024\n;\t\t\t  bbb = byte size of the HPDA buffer\t      512  4096\n;\t\t\t  ccc = # VM callbacks\t\t\t       16    32\n;\t\t\t  hhh = # DPMI memory handles\t\t\t1    32\n;\t\t\t  ppp = # page directories\t\t\t1     1\n;\t\t\t  ddd = byte size of the dynamic save area   1024  2048\n; forcelpm16\t\t; Force the LPM stack to be 16-bit (overcome bug in MS linker)\n; noumb \t\t; Don't allocate memory in UMBs\n; novcpi\t\t; Disable VCPI presence detection\n; pro=d:\\path\\filename.ext ; Load a profile (cannot be used from within a profile)\n; sharedmem=nnnn\t; Set the Shared Memory size to nnnn MB\n;\t\t\t; (default = 16 MB, must be multiple of 4 MB)\n; swapfile [=d:\\path\\filename.ext] [/s=nnnn] [/t] [/p] ; Use a swapfile for DPMI VMM\n;\t\t  optional args\n;\t\t  d:\\path\\filename.ext\t Use this as permanent swapfile\n;\t\t  /p\t\t\t Make it permanent\n;\t\t  /t\t\t\t On second thought, it's temporary\n;\t\t  /s=nnnn\t\t Make it nnnn KB in size (default = 8192)\n;\t\t  If no filename is specified, the SWAPFILE is temporary\n;\t\t    unless /P is specified.  Otherwise, it's permanent\n;\t\t    unless /T is specified.\n\n\u001a"
  },
  {
    "path": "dpmi/DPMIONE.PRO",
    "content": "; Profile for DPMIONE.EXE\n\n  LOAD=dpmi.lod pro=dpmi.pro\n\n;\n; The default options are\n;\n; DEBUG=QSWAT\t\t\tDon't signal INT 01h if preceding 386SWAT present.\n;\n; All possible options recognized by DPMIONE.EXE are\n;\n; LOAD=d:\\path\\filename.ext\tLoad a PM program such as DPMI.LOD\n; PRO=d:\\path\\filename.ext\tParse a profile.\n; UNLOAD\t\t\tUninstall DPMIONE.\n; UNINST\t\t\t...\n; UNINSTALL\t\t\t...\n\n; DEBUG=NSWAT\t\t\tDon't pass on SWAT presence to load modules.\n; DEBUG=QSWAT\t\t\tDon't signal INT 01h if preceding 386SWAT present.\n\u001a"
  },
  {
    "path": "dpmi/LICENSE.TXT",
    "content": "DPMIONE  -- A DPMI 1.0 Host -- Version 0.91\n(C) Copyright 1990-2004 Qualitas, Inc.\tAll Rights Reserved.\n\n\nAuthor & Copyright\n------------------\n\nThis program was written by Bob Smith (bsmith@sudleyplace.com) and is\n(C) Copyright 1990-2004 Qualitas, Inc.\tThe most recent version may be\nfound at http://www.sudleyplace.com/dpmione/.\n\n\nLicense\n-------\n\nThis program may be used free for non-commercial use; commercial use\nrequires a Volume Purchase Agreement from the author.  It may be\nfreely distributed as long as no part of the program or its\ndocumentation is altered and the program and its documentation are\nkept together.\n\n\u001a"
  },
  {
    "path": "dpmi/README.TXT",
    "content": "DPMIONE  -- A DPMI 1.0 Host -- Version 0.91\n(C) Copyright 1990-2004 Qualitas, Inc.\tAll Rights Reserved.\n\n\nOverview\n--------\n\nThe DOS Protected Mode Interface (DPMI) Specification version 0.9 was\ncreated by the DPMI Committee in 1990, and extended to version 1.0 in\n1991.  From the introduction to the DPMI 1.0 spec, \"The DOS Protected\nMode Interface (DPMI) allows DOS programmers to access the advanced\nfeatures of 80286, 80386, and 80486-based PCs in a well-behaved,\nhardware-independent fashion that does not compromise system\nprotection\".  With this spec, it becomes especially easy to write a\nprogram which enters Protected Mode (PM), and has access to all of the\nsystem's extended memory.\n\nDPMI 0.9 hosts are readily available, standalone or otherwise.\tSome\nDPMI 0.9 hosts implemented a handful of DPMI 1.0 features, but other\nthan 386MAX, none of them did the whole spec.\n\nDPMIONE is, to my knowledge, the first publicly available standalone\nDPMI 1.0 host.\tThis program is an outgrowth of the DPMI 1.0 host\nwhich first appeared in 386MAX from Qualitas, Inc. in 1992.  As such,\nit has undergone extensive testing in that commercial product before\nbeing ported to this standalone program.\n\n\n\nFeatures\n--------\n\n* Supports DPMI 1.0 (superset of DPMI 0.9)\n* Starts from either Real Mode or Virtual Mode (using VCPI)\n* Low DOS memory resident size is about 15KB\n* Extended memory resident size is about 300KB plus Page Tables (4KB\n  per 4MB of physical memory)\n* Loads from command line or as device driver so subsequently loaded\n  device drivers can use DPMI\n* Supports both 16-bit and 32-bit DPMI clients\n* Supports nested DPMI clients\n* Supports uncommitted memory (a very handy DPMI 1.0 feature)\n  (See the file UNCOMMIT.TXT for details.)\n* Full DOS (INT 21h) & Mouse (INT 33h) translation services\n* Swapfile support\n* Compatible with 386SWAT for debugging DPMI clients\n\n\nSystem Requirements\n-------------------\n\n* 80386 CPU or later\n* XMS driver (HIMEM.SYS or Memory Manager EMM386/QEMM/etc. --\n  386MAX 7 and later versions already support DPMI 1.0)\n\n\nLimitations\n-----------\n\n* VM/RM exceptions 06h (Invalid Opcode) and 0Dh (GP Fault) only are\n  reflected to PM.\n* The TSR facility of DPMI 1.0 is not supported.\n\n\nInstallation\n------------\n\n1.  Unzip the files into a separate directory (say, C:\\DPMIONE).\n\n2.  Edit the file DPMIONE.PRO to include a line which loads the\n    DPMI.LOD file, e.g.\n\n    load=c:\\dpmione\\dpmi.lod pro=c:\\dpmione\\dpmi.pro\n\n3.  Edit the DPMI.PRO file as necessary (no changes are needed from\n    the defaults).\n\n4.  Decide whether you want to load DPMIONE.EXE in your CONFIG.SYS or\n    AUTOEXEC.BAT file (or neither).  Then, do either step 4a or 4b\n    (but *NOT BOTH*):\n\n    a.\tEdit your CONFIG.SYS file to include a line such as\n\n\tDevice=c:\\dpmione\\dpmione.exe pro=c:\\dpmione\\dpmione.pro\n\n    b.\tEdit your AUTOEXEC.BAT file to include a line such as\n\n\tc:\\dpmione\\dpmione pro=c:\\dpmione\\dpmione.pro\n\n    c.\tIf you chose not to load DPMIONE automatically, you can run it\n\tfrom the command line at a later time, with a line similar to\n\tthe one in 4b.\n\n5.  If necessary, reboot your system to load DPMIONE.\n\n\nCompatibility\n-------------\n\nAs a test of this program's compatibility as a DPMI host, you can\nactually use it as a substitute for the Windows 3.1x DPMI host.  That\nis, install a fresh copy of Windows 3.1x.  Then, with DPMIONE resident,\ngo to the WINDOWS directory and type\n\n\tsystem\\krnl386\n\nand Windows is up and running.\tThis instance of Windows does not\nsupport DOS sessions or anything related to that, but most other\nWindows functions are there including File Manager.  This has proven\nto be an exceptionally rigorous test of a DPMI host.  No other\nunrelated DPMI host can make this claim.\n\n\nExpand Down Stacks\n------------------\n\nThe Locked Protected Mode stack used by DPMIONE for hardware\ninterrupts and faults is marked as Expand Down so it expands\nautomatically.\tIn the process of making this work, I learned a lot.\nFor more details on Expand Down segments, see\nhttp://www.sudleyplace.com/dpmione/expanddown.htm.\n\n\nAuthor & Copyright\n------------------\n\nThis program was written by Bob Smith (bsmith@sudleyplace.com) and is\n(C) Copyright 1990-2004 Qualitas, Inc.\tThe most recent version may be\nfound at http://www.sudleyplace.com/dpmione/.\n\n\nLicense\n-------\n\nThis program may be used free for non-commercial use; commercial use\nrequires a volume purchase agreement from the author.  It may be\nfreely distributed as long as no part of the program or its\ndocumentation is altered and the program and its documentation are\nkept together.\n\n\nDownload\n--------\n\nThe program files may be downloaded from our FTP site at\nftp://ftp.sudleyplace.com/sudleyplace/dpmione.zip.\n\n\nSpecification\n-------------\n\nTo view the DPMI 1.0 specification, try one of the following links:\n\nhttp://www.delorie.com/djgpp/doc/dpmi/ (HTML)\nhttp://clio.rice.edu/cwsdpmi/dpmispec1.pdf (PDF)\n\n\nVersion History\n---------------\n\nPlease see the file VERSION.TXT.\n\n\u001a"
  },
  {
    "path": "dpmi/UNCOMMIT.TXT",
    "content": "\t\tHow to Use Uncommitted Memory\n\nOverview\n--------\n\nOne of the really nice features of DPMI 1.0 is its support of\nuncommitted memory, that is the ability to allocate address space\nwithout allocating memory to back it up at the same time.\n\nFor example, say you need space for an object whose size you can't\ncompute at the start, but has a reasonable upper limit of, say, 100\nmegabytes.  Using uncommitted memory, you can allocate 100 MB of\naddress space and then just start using it.\n\nWhen you first write to anywhere in the address space, the DPMI 1.0\nhost signals a Visible Page Fault (VPF) which your program has hooked\nand is now given the opportunity to handle.  Your program's response\nto the VPF is to mark the 4KB block's page attributes as Read/Write\nand Committed, and then simply re-execute the instruction which\ntriggered the VPF.  The DPMI host takes over from there, maps in a 4KB\nblock of memory, and your program continues on as if nothing had\nhappened.\n\nSubsequent accesses to different 4KB blocks of the uncommitted memory \ntrigger additional VPFs to which your program responds in the same \nway.  This provides a very efficient mechanism with a small amount of \noverhead once per 4KB block of the address space and commits only the \namount of memory actually needed.\n\nI used this technique in my linker, QLINK.  At the start of the \nprogram, it doesn't know how big each segment might be, but it can \nmake a reasonable guess that none will be bigger than a few megabytes.\t\nWhen data is written to each segment, QLINK's VPF handler marks the \nfaulting address as committed, and continues on.\n\nThis feature allows QLINK to pass through each object file only once \ninstead of the usual two passes needed by other linkers.\n\n\nDetails\n-------\n\nTo use uncommitted memory, follow these steps:\n\n1.  Allocate address space via DPMI function 504h (Allocate Linear\n    Memory Block) with EDX = 0 to create Uncommitted Pages.\n\n2.  Hook the Page Fault handler via DPMI function 210h (Get Extended\n    Processor Exception Handler -- PM), interrupt 0Eh.\n\n3.  When the Page Fault handler hooked above is called, find the \n    matching handle from step 1, and change the corresponding 4KB \n    block's Page Attributes (via DPMI function 507h -- Set Page \n    Attributes) to Read/Write and Committed.\n\n4.  Return to the caller to re-execute the instruction which triggered \n    the VPF.\n\n"
  },
  {
    "path": "dpmi/VERSION.TXT",
    "content": "Version History for DPMIONE\n---------------------------\n\n0.91 -- 22 April 2004\n    * Fix bugs when loading as device driver.\n    * Provide partial DOS translation services for Virtual DMA\n      Services (VDS -- INT 4Bh).\n\n0.90 -- 9 February 2004\n    * Overcome bug in MS 16-bit linker (5.31) where their GP Fault\n      handler mistakenly assumes that the incoming LPM stack is\n      16-bit even though they are a 32-bit client.\n    * Implement FORCELPM16 in DPMI.PRO in case there are other apps\n      with the same bug.\n\n0.89 -- 8 July 2003\n    * Fix bug where if in VM, but no VCPI host name match, program\n      mistakenly tries to enter PM as if in RM.\n\n0.88 -- 4 June 2003\n    * Workaround bug in WinME where it has effectively disabled\n      INT 15h/AH=87h (Move Extended Memory BIOS function).\n    * Fix obscure bug related to marking a PDE as uncommitted.\n    * Implement SHAREDMEM=nnn in DPMI.PRO.\n\n0.87--26 May 2003\n    * Remove debugging code which, were it encountered, would cause\n      the system to reboot.\n\n0.86 -- 17 May 2003\n    * Fix bug in DPMI function 505h (Resize Linear Memory Block) when\n      used on Expand Down segments.\n    * Increase size of TSR space to accommodate larger resident size\n      of DPMI.LOD.\n    * Fix bug in stack alignment when LPM stack selector pushed.\n\n0.85 -- 14 May 2003\n    * Initial release to public as beta.\n\n\u001a"
  },
  {
    "path": "dpmic.asm",
    "content": "FORMAT MZ\nHEAP 0\n\n\nsegment DATA16\nUSE16\n\n\n; main\nsegment CODE16\nUSE16\n\nerror:\n\nmov ax,0x4C00\nint 0x21\n\n\tmodesw\tdd\t0\n\nstart16:\n\n\t; A raw (not DOS32A) DPMI client\n\t\t\t\t\n\tmov\tax,1687h\t\t; get address of DPMI host's\n\tint\t2fh\n\tor\tax,ax\t\t\t; exit if no DPMI host\n\tjnz\terror\n\tmov\tword [modesw],di\n\tmov\tword [modesw+2],es\n\tor\tsi,si\t\t\t; check private data area size\n\tjz .l1\t\t     \t; jump if no private data area\n\n\tmov\tbx,si\t\t\t; allocate DPMI private area\n\tmov\tah,48h\t\t\t; allocate memory\n\tint\t21h\t\t\t    ; transfer to DOS\n\tjc error\t\t\t; jump, allocation failed\n\tmov\tes,ax\t\t\t; let ES=segment of data area\n\n.l1:\nxchg bx,bx\n\tmov\tax,0\t\t\t; bit 0=0 indicates 16-bit app\n\tcall [modesw]\t\t\t; switch to protected mode\n\txchg bx,bx\n\tjc error\t\t\t; jump if mode switch failed\n\t\t\t\t\t\t; else we're in prot. mode now\n\tnop\n\n\tmov ax,0x4C00\n\tint 0x21\n\nSEGMENT ENDS \nentry CODE16:start16\n\n\n"
  },
  {
    "path": "entry.asm",
    "content": "FORMAT MZ\nHEAP 0\n\nINCLUDE 'config.asm'\nINCLUDE 'struct.asm'\nINCLUDE 'data16.asm'\nINCLUDE 'guest32.asm'\nINCLUDE 'data32.asm'\nINCLUDE 'data64.asm'\nINCLUDE 'stack16.asm'\nINCLUDE 'stack32.asm'\nINCLUDE 'stack64.asm'\nINCLUDE 'guest16.asm' \nINCLUDE 'code16.asm' \nINCLUDE 'a20.asm'\nINCLUDE 'idt.asm'\nINCLUDE 'gdt.asm'\nINCLUDE 'code32.asm'\nINCLUDE 'code64.asm'\n\nSEGMENT ENDS \n\nentry CODE16:start16\n\n "
  },
  {
    "path": "gdt.asm",
    "content": "; --------------------------------------- GDT routines ---------------------------------------\nUSE16\n\nmacro gdt_initialize a_seg,a_desc\n{\n    xor eax,eax\n\tmov ax,a_seg\n\tshl eax,4\n\tmov [a_desc + 2],ax\n    shr eax,8\n    mov [a_desc + 4],ah \n}\n\nmacro gdt_initialize64 a_seg,a_desc\n{\n    xor eax,eax\n\tmov [a_desc + 2],ax\n    mov [a_desc + 4],ah \n}\n\nGDTInit:\n\t\n\t; 16-32 segments\n\tgdt_initialize CODE32,code32_descriptor\n\tgdt_initialize DATA32,data32_descriptor\n\tgdt_initialize STACK32,stack32_descriptor\n\tgdt_initialize CODE16,code16_descriptor\n\tgdt_initialize DATA16,data16_descriptor\n\tgdt_initialize STACK16,stack16_descriptor\n\tgdt_initialize 0,raw32_descriptor\n\n    ; Paging segment, we 've found it already\t\n\txor eax,eax\n    mov [ds:page32_descriptor.b0_15],ax\n    mov [ds:page32_descriptor.b16_23],ah\n\txor eax,eax\n    mov [ds:page64_descriptor.b0_15],ax\n    mov [ds:page64_descriptor.b16_23],ah\n\n\n\t; 64 segments\n\tgdt_initialize64 CODE64,code64_descriptor\n\tgdt_initialize64 DATA64,data64_descriptor\n\n\n\t; and the LDT\n\txor eax,eax\n\tmov ax,DATA32\n\tshl eax,4           \n\tadd eax,ldt_start\n\tmov [ds:ldt_descriptor.b0_15],ax\n\tshr eax,8\n\tmov [ds:ldt_descriptor.b16_23],ah\n \n\t; Set gdt ptr\n\txor eax,eax\n\tmov ax,DATA16       \n\tshl eax,4\n\tadd ax,dummy_descriptor\n\tmov [gdt_ptr],eax\n\nRETF"
  },
  {
    "path": "guest16.asm",
    "content": "SEGMENT VMX16 USE16\n\n\n\n; VMX Entry for our Virtual Machine\n; This is a Real Mode segment\n\n; Note that since the memory is see through, BIOS and DOS interrupts work here!\n\nStartVM:\n\n; Remember we used a protected mode selector to get here?\n; Jump to a real mode segment now so CS gets a proper value\n\n\nnop\nnop\n\ndb 0eah\ndw PM_VM_Entry,VMX16\nPM_VM_Entry:\n\nmov ax,DATA16\nmov ds,ax\nmov [vmt3],1\n\nvmcall ; Forces exit\n\n\n\n"
  },
  {
    "path": "guest32.asm",
    "content": "SEGMENT VMX32 USE32\n\n; VMX Entry for our Virtual Machine\n; This is a Protected Mode segment\n\nStartVM2: ; This is a protected mode start - 32 bit so registers are already loaded\n\nmov ax,data16_idx\nmov ds,ax\nmov byte [ds:vmt2],0x1\nvmcall ; Forces exit\n\n\n\n\n\n\n"
  },
  {
    "path": "guest64.asm",
    "content": "\n; VMX Entry for our Virtual Machine\n; This is a Protected Mode segment\n\nStartVM3: ; This is a protected mode start - 32 bit so registers are already loaded\n\nxchg bx,bx\nvmcall ; Forces exit\n"
  },
  {
    "path": "himem16.asm",
    "content": "\nhimaddrx:\nhimaddr dd 0\n\nhimemthere:\n\nmov ax,0x4300\nint 0x2F\ncmp al,0x80\njz .hi\n\nret\n.hi:\n\nmov ax,0x4310\nint 0x2F\nmov word [cs:himaddrx + 2],es\nmov word [cs:himaddrx],bx\n\nmov al,0x80\nret\n\nallochigh: ; EDX = bytes, return ECX = handle, EDI = linear\n\nxor ecx,ecx\ncmp [cs:himaddr],0\njnz .useh\n\n.noh:\nmov ecx,0\nmov edi,0\nret\n\n.useh:\n\nmov ax,0x0900\nshr edx,10\ncall far [cs:himaddr]\ncmp dx,0\njz .noh\n\nmov ax,0x0C00\nmov cx,dx\nxor edx,edx\nxor ebx,ebx\nmov dx,cx\ncall far [cs:himaddr]\ncmp ax,1\njz .okh\n\nmov ax,0x0A00\nmov dx,cx\ncall far [cs:himaddr]\njmp .noh\n\n.okh:\nxor edi,edi\nmov di,dx\nshl edi,16\nadd edi,ebx\n\n\nret\n\nfreehigh: ; DX = handle\n\ncmp dx,0\njz .noh\n\ncmp [cs:himaddr],0\njnz .useh\n\n.noh:\n\nret\n\n.useh:\n\nmov ax,0x0D00\ncall far [cs:himaddr]\n\nmov ax,0x0A00\ncall far [cs:himaddr]\n\nret"
  },
  {
    "path": "idt.asm",
    "content": "; --------------------------------------- IDT routines ---------------------------------------\nUSE16\nIDTInit2:\n\n ; Base for intr00 -> All vectors point to this, except f0\n xor edx,edx\n mov dx,CODE32\n shl edx,4\n add edx,intr00 ; EDX now contains physical address for handler\n\n\n \n mov cx,255\n xor esi,esi\n mov si,interruptsall\n Loop1a:\n \n ; \n push edx\n cmp cx, 15\n jnz .nof0\n linear edx,int32,CODE32\n  .nof0:\n mov edi,esi\n mov eax,edx\n mov word [edi],ax ; lower\n add edi,2\n mov word [edi],code32_idx ; sel\n add edi,2\n mov byte [edi],0\n add edi,1\n mov byte [edi],08Eh; \n add edi,1\n mov eax,edx\n shr eax,16\n mov word [edi],ax ; upper\n \n pop edx\n \n \n jcxz EndLoop1a\n dec cx\n add esi,8\n jmp Loop1a\n EndLoop1a:\n \n \n  ; Set idt ptr\n  xor eax,eax\n  mov     ax,DATA16\n  shl     eax,4\n  add     ax,interruptsall\n  mov     [idt_PM_ptr],eax\n\n \n\nretf\n \n\n\n IDTInit:\n\n  push es\n\n  mov ax,DATA16\n  mov es,ax\n\n  ; 00h\n  mov ecx,255\n  xor edi,edi\n  mov di,interruptsall\n  \n  .Loop1:\n  \n  mov bp,8\n  mov ax,cx\n  mul bp\n  mov bp,ax\n  \n  xor eax,eax\n\n\n  cmp cx, 0x0F\n  jz .yf0\n  cmp cx, 0xDE\n  jz .y21\n\n  add eax,intr00\n  jmp .ef\n\n  .y21:\n  add eax,int32_21\n  jmp .ef\n\n  .yf0:\n  add eax,int32\n  jmp .ef\n\n  .ef:\n  mov [di],ax\n  shr eax,16\n  mov [di + 6],ax\n  mov ax,code32_idx\n  mov [di + 2],ax\n  xor ah,ah\n  mov [di + 4],ah\n  mov ah,08eh\n  mov [di + 5],ah; 10001110 selector\n  \n  add di,8\n \n  jcxz .EndLoop1\n\n  dec cx\n  jmp .Loop1\n  .EndLoop1:\n  \n\n\t; Set idt ptr\n\txor eax,eax\n\tmov     ax,DATA16\n\tshl     eax,4\n\tadd     ax,interruptsall\n\tmov     [idt_PM_ptr],eax\n\n\tpop es\n  RETF\n\n\n\n  \n\n IDTInit64:\n\n  push es\n\n  mov ax,DATA16\n  mov es,ax\n\n  ; 00h\n  mov ecx,0\n  xor edi,edi\n  mov di,interruptsall64\n  \n  .Loop1:\n\n  cmp ecx,0x100\n  jz .End\n\n  linear eax,intr6400,CODE64\n  \n  cmp ecx,0xF0\n  jz .yf0\n  cmp ecx,0x21\n  jz .y21\n\n  jmp .ef0\n\n  .yf0:\n  linear eax,int64,CODE64\n  jmp .ef0\n\n  .y21:\n  linear eax,int64_21,CODE64\n  jmp .ef0\n\n  .ef0:\n\n  ; 0(2) - Low bits offset\n  mov word [di],ax\n  ; 2(2) - Selector\n  mov word [di + 2],code64_idx\n  ; 4(1) - zero\n  mov byte [di + 4],0\n  ; 5(1) - Type + Attributes\n  mov byte [di + 5],0x8E\n  ; 6(2) - Middle offset\n  mov edx,eax\n  shr edx,16\n  mov word [di + 6],dx\n  ; 8(4) High bits\n  mov dword [di + 8],0\n  ; 12(4) zero\n  mov dword [di + 12],0\n\n\n  add di,16\n  inc ecx\n  jmp .Loop1\n\n  \n  .End:\n\n  ; Set idt ptr\n  linear eax,interruptsall64\n  mov     dword [idt_LM_ptr],eax\n  mov     dword [idt_LM_ptr + 4],0\n  \n  pop es\n  RETF\n\n"
  },
  {
    "path": "int16.asm",
    "content": "; --------------------------------------- int 0xF0 real ---------------------------------------\n\nc16o dw 0\nc16s dw 0\nc16sts dw 0\nc16sto dw 0\n\ninclude 'directlong.asm'\n\nThread16C:\n\n\tthread16header STACK16T1,stack16t1_end\n\n\tmov ax,CODE16\n\tmov ds,ax\n\tmov ax,[c16sts]\n\tmov ss,ax\n\tmov ax,[c16sto]\n\tmov sp,ax\n\n    mov ax,0x25F0\n\tmov dx,int16\n\tint 0x21\n\t\n\n\tmov ax,CODE16\n\tmov ds,ax\n\tcall far dword [c16o]\n\tcli\n\thlt\n\thlt\n\n\nThread32P:\t\n\tmov     ax,page32_idx          \n\tmov     ss,ax  \n\t; mov esp,xxxxxxxx\n\tdb 0x66\n\tdb 0xBC\n\tc32st dd 0 \n\n\tmov ax,code16_idx\n\tmov ds,ax\n\tdb  066h  \n\tdb  09ah \n\tc32 dd  0\n\tdw  vmx32_idx\n    cli\n\thlt\n\thlt\n\n\n\nUSE64\n\nThread64P:\t\n\t; mov rsp,xxxxxxxx\n\t;mov rsp,0x0000000012345678\n\tdb 0x48\n\tdb 0xC7\n\tdb 0xC4\n\tc64st dd 0 \n\n\tlinear rax,idt_LM_start\n\tlidt [rax]\n\tmov ax,page64_idx\n\tmov ss,ax\n\n\tlinear rax,retx,CODE16\n\tpush rax; for returning\n\n\tdb 0x68; push\n\tc64 dd 0 \n\tret\n\tretx:\n\tcli\n\thlt\n\thlt\n\ncv64vmode db 0 \ncv64vmode2 dw 0 \n\n\nThread64PV:\t\n\t; mov rsp,xxxxxxxx\n\t;mov rsp,0x0000000012345678\n\tdb 0x48\n\tdb 0xC7\n\tdb 0xC4\n\tcv64st dd 0 \n\n\tlinear rax,idt_LM_start\n\tlidt [rax]\n\tmov ax,page64_idx\n\tmov ss,ax\n\tmov ds,ax\n\tmov es,ax\n\n; ---- VMX\n\n\t; Existence test\n\tlinear rbx,vmt1,DATA16\n\tmov byte [rbx],0\n\n\t; VMX Preparation\n\tlinear rbx,vmt1,DATA16\n\tmov byte [rbx],1\n\n\t; VMX_Init\n\tlinear rax,vvr1,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxinitstructures dd 0 \n\tret\n\tvvr1:\n\n\t; VMX_Enable\n\tlinear rax,vvr2,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxenable dd 0 \n\tret\n\tvvr2:\n\n\t; Load the revision\n\tlinear rdi,VMXRevision,VMXDATA64\n\tmov ebx,[rdi];\n\n\t; Initialize the region\n\tlinear rdi,VMXStructureData2,VMXDATA64\n\tmov rcx,[rdi];  Get address of data1\n\tmov rsi,rdi\n\tmov rdi,rcx\n\tmov [rdi],ebx ; // Put the revision\n\tVMCLEAR [rsi]\n\tmov [rdi],ebx ; // Put the revision\n\tVMPTRLD [rsi] \n\tmov [rdi],ebx ; // Put the revision\n\n\t; EPT init\n\tlinear rax,vvr7,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxinitept dd 0 \n\tret\n\tvvr7:\n\n\tlinear rax,cv64vmode,CODE16\n\tmov al,[rax]\n\tcmp al,1\n\tjz cPM\n\t\n\t; Controls init ur\n\txor rdx,rdx\n\tbts rdx,1\n\tbts rdx,7\n\tlinear rax,vvr6,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxinitcontrols1 dd 0 \n\tret\n\n\tcPM:\n\n\t; pm init controls\n\tmov rdx,0x49\n\tlinear rax,vvr6,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxinitcontrols2 dd 0 \n\tret\n\n\tvvr6:\n\n\t; Host Init\n\tpush gs\n\tpush fs\n\tlinear rcx,vretxx,CODE16\n\tlinear rax,vvr4,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxinithost dd 0 \n\tret\n\tvvr4:\n\tpop fs\n\tpop gs\n\n\t; Guest Init\n\tmov r8,raw32_idx\n\tmov r9,0\n\n\tlinear rax,cv64vmode,CODE16\n\tmov al,[rax]\n\tcmp al,1\n\tjz uPM\n\n\t; UR\n\tmov r10,vmentryx\n\tmov r9,CODE16\n\tlinear rax,vvr5,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxinitguest1 dd 0 \n\tret\n\n\tuPM:\n\t; PM\n\tlinear r10,vmentry,CODE16\n\tlinear rax,vvr5,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxinitguest2 dd 0 \n\tret\n\t\n\tvvr5:\n\n\t; The EPT initialization for the guest\n\tlinear rax,PhysicalEptOffset64,DATA16\n\tmov rax,[rax]\n\tor rax,0 ; Memory Type 0\n\tor rax,0x18 ; Page Walk Length 3\n\tmov rbx,0x201A ; EPTP\n\tvmwrite rbx,rax\n \n\t; The Link Pointer -1 initialization\n\tmov rax,0xFFFFFFFFFFFFFFFF\n\tmov rbx,0x2800 ; LP\n\tvmwrite rbx,rax\n \n\t; One more RSP initialization of the host\n\txor rax,rax\n\tmov rbx,0x6c14 ; RSP\n\tmov rax,rsp\n\tvmwrite rbx,rax\n\n\tVMLAUNCH\n\tjmp vretxx\n\n\t; Virtual Machine Here, Protected mode\nUSE32\n\tvmentry:\n\n\t; set the stack\n\tmov ax,page32_idx\n\tmov ss,ax\n\n\t; set the IDT\n\tlinear ebx,idt_PM_start,DATA16\n\tlidt [ebx]\n\n\t; mov esp,xxxxxxxx\n\tdb 0xBC\n\tcv64vst1 dd 0 \n\n\t; call the address\n\tdb  09ah \n\tcv64 dd  0\n\tdw  vmx32_idx\n\tVMCALL \n\n\t; Virtual Machine Here, Unrestricted  mode\nUSE16\n\tcv64vst0 dd 0 \n\tvmentryx:\n\n\tmov ax,DATA16\n\tmov ds,ax\n\n\t; set the IDT\n\tmov ebx,idt_RM_start\n\tlidt [ebx]\n\n\t; set the stack\n\tmov eax,[cs:cv64vst0]\n\tmov ss,ax\n\tshr eax,16\n\tmov sp,ax\n\n\t; Check submode\n\tmov ax,[cs:cv64vmode2]\n\tcmp ax,0\n\tje UR_Mode_0\n\tcmp ax,1\n\tje UR_Mode_1_P\n\tcmp ax,2\n\tje UR_Mode_2_P\n\n\tVMCALL; Nothing else supported atm\n\n\n; ------------ Long Submode\nUR_Mode_2:\nUSE64\nxchg bx,bx\nvmcall\n\nUSE16\nUR_Mode_2_P:\n\t; Restore CS (remember it is loaded with a protected mode selector)\n\tdb 0eah\n\tdw PM_VM_Entry4,CODE16\n\tPM_VM_Entry4:\n\tthread64header 1\n\tdb 066h\n\tdb 0eah\n\tThread64Ptr1V dd 0\n\tdw code64_idx\n; ------------ \n\n\n; ------------ Protected Submode\nUR_Mode_1:\nUSE16\n\tmov     ax,page32_idx          \n\tmov     ss,ax  \n\t; mov esp,xxxxxxxx\n\tdb 0x66\n\tdb 0xBC\n\tc32stV dd 0 \n\tmov ax,code16_idx\n\tmov ds,ax\n\tdb  066h  \n\tdb  09ah \n\tc32V dd  0\n\tdw  vmx32_idx\n\tvmcall\n\nUSE16\nUR_Mode_1_P: ; Protected Mode from Unrestricted guest\n\t; Restore CS (remember it is loaded with a protected mode selector)\n\tdb 0eah\n\tdw PM_VM_Entry3,CODE16\n\tPM_VM_Entry3:\n\tEnterProtected UR_Mode_1,code16_idx\n; ------------ \n\n\n; ------------ Real Submode Mode \nUR_Mode_0:\n\t; call the address\n\tdb  09ah \n\tcv64u dd  0\n\tVMCALL \n; ------------ \n\n\n \n\nUSE64\n\tvretxx:\n\n\t; VMX_Disable\n\tlinear rax,vvr3,CODE16\n\tpush rax; for returning\n\tdb 0x68; push\n\tcv64_vmxdisable dd 0 \n\tret\n\tvvr3:\n\n\tcli\n\thlt\n\thlt\n\n\n\n\nUSE16\nThread32C:\n\tthread16header STACK16T1,stack16t1_end\n\tEnterProtected Thread32P,code16_idx\nThread64C:\n\tthread64header\n\tdb 066h\n\tdb 0eah\n\tThread64Ptr1 dd 0\n\tdw code64_idx\nThread64CV:\n\tthread64header\n\tdb 066h\n\tdb 0eah\n\tThread64Ptr4 dd 0\n\tdw code64_idx\n\n\n\nint16:\n\n\tjmp .ibegin\n\tdb 'dmmi'\n\tdb 10 dup(0x90)\n\t.ibegin:\n\t; AX 0, find interface\n\tcmp ax,0\n\tjnz .n0\n\n\n\t\tdh_virtualization;\n\t\tpush ds\n\t\tmov ax,DATA16\n\t\tmov ds,ax\n\t\tmov dl,[numcpus]\n\t\tpop ds\n\t\tmov ax,0xFACE\n\tIRET\n.n0:\n\n\t; AH 1, begin thead\n\tcmp ah,1\n\tjnz .n1\n\n\t\tcmp al,0\n\t\tjnz .n10\n\t\t\t; BL = CPU\n\t\t\t; AL = 0 = Unreal mode thread\n\t\t\t; ES:DX = Run address\n\t\t\t; GS:CX = Stack\n\n\t\t\tand ebx,0xFF\n\t\t\tmov ax,CODE16\n\t\t\tmov ds,ax\n\t\t\tmov [c16s],es\n\t\t\tmov [c16o],dx\n\t\t\tmov [c16sts],gs\n\t\t\tmov [c16sto],cx\n\t\t\tlinear eax,Thread16C,CODE16\n\t\t\tcall far CODE16:SendSIPIf\n\t\t\tIRET\n\t\t.n10:\n\n\t\tcmp al,1\n\t\tjnz .n11\n\t\t\t; BL = CPU\n\t\t\t; AL = 1 = Protected mode thread\n\t\t\t; EDX = Linear Address\n\t\t\t; ECX = Linear Stack\n\n\t\t\tand ebx,0xFF\n\t\t\tmov ax,CODE16\n\t\t\tmov ds,ax\n\t\t\tmov [c32],edx\n\t\t\tmov [c32st],ecx\n\t\t\tlinear eax,Thread32C,CODE16\n\t\t\tcall far CODE16:SendSIPIf\n\t\t\tIRET\n\t\t.n11:\n\n\t\tcmp al,2\n\t\tjnz .n12\n\t\t\t; BL = CPU\n\t\t\t; AL = 2 = Long mode thread\n\t\t\t; EDX = Linear Address\n\t\t\t; ECX = Linear Stack\n\n\t\t\tand ebx,0xFF\n\t\t\tmov ax,CODE16\n\t\t\tmov ds,ax\n\t\t\tmov [c64],edx\n\t\t\tmov [c64st],ecx\n\t\t\tlinear eax,Thread64C,CODE16\n\t\t\tcall far CODE16:SendSIPIf\n\t\t\tIRET\n\t\t.n12:\n\n\t\tcmp al,3\n\t\tjnz .n13\n\t\t\t; BL = CPU\n\t\t\t; AL = 3 = Virtualized Thread\n\t\t\t; BH = mode (1 PM mode,0 UG mode)\n\t\t\t; SI = submode (0 Unreal mode)\n\t\t\t; EDX = Linear Address (or seg:ofs if submode 0)\n\t\t\t; ECX = Linear Stack \n\t\t\t; EDI = Virtualized Linear Stack (or seg:ofs if submode 0)\n\n\t\t\t; Test existence\n\t\t\tpush eax\n\t\t\tpush ebx\n\t\t\tpush ecx\n\t\t\tpush edx\n\t\t\tmov eax,1\n\t\t\tcpuid\n\t\t\tbt ecx,5\n\t\t\tpop edx\n\t\t\tpop ecx\n\t\t\tpop ebx\n\t\t\tpop eax\n\t\t\tJC .okvm\n\t\t\tiret; duh\n\t\t\t.okvm:\n\n\t\t\tmov ax,CODE16\n\t\t\tmov ds,ax\n\t\t\tmov [cv64u],edx\n\t\t\tmov [cv64],edx\n\t\t\tmov [cv64st],ecx\n\t\t\tmov [c32V],edx\n\t\t\tmov [c32stV],ecx\n\t\t\tmov [cv64vst0],edi\n\t\t\tmov [cv64vst1],edi\n\t\t\tmov [cv64vmode],bh\n\t\t\tmov [cv64vmode2],si\n\t\t\tand ebx,0xFF\n\t\t\tlinear eax,Thread64CV,CODE16\n\t\t\tcall far CODE16:SendSIPIf\n\t\t\tIRET\n\t\t.n13:\n\n\tIRET\n\n\n.n1:\n\n\n\n\t; AH 5, mutex functions\n\tcmp ah,5\n\tjnz .n5\n\n\t\t; Initialize mutex\n\t\tcmp al,0\n\t\tjnz .n50\n\t\t\tmov byte [es:di],0xFF\n\t\tiret\n\t\t.n50:\n\n\t\t; lock mutex\n\t\tcmp al,2\n\t\tjnz .n52\n\t\t\tdec byte [es:di]\n\t\tiret\n\t\t.n52:\n\n\t\t; unlock mutex\n\t\tcmp al,3\n\t\tjnz .n53\n\t\t\tcmp byte [es:di],0xFF\n\t\t\tjz .okl\n\t\t\t\tinc byte [es:di]\n\t\t\t.okl:\n\t\tiret\n\t\t.n53:\n\n\t\t; wait mutex\n\t\tcmp al,4\n\t\tjnz .n54\n\t\t\t\n\t\t\t.Loop1:\t\t\n\t\t\tCMP byte [es:di],0xff\n\t\t\tJZ .OutLoop1\n\t\t\tpause \n\t\t\tJMP .Loop1\n\t\t\t.OutLoop1:\n\n\t\tiret\n\t\t.n54:\n\n\tIRET\n\n\n.n5:\n\n\t; AH 4, call real mode interrupt\n\t; AL = INT NUM\n\t; BP = AX VALUE\n\t; CX,DX,SI,DI = Normal values\n\t; Upper ESI,EDI => DS and ES\n\tcmp ah,4\n\tjnz nr4\n\n\tpush ds\n\tpush es\n\tpush ax\n\n\t; Mutex Lock\n\tmov ax,mut_i21\n\tcall far CODE16:qwaitlock16\n\t\n\tpush esi\n\tshr esi,16\n\tmov ds,si\n\tpop esi\n\n\tpush edi\n\tshr edi,16\n\tmov es,di\n\tpop edi\n\t\n\t; Interrupt put\n\tpop ax\n\tmov [cs:inttr],al\n\tpush ax\n\n\tcmp al,0\n\tjz skip1\n\tmov ax,bp\n\tdb 0xCD\n\tinttr db 0\n\tskip1:\n\n\tpop ax\n\tpop es\n\tpop ds\n\n\t; Unlock\n\tqunlock16 mut_i21\n\tiret\nnr4:\n\n\n\t; AX 9, switch to mode\n\tcmp ah,9\n\tjnz n9\n\n\t\t; AL 0, unreal\n\t\tcmp al,0\n\t\tjnz .n90\n\n\t\t\tpush cs\n\t\t\tcli\n\t\t\tcall EnterUnreal\n\t\t\tsti\n\t\t\tIRET\n\t\t.n90:\n\t\t; AL 1, protected\n\t\tcmp al,1\n\t\tjnz n91\n\n\t\t    mov [cs:n91aa],ecx\n\t\t\tmov ax,DATA16\n\t\t\tmov ds,ax\n\t\t\tmov bx,gdt_start\n\t\t\tlgdt [bx]\n\t\t\tmov bx,idt_PM_start\n\t\t\tlidt [bx]\n\t\t\tmov eax,cr0\n\t\t\tor al,1\n\t\t\tmov cr0,eax \n\t\t\tmov ax,page32_idx\n\t\t\tmov gs,ax\n\n\t\t\tdb  066h  \n\t\t\tdb  0eah \n\t\t\tn91aa dd  0\n\t\t\tdw  vmx32_idx\n\n\n\n\t\tn91:\n\t\t; AL 2, long\n\t\t; ECX = linear address\n\t\tcmp al,2\n\t\tjnz n92\n\n\t\t\tmov [cs:Thread64F9],ecx\n\n\t\t\tthread64header\n\n\n\t\t\tmov ax,page64_idx\n\t\t\tmov ss,ax\n\t\t\tmov es,ax\n\t\t\tmov ds,ax\n\t\t\tlinear eax,idt_LM_start\n\t\t\tdb 066h\n\t\t\tdb 0eah\n\t\t\tThread64F9 dd 0\n\t\t\tdw code64_idx\n\n\n\t\t\tIRET\n\t\tn92:\n\n\tIRET\nn9:\n\n\n\n\n\t; AX 0x1401 Helper for DISM to take dissassembly\n\tcmp ax,0x1401\n\tjnz n1401\n\n\t\t; Input CX:DX output of what we had\n\t\t; BX # of bytes dissassembled\n\t\t;break\n\t\tcmp cx,0\n\t\tjz .nxx\n\t\tcmp dx,0\n\t\tjz .nxx\n\n\t\tpush ds\n\t\tpush es\n\t\tpush si\n\t\tpush di\n\n\t\tmov ax,cx\n\t\tmov ds,ax\n\t\tmov si,dx\n\t\tmov ax,DATA16\n\t\tmov es,ax\n\t\tmov di,dismdata2\n\n\n\t\tmov [es:dismdatac],ebx\n\n\t\t.rlp:\n\t\tmov al,[ds:si]\n\t\tmov [es:di],al\n\t\tcmp al,0\n\t\tjz .ee\n\t\tinc si\n\t\tinc di\n\t\tjmp .rlp\n\n\t\t.ee:\n\n\n\t\tpop di\n\t\tpop si\n\t\tpop es\n\t\tpop ds\n\n\n\t\tIRET\n\n\t\t.nxx:\n\t\t; Return DS:SI the 100 byte buffer\n\t\tmov si,DATA16\n\t\tmov ds,si\n\n\t\txor esi,esi\n\t\tmov si,dismdatac\n\t\tshl esi,16\n\t\tMOV si,dismdata2\n\n\t\t\n\n\t;\tmov byte [ds:si],16\n;\t\tmov byte [ds:si + 1],2\n;\t\tmov byte [ds:si + 2],0x90\n;\t\tmov byte [ds:si + 3],0x90\n\t\tIRET\n\nn1401:\n\nIRET\n\nTempBackRM:\n\n\n\tmov     eax,cr0         \n\tand     al,not 1        \n\tand eax,7FFFFFFFh; Set PE=0\n\tmov     cr0,eax         \n\tdb      0eah\n\tdw      .flush_ipq,CODE16\n\t.flush_ipq:\n\tmov     ax,STACK16 \n\tmov     ss,ax\n\txor esp,esp\n\tmov     sp,stack16dmmi2_end\n\tmov ax, DATA16\n\tmov     ds,ax\n\tmov     es,ax\n\tmov     di,idt_RM_start\n\tlidt    [di]\n\tsti\n\n\t; execute the interrupt\n\tmov ax,DATA32\n\tmov ds,ax\n\tmov bp,word [From32To16Regs]\n\tmov bx,word [From32To16Regs + 2]\n\tmov cx,word [From32To16Regs + 4]\n\tmov dx,word [From32To16Regs + 6]\n\tmov si,word [From32To16Regs + 8]\n\tmov di,word [From32To16Regs + 10]\n\tmov ax, word [From32To16Regs + 12]\n\tmov gs,ax ; later DS\n\tmov ax, word [From32To16Regs + 14]\n\tmov fs,ax ; later ES\n\tmov al, byte [From32To16Regs + 16]\n\tmov [cs:inttt],al\n\tcmp al,0\n\tjz skip2\n\tpush bp\n\tpop ax\n\tpush gs\n\tpop ds\n\tpush fs\n\tpop es\n\n\tdb 0xCD\n\tinttt db 0\n\tskip2:\n\n\t; And again protected\n\t; macro EnterProtected ofs32 = Start32,codeseg = code32_idx,noinits = 0\n\tEnterProtected  i4BackFromRM,code32_idx\n\n\n\nTempBackLM:\n\n\tmov     eax,cr0         \n\tand     al,not 1        \n\tand eax,7FFFFFFFh; Set PE=0\n\tmov     cr0,eax         \n\tdb      0eah\n\tdw      .flush_ipq,CODE16\n\t.flush_ipq:\n\tmov     ax,STACK16 \n\tmov     ss,ax\n\tmov     sp,stack16dmmi2_end\n\tmov ax, DATA16\n\tmov     ds,ax\n\tmov     es,ax\n\tmov     di,idt_RM_start\n\tlidt    [di]\n\n\tpush cs\n\tcall EnterUnreal\n\n\n\t; execute the interrupt\n\tmov ax,STACK16S \n\tmov ss,ax\n\txor esp,esp\n\tmov esp,stack16dmmi2_end\n\tmov ax,DATA64\n\tmov ds,ax\n\tmov bp,word [From64To16Regs]\n\tmov bx,word [From64To16Regs + 2]\n\tmov cx,word [From64To16Regs + 4]\n\tmov dx,word [From64To16Regs + 6]\n\tmov si,word [From64To16Regs + 8]\n\tmov di,word [From64To16Regs + 10]\n\tmov ax, word [From64To16Regs + 12]\n\tmov gs,ax ; later DS\n\tmov ax, word [From64To16Regs + 14]\n\tmov fs,ax ; later ES\n\tmov al, byte [From64To16Regs + 16]\n\tmov [cs:inttt2],al\n\tcmp al,0\n\tjz skip3\n\tpush bp\n\tpop ax\n\tpush gs\n\tpop ds\n\tpush fs\n\tpop es\n\n\tdb 0xCD\n\tinttt2 db 0\n\tskip3:\n\n\t; and again long mode\n\tthread64header\n\tdb 066h\n\tdb 0eah\n\tThread64Ptr3 dd 0\n\tdw code64_idx\n\n\nTempBackLMnnn0:\n\n\tmov     eax,cr0         \n\tand     al,not 1        \n\tand eax,7FFFFFFFh; Set PE=0\n\tmov     cr0,eax         \n\tdb      0eah\n\tdw      .flush_ipq,CODE16\n\t.flush_ipq:\n\tmov ax, DATA16\n\tmov     ds,ax\n\tmov     es,ax\n\tmov     di,idt_RM_start\n\tlidt    [di]\n\n\t; jmp 0x1234:0x5678\n\tdb 0xEA\n\tsegnnn0 dw 0\n\tofsnnn0 dw 0\n\n\n"
  },
  {
    "path": "int32.asm",
    "content": "; --------------------------------------- int 0xF0 protected ---------------------------------------\n\nint32_21:\n\n\tmov bp,ax\n\tmov ax,0x0421\n\t  \nint32:\n\n\n\tjmp .ibegin\n\tdb 'dmmi'\n\t.ibegin:\n\t; AX 0, find interface\n\tcmp ax,0\n\tjnz .n0\n\n\t\tdh_virtualization;\n\t\tpush ds\n\t\tmov ax,data16_idx\n\t\tmov ds,ax\n\t\tmov dl,[numcpus]\n\t\tpop ds\n\t\tmov ax,0xFACE\n\tIRETD\n.n0:\n\n\n\t; AH 4, call real mode interrupt\n\t; AL = INT NUM\n\t; BP = AX VALUE\n\t; CX,DX,SI,DI = Normal values\n\t; Upper ESI,EDI => DS and ES\n\tcmp ah,4\n\tjnz nn4\n\n\tpush ds\n\tpush eax\n\n\tmov ax,data32_idx\n\tmov ds,ax\n\n\t; Mutex Lock\n\tmov ax,mut_i21\n\tcall far code32_idx:qwaitlock32\n\n\t; Save: AX,BX,CD,DX,SI,DI,DS,ES\n\tmov word [From32To16Regs],bp\n\tmov word [From32To16Regs + 2],bx\n\tmov word [From32To16Regs + 4],cx\n\tmov word [From32To16Regs + 6],dx\n\tmov word [From32To16Regs + 8],si\n\tmov word [From32To16Regs + 10],di\n\tmov eax,esi\n\tshr eax,16\n\tmov word [From32To16Regs + 12],ax\n\tmov eax,edi\n\tshr eax,16\n\tmov word [From32To16Regs + 14],ax\n\tpop eax\n\tmov byte [From32To16Regs + 16],al ; #intr\n\tmov word [From32To16Regs + 18],ss ; save for later\n\tmov dword [From32To16Regs + 20],esp ; save for later\n\n\t; back to real mode\n    db\t\t066h\n\tdb      0eah\n\tdw      TempBackRM\n\tdw\t\tcode16_idx\n\ti4BackFromRM:\n\tmov ax,stack32_idx\n\tmov ss,ax\n\tmov ax,data32_idx\n\tmov ds,ax\n\tmov ax,word [From32To16Regs + 18]\n\tmov ss,ax\n\tmov esp,dword [From32To16Regs + 20]\n\tpop ds\n\n\tqunlock32 mut_i21\n\n\tiretd\nnn4:\n\n\n\t; AH 5, mutex functions\n\tcmp ah,5\n\tjnz .n5\n\n\t\t; Initialize mutex\n\t\tcmp al,0\n\t\tjnz .n50\n\t\t\tpush fs\n\t\t\tmov bx,page32_idx\n\t\t\tmov fs,bx\n\t\t\tmov byte [fs:edi],0xFF\n\t\t\tpop fs\n\t\tiretd\n\t\t.n50:\n\n\t\t; lock mutex\n\t\tcmp al,2\n\t\tjnz .n52\n\t\t\tpush fs\n\t\t\tmov bx,page32_idx\n\t\t\tmov fs,bx\n\t\t\tdec byte [fs:edi]\n\t\t\tpop fs\n\t\tiretd\n\t\t.n52:\n\n\t\t; unlock mutex\n\t\tcmp al,3\n\t\tjnz .n53\n\t\t\tpush fs\n\t\t\tmov bx,page32_idx\n\t\t\tmov fs,bx\n\t\t\tcmp byte [fs:edi],0xFF\n\t\t\tjz .okl\n\t\t\t\tinc byte [fs:edi]\n\t\t\t.okl:\n\t\t\tpop fs\n\t\tiretd\n\t\t.n53:\n\n\t\t; wait mutex\n\t\tcmp al,4\n\t\tjnz .n54\n\t\t\t\n\t\t\tpush fs\n\t\t\tmov bx,page32_idx\n\t\t\tmov fs,bx\n\t\t\t.Loop1:\t\t\n\t\t\tCMP byte [fs:edi],0xff\n\t\t\tJZ .OutLoop1\n\t\t\tpause \n\t\t\tJMP .Loop1\n\t\t\t.OutLoop1:\n\t\t\tpop fs\n\n\t\tiretd\n\t\t.n54:\n\n\tIRETd\n\n\n.n5:\n\n\n\n\t; AX 9, switch to mode\n\tcmp ah,9\n\tjnz nn9\n\t\t; AL 0, unreal\n\t\tcmp al,0\n\t\tjnz .nn90\n\n\t\t\t\t; Back to real mode, ecx = seg:ofs\n\t\t\t\tmov ax,page32_idx\n\t\t\t\tmov ds,ax\n\t\t\t\tlinear eax,ofsnnn0,CODE16\n\t\t\t\tmov word [eax],cx\n\t\t\t\tshr ecx,16\n\t\t\t\tlinear eax,ofsnnn0,CODE16\n\t\t\t\tmov word [eax],cx\n\n\t\t\t\tpush code32_idx\n\t\t\t\tmov ecx,nnn90Back\n\t\t\t\tpush ecx\n\t\t\t\tretf\n\t\t\t\n\t\t\tIRETD\n\t\t.nn90:\n\tIRETD\nnn9:\n\nnop\niretd\n\n\nCompatFromLongIntF0:\n\n; Disable Paging to get out of Long Mode\n\tmov eax, cr0\n\tand eax,7fffffffh \n\tmov cr0, eax\n; Deactivate Long Mode\n\tmov ecx, 0c0000080h\n\trdmsr\n\tbtc eax, 8\n\twrmsr\n; Disable PAE\n\tmov eax, cr4\n\tbtc eax, 5\n\tmov cr4, eax\n\n; Go Real\n    db\t\t066h\n\tdb      0eah\n\tdw      TempBackLM\n\tdw\t\tcode16_idx\n\n\nnnn90Back:\n\n; Disable Paging to get out of Long Mode\n\tmov eax, cr0\n\tand eax,7fffffffh \n\tmov cr0, eax\n; Deactivate Long Mode\n\tmov ecx, 0c0000080h\n\trdmsr\n\tbtc eax, 8\n\twrmsr\n; Disable PAE\n\tmov eax, cr4\n\tbtc eax, 5\n\tmov cr4, eax\n\n; Go Real\n    db\t\t066h\n\tdb      0eah\n\tdw      TempBackLMnnn0\n\tdw\t\tcode16_idx\n"
  },
  {
    "path": "int64.asm",
    "content": "; --------------------------------------- int 0xF0 long ---------------------------------------\n\nint64_21:\n\n\tmov bp,ax\n\tmov ax,0x0421\n\t\n\nint64:\n\n\n\n\tjmp .ibegin\n\tdb 'dmmi'\n\tdb 10 dup(0x90)\n\t.ibegin:\n\t; AX 0, find interface\n\tcmp ax,0\n\tjnz .n0\n\n\t\tdh_virtualization;\n\t\tlinear rax,numcpus,DATA16\n\t\tmov dl,[rax]\n\t\tmov rax,0xFACE\n\tIRETQ\n.n0:\n\n\n\n\t; AH 4, call real mode interrupt\n\t; AL = INT NUM\n\t; BP = AX VALUE\n\t; CX,DX,SI,DI = Normal values\n\t; Upper ESI,EDI => DS and ES\n\n\n\tcmp ah,4\n\tjnz nx4\n\n\tpush rax\n\tlinear r8,From64To16Regs,DATA64\n\n\t; Mutex Lock\n\tmov rax,mut_i21\n\tcall qwaitlock64\n\n\t; Save: AX,BX,CD,DX,SI,DI,DS,ES\n\tmov word [r8],bp\n\tmov word [r8 + 2],bx\n\tmov word [r8 + 4],cx\n\tmov word [r8 + 6],dx\n\tmov word [r8 + 8],si\n\tmov word [r8 + 10],di\n\tmov eax,esi\n\tshr eax,16\n\tmov word [r8 + 12],ax\n\tmov eax,edi\n\tshr eax,16\n\tmov word [r8 + 14],ax\n\tpop rax\n\tmov byte [r8 + 16],al ; #intr\n\tmov word [r8 + 18],ss ; save for later\n\tmov dword [r8 + 20],esp ; save for later\n\n\t; go to compatibility mode\n\tpush code32_idx\n\txor rcx,rcx\n\tmov ecx,CompatFromLongIntF0\n\tpush rcx\n\tretf\n\nUSE64\n\tBackFromExecutingInterruptLM:\n\tlinear rax,idt_LM_start\n\tlidt [rax]\n\tmov ax,page64_idx\n\tmov ss,ax\n\tlinear r8,From64To16Regs,DATA64\n\txor rsp,rsp\n\tmov esp,dword [r8 + 20]   \n\n\tqunlock64 mut_i21\n\n\tiretq\nnx4:\n\n\n\t; AH 5, mutex functions\n\tcmp ah,5\n\tjnz .n5\n\n\t\t; Initialize mutex\n\t\tcmp al,0\n\t\tjnz .n50\n\t\t\tmov byte [rdi],0xFF\n\t\tiretq\n\t\t.n50:\n\n\t\t; lock mutex\n\t\tcmp al,2\n\t\tjnz .n52\n\t\t\tdec byte [rdi]\n\t\tiretq\n\t\t.n52:\n\n\t\t; unlock mutex\n\t\tcmp al,3 \n\t\tjnz .n53\n\t\t\tcmp byte [rdi],0xFF\n\t\t\tjz .okl\n\t\t\t\tinc byte [rdi]\n\t\t\t.okl:\n\t\tiretq\n\t\t.n53:\n\n\t\t; wait mutex\n\t\tcmp al,4\n\t\tjnz .n54\n\t\t\t\n\t\t\t.Loop1:\t\t\n\t\t\tCMP byte [rdi],0xff\n\t\t\tJZ .OutLoop1\n\t\t\tpause \n\t\t\tJMP .Loop1\n\t\t\t.OutLoop1:\n\n\t\tiretq\n\t\t.n54:\n\n\tIRETQ\n\n\n.n5:\n\n\t; AX 0x800, disable VMX\n\tcmp ax,0x800\n\tjnz nnn800\n \t\tcall VMX_Disable\n\n\tIRETQ\nnnn800:\n\n\n\t; AX 0x801, prepare vmx structures\n\tcmp ax,0x801\n\tjnz nnn801\n\t ; r8 host return\n\t ; r9 seg vm\n\t ; r10 ofs vm\n\t\n\t\tcall VMX_Init_Structures\n\t\tcall VMX_Enable\n\t\tcall VMXInit\n\t\tcall VMX_InitializeEPT\n\t\txor rdx,rdx\n\t\tbts rdx,1\n\t\tbts rdx,7\n\t\tcall VMX_Initialize_VMX_Controls\n\t\tmov rcx,r8\n\t\tcall VMX_Initialize_Host\n\t\tcall VMX_Initialize_UnrestrictedGuest\n \t\tcall VMXInit2\n\n\tIRETQ\nnnn801:\n\n\t; AX 9, switch to mode\n\tcmp ah,9\n\tjnz nnn9\n\t\t; AL 0, unreal\n\t\tcmp al,0\n\t\tjnz .nnn90\n\n\t\t\t\tlinear eax,segnnn0,CODE16\n\t\t\t\tmov word [eax],cx\n\t\t\t\tshr ecx,16\n\t\t\t\tlinear eax,ofsnnn0,CODE16\n\t\t\t\tmov word [eax],cx\n\t\t\t\n\t\t\t\t; Back to Compatibility Mode\n\t\t\t\tpush code32_idx\n\t\t\t\txor rcx,rcx\n\t\t\t\tmov ecx,nnn90Back\n\t\t\t\tpush rcx\n\t\t\t\tretf\n\n\t\t\t\n\t\t\tIRETQ\n\t\t.nnn90:\n\tIRETQ\nnnn9:\n\n\n\nIRETQ"
  },
  {
    "path": "iso.ps1",
    "content": "function New-IsoFile\n{  \n  <# .Synopsis Creates a new .iso file .Description The New-IsoFile cmdlet creates a new .iso file containing content from chosen folders .Example New-IsoFile \"c:\\tools\",\"c:Downloads\\utils\" This command creates a .iso file in $env:temp folder (default location) that contains c:\\tools and c:\\downloads\\utils folders. The folders themselves are included at the root of the .iso image. .Example New-IsoFile -FromClipboard -Verbose Before running this command, select and copy (Ctrl-C) files/folders in Explorer first. .Example dir c:\\WinPE | New-IsoFile -Path c:\\temp\\WinPE.iso -BootFile \"${env:ProgramFiles(x86)}\\Windows Kits\\10\\Assessment and Deployment Kit\\Deployment Tools\\amd64\\Oscdimg\\efisys.bin\" -Media DVDPLUSR -Title \"WinPE\" This command creates a bootable .iso file containing the content from c:\\WinPE folder, but the folder itself isn't included. Boot file etfsboot.com can be found in Windows ADK. Refer to IMAPI_MEDIA_PHYSICAL_TYPE enumeration for possible media types: http://msdn.microsoft.com/en-us/library/windows/desktop/aa366217(v=vs.85).aspx .Notes NAME: New-IsoFile AUTHOR: Chris Wu LASTEDIT: 03/23/2016 14:46:50 #> \n   \n  [CmdletBinding(DefaultParameterSetName='Source')]Param( \n    [parameter(Position=1,Mandatory=$true,ValueFromPipeline=$true, ParameterSetName='Source')]$Source,  \n    [parameter(Position=2)][string]$Path = \"$env:temp\\$((Get-Date).ToString('yyyyMMdd-HHmmss.ffff')).iso\",  \n    [ValidateScript({Test-Path -LiteralPath $_ -PathType Leaf})][string]$BootFile = $null, \n    [ValidateSet('CDR','CDRW','DVDRAM','DVDPLUSR','DVDPLUSRW','DVDPLUSR_DUALLAYER','DVDDASHR','DVDDASHRW','DVDDASHR_DUALLAYER','DISK','DVDPLUSRW_DUALLAYER','BDR','BDRE')][string] $Media = 'CDR', \n    [string]$Title = (Get-Date).ToString(\"yyyyMMdd-HHmmss.ffff\"),  \n    [switch]$Force, \n    [parameter(ParameterSetName='Clipboard')][switch]$FromClipboard \n  ) \n  \n  Begin {  \n    ($cp = new-object System.CodeDom.Compiler.CompilerParameters).CompilerOptions = '/unsafe' \n    if (!('ISOFile' -as [type])) {  \n      Add-Type -CompilerParameters $cp -TypeDefinition @'\npublic class ISOFile  \n{ \n  public unsafe static void Create(string Path, object Stream, int BlockSize, int TotalBlocks)  \n  {  \n    int bytes = 0;  \n    byte[] buf = new byte[BlockSize];  \n    var ptr = (System.IntPtr)(&bytes);  \n    var o = System.IO.File.OpenWrite(Path);  \n    var i = Stream as System.Runtime.InteropServices.ComTypes.IStream;  \n   \n    if (o != null) { \n      while (TotalBlocks-- > 0) {  \n        i.Read(buf, BlockSize, ptr); o.Write(buf, 0, bytes);  \n      }  \n      o.Flush(); o.Close();  \n    } \n  } \n}  \n'@  \n    } \n   \n    if ($BootFile) { \n      if('BDR','BDRE' -contains $Media) { Write-Warning \"Bootable image doesn't seem to work with media type $Media\" } \n      ($Stream = New-Object -ComObject ADODB.Stream -Property @{Type=1}).Open()  # adFileTypeBinary \n      $Stream.LoadFromFile((Get-Item -LiteralPath $BootFile).Fullname) \n      ($Boot = New-Object -ComObject IMAPI2FS.BootOptions).AssignBootImage($Stream) \n    } \n  \n    $MediaType = @('UNKNOWN','CDROM','CDR','CDRW','DVDROM','DVDRAM','DVDPLUSR','DVDPLUSRW','DVDPLUSR_DUALLAYER','DVDDASHR','DVDDASHRW','DVDDASHR_DUALLAYER','DISK','DVDPLUSRW_DUALLAYER','HDDVDROM','HDDVDR','HDDVDRAM','BDROM','BDR','BDRE') \n  \n    Write \"Selected media type is $Media with value $($MediaType.IndexOf($Media))\"\n    ($Image = New-Object -com IMAPI2FS.MsftFileSystemImage -Property @{VolumeName=$Title}).ChooseImageDefaultsForMediaType($MediaType.IndexOf($Media)) \n   \n    if (!($Target = New-Item -Path $Path -ItemType File -Force:$Force -ErrorAction SilentlyContinue)) { Write \"Cannot create file $Path. Use -Force parameter to overwrite if the target file already exists.\"; break } \n  }  \n  \n  Process { \n    if($FromClipboard) { \n      if($PSVersionTable.PSVersion.Major -lt 5) { Write 'The -FromClipboard parameter is only supported on PowerShell v5 or higher'; break } \n      $Source = Get-Clipboard -Format FileDropList \n    } \n  \n    foreach($item in $Source) { \n      if($item -isnot [System.IO.FileInfo] -and $item -isnot [System.IO.DirectoryInfo]) { \n        $item = Get-Item -LiteralPath $item\n      } \n  \n      if($item) { \n        Write \"Adding item to the target image: $($item.FullName)\"\n        try { $Image.Root.AddTree($item.FullName, $true) } catch { Write  ($_.Exception.Message.Trim() + ' Try a different media type.') } \n      } \n    } \n  } \n  \n  End {  \n    if ($Boot) { $Image.BootImageOptions=$Boot }  \n    $Result = $Image.CreateResultImage()  \n    [ISOFile]::Create($Target.FullName,$Result.ImageStream,$Result.BlockSize,$Result.TotalBlocks) \n    Write \"Target image ($($Target.FullName)) has been created\"\n    $Target\n  } \n} \n\nget-childitem \".\\cd\" | New-ISOFile -force -path d.iso"
  },
  {
    "path": "leheader.asm",
    "content": ";\n; FASM example of creation of a linear ( exponential soon Very Happy )\n; executable (\"LE\") for running on DOS/32A extender.\n;\n; Compiles directly from .ASM into .LE , no linker Very Happy\n;\n; Use \"SB\" tool to bind it with the extender.\n;\n; http://board.flatassembler.net/topic.php?t=7122\n;\n; Limitations:\n; - No relocs (crappy anyway)\n; - Only one \"object\" ( no problem, flat rules Very Happy )\n;\n; Size should be no problem, tested with 2 MiB, should\n; support up to 2 Gib Wink\n;\n\nformat binary as \"LE\"\nuse32\norg 0\n\n; *** Constants ***\n\nccstackp = 2 ; Stack size in pages ( 1 page = 4 KiB )\n\n; *** Calculations ***\n\nvvstackb = ccstackp shl 12\t\t  ; Pages -> Bytes\nvvcodesize = llcodeend - llcode\nvvcodep = ( vvcodesize + $0FFF ) shr 12 ; Bytes -> Pages\nvvpagestotal = vvcodep + ccstackp\nvvpagestotalali = ( vvpagestotal + 3 ) and $000FFFFC ; Align to integer multi of 4\n\nvvcodepad = 2 ; Allign code size to integer multi of $10, and add 2 to make loader / DOS happy\nvvtemp1 = vvcodesize and $0F ; Temp, find out used bytes on last 16-Bytes block\nif vvtemp1 > 0\n  vvcodepad = 18 - vvtemp1\nend if\n\n; *** LE / [LX] \"Module Header\" (0,$AC) ***\n\n;org 0\ndb \"LE\"\ndb 0,0\t\t    ; Little endian, surprisingly Very Happy\ndb 0,0,0,0    ; \"level\" ... of zeroizm\ndb 2,0\t\t   ; 80386\ndb 1,0\t     ; \"OS/2\" Osama's System Very Happy\ndb 0,0,0,0    ; \"module version\"\n; org $10\ndd 0\t\t   ; \"module type\", crap\ndd vvpagestotal   ; Number of pages total\ndd 1,0\t\t\t; CS:EIP object number (4 bytes) & offset (4 bytes)\n; org $20\ndd 2, vvstackb\t    ; SS:ESP object number (4 bytes) & offset (4 bytes)\ndd $1000\t ; Page size in bytes\ndd 0\t\t; LX: \"shift\" alignement (4 -> $10 bytes) | LE: bytes on last page | crap Sad\n; org $30\ndd vvpagestotalali shl 2 , 0\n; \"fixup\" size, chk | \"size\" may NEVER be 0 !!! Can be skipped in LE, but not empty\ndd $30,0      ; \"loader\" size, chk\n; org $40\ndd $B0\t\t ; Offset of the \"Object table\" (relative to \"LE\")\ndd 2\t       ; Number of entries\ndd $E0\t\t ; LX: Offset of the \"Object Page Table\" | LE: Offset of object \"Map\" !!!\ndd 0\t\t; Offset of ??? , \"iterate\" crap\n; org $50\ndd 0\t     ; Offset ressource table\ndd 0\t    ; Number of entries\ndd 0\t\t ; Offset \"resident\" crap\ndd 0\t\t  ; Offset of \"entry\" crap table Sad\n; org $60\ndd 0,0\t\t   ; \"MD\" offset & entries, useless junk Very Happy\ndd $E0\t\t ; Fixup offset 1, important in LX only !!!\ndd $E0\t\t  ; Fixup offset 2, useless junk both LE and LX Wink\n; org $70\ndd 0,0\t\t  ; Import offset, count, both junk\ndd 0,0\t\t   ; 2 more offsets, crap\n; org $80\ndd llcode     ; \"Data pages offset\" - where the code begins, relative to MZ, not \"LE\" !!!\n\t; \"SB\" will care when binding ... just v. 7.1 won't - it has a BUG !!! Sad\ndd 0,0,0      ; Some more crap\n; org $90\ndd 0,0,0,0    ; Useless \"chk\", \"auto\", 2 x deBUG\n; org $A0\ndd 0,0,0      ; Crap / \"heap\"\n\n; *** Reserved / crap ($AC,4) ***\n\ndd 0\n\n; *** Object table entry #1 ($B0,$18 ) (main) ***\n\n; Flags can be $2045 (R) or $2047 (R&W)\n\ndd vvcodep shl 12 ; Size in bytes (we always align to 4 KiB)\ndd 0\t       ; Base address won't work, let's set it to most funny value of 0\ndd $2047\t  ; Flags: \"huge 32-bit\" | \"preloaded\" | \"executable\" | \"writable\" | \"readable\"\ndd 1,vvcodep\t ; \"map\" index (count from 1 ???) / entries\ndd 0\t\t; Reserved / crap\n\n; *** Object table entry #2 ($C8,$18 ) (stack) ***\n\n; !!! Stack may *** NEVER *** be executable !!!\n\ndd ccstackp shl 12    ; Size in bytes\ndd 0\t\t\t ; Base address won't work\ndd $2043\t  ; Flags: \"huge 32-bit\" | \"preloaded\" | \"writable\" | \"readable\"\ndd 1+vvcodep,ccstackp ; \"map\" index / entries\ndd 0\t\t       ; Reserved / crap\n\n; *** Object Page Map ($E0,n*$10 ) | Fixup 1st Table | Fixup 2nd Table ***\n\ndd vvpagestotalali dup (0)   ; Crap, one \"dd\" zero needed per page\n\nmacro laddr reg,ofs\n{\n\tlocal thiscall\n\tcall thiscall\n\tthiscall:\n\tpop reg\n\tadd reg,ofs-thiscall\n}\n\n\n; *** Code, forget about \"org\", never loads correctly Wink ***\n; \"org\" $F0 minimum, always $10 bytes aligned\n\nllcode:\n\ninclude 'lemain.asm'\n\nllcodeend:\n\ndb vvcodepad dup (0)   ; Crap, to prevent unexpected EOF\n\n;end."
  },
  {
    "path": "lemain.asm",
    "content": "; le-main, 32-bit flat, everything is inside here\n\njmp main\n\ntx1b db 'Hello from protected mode, using DOS/32A, coded with FASM !!!',0x0D,0x0A,0x24\n\nmain:\n\tladdr edx,tx1b\n\tmov   ah,9\n\tint   0x21\n\n    mov   ax,0x4C00\n    int   0x21\n\n\n"
  },
  {
    "path": "mdebug.asm",
    "content": "FORMAT MZ\nHEAP 0\n\ninclude 'struct.asm'\n\n\n\n; stack\nsegment STACK16\nUSE16\n\ndw 128 dup(0)\nstre:\n\ndw 128 dup(0)\nstx1e:\n\n; data\nsegment DATA16\nUSE16\n\nrun db 0\npsp dw 0\nm1 db \"Multicore Debugger, (C) Chourdakis Michael\",0x0D,0x0A,\"$\"\nprg db \"d:\\debuggee.exe\",0x0\n\nstruc LoadX a,b,c,d,e,f,g\n    {\n    .f1 dw a\n    .f2 dd b\n    .f3 dd c\n\t.f4 dd d\n\t.sp dw g\n\t.ss dw f\n\t.cs dw e\n\t.ip dw e\n    }\n\nbbb LoadX 0,0,0,0,0,0,0\n\nmut0 db 0\n\n\n; main\nsegment CODE16\nUSE16\n\ninclude \"mdebugcore.asm\"\ninclude \"reqdmmi.asm\"\n\n\nstart16:\n\n\n\tmov ax,STACK16\n\tmov ss,ax\n\tmov eax,stre\n\tmov esp,eax\n\tmov ax,DATA16\n\tmov ds,ax\n\tmov es,ax\n\tmov ax,0x0900\n\tmov dx,m1\n\tint 0x21\n\n\tRequireDMMI\n\n\t; enter unreal\n\tmov ax,0x0900\n\tint 0xF0\n\n\n\n\t; Load executable\n\tmov bx,bbb\n\tmov dx,prg\n\tmov ax,0x4B01\n\tint 0x21\n\tjc endx\n\tBackExecutable:\n\tmov ax,DATA16\n\tmov ds,ax\n\tcmp [run],1\n\tje endx2\n\tmov [run],1\n\tmov ah,0x62\n\tint 0x21\n\tmov [psp],bx\n\n\n\t; mutexes\n\tmov ax,DATA16\n\tmov es,ax\n\tmov ax,0x0500\n\tmov di,mut0\n\tint 0xF0\n\n\tmov ax,DATA16\n\tmov es,ax\n\tmov ax,0x0502\n\tmov di,mut0\n\tint 0xF0\n\n\t; start thread\n\tmov ax,CODE16\n\tmov es,ax\n\tmov dx,Thr\n\tmov ax,0x0100\n\tmov bl,1\n\tmov cx,STACK16\n\tmov gs,cx\n\tmov cx,stx1e\n\tint 0xF0\n\n\t; run\n\tmov ax,DATA16\n\tmov ds,ax\n\tmov ax,[bbb.sp]\n\tmov sp,ax\n\tmov ax,[bbb.ss]\n\tmov ss,ax\n\tmov ax,[bbb.ip]\n\tpush ax\n\tmov ax,[bbb.cs]\n\tpush ax\n\tretf\n\n\n\tendx2:\n\n\t; wait mutex\n\tmov ax,DATA16\n\tmov es,ax\n\tmov ax,0x0504\n\tmov di,mut0\n\tint 0xF0\n\n\n\tendx:\n\n\t\n\t\n\t; End\n\tmov ax,0x4C00\n\tint 0x21\n\n\n\n\nSEGMENT ENDS \nentry CODE16:start16\n\n\n"
  },
  {
    "path": "mdebugcore.asm",
    "content": "\n\nThr:\n\n\t; mutex release\n\tmov ax,DATA16\n\tmov es,ax\n\tmov ax,0x0503\n\tmov di,mut0\n\tint 0xF0\n\n\n\nretf\n"
  },
  {
    "path": "mutex16.asm",
    "content": "USE16\n\n\n\n\n\nmacro qlock16 trg,del = -1\n\t{\n\tpush ds\n\tpush di\n\tpush ecx\n\tMOV DI,DATA16\n\tMOV DS,DI\n\tMOV DI,trg\n\tdec byte [ds:di]\n\tpop ecx\n\tpop di\n\tpop ds\n\t}\n\nmacro qunlock16 trg\n\t{\n\tpush ds\n\tpush di\n\tMOV DI,DATA16\n\tMOV DS,DI\n\tMOV DI,trg\n\tcmp byte [ds:di],0xFF\n\tjz .unlk\n\tinc byte [ds:di]\n\t.unlk:\n\tpop di\n\tpop ds\n\t}\n\nqwait16:\n\t; ax = target mutex in data16\n\tpush ds\n\tpush di\n\tMOV DI,DATA16\n\tMOV DS,DI\n\tMOV DI,ax\n\n\t.Loop1:\t\t\n\tCMP byte [ds:di],0xff\n\tJZ .OutLoop1\n\tpause \n\tJMP .Loop1\n\t.OutLoop1:\n\t\n\tpop di\n\tpop ds\nretf\n\n\nqwaitlock16:\n\t; ax = target mutex in data16\n\tpush bx\n\tpush ds\n\tpush di\n\tMOV DI,DATA16\n\tMOV DS,DI\n\tMOV DI,ax\n\n\t.Loop1:\t\t\n\tCMP byte [ds:di],0xff\n\tJZ .OutLoop1\n\tpause \n\tJMP .Loop1\n\t.OutLoop1:\n\t\n\t; Lock is free, can we grab it?\n\tmov bl,0xfe\n\tMOV AL,0xFF\n\tLOCK CMPXCHG [DS:DI],bl\n\tJNZ .Loop1 ; Write failed\n\n\t.OutLoop2: ; Lock Acquired\n\n\tpop di\n\tpop ds\n\tpop bx\nretf\n"
  },
  {
    "path": "mutex32.asm",
    "content": "USE32\n\n\n\n\n\nmacro qlock32 trg\n\t{\n\tpush ds\n\tpush di\n\tpush ecx\n\tMOV DI,data16_idx\n\tMOV DS,DI\n\tMOV DI,trg\n\tdec byte [ds:di]\n\tpop ecx\n\tpop di\n\tpop ds\n\t}\n\nmacro qunlock32 trg\n\t{\n\tpush ds\n\tpush di\n\tMOV DI,data16_idx\n\tMOV DS,DI\n\tMOV DI,trg\n\tcmp byte [ds:di],0xFF\n\tjz .unlk\n\tinc byte [ds:di]\n\t.unlk:\n\tpop di\n\tpop ds\n\t}\n\nqwait32:\n\t; ax = target mutex in data16\n\tpush ds\n\tpush di\n\tMOV DI,data16_idx\n\tMOV DS,DI\n\tMOV DI,ax\n\n\t.Loop1:\t\t\n\tCMP byte [ds:di],0xff\n\tJZ .OutLoop1\n\tpause \n\tJMP .Loop1\n\t.OutLoop1:\n\t\n\tpop di\n\tpop ds\nretf\n\n\nqwaitlock32:\n\t; ax = target mutex in data16\n\tpush bx\n\tpush ds\n\tpush di\n\tMOV DI,data16_idx\n\tMOV DS,DI\n\tMOV DI,ax\n\n\t.Loop1:\t\t\n\tCMP byte [ds:di],0xff\n\tJZ .OutLoop1\n\tpause \n\tJMP .Loop1\n\t.OutLoop1:\n\t\n\t; Lock is free, can we grab it?\n\tmov bl,0xfe\n\tMOV AL,0xFF\n\tLOCK CMPXCHG [DS:DI],bl\n\tJNZ .Loop1 ; Write failed\n\n\t.OutLoop2: ; Lock Acquired\n\n\tpop di\n\tpop ds\n\tpop bx\nretf\n"
  },
  {
    "path": "mutex64.asm",
    "content": "USE64\n\nmacro qlock64 trg\n\t{\n\tpush rcx\n\tlinear rcx,trg\n\tdec byte [rcx]\n\tpop rcx\n\t}\n\nmacro qunlock64 trg\n\t{\n\tpush rcx\n\tlinear rcx,trg\n\tcmp byte [rcx],0xFF\n\tjz .unlk\n\tinc byte [rcx]\n\t.unlk:\n\tpop rcx\n\t}\n\nqwait64:\n\t; ax = target mutex in data16\n\tpush rcx\n\tlinear rcx,rax\n\n\t.Loop1:\t\t\n\tCMP byte [rcx],0xff\n\tJZ .OutLoop1\n\tpause \n\tJMP .Loop1\n\t.OutLoop1:\n\t\n\tpop rcx\nret\n\n\nqwaitlock64:\n\t; rax = target mutex in data16\n\tpush rbx\n\tpush rcx\n\tlinear rcx,rax\n\n\t.Loop1:\t\t\n\tmov al,[rcx]\n\tCMP al,0xff\n\tJZ .OutLoop1\n\tpause \n\tJMP .Loop1\n\t.OutLoop1:\n\t\n\t; Lock is free, can we grab it?\n\tmov bl,0xfe\n\tMOV AL,0xFF\n\tLOCK CMPXCHG [rcx],bl\n\tJNZ .Loop1 ; Write failed\n\n\t.OutLoop2: ; Lock Acquired\n\n\tpop rcx\n\tpop rbx\nret\n"
  },
  {
    "path": "opcodes.asm",
    "content": "op1:\n\n\nrdtscp\nret\n\n\n\n\nOpcodeTest:\n\ncall op1\nret"
  },
  {
    "path": "page16.asm",
    "content": "; --------------------------------------- 16 bit Paging routines to map 1GB ---------------------------------------\nUSE16\n\n; We will call this from real mode to enter long mode directly when needed\n\nInitPageTableFor64:\n\n\t; a function to use 1GB pages\n    pushad\n\tpush es\n\tpush gs\n\tmov ax,DATA16\n\tmov gs,ax\n\n\tmov esi,[gs:PhysicalPagingOffset64]\n\n\t\n\t; Put the PML4T to 0x0000, these are 512 entries, so it takes 0x1000 bytes\n\t; We only want the first PML4T \n\tmov eax,esi\n\tadd eax,0x1000 ; point it to the first PDPT\n\tor eax,3 ; Present, Readable/Writable\n\tmov [fs:esi + 0x0000],eax\n\t\t\t\n\tmov ecx,4 ; Map 4GB (512*1GB).  \n\tmov eax,0x83 ; Also bit 7\n\tmov edi,esi\n\tadd edi,0x1000\n\t.lxf1:\n\tmov     [fs:edi],eax\n\tadd     eax,1024*1024*1024\n\tadd edi,8\n\tloop .lxf1\n\n\tpop gs\n\tpop es\n\tpopad\n\nretf\n\n\n"
  },
  {
    "path": "page32.asm",
    "content": "; --------------------------------------- Paging routines ---------------------------------------\nUSE32\n\nInitPageTable32a:\n\n  ; A more clean version of what we are doing.\n  ; We map the entire 4GB address space (1024*1024*4096) See Through\n\n\tpushad\n\tpush ds\n\tpush es\n\t\n\tmov ax,data16_idx\n\tpush gs\n\tmov gs,ax\n\tmov ebp,[gs:PhysicalPagingOffset32]\n\tpop gs\n\tmov ax,page32_idx\n\tmov ds,ax\n\tmov es,ax\n \n\t; Tables Clear\n\tmov edi,ebp\n\tmov ecx,2048\n\txor eax,eax\n\trep stosd\n \n\t; PageDir32 points to PageTables32\n\t; Create 1024 entries\n\tmov edi,ebp\n\txor ecx,ecx\n\tLoopPageDir1:\n\txor eax,eax\n\tmov eax,ebp\n\tadd eax,4096\n\tshr eax,12 ; Get rid of lower 12 bits (4096 alignment)\n\tmov ebx,ecx\n\tadd eax,ebx\n\tshl eax,12\n\tor al,7 ; Present, Writable, Everyone, \n\tstosd\n\tinc ecx\n\tcmp ecx,1024\n\tjnz LoopPageDir1\n \n \n\t; PageTables32 create 1024 entries\n\tmov edi,ebp\n\tadd edi,4096\n\txor ecx,ecx\n\tLoopPageTables1:\n \n\txor eax,eax\n\tmov eax,0 ; See-Through, so we start at 0\n\tadd eax,ecx\n\tshl eax,12\n\tor al,7 ; Present, Writable, Everyone, \n\tstosd\n \n\tinc ecx\n\tcmp ecx,1024\n\tjnz LoopPageTables1\n \n\tpop es\n\tpop ds\n\tpopad\nret\n\n\n\nInitPageTable642:\n    pushad\n    push ds\n    push es\n\n\tmov ax,data16_idx\n\tpush gs\n\tmov gs,ax\n\tmov esi,[gs:PhysicalPagingOffset64]\n\tpop gs\n\n    mov ax,page64_idx\n    mov ds,ax\n    mov es,ax\n    xor     eax, eax\n    mov     edi,esi\n    mov     ecx,03000h\n    rep     stosb\n\n    ;top level page table\n    mov     eax, esi\n\tadd eax,0x1000\n    or              eax,3\n    mov     [esi],eax\n    mov     eax, esi\n\tadd eax,0x2000\n    or              eax,3\n    mov     [esi + 0x1000],eax\n\n    ;2MB pages to identity map the first 16MB ram\n    mov     eax,1\n    shl             eax,7\n    or              eax,3\n    mov     [esi + 0x2000],eax\n    add     eax,0x200000\n    mov     [esi + 0x2008],eax\n    add     eax,0x200000\n    mov     [esi + 0x2010],eax\n    add     eax,0x200000\n    mov     [esi + 0x2018],eax\n    add     eax,0x200000\n    mov     [esi + 0x2020],eax\n    add     eax,0x200000\n    mov     [esi + 0x2028],eax\n    add     eax,0x200000\n    mov     [esi + 0x2030],eax\n    add     eax,0x200000\n    mov     [esi + 0x2038],eax\n\n    pop es\n    pop ds\n    popad \nret\n\n\nInitPageTable643:\n\n\t; a function to use 1GB pages\n    pushad\n\tpush es\n\tpush gs\n\tmov ax,data16_idx\n\tmov gs,ax\n\tmov ax,page32_idx\n\tmov es,ax\n\tmov esi,[gs:PhysicalPagingOffset64]\n\n    ; clear\n    mov     edi,esi\n\txor eax,eax\n    mov     ecx,03000h\n    rep     stosb\n\n\t; Put the PML4T to 0x0000, these are 512 entries, so it takes 0x1000 bytes\n\t; We only want the first PML4T \n\tmov eax,esi\n\tadd eax,0x1000 ; point it to the first PDPT\n\tor eax,3 ; Present, Readable/Writable\n\tmov [es:esi + 0x0000],eax\n\t\t\t\n\tmov ecx,4 ; Map 4GB (512*1GB).  \n\tmov eax,0x83 ; Also bit 7\n\tmov edi,esi\n\tadd edi,0x1000\n\t.lxf1:\n\tmov     [es:edi],eax\n\tadd     eax,1024*1024*1024\n\tadd edi,8\n\tloop .lxf1\n\n\tpop gs\n\tpop es\n\tpopad\n\nret\n"
  },
  {
    "path": "qlink/QLINK.CFG",
    "content": "# QLINK Configuration File\n# Put additional switches here rather than the command line\n# to avoid cluttering up that resource.\n\n#  Switch list\n##################\n# /F:switch  to fail on event named 'switch'\n# /W:switch  to warn on event named 'switch' and take default action\n# /I:switch  to ignore\tevent named 'switch' and take default action\n# Where 'switch' is one of the following:\n\n# ALL\t  = Set all of the switches below to the specified state.\n\n# OMFIGN  = An OMF record is encountered which is ignorable (typically\n#\t    this record is obsolete).  The ignore/warn action is to\n#\t    ignore the record.\n\n# OMFUNK  = An unknown OMF record is encountered.  Either QLINK\n#\t    doesn't implement that record (please call us), or the\n#\t    .OBJ file is corrupted (but not so corrupted as to fail\n#\t    the checksum test).  The ignore/warn action is to ignore\n#\t    the record.\n\n# CSUMINV = An OMF record' checksum is invalid.  Some language\n#\t    translators don't compute a proper checksum, but they\n#\t    should put in a zero for the checksum field which QLINK\n#\t    allows.  Something else is going on.  The ignore/warn\n#\t    action is to ignore the invalid checksum and process the\n#\t    record.\n\n# CTYPINV = A SEGDEF record has an invalid combine type.  The\n#\t    ignore/warn action is to use a combine type of private (do\n#\t    not combine).\n\n# ALININV = A SEGDEF record has an invalid alignment type.  The\n#\t    ignore/warn action is to use an alignment of byte.\n\n# ALINDIF = Two SEGDEF records describing the same segment/class have\n#\t    different alignment types.\tThe ignore/warn action is to\n#\t    use the actual alignment type for each segment.\n\n# USEDIF  = Two SEGDEF records desribing the same segment/class have\n#\t    different USE16/USE32 attributes.  The ignore/warn action\n#\t    is to use USE32 as the segment attribute.\n\n# GRPINV  = A GRPDEF record has an invalid group component descriptor\n#\t    (it should be FF, but isn't).  The ignore/warn action is\n#\t    to ignore the value.\n\n# GRPDIF  = A segment is contained in two different groups.  The\n#\t    ignore/warn action is to ignore the second and subsequent\n#\t    grouping of the segment.\n\n# SEGBIG  = A USE16 segment exceeds 64KB in size.  The ignore/warn\n#\t    action is to ignore the problem.  You fix it.\n\n# GRPBIG  = A USE16 segment in a group ends above 64KB.  The\n#\t    ignore/warn action is to ignore the problem.\n\n# GRPMIX  = A group has mixed absolute and relocatable segments.  The\n#\t    ignore/warn action is to ignore the problem.\n\n# FIXOVF  = The value of an external reference is wider than the\n#\t    target field.  The ignore/warn action is to shorten the\n#\t    value to fit the field and then ignore the problem,\n#\t    although you shouldn't.\n\n# FIXOVF$ = The value of an external reference is wider than the\n#\t    target field in a segment named '$$SYMBOLS'.  The\n#\t    ignore/warn action is to shorten the value to fit the\n#\t    field and then ignore the problem.\n\n# ABSOVF  = The value of an absolute constant is wider than the\n#\t    target field.  The ignore/warn action is to fixup the\n#\t    location with the wider value.  This can happen due to a\n#\t    bug in MASM 5.10b where it generates an incorrect .OBJ\n#\t    record when referencing an external absolute constant in a\n#\t    DD of DF field (it marks is as a word width rather than a\n#\t    dword width).\n\n# ABSDIF  = A group has absolute segments with differing starting\n#\t    addresses.\tThe ignore/warn action is to ignore the\n#\t    problem.\n\n# TYPDIF  = Tyep indices differ between two occurrences of the same\n#\t    symbol.  The ignore/warn action is to ignore the problem.\n\n# SEGEXT  = A FIXUPP record has an external target in a different\n#\t    segment than the frame segment.  The ignore/warn action is\n#\t    to calculate the fixup using the difference between the\n#\t    two segments.\n\n# SEGEXT0 = A FIXUPP record has an external target not in a segment\n#\t    whereas the frame is a segment.  The ignore/warn action is\n#\t    to ignore the frame segment.\n\n# GRPEXT  = The group which contains an external Target in a FIXUPP\n#\t    record is different from the Frame group.  This can occur\n#\t    due to incorrect assume statements.  For example, if you\n#\t    put data variables in a code segment (with, say, ASSUME\n#\t    CS:PGROUP), be sure to use a corresponding ASSUME\n#\t    DS:PGROUP as the assume for DS is the segment/group\n#\t    reference used as the frame for data variables.  The\n#\t    ignore/warn action is to ignore the problem, but you\n#\t    shouldn't.\n\n# GRPEXT0 = The group which contains an ungrouped external Target in a\n#\t    FIXUPP record is different from the Frame group.  This can\n#\t    occur due to incorrect assume statements.  For example, if\n#\t    you put data variables in a code segment (with, say,\n#\t    ASSUME CS:PGROUP), be sure to use a corresponding ASSUME\n#\t    DS:PGROUP as the assume for DS is the segment/group\n#\t    reference used as the frame for data variables.  The\n#\t    ignore/warn action is to ignore the problem, but you\n#\t    shouldn't.\n\n# RELGRP  = A self-relative FIXUPP record has a frame group which does\n#\t    not contain the fixup segment.  The ignore/warn action is\n#\t    to calculate the fixup using the difference between the\n#\t    fixup segment and the frame group.\n\n# RELSEG  = A self-relative FIXUPP record has a frame segment which is\n#\t    not the same as the fixup segment.\tThe ignore/warn action\n#\t    is the calculate the fixup using the difference between\n#\t    the fixup segment and the frame segment.\n\n# RELTGT  = A self-relative FIXUPP record has a frame segment which is\n#\t    not the same as the target segment.  The ignore/warn action\n#\t    is the calculate the fixup using the difference between\n#\t    the target segment and the frame segment.\n\n# RELGRPX = A self-relative FIXUPP record has an external frame group\n#\t    which does not contain the fixup segment.  The ignore/warn\n#\t    action is to calculate the fixup using the difference\n#\t    between the fixup segment and the frame group.\n\n# RELSEGX = A self-relative FIXUPP record has an external frame\n#\t    segment which is not the same as the fixup segment.  The\n#\t    ignore/warn action is the calculate the fixup using the\n#\t    difference between the fixup segment and the frame\n#\t    segment.\n\n# PUBDIF  = In a PUBDEF record, the referenced segment is not\n#\t    contained in the referenced group.\tThe ignore/warn action\n#\t    is to ignore the problem.\n\n# LINDIF  = In a LINNUM record, the referenced segment is not\n#\t    contained in the referenced group.\tThe ignore/warn action\n#\t    is to ignore the problem.\n\n# FIXDIF  = In a FIXUPP record, the Frame or Target group does not\n#\t    contain the Target or Frame segment.  The ignore/warn\n#\t    action is to ignore the problem.\n\n# FIXDIFX = In a FIXUPP record, the Frame or Target segment is not\n#\t    contained in any group, but there's a Target or Frame\n#\t    group.  The ignore/warn action is to ignore the problem.\n\n# FRMSEG  = The Frame base of a FIXUPP record is a segment, but\n#\t    perhaps should be the group which contains the segment.\n#\t    The ignore/warn action is to ignore the problem.\n\n# FRMSEG0 = The Frame base of a FIXUPP record is a segment, but\n#\t    perhaps should be the group which contains the segment,\n#\t    although the segment is the first one in the group.  The\n#\t    default action is to ignore this problem.  The ignore/warn\n#\t    action is to ignore the problem.\n\n# FRMSEG$ = A FRMSEG error has occurred for a fixup in a segment\n#\t    named '$$SYMBOLS'.  The default action is to ignore this\n#\t    problem.  The ignore/warn action is to ignore the problem.\n\n# THRINV  = The Target Method field of a thread FIXUPP record is > 3.\n#\t    The The ignore/warn action is to reduce the method number\n#\t    modulo 4.\n\n# BAKPAT  = A BAKPAT record has an invalid location type (> 2).  The\n#\t    default action is to fail.\tThe ignore/warn action is to use a\n#\t    byte-wide location.\n\n# NBKPAT  = A NBKPAT record has an invalid location type (> 2).  The\n#\t    default action is to fail.\tThe ignore/warn action is to use a\n#\t    byte-wide location.\n\n# EXTMAT  = Ensure that all EXTDEFs have a matching reference to them.\n#\t    If not, then presumably the corresponding extrn can be\n#\t    deleted.  The ignore/warn action is to ignore the problem.\n\n# MTOBJ   = Ensure that all .OBJ files are nonempty.  If not, then likely\n#\t    the assembler/compiler didn't complete its job.  The\n#\t    The ignore/warn action is to ignore the empty file.\n\n# BLKDEF  = Normally, you should ignore a Block Definition Record as\n#\t    it is ignored by QLINK.  The only reason this switch is\n#\t    present is so the default action can be /I as opposed to\n#\t    having to ignore all OMFIGN records some of which might be\n#\t    of interest.  The ignore/warn action is to ignore the\n#\t    problem.\n\n# BLKEND  = Normally, you should ignore a Block End Record as it is\n#\t    ignored by QLINK.  The only reason this switch is present\n#\t    is so the default action can be /I as opposed to having to\n#\t    ignore all OMFIGN records some of which might be of\n#\t    interest.  The ignore/warn action is to ignore the\n#\t    problem.\n\n# TYPDEF  = Normally, you should ignore a Type Definition Record as\n#\t    it is ignored by QLINK.  The only reason this switch is\n#\t    present is so the default action can be /I as opposed to\n#\t    having to ignore all OMFIGN records some of which might be\n#\t    of interest.  The ignore/warn action is to ignore the\n#\t    problem.\n\n######################################################################\n# Default settings\n#\n# The default setting for all error messages is /F:switch for all\n# switches (i.e., /F:ALL), except for EXTMAT, THRINV, BLKDEF, BLKEND,\n# TYPDEF, FRMSEG0, FRMSEG$, and FIXOVF$ for which the default setting\n# is to ignore.\n\n"
  },
  {
    "path": "qlink/QLINK.HTM",
    "content": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\t \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n   <title>Qualitas Linker</title>\n   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n   <link rel=\"stylesheet\"\n\t\t href=\"http://www.sudleyplace.com/styles/common.css\"\n\t\t type=\"text/css\" />\n</head>\n\n<body>\n<!--#config timefmt=\"%d %B %Y %H:%M:%S\" -->\n\n<h1 title=\"Last Changed <!--#echo var='LAST_MODIFIED' -->\">\nQLINK Documentation File<br />\nVersion 5.08<br />\n<small>23 March 2006</small>\n</h1>\n\n<span style=\"float:right\">\n  <script type=\"text/javascript\">\n\t<!--\n\tgoogle_ad_client = \"pub-5069729984191471\";\n\tgoogle_ad_width = 120;\n\tgoogle_ad_height = 600;\n\tgoogle_ad_format = \"120x600_as\";\n\tgoogle_color_border = \"FF4500\";\n\tgoogle_color_bg = \"FFEBCD\";\n\tgoogle_color_link = \"DE7008\";\n\tgoogle_color_url = \"E0AD12\";\n\tgoogle_color_text = \"8B4513\";\n\t//-->\n  </script>\n  <script type=\"text/javascript\"\n\t\t  src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\n  </script>\n</span>\n\n<h3><a name=\"Overview\"></a>Overview</h3>\n\n<p>QLINK is a DOS linker and analysis tool designed to link together MS-DOS \n  compatible .OBJ files.&nbsp; It can replace the MS-DOS LINK.EXE program \n  when producing MS-DOS compatible .EXE and .COM files.</p>\n\n<h3><a name=\"Installation\"></a>Installation</h3>\n\n<p>Make a directory (e.g., <tt>C:\\QLINK</tt>), copy the zip file to that \n  directory, and unzip the files:</p>\n\n<p><tt>MD C:\\QLINK</tt><br />\n  <tt>CD C:\\QLINK</tt><br />\n  <tt>COPY A:\\QLINK.ZIP</tt><br />\n  <tt>PKUNZIP QLINK.ZIP</tt></p>\n\n<p>If you'll be running QLINK under Windows 3.1x (see below for Win95 instructions), \n  copy the file <tt>WINDPMI.386</tt> to your Windows system directory.&nbsp; \n  For example, if you installed Windows into the directory <tt>C:\\WINDOWS</tt>, \n  copy <tt>WINDPMI.386</tt> to <tt>C:\\WINDOWS\\SYSTEM</tt>.&nbsp; Then edit \n  your Windows SYSTEM.INI file to insert a line such as the following in \n  the <tt>[386ENH]</tt> section:</p>\n\n<p><tt>&nbsp;&nbsp;&nbsp; device=windpmi.386</tt></p>\n\n<p>You should first ensure that no other similar line already appears in \n  your SYSTEM.INI file.&nbsp; For example, you might already have a line \n  such as</p>\n\n<p><tt>&nbsp;&nbsp;&nbsp; device=c:\\bc4\\bin\\windpmi.386</tt></p>\n\n<p>If this is the case, do not insert another call to the same driver; you \n  need only one. This VxD does not work with Win9x.</p>\n\n<p>If you'll be running QLINK under Win9x, follow the above procedure using \n  the file <tt>W95DPMI.386</tt> instead of <tt>WINDPMI.386</tt>.</p>\n\n<h3><a name=\"Benefits\"></a>Benefits </h3>\n\n<ul>\n  <li>One pass linker (using <a class=\"linkleft\" href=\"/dpmione/uncommit.htm\">uncommitted \n\tmemory</a> in DPMI 1.0)</li>\n  <li>Better performance (typically twice as fast as MS LINK, sometimes \n\tten times faster)</li>\n  <li>Handles USE32 segments &gt; 64KB</li>\n  <li>Detailed error checking to the point that it becomes a highly valuable \n\tanalysis tool</li>\n  <li>Detailed error information (e.g., source code line number info (if \n\tin .OBJ file) for fixup overflows)</li>\n  <li>Type checking between .OBJ files (if in .OBJ files).</li>\n</ul>\n\n<h3><a name=\"SysReq\"></a>System Requirements</h3>\n\n<ul>\n  <li>MS-DOS 3.x or later</li>\n  <li>DPMI host which supports DPMI 1.0 calls -- use either 386MAX version \n\t7.0 or later, or Windows 3.1 with a (supplied) VxD from Borland (<tt>WINDPMI.386</tt>), \n\tor Win95 with a different VxD (<tt>W95DPMI.386</tt>), or\n\t<a class=\"linkleft\" href=\"/dpmione/index.htm\">DPMIONE</a>.</li>\n</ul>\n\n<h3><a name=\"Usage\"></a>How To Use</h3>\n\n<p>For the most part, just call QLINK instead of LINK or TLINK as appropriate.&nbsp; \n  Borland users should note that a number of Borland specific Object Module \n  Formats (OMFs) are not implemented as yet (I'm waiting for the documentation \n  from Borland).&nbsp; Several MS link switches are not supported as yet \n  (e.g., <tt>/PACKC</tt>).&nbsp; If there are switches you particularly \n  need which are not supported, let me know.&nbsp; For an explanation of \n  the old linker switches, see your linker manual.</p>\n\n<h3><a name=\"Tips\"></a>Tips</h3>\n\n<p>To take advantage of the detailed error processing in QLINK, use the \n  assembler switches which generate types and line numbers.&nbsp; For MASM \n  and TASM these switches are <tt>/Zd</tt> and <tt>/Zi</tt>.</p>\n\n<h3><a name=\"SegOrd\"></a>Segment Ordering</h3>\n\n<p>The order in which segments appear in the executable file depends on \n  several factors.&nbsp; The first is whether or not the <tt>/DOSSEG</tt> \n  switch appears explicitly on the command line or implicitly in a OMF record \n  in one of the .OBJ files.</p>\n\n<p>If <tt>/DOSSEG</tt> is specified, the segment order is as follows:</p>\n\n<ul>\n  <li>All segments with a class name ending in <tt>'CODE'</tt></li>\n  <li>All other segments not in <tt>DGROUP</tt>, grouping together segments \n\twith the same class name</li>\n  <li><tt>DGROUP</tt> segments in the following order:\n\t<ul>\n\t  <li>Any segments of class <tt>'BEGDATA'</tt></li>\n\t  <li>Any segment not of class <tt>'BEGDATA'</tt>, <tt>'BSS'</tt>, or \n\t\t<tt>'STACK'</tt></li>\n\t  <li>Segments of class <tt>'BSS'</tt></li>\n\t  <li>Segments of class <tt>'STACK'</tt></li>\n\t</ul>\n  </li>\n</ul>\n\n<p>Otherwise, the segment order is as follows:</p>\n\n<ul>\n  <li>All unclassed segments</li>\n  <li>All classed segments by class (that is, segments in the same class \n\tappear adjacent to each other).</li>\n</ul>\n\n<h3>  <a name=\"Errors\"></a>Error Messages</h3>\n\n<p>There are a number of switches specific to QLINK which are documented \n  in the file QLINK.CFG.&nbsp; These switches control the processing of \n  error messages from QLINK.&nbsp;&nbsp; All error messages begin with either</p>\n\n<p><tt>==> WARN:</tt></p>\n\n<p>or</p>\n\n<p><tt>==> FAIL:</tt></p>\n\n<p>Messages which begin with <tt>WARN</tt> are warnings and do not halt \n  the linker.&nbsp; Messages which being with <tt>FAIL</tt> cause the linker \n  to stop immediately and not continue processing the input files.</p>\n\n<p>If an error message is followed by a name such as <tt>FIXOVF</tt> or \n  <tt>GRPEXT0</tt> in parentheses, then that error can be controlled by \n  the switches <tt>/I:</tt><i>switch</i>, <tt>/W:</tt><i>switch</i>, and \n  <tt>/F:</tt><i>switch</i>, where <i>switch</i> is the name in parentheses \n  in the error message.</p>\n\n<p>If you wish to ignore this error (meaning the linker takes a default \n  action and continues processing), use <tt>/I:</tt><i>switch</i>.&nbsp; \n  To warn about an error (meaning an error message is displayed, the linker \n  takes a default action, and continues processing), use <tt>/W:</tt><i>switch</i>.&nbsp; \n  The default settings for all error messages are described in the file \n  QLINK.CFG.</p>\n\n<p>This same file (QLINK.CFG) is consulted when QLINK begins execution.&nbsp; \n  Any switches found there (including switches such as <tt>/MAP</tt>, <tt>/LINE</tt>, \n  etc.) are processed before the command line is parsed.&nbsp; Switches \n  only may be contained in QLINK.CFG, not names of .OBJ files, etc.&nbsp; \n  Even earlier in the process, the environment variable <tt>QLINK=</tt> \n  is consulted, and it too may contain only switches.</p>\n\n<p>Thus the order of processing of switches is first, those contained in \n  the environment variable <tt>QLINK=</tt>, then those in the file QLINK.CFG \n  (first in the current directory, and if not found there in the directory \n  from which QLINK is loaded), and finally those found on the command line \n  to QLINK.&nbsp; Switches processed later in the sequence override ones \n  processed earlier.</p>\n\n<h3><a name=\"NameSub\"></a>Name Substitutions</h3>\n\n<p>Occasionally, you want to link together .OBJ modules from different projects \n  which use different naming conventions.&nbsp; For example, in one project \n  code segments are in class <tt>CODE</tt> and in others they are in class \n  <tt>PROG</tt>.&nbsp; Previously, you would have to edit the source code, \n  make the changes, and re-compile.&nbsp; With the Name Substitution feature \n  of QLINK, it's a snap.</p>\n\n<p>To substitute names on the fly within the .OBJ file, place the switch \n  <tt>/NS</tt> before the reference to each .OBJ file whose names are to \n  be substituted.&nbsp; For example, use <tt>/NS:PROG-CODE</tt> to tell \n  QLINK that the name <tt>PROG</tt> is to be changed to <tt>CODE</tt>.</p>\n\n<p>Each substitution is effective for all .OBJ files which appear after \n  it until that substitution (or all substitutions) are halted.&nbsp; Use \n  the form <tt>/NS:</tt><i>name</i> to halt substitutions on <i>name</i>; \n  use <tt>/NS</tt> with no arguments to halt all substitutions.</p>\n\n<p>Note that this means that the occurrences of <tt>/NS</tt> are sensitive \n  to the position and order in which they appear.&nbsp; Be sure to place \n  occurrences of <tt>/NS</tt> <b>before</b> the reference to the .OBJ file \n  to which they apply.</p>\n\n<p>To swap two symbols in the same file, use (say) <tt>/NS:A-B:B-A</tt>.</p>\n\n<p>The substitution is made on all references to the name regardless of \n  context.&nbsp; Thus if you have a file with a segment named <tt>PROG</tt> \n  and a class named <tt>PROG</tt>, substituting <tt>CODE</tt> for <tt>PROG</tt> \n  changes both references.</p>\n\n<p>The full syntax is</p>\n\n<p><tt><i>Nameset</i>:&nbsp;&nbsp; (<i>empty</i>)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n  ; Halt substitution on all names<br />\n  &nbsp;<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <i>name</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n  ; Halt substitution on this name<br />\n  &nbsp;<tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <i>name</i> \n  '-' <i>name</i></tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \n  ; Substitute the second name for the first name</p>\n\n<p><tt><i>Namedef</i>:&nbsp;&nbsp;&nbsp; <i>Nameset</i></tt> <br />\n  <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | <i>Namedef</i> \n  ':' <i>Nameset</i></tt></p>\n\n<p><tt><i>Switch</i>:&nbsp;&nbsp;&nbsp;&nbsp; '/NS:' <i>Namedef</i></tt></p>\n\n<p>The keyword <tt>/NS</tt> may appear in the QLINK environment variable, \n  the QLINK.CFG configuration file, the automatic response file, and the \n  QLINK command line.</p>\n\n<h3>Frequently Asked Questions</h3>\n\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" summary=\"\">\n  <tr align=\"left\" valign=\"top\"> \n\t<td>Q:&nbsp;</td>\n\t<td>When I link modules with the MS linker and QLINK, sometimes the \n\t  executable files are of very different sizes?</td>\n  </tr>\n  <tr align=\"left\" valign=\"top\">\n\t<td>A:&nbsp;</td>\n\t<td>This can occur if a .LIB is used to resolve external references.&nbsp; \n\t  Because there is no rule as to the order in which external refs are \n\t  processed, different ordering of these references mean that there \n\t  can be different segment boundary alignments which can change the \n\t  final executable file size.</td>\n  </tr>\n</table>\n\n<h3><a name=\"WishList\"></a>Future Work</h3>\n\n<p>In no particular order of importance (nor of expectation of getting done), \n  the following topics are on my list:</p>\n<ul>\n  <li>Support Borland-specific OMFs</li>\n  <li>Support MS-specific OMFs (for which I don't have any examples)</li>\n  <li>External procedure for symbol processing (instead of reading .MAP \n\tfile)</li>\n  <li>Allow segment attribute changes per .OBJ file</li>\n  <li>Generate Windows compatible .EXEs</li>\n  <li>Generate Code view information</li>\n  <li>Generate Turbo Debugger information</li>\n  <li>Compress .EXE using LZH or some such technique (for Windows executables \n\tas well)</li>\n  <li>Finish type checking of structures</li>\n</ul>\n\n<p>Please feel free to add to this list.</p>\n\n<h3><a name=\"TechSupport\"></a>Technical Support</h3>\n\n<p>Please contact the author via Internet e-mail at</p>\n\n<p>&nbsp;&nbsp;&nbsp;<script type=\"text/javascript\"\n  src=\"/email.cgi?n=bsmith&amp;d=sudleyplace.com&amp;class=mailright\"></script>\n  (Bob Smith)</p>\n\n<p>QLINK is &copy; Copyright 1994-2006 Qualitas, Inc.&nbsp; All rights reserved.</p>\n\n<h3><a name=\"Changes\"></a>Change History</h3>\n\n<p>5.08&nbsp;&nbsp;&nbsp;&nbsp;23 March 2006</p>\n\n<ul>\n  <li>Fix bug in .LIB symbol compares for case-insensitive\n\tlibraries whose symbols contain uppercase letters (thanks\n\tBob Snuggs).</li>\n</ul>\n\n<p>5.07&nbsp;&nbsp;&nbsp;&nbsp;2 January 2004</p>\n\n<ul>\n  <li>Fix bug which prevents multiple .LIB files from being recognized (thanks \n\tJapheth).</li>\n</ul>\n\n<p>5.06&nbsp;&nbsp;&nbsp;&nbsp;24 December 2003</p>\n\n<ul>\n  <li>Catch invalid OMF record where an LIDATA record has a zero repeat \n\tcount.</li>\n</ul>\n\n<p>5.05&nbsp;&nbsp;&nbsp;&nbsp;19 June 2003</p>\n\n<ul>\n  <li>Mark COMM variables as USE32 if the segment in which they are defined \n\t(c_common or FAR_BSS) is USE32.</li>\n  <li>Load .OBJ files into extended memory instead of low DOS in case there's \n\tnot enough room.</li>\n  <li>Implement undocumented /KNOWEAS for compatibility with MS linker.</li>\n</ul>\n\n<p>5.04&nbsp;&nbsp;&nbsp;&nbsp;22 May 2003</p>\n\n<ul>\n  <li>Added more information to USEDIF error message to point to .OBJ file \n\tin which the segment was first defined.</li>\n  <li>Added references to DPMIONE as a DPMI 1.0 host under which QLINK \n\truns.</li>\n</ul>\n\n<p>5.03&nbsp;&nbsp;&nbsp;&nbsp;21 July 2002</p>\n\n<ul>\n  <li>Modified the change in version 5.00 for fixup overflows to treat \n\tthe Target Displacement as a signed number and then ignore overflows \n\tif the upper 24- (for byte fixups) or 16-bits (for word fixups) are \n\tall ones.</li>\n</ul>\n\n<p>5.02&nbsp;&nbsp;&nbsp;&nbsp;1 July 2002</p>\n\n<ul>\n  <li>Fix bug where a MODEND fixup generating any kind of error causes \n\tthe routine which displays the .OBJ file name to fail (thanks to Vladomir \n\tRodriquez for pointing this out).</li>\n</ul>\n\n<p>5.01&nbsp;&nbsp;&nbsp;&nbsp;26 June 2002</p>\n\n<ul>\n  <li>Fix bug where .MAP file occasionally not written out.</li>\n  <li>Display segment combine type in /MAP:FULL.</li>\n  <li>Fix bug in display of line #s for grouped segments which are not first \n\tin the group.</li>\n  <li>Append IGNOREd errors to .ERR file if /DEBUG:ERR in effect.</li>\n  <li>Added FIXOVF$ switch to ignore fixup overflows in '$$SYMBOLS' segments.</li>\n  <li>Fix bug when parsing command line and/or .ARF file if leading '+' \n\tin multiple entry (.OBJ or .LIB) fields.</li>\n</ul>\n\n<p>5.00&nbsp;&nbsp;&nbsp;&nbsp;26 June 2002</p>\n\n<ul>\n  <li>Change version # to 5 to workaround bug in EXEHDR.</li>\n  <li>Fix bug in display of FRMSEG$ message.</li>\n  <li>Display error message if not enough memory to enter PM through the \n\tDPMI host.</li>\n  <li>Fix bug when checking for fixup overflows where the displacement \n\twasn't added in before the overflow check, thus missing some overflows \n\t(thanks to Vladomir Rodriquez for pointing this out).</li>\n</ul>\n\n<p>1.30&nbsp;&nbsp;&nbsp;&nbsp;22 June 2002</p>\n\n<ul>\n  <li>Added MTOBJ switch to fail on empty .OBJ files which can occur when \n\ta language translator creates an object file but halts for some reason \n\tbefore writing anything to it.</li>\n</ul>\n\n<p>1.29&nbsp;&nbsp;&nbsp;&nbsp;18 April 2002</p>\n\n<ul>\n  <li>Fix bug to change ignore/warn action on OMFUNK to ignore the record.</li>\n</ul>\n\n<p>1.28&nbsp;&nbsp;&nbsp;&nbsp;25 April 2000</p>\n\n<ul>\n  <li>Fix bug handling weak externs if the symbol is already public.</li>\n</ul>\n\n<p>1.27&nbsp;&nbsp;&nbsp;&nbsp;18 April 2000</p>\n\n<ul>\n  <li>Implement support for COMDAT records.</li>\n  <li>Avoid searching through duplicate library names.</li>\n  <li>Handle blank line in ARF file as field marker.</li>\n  <li>Allow library directories in libfiles part of the command line.</li>\n</ul>\n\n<p>1.26&nbsp;&nbsp;&nbsp; 10 April 2000</p>\n\n<ul>\n  <li>Extend checking for FRMSEG, FRMSEG0, and FRMSEG$ to the FT01 case.</li>\n  <li>Define RELTGT switch to catch the case where a self-relative fixup's \n\tFrame and Target segments are different in the FT00 case.</li>\n</ul>\n\n<p>1.25&nbsp;&nbsp;&nbsp; 7 April 2000</p>\n\n<ul>\n  <li>Extend checking for RELGRP errors in self-relative fixups to the \n\tFT10 and FT11 cases.</li>\n  <li>Extend checking for RELGRPX and RELSEGX errors in self-relative fixups \n\tto the FT20 and FT21 cases.</li>\n  <li>Extend checking for RELSEG errors in self-relative fixups to the \n\tFT01 case.</li>\n</ul>\n\n<p>1.24&nbsp;&nbsp;&nbsp; 4 April 2000</p>\n\n<ul>\n  <li>Extend Name Substitutions to PUBDEF and EXTDEF records (it previously \n\tapplied to LNAMES &amp; LLNAMES records only).</li>\n  <li>Extend Name Substitutions to .LIB files.</li>\n</ul>\n\n<p>1.23&nbsp;&nbsp;&nbsp; 30 March 2000</p>\n\n<ul>\n  <li>Define FRMSEG$ switch to catch the case where a FRMSEG error occurs \n\tin a fixup segment named '$$SYMBOLS'.&nbsp; This reduces some of the \n\tnoise when linking with debugging info.&nbsp; The default action is \n\tto ignore the error.</li>\n  <li>Fix bug when an external mixed-case symbol precedes the matching \n\tpublic declaration of the same symbol in a different case.</li>\n</ul>\n\n<p>1.22&nbsp;&nbsp;&nbsp; 30 March 2000</p>\n\n<ul>\n  <li>Implement /NS keyword to handle name substitutions.</li>\n  <li>Implement additional debugging display for fixups via /DEBUG:FIXUP.</li>\n</ul>\n\n<p>1.21&nbsp;&nbsp;&nbsp; 28 March 2000</p>\n\n<ul>\n  <li>&nbsp;Force /NOE as I can't figure out how it works.&nbsp; I thought \n\tI understood it, but now I'm convinced I do not.</li>\n</ul>\n\n<p>1.20&nbsp;&nbsp;&nbsp; 24 March 2000</p>\n\n<ul>\n  <li>Implement /FARCALL.</li>\n  <li>Fix bugs when recognizing special class, segment, and group&nbsp; \n\tnames (wasn't case-insensitive and was off by one in length when comparing \n\tnames).</li>\n</ul>\n\n<p>1.19&nbsp;&nbsp;&nbsp; 22 March 2000</p>\n\n<ul>\n  <li>Define FRMSEG0 switch to reduce the number of spurious FRMSEG&nbsp; \n\tmessages in the case where the segment is the first one in the group.&nbsp; \n\tIn this case, the fixup value is the same independent of whether the \n\tfixup is segment- or group-relative.&nbsp; The default action is to \n\tignore FRMSEG0 errors.</li>\n</ul>\n\n<p>1.18&nbsp;&nbsp;&nbsp; 15 March 2000</p>\n\n<ul>\n  <li>&nbsp;Fix bug in self-relative fixups for several Frame vs. Target \n\tcases I never thought could occur until NASM came along.</li>\n</ul>\n\n<p>1.17&nbsp;&nbsp;&nbsp; 2 October 1999</p>\n\n<ul>\n  <li>Change default behavior of ALINDIF to align segments of the same \n\ttype according to the actual alignment (which may differ from segment \n\tto segment) instead of enforcing a single alignment across all segments \n\tof the same type.&nbsp; This change mimics the MS-LINK behavior.&nbsp; \n\tUsing segments of the same type with different alignment is still a \n\tmistake.</li>\n</ul>\n\n<p>1.16&nbsp;&nbsp;&nbsp; 8 September 1999</p>\n\n<ul>\n  <li>Fix bug when encountering multiple different segments with stack \n\tcombine type (use the first one only).</li>\n</ul>\n\n<p>1.15&nbsp;&nbsp;&nbsp; 6 September 1999</p>\n\n<ul>\n  <li>Fix bug which didn't display an error if a .LIB file was not found.</li>\n  <li>Implement switches for BLKDEF, BLKEND, and TYPDEF records instead \n\tof lumping them into OMFIGN.&nbsp; As the default action is to ignore \n\tthese records, you don't have to ignore all OMFIGN records just to ignore \n\tthese.</li>\n</ul>\n\n<p>1.14&nbsp;&nbsp;&nbsp; 3 September 1999</p>\n\n<ul>\n  <li>Fix bug where default EXE and MAP filenames were not displayed when \n\tusing an Automatic Response File.</li>\n</ul>\n\n<p>1.13&nbsp;&nbsp;&nbsp; 25 May 1999</p>\n\n<ul>\n  <li>Fix bug with not generating .MAP file when /MAP specified without \n\tan end-of-field marker.</li>\n</ul>\n\n<p>1.12&nbsp;&nbsp;&nbsp; 16 May 1999</p>\n\n<ul>\n  <li>Fix bug with <tt>/DOSSEG</tt> segment ordering.</li>\n</ul>\n\n<p>1.11&nbsp;&nbsp;&nbsp; 25 June 1998</p>\n\n<ul>\n  <li>Compare segment and class names case insensitively so as to mimic \n\tMS LINK behavior.</li>\n  <li>Fix bug in FIXUPP of Frame Segment, Target External where the wrong \n\tvariable was used when checking for FRMSEG errors.</li>\n  <li>Round down Frame Base to para boundary before calculating fixups.</li>\n</ul>\n\n<p>1.10&nbsp;&nbsp;&nbsp; 27 April 1998</p>\n\n<ul>\n  <li>Mark THRINV as ignored.&nbsp; Apparently, MSVC 8 (and possibly earlier \n\tversions) set bit 2 in the method field of a THREAD subrecord in a FIXUPP \n\trecord.</li>\n  <li>Fix bugs with aliased symbols.</li>\n  <li>Fix spurious error report with BAKPAT records.</li>\n</ul>\n\n<p>1.09&nbsp;&nbsp;&nbsp; 12 March 1998</p>\n\n<ul>\n  <li>Fix bug in parsing of .LIB file on the command line so that QLINK \n\tno longer asks for more .LIB files if one is specified.</li>\n  <li>Implement <tt>/OPTHEADER</tt> (<tt>/OP</tt>) to optimize the .EXE \n\tfile header by rounding the header up to a paragraph boundary instead \n\tof a 512-byte boundary.</li>\n</ul>\n\n<p>1.08&nbsp;&nbsp;&nbsp; 12 November 1997</p>\n\n<ul>\n  <li>Wrote the VxD <tt>W95DPMI.386</tt> which provides the appropriate \n\tDPMI 1.0 functions for QLINK to run under Win95.&nbsp; In particular, \n\tthis VxD supplies the needed calls to allocate uncommitted pages.</li>\n</ul>\n\n<p>1.07&nbsp;&nbsp;&nbsp; 8 July 1997</p>\n\n<ul>\n  <li>Add <tt>EXTMAT</tt> config option to display message if an external \n\tin a module is not referenced by that module.&nbsp; Presumably (but \n\tnot always), these references can be deleted from the source file.</li>\n</ul>\n\n<p>1.06&nbsp;&nbsp;&nbsp; 25 June 1995</p>\n\n<ul>\n  <li>If <tt>/MAP</tt> but no explicit entry in map file field, create \n\tone anyway.</li>\n  <li>Fix bug in fixup of far call to extern in a later segment which doesn't \n\tstart on a para boundary.</li>\n  <li>Fix bug where <tt>/NOE</tt> didn't work.</li>\n  <li>Fix bug where null para at start of <tt>_TEXT</tt> not handled.</li>\n</ul>\n\n<p>1.05&nbsp;&nbsp;&nbsp; 8 May 1995</p>\n\n<ul>\n  <li>Implement <tt>/ONERROR:NOEXE</tt>.</li>\n  <li>Parse and ignore <tt>/NOLOGO</tt>.</li>\n  <li>Parse and warn <tt>/PACKCODE:</tt><i>nnn</i>.</li>\n  <li>Use FSA to parse .ARF files.</li>\n  <li>Change <tt>THRINV</tt> from always Fail to Ignore, Warn, Fail.</li>\n  <li>Support <tt>BAKPAT</tt> records.</li>\n  <li>Support <tt>CEXTDEF</tt> records.</li>\n  <li>Support <tt>LLNAMES</tt> records.</li>\n  <li>Treat extra fields in ARF file as EOF.</li>\n  <li>Implement <tt>/NOIGNORECASE</tt>.</li>\n</ul>\n\n<p>1.04&nbsp;&nbsp;&nbsp; 25 March 1995</p>\n\n<ul>\n  <li>Allow addition with seg directive, e.g., <tt>DW (seg PGROUP)+10h</tt>.&nbsp; \n\tNote that MS-LINK doesn't handle this correctly.</li>\n  <li>Fix bug in handling of OMF <tt>FIXUPP</tt> records for Frame &amp; \n\tTarget external for self-relative fixups.&nbsp; This format is used \n\tby MASM 6.10, but neither MASM 5.10b nor 6.11a.</li>\n</ul>\n\n<p>1.03&nbsp;&nbsp;&nbsp; 14 February 1995</p>\n\n<ul>\n  <li>Allow options occasionally enabled by some Integrated Development \n\tEnvironments which turn off unsupported features such as\n\t<ul>\n\t  <li><tt>/NOPACKCODE</tt></li>\n\t  <li><tt>/NOPACKDATA</tt></li>\n\t  <li><tt>/NOPACKFUNCTIONS</tt></li>\n\t</ul>\n  </li>\n  <li>Also allow (and signal warning) for unsupported features\n\t<ul>\n\t  <li><tt>/FARCALLTRANSLATION</tt></li>\n\t  <li><tt>/PACKCODE</tt></li>\n\t  <li><tt>/PACKDATA</tt></li>\n\t  <li><tt>/PACKFUNCTIONS</tt></li>\n\t</ul>\n  </li>\n</ul>\n\n<p>1.02&nbsp;&nbsp;&nbsp; 18 November 1994</p>\n\n<ul>\n  <li>Fix bug if QLINK is run w/o DPMI host present.</li>\n  <li>Fix misspelling of <tt>/NOEXTDICTIONARY</tt>.</li>\n</ul>\n\n<p>1.01&nbsp;&nbsp;&nbsp; 26 October 1994</p>\n\n<ul>\n  <li>Fix bug if searching for library file.</li>\n  <li>Write out minimal sized .EXE file.</li>\n</ul>\n\n<p>1.00&nbsp;&nbsp;&nbsp; 2 October 1994</p>\n\n<ul>\n  <li>Initial release</li>\n</ul>\n\n<!--#include virtual=\"/ValidXHTML-CSS.html\" -->\n<!--#include virtual=\"/footer.htm\" -->\n</body></html>"
  },
  {
    "path": "qlink/QLINK.TXT",
    "content": "QLINK Documentation File\n\nOverview\n--------\n\nQLINK is a DOS linker and analysis tool designed to link together\nMS-DOS compatible .OBJ files.  It can replace the MS-DOS LINK.EXE\nprogram when producing MS-DOS compatible .EXE and .COM files.\n\n\nInstallation\n------------\n\nMake a directory (e.g., C:\\QLINK), copy the zip file to that\ndirectory, and unzip the files:\n\nMD C:\\QLINK\nCD C:\\QLINK\nCOPY A:\\QLINK.ZIP\nPKUNZIP QLINK.ZIP\n\nIf you'll be running QLINK under Windows 3.1x (see below for Win95\ninstructions), copy the file WINDPMI.386 to your Windows system\ndirectory.  For example, if you installed Windows into the directory\nC:\\WINDOWS, copy WINDPMI.386 to C:\\WINDOWS\\SYSTEM.  Then edit your\nWindows SYSTEM.INI file to insert a line such as the following in the\n[386ENH] section:\n\n    device=windpmi.386\n\nYou should first ensure that no other similar line already appears in\nyour SYSTEM.INI file.  For example, you might already have a line such\nas\n\n    device=c:\\bc4\\bin\\windpmi.386\n\nIf this is the case, do not insert another call to the same driver;\nyou need only one.  This VxD does not work with Win9x.\n\nIf you'll be running QLINK under Win9x, follow the above procedure\nusing the file W95DPMI.386 instead of WINDPMI.386.\n\n\n\nBenefits\n--------\n\n* One pass linker (using uncommitted memory in DPMI 1.0)\n\n* Better performance (typically twice as fast as MS LINK, sometimes\n  ten times faster)\n\n* Handles USE32 segments > 64KB\n\n* Detailed error checking to the point that it becomes a highly\n  valuable analysis tool\n\n* Detailed error information (e.g., source code line number info (if\n  in .OBJ file) for fixup overflows)\n\n* Type checking between .OBJ files (if in .OBJ files)\n\n\nSystem Requirements\n-------------------\n\n* MS-DOS 3.x or later\n\n* DPMI host which supports DPMI 1.0 calls -- use either 386MAX version\n  7.0 or later, or Windows 3.1x with a (supplied) VxD from Borland\n  (WINDPMI.386), or DPMIONE (see http://www.sudleyplace.com/dpmione/).\n\n\nHow To Use\n----------\n\nFor the most part, just call QLINK instead of LINK or TLINK as\nappropriate.  Borland users should note that a number of\nBorland-specific Object Module Formats (OMFs) are not implemented as\nyet (I'm waiting for the documentation from Borland).  Several MS link\nswitches are not supported as yet (e.g., /PACKC).  If there are\nswitches you particularly need which are not supported, let me know.\nFor an explanation of the old linker switches, see your linker manual.\n\n\nTips\n----\n\nTo take advantage of the detailed error processing in QLINK, use the\nassembler switches which generate types and line numbers.  For MASM\nand TASM these switches are /Zd and /Zi.\n\n\nSegment Ordering\n----------------\n\nThe order in which segments appear in the executable file depends on\nseveral factors.  The first is whether or not the /DOSSEG switch\nappears explicitly on the command line or implicitly in a OMF record\nin one of the .OBJ files.\n\nIf /DOSSEG is specified, the segment order is as follows:\n\n* All segments with a class name ending in 'CODE'\n* All other segments not in DGROUP\n* DGROUP segments in the following order:\n  * Any segments of class 'BEGDATA'\n  * Any segment not of class 'BEGDATA', 'BSS', or 'STACK'\n  * Segments of class 'BSS'\n  * Segments of class 'STACK'\n\nOtherwise, the segment order is as follows:\n\n* All unclassed segments\n* All classed segments by class (that is, segments in the same class\n  appear adjacent to each other).\n\n\nError Messages\n--------------\n\nThere are a number of switches specific to QLINK which are documented\nin the file QLINK.CFG.\tThese switches control the processing of error\nmessages from QLINK.  All error messages begin with either\n\n> WARN:\n\nor\n\n> FAIL:\n\nMessages which begin with WARN are warnings and do not halt the\nlinker.  Messages which being with FAIL cause the linker to stop\nimmediately and not continue processsing the input files.\n\nIf an error message is followed by a name such as FIXOVF or GRPEXT0 in\nparentheses, then that error can be controlled by the switches\n/I:switch, /W:switch, and /F:switch, where 'switch' is the name in\nparentheses in the error message.\n\nIf you wish to ignore this error (meaning the linker takes a default\naction and continues processing), use /I:switch.  To warn about an\nerror (meaning an error message is displayed, the linker takes a\ndefault action, and continues processing), use /W:switch.  The default\nsettings for all error messages are described in the file QLINK.CFG.\n\nThis same file (QLINK.CFG) is consulted when QLINK begins execution.\nAny switches found there (including switches such as /MAP, /LINE,\netc.) are processed before the command line is parsed.\tSwitches only\nmay be contained in QLINK.CFG, not names of .OBJ files, etc.  Even\nearlier in the process, the environment variable QLINK= is consulted,\nand it too may contain only switches.\n\nThus the order of processing of switches is first, those contained in\nthe environment variable QLINK=, then those in the file QLINK.CFG\n(first in the current directory, and if not found there in the\ndirectory from which QLINK is loaded), and finally those found on the\ncommand line to QLINK.\tSwitches processed later in the sequence\noverride ones processed ealier.\n\n\nName Substitutions\n------------------\n\nOccasionally, you want to link together .OBJ modules from different\nprojects which use different naming conventions.  For example, in one\nproject code segments are in class 'CODE' and in others they are in\nclass 'PROG'.  Previously, you would have to edit the source code,\nmake the changes, and re-compile.  With the Name Substitution feature\nof QLINK, it's a snap.\n\nTo substitute names on the fly within the .OBJ file, place the switch\n/NS before the reference to each .OBJ file whose names are to be\nsubstituted.  For example, use /NS:PROG-CODE to tell QLINK that the\nname 'PROG' is to be changed to 'CODE'.\n\nEach substitution is effective for all .OBJ files which appear after\nit until that substitution (or all substitutions) are halted.  Use the\nform /NS:name to halt substitutions on 'name'; use /NS with no\narguments to halt all substitutions.\n\nNote that this means that the occurrences of /NS are sensitive to the\nposition and order in which they appear.  Be sure to place occurrences\nof /NS before the reference to the .OBJ file to which they apply.\n\nTo swap two symbols in the same file, use (say) /NS:A-B:B-A.\n\nThe substitution is made on all references to the name regardless of\ncontext.  Thus if you have a file with a segment named PROG and a\nclass named PROG, substituting CODE for PROG changes both references.\n\nThe full syntax is\n\nNameset:    (empty)\t    ; Halt substitution on all names\n\t  | name\t    ; Halt substitution on this name\n\t  | name '-' name   ; Substitute the second name for the\n\t\t\t    ; first name\n\nNamedef:    Nameset\n\t  | Namedef ':' Nameset\n\nSwitch:     '/NS:' Namedef\n\nThe keyword /NS may appear in the QLINK environment variable, the\nQLINK.CFG configuration file, the automatic response file, and the\nQLINK command line.\n\n\nFrequently Asked Questions\n--------------------------\n\nQ:  When I link modules with the MS linker and QLINK, sometimes the\n    executable files are of very different sizes?\nA:  This can occur if a .LIB is used to resolve external references.\n    Because there is no rule as to the order in which external refs\n    are processed, different ordering of these references mean that\n    there can be different segment boundary alignments which can\n    change the final executable file size.\n\n\nFuture Work\n-----------\n\nIn no particular order of importance (nor of expectation of getting\ndone), the following topics are on my list:\n\n* Support Borland-specific OMFs\n\n* Support MS-specific OMFs (for which I don't have any examples)\n\n* External procedure for symbol processing (instead of reading .MAP\n  file)\n\n* Allow segment attribute changes per .OBJ file\n\n* Generate Windows-compatible .EXEs\n\n* Generate Codeview information\n\n* Generate Turbo Debugger information\n\n* Compress .EXE using LZH or some such technique (for Windows\n  executables as well)\n\n* Finish type checking of structures\n\nPlease feel free to add to this list.\n\n\nTechnical Support\n-----------------\n\nPlease contact the author via Internet e-mail at\n\n    bsmith@sudleyplace.com (Bob Smith)\n\n\nQLINK is (C) Copyright 1994-2006 Qualitas, Inc.  All rights reserved.\n\n\nChange History\n--------------\n\n5.08\t23 March 2006\n\t* Fix bug in .LIB symbol compares for case-insensitive\n\t  libraries whose symbols contain uppercase letters (thanks\n\t  Bob Snuggs).\n\n5.07\t2 January 2004\n\t* Fix bug which prevents multiple .LIB files from being\n\t  recognized (thanks Japheth).\n\n5.06\t24 December 2003\n\t* Catch invalid OMF record where an LIDATA record has a zero\n\t  repeat count.\n\n5.05\t19 June 2003\n\t* Mark COMM variables as USE32 if the segment in which they\n\t  are defined (c_common or FAR_BSS) is USE32.\n\t* Load .OBJ files into extended memory instead of low DOS\n\t  in case there's not enough room.\n\t* Implement undocumented /KNOWEAS for compatibility with MS\n\t  linker.\n\n5.04\t22 May 2003\n\t* Added more information to USEDIF error message to point to\n\t  .OBJ file in which the segment was first defined.\n\t* Added references to DPMIONE as a DPMI 1.0 host under which\n\t  QLINK runs.\n\n5.03\t21 July 2002\n\t* Modified the change in version 5.00 for fixup overflows to\n\t  treat the Target Displacement as a signed number and then\n\t  ignore overflows if the upper 24- (for byte fixups) or\n\t  16-bits (for word fixups) are all ones.\n\n5.02\t1 July 2002\n\t* Fix bug where a MODEND fixup generating any kind of error\n\t  causes the routine which displays the .OBJ file name to fail\n\t  (thanks to Vladomir Rodriquez for pointing this out).\n\n5.01\t26 June 2002\n\t* Fix bug where .MAP file occasionally not written out.\n\t* Display segment combine type in /MAP:FULL.\n\t* Fix bug in display of line #s for grouped segments which are\n\t  not first in the group.\n\t* Append IGNOREd errors to .ERR file if /DEBUG:ERR in effect.\n\t* Added FIXOVF$ switch to ignore fixup overflows in '$$SYMBOLS'\n\t  segments.\n\t* Fix bug when parsing command line and/or .ARF file if\n\t  leading '+' in multiple entry (.OBJ or .LIB) fields.\n\n5.00\t26 June 2002\n\t* Change version # to 5 to workaround bug in EXEHDR.\n\t* Fix bug in display of FRMSEG$ message.\n\t* Display error message if not enough memory to enter PM\n\t  through the DPMI host.\n\t* Fix bug when checking for fixup overflows where the displacement\n\t  wasn't added in before the overflow check, thus missing some\n\t  overflows (thanks to Vladomir Rodriquez for pointing this out).\n\n1.30\t22 June 2002\n\t* Added MTOBJ switch to fail on empty .OBJ files which can occur\n\t  when a language translator creates an object file but halts for\n\t  some reason before writing anything to it.\n\n1.29\t18 April 2002\n\t* Fix bug to change ignore/warn action on OMFUNK to ignore the\n\t  record.\n\n1.28\t25 April 2000\n\t* Fix bug handling weak externs if the symbol is already public.\n\n1.27\t18 April 2000\n\t* Implement support for COMDAT records.\n\t* Avoid searching through duplicate library names.\n\t* Handle blank line in ARF file as field marker.\n\t* Allow library directories in libfiles part of the command line.\n\n1.26\t10 April 2000\n\t* Extend checking for FRMSEG, FRMSEG0, and FRMSEG$ to the FT01\n\t  case.\n\t* Define RELTGT switch to catch the case where a self-relative\n\t  fixup's Frame and Target segments are different in the FT00\n\t  case.\n\n1.25\t7 April 2000\n\t* Extend checking for RELGRP errors in self-relative fixups to the\n\t  FT10 and FT11 cases.\n\t* Extend checking for RELGRPX and RELSEGX errors in self-relative\n\t  fixups to the FT20 and FT21 cases.\n\t* Extend checking for RELSEG errors in self-relative fixups to the\n\t  FT01 case.\n\n1.24\t4 April 2000\n\t* Extend Name Substitutions to PUBDEF and EXTDEF records (it\n\t  previously applied to LNAMES & LLNAMES records only).\n\t* Extend Name Substitutions to .LIB files.\n\n1.23\t30 March 2000\n\t* Define FRMSEG$ switch to catch the case where a FRMSEG error\n\t  occurs in a fixup segment named '$$SYMBOLS'.  This reduces some\n\t  of the noise when linking with debugging info.  The default\n\t  action is to ignore the error.\n\t* Fix bug when an external mixed-case symbol precedes the matching\n\t  public declaration of the same symbol in a different case.\n\n1.22\t30 March 2000\n\t* Implement /NS keyword to handle name substitutions.\n\t* Implement additional debugging display for fixups via\n\t  /DEBUG:FIXUP.\n\n1.21\t28 March 2000\n\t* Force /NOE as I can't figure out how it works.  I thought I\n\t  understood it, but now I'm convinced I do not.\n\n1.20\t24 March 2000\n\t* Implement /FARCALL.\n\t* Fix bugs when recognizing special class, segment, and group\n\t  names (wasn't case-insensitive and was off by one in length\n\t  when comparing names).\n\n1.19\t22 March 2000\n\t* Define FRMSEG0 switch to reduce the number of spurious FRMSEG\n\t  messages in the case where the segment is the first one in the\n\t  group.  In this case, the fixup value is the same independent\n\t  of whether the fixup is segment- or group-relative.  The default\n\t  action is to ignore FRMSEG0 errors.\n\n1.18\t15 March 2000\n\t* Fix bug in self-relative fixups for several Frame vs. Target\n\t  cases I never thought could occur until NASM came along.\n\n1.17\t2 October 1999\n\t* Change default behavior of ALINDIF to align segments of the\n\t  same type according to the actual alignment (which may\n\t  differ from segment to segment) instead of enforcing a\n\t  single alignment across all segments of the same type.  This\n\t  change mimics the MS-LINK behavior.  Using segments of the\n\t  same type with different alignment is still a mistake.\n\n1.16\t8 September 1999\n\t* Fix bug when encountering multiple different segments with\n\t  stack combine type (use the first one only).\n\n1.15\t6 September 1999\n\t* Fix bug which didn't display an error if a .LIB file was not\n\t  found.\n\t* Implement switches for BLKDEF, BLKEND, and TYPDEF records\n\t  instead of lumping them into OMFIGN.\tAs the default action\n\t  is to ignore these records, you don't have to ignore all\n\t  OMFIGN records just to ignore these.\n\n1.14\t3 September 1999\n\t* Fix bug where default EXE and MAP filenames were not\n\t  displayed when using an Automatic Response File.\n\n1.13\t25 May 1999\n\t* Fix bug with not generating .MAP file when /MAP specified\n\t  without an end-of-field marker.\n\n1.12\t16 May 1999\n\t* Fix bug with DOSSEG segmnent ordering.\n\n1.11\t25 June 1998\n\t* Compare segment and class names case insensitively so as to\n\t  mimic MS LINK behavior.\n\t* Fix bug in FIXUPP of Frame Segment, Target External where the\n\t  wrong variable was used when checking for FRMSEG errors.\n\t* Round down Frame Base to para boundary before calculating\n\t  fixups.\n\n1.10\t27 April 1998\n\t* Mark THRINV as ignored.  Apparently, MSVC 8 (and possibly\n\t  earlier versions) set bit 2 in the method field of a THREAD\n\t  subrecord in a FIXUPP record.\n\t* Fix bugs with aliased symbols.\n\t* Fix spurious error report with BAKPAT records.\n\n1.09\t12 March 1998\n\t* Fix bug in parsing of .LIB file on the command line so that\n\t  QLINK no longer asks for more .LIB files if one is specified.\n\t* Implement /OPTHEADER (/OP) to optimize the .EXE file header by\n\t  rounding the header up to a paragraph boundary instead of a\n\t  512-byte boundary.\n\n1.08\t12 November 1997\n\t* Wrote the VxD W95DPMI.386 which provides the appropriate\n\t  DPMI 1.0 functions needed for QLINK to run under Win95.\n\n1.07\t8 July 1997\n\t* Add EXTMAT config option to display message if an external in a\n\t  module is not referenced by that module.\tPresumably (but not\n\t  always), these references can be deleted from the source file.\n\n1.06\t25 June 1995\n\t* If /MAP but no explicit entry in mapfile field, create one\n\t  anyway.\n\t* Fix bug in fixup of far call to extern in a later segment\n\t  which doesn't start on a para boundary.\n\t* Fix bug where /NOE didn't work.\n\t* Fix bug where null para at start of _TEXT not handled.\n\n1.05\t8 May 1995\n\t* Implement /ONERROR:NOEXE.\n\t* Parse and ignore /NOLOGO.\n\t* Parse and warn /PACKCODE:nnn.\n\t* Use FSA to parse .ARF files.\n\t* Change THRINV from always Fail to Ignore, Warn, Fail.\n\t* Support BAKPAT records.\n\t* Support CEXTDEF records.\n\t* Support LLNAMES records.\n\t* Treat extra fields in ARF file as EOF.\n\t* Implement /NOIGNORECASE.\n\n1.04\t25 March 1995\n\t* Allow addition with seg directive, e.g.,\n\t  DW (seg PGROUP)+10h.\tNote that MS-LINK doesn't handle this\n\t  correctly.\n\t* Fix bug in handling of OMF FIXUPP records for Frame &\n\t  Target external for self-relative fixups.  This format is\n\t  used by MASM 6.10, but neither MASM 5.10b nor 6.11a.\n\n1.03\t14 February 1995\n\t* Allow options occasionally enabled by some Integrated\n\t  Development Environments which turn off unsupported\n\t  features such as\n\n\t  /NOPACKCODE\n\t  /NOPACKDATA\n\t  /NOPACKFUNCTIONS\n\n\t* Also allow (and signal warning) for unsupported features\n\n\t  /FARCALLTRANSLATION\n\t  /PACKCODE\n\t  /PACKDATA\n\t  /PACKFUNCTIONS\n\n1.02\t18 November 1994\n\t* Fix bug if QLINK is run w/o DPMI host present.\n\t* Fix misspelling of /NOEXTDICTIONARY.\n\n1.01\t26 October 1994\n\t* Fix bug if searching for library file.\n\t* Write out minimal sized .EXE file.\n\n1.00\t2 October 1994\n\t* Initial release.\n\n\u001a"
  },
  {
    "path": "reqdmmi.asm",
    "content": "\n\nmacro RequireDMMI\n{\n\tlocal FailX\n\tlocal SuccX\n\tlocal FailErr\n\n\tpushad\n\tpush es\n\tpush ds\n\n\tmov ax,0x35F0\n\tint 0x21\n\tcmp dword [es:bx + 2],'dmmi'\n\tjnz FailX\n\tmov ax,0\n\tint 0xF0\n\tcmp ax,0xFACE\n\tjnz FailX\n\n\tpop ds\n\tpop es\n\tpopad\n\tjmp SuccX\n\n\tFailErr db \"This app requires a DMMI Server\",0xD,0xA,\"$\"\n\tFailX:\n\tpush cs\n\tpop ds\n\tmov ax,0x0900\n\tmov dx,FailErr\n\tint 0x21\n\tpop ds\n\tpop es\n\tpopad\n\tmov ax,0x4c00\n\tint 0x21\n\n\tSuccX:\n\n}"
  },
  {
    "path": "runx.bat",
    "content": "\n@echo off\nD:\n\n\nentry.exe\nentry.exe /r\ndmmic.exe\ndos32a.exe le.exe\n\n\nrem cd dpmi\nrem dpmione pro=dpmione.pro\nrem cd ..\n\nvdebug debuggee.exe\nmdebug debuggee.exe\nswitcher\n\n\na:\n\n\n"
  },
  {
    "path": "stack16.asm",
    "content": "; --------------------------------------- 16 bit stack ---------------------------------------\nSEGMENT STACK16 USE16\nsseg16 dw 1024 dup (?)\nstack16_end:\n\n\n;-------------------------------------------------------------------------------------------\n; 16 bit stack segment for sipi\n;-------------------------------------------------------------------------------------------\nSEGMENT STACK16S USE16\nORG 0\nsseg16s dw 200 dup (?)\nstack16s_end:\n\n\t\t\nsseg16dmmi2 dw 100 dup (?)\nstack16dmmi2_end:\n\nsseg16dmmi3 dw 100 dup (?)\nstack16dmmi3_end:\n\n;-------------------------------------------------------------------------------------------\n; 16 bit stack segments for threads\n;-------------------------------------------------------------------------------------------\nSEGMENT STACK16T1 USE16\nORG 0\nsseg16t1 dw 200 dup (?)\nstack16t1_end:\nSEGMENT STACK16T2 USE16\nORG 0\nsseg16t2 dw 200 dup (?)\nstack16t2_end:\nSEGMENT STACK16T3 USE16\nORG 0\nsseg16t3 dw 200 dup (?)\nstack16t3_end:\nSEGMENT STACK16T4 USE16\nORG 0\nsseg16t4 dw 200 dup (?)\nstack16t4_end:\nSEGMENT STACK16T5 USE16\nORG 0\nsseg16t5 dw 200 dup (?)\nstack16t5_end:\n"
  },
  {
    "path": "stack32.asm",
    "content": "; --------------------------------------- 32 bit stack ---------------------------------------\nSEGMENT STACK32 USE32\nstack32         db      100 dup (?)\nstack32_end:\n\n"
  },
  {
    "path": "stack64.asm",
    "content": "; --------------------------------------- 64 bit stack ---------------------------------------\n\nSEGMENT STACK64 USE64\nORG 0\nstack64         db      1000 dup (?)\nstack64_end:\n\nnop\n\nstack64dmmi         db      1000 dup (?)\nstack64dmmi_end:\n\nnop\n"
  },
  {
    "path": "startbochs.bat",
    "content": "bochs.exe -q -f \"%1\"\n"
  },
  {
    "path": "startvbox.bat",
    "content": "g:\\virtualbox\\VBoxManage.exe unregistervm asmtest\ng:\\virtualbox\\VBoxManage.exe registervm \"%1\"\nset VBOX_GUI_DBG_AUTO_SHOW=true\nset VBOX_GUI_DBG_ENABLED=true\ng:\\virtualbox\\VBoxManage.exe startvm asmtest -E VBOX_GUI_DBG_AUTO_SHOW=true -E VBOX_GUI_DBG_ENABLED=true\n"
  },
  {
    "path": "startvmware.bat",
    "content": "\"C:\\Program Files (x86)\\VMware\\VMware Workstation\\vmware.exe\" -q -x \"%1\"\n"
  },
  {
    "path": "struct.asm",
    "content": "; --------------------------------------- Macro and Structure Definitions ---------------------------------------\n\nmacro linear reg,trg,seg = DATA16\n\t{\n;\txor reg,reg\n\tmov reg,seg\n\tshl reg,4\n\tadd reg,trg\n\t}\n\nmacro atlinear reg,trg,seg\n\t{\n\tmov reg,seg\n\tshl reg,4\n\tadd reg,trg\n\tmov reg,[reg]\n\t}\n\n\nmacro dh_virtualization\n{\n\t\tlocal .nuvmx\n\t\tlocal .nvmx\n\n\t\t; dh -> 0 no virtualization\n\t\t; dh -> 1 virtualization plain\n\t\t; dh -> 2 virtualization unrestricted guest\n\t\tmov eax,1\n\t\tcpuid\n\t\txor dx,dx\n\t\tbt ecx,5\n\t\tjnc .nvmx\n\t\tmov dh,1\n\t\txor eax,eax\n\t\txor edx,edx\n\t\tmov ecx,0x48B ; IA32_VMX_PROCBASED_CTLS2\n\t\trdmsr\n\t\tbt edx,7\n\t\tjnc .nuvmx\n\t\tmov dh,2\n\t\tjmp .nvmx\n\t\t.nuvmx:\n\t\tmov dh,1\n\t\t.nvmx:\n}\n\nmacro pushadxeax\n\t{\n\tpush ebx\n\tpush ecx\n\tpush edx\n\tpush esi\n\tpush edi\n\tpush ebp\n\t}\n\t\nmacro popadxeax\n\t{\n\tpop ebp\n\tpop edi\n\tpop esi\n\tpop edx\n\tpop ecx\n\tpop ebx\n\t}\n\nmacro push64\n\t{\n\tpush rax\n\tpush rbx\n\tpush rcx\n\tpush rdx\n\tpush rsi\n\tpush rdi\n\tpush rbp\n\tpush r8\n\tpush r9\n\tpush r10\n\tpush r11\n\tpush r12\n\tpush r13\n\tpush r14\n\tpush r15\n\t}\n\t\nmacro pop64\n\t{\n\tpop r15\n\tpop r14\n\tpop r13\n\tpop r12\n\tpop r11\n\tpop r10\n\tpop r9\n\tpop r8\n\tpop rbp\n\tpop rdi\n\tpop rsi\n\tpop rdx\n\tpop rcx\n\tpop rbx\n\tpop rax\n\t}\n\nstruc A_CPU a,b,c,d\n        {\n        .acpi   dd a\n        .apic   dd b\n        .flags  dd c\n\t\t.handle dd d\n        }\n\n\nstruc GDT_STR s0_15,b0_15,b16_23,flags,access,b24_31\n        {\n\t\t.s0_15   dw s0_15\n\t\t.b0_15   dw b0_15\n\t\t.b16_23  db b16_23\n\t\t.flags   db flags\n\t\t.access  db access\n\t\t.b24_31  db b24_31\n        }\nstruc IDT_STR o0_15,se0_15,zb,flags,o16_31\n        {\n\t\t.o0_15   dw o0_15\n\t\t.se0_15  dw se0_15\n\t\t.zb      db zb\n\t\t.flags   db flags\n\t\t.o16_31  dw o16_31\n        }\nstruc IDT_STR64 o0_15,se0_15,zb,flags,o16_31,o32_63,zr\n        {\n\t\t.o0_15   dw o0_15\n\t\t.se0_15  dw se0_15\n\t\t.zb      db zb\n\t\t.flags   db flags\n\t\t.o16_31  dw o16_31\n\t\t.o32_63  dd o32_63\n\t\t.zr      dd zr\n        }\n\nmacro vmw16 code,value\n{\n\tmov ebx,code\n\txor eax,eax\n\tmov ax,value\n\tvmwrite ebx,eax\n}\n\nmacro vmw32 code,value\n{\n\tmov ebx,code\n\tmov eax,value\n\tvmwrite ebx,eax\n}\nmacro vmw64 code,value\n{\n\tmov rbx,code\n\tmov rax,value\n\tvmwrite rbx,rax\n}\n\nmacro vmr r,code\n{\n\tmov rbx,code\n\tvmread r,rbx\n}\n\nmacro break\n{\nxchg bx,bx\n}\n\n\nstruc LoadX a,b,c,d,e,f,g\n    {\n    .f1 dw a\n    .f2 dd b\n    .f3 dd c\n\t.f4 dd d\n\t.sp dw g\n\t.ss dw f\n\t.cs dw e\n\t.ip dw e\n    }\n\n\n"
  },
  {
    "path": "swat/386SWAT",
    "content": ";\n; Recommended options are\n\n  trapdiv\t\t; Direct INT 00h to 386SWAT (Divide Overflow Fault)\n  trapnmi\t\t; Direct INT 02h to 386SWAT (Non-maskable interrupt)\n  trapbound ; Direct INT 05h to 386SWAT (BOUND Fault)\n  trapinv\t\t; Direct INT 06h to 386SWAT (Invalid Opcode Fault)\n  trapstack ; Direct INT 0Ch to 386SWAT (Stack Fault)\n  x15\t\t\t; Pass through all INT 15h memory calls\n\n;\n; The default options are\n;\n; addrhbits=12\t; Specify bits in addresses to hash (8-12)\n; btbsize=0 ; Specify size of Branch Trace Buffer in kilobytes\n; cmdhist=1024\t; Specify the size of the command history buffer\n; intrude\t\t; Attempt to intrude into another memory manager's PL0 context\n; logsize=4096\t; Specify size of error log buffer in bytes\n; normlidt\t\t; Disable Real Mode LIDT redirection\n; proxsrch=4,1\t; Search symbols for matches within range 4 of units with\n;\t\t ; granularity 1 (default granularity is 1 for byte).\n; savescreen=16 ; Specify # last screens to save\n; symfilter=__imp__ _ ; Specify leading text to strip from symbols\n; symsize=4096\t; Specify # bytes to reserve for the symbol table\n; trapskip\t\t; Direct INT 03h to 386SWAT (Single-skip)\n; trapstep\t\t; Direct INT 01h to 386SWAT (Single-step)\n; wkdls=0\t\t; No Windows Kernel Debugger Load Segment symbols\n;\n;\n; The default services are\n;\n; Windows Kernel Debugger services enabled (disable via nowink)\n;\n;\n; All possible options are\n;\n; [section name] ; Limit profile processing to the matching MultiConfig\n;\t\t\t\t; section in CONFIG.SYS\n; addrhbits=nn\t; Specify bits in addresses to hash (8-12, default=12)\n; altscr\t\t; Use alternate screen for debugging\n; /a\t\t\t; Alias for ALTSCR\n; btbsize=nnnnn ; Specify size of Branch Trace Buffer in kilobytes (default=0)\n; buckets=nnn\t; Specify # 1K hash bucket blocks (1-255)\n; cmdhist=nnn\t; Specify the size of the command history buffer\n; coldboot\t\t; Do not try to warm boot on Ctrl-Alt-Del\n; dvga\t\t\t; Use Dual VGA screen\n; fsonly\t\t; SWAT available in Fullscreen mode in Windows only\n; gpskip=key[,key] ; GP Skip instructions:\tALL, INT, HLT, OUTD, OUTI, OUTS,\n;\t\t\t\t; IND, INI, INS, CLI, STI, IRET, PPF, and CRn so far\n; intrude\t\t; Obsolete option which is now the default\n; keyb=cclay\t; Use international keyboard whose country code/layout is cclay.\n;\t\t\t\t; Possible values are\n;\t\t\t\t;\tcclay  Country\n;\t\t\t\t; ----------------------\n;\t\t\t\t;\tGR129  Germany\n;\t\t\t\t;\tSP172  Spain\n; lcd\t\t\t; LCD screen present\n; loadhigh\t\t; Obsolete option which is now the default\n; loadlow\t\t; Tell 386MAX it's not OK to load us into extended memory\n;\t\t\t\t; after INIT_REAL and to relocate our INIT_VIRT code.\n; loadsym\t\t; Enable command line loading of symbols\n; loadsym=d:\\path\\filename.ext [optional args] ; Load SSF file at PM init time\n;\t\t\t\t; [/b=xxxxxxxx]    Optional physical base address in hex\n;\t\t\t\t; [/h]\t\t   Optional HPDA flag (enable DPMI services)\n;\t\t\t\t; [/li-]\t   Optional disable of line numbers\n;\t\t\t\t; [/xl] \t   Disable larger comparison w/SYMSIZE\n; logsize=nnnnn  ; Specify size of error log buffer in bytes (default=4096)\n; mono\t\t\t; Use monochrome adapter if present\n; nogd\t\t\t; Don't automatically set the GD bit in DR7\n; normlidt\t\t; Disable Real Mode LIDT redirection\n; noswap\t\t; Don't swap screens over single-step/skip\n; novxd \t\t; Don't load the VxD\n; nowindpci ; Disable Windows Dual PCI switching\n; nowink\t\t; Disable Windows Kernel Debugger services\n; passthrough=nn,nn,... ; Specify one or more hardware interrupt handlers\n;\t\t\t\t; (numbers in hex) to pass through while SWAT is active.\n;\t\t\t\t; The only ones currently supported are B, C, 76, and 77.\n; path=dir[,dir2[...]] ; Specify source code search path for symbolic debugging\n;\t\t\t\t; (current directory is NOT included by default)\n; portinit=string ; Specify a modem initialization string (setcom must be\n;\t\t\t\t; specified as well).  Valid escape sequences are:\n;\t\t\t\t; \\\\ Send a backslash\n;\t\t\t\t; \\r Send a carriage return\n;\t\t\t\t; \\b Send a break signal\n;\t\t\t\t; \\p Pause about 250 ms.\n;\t\t\t\t; \\1 - \\0 Wait 1 - 10 seconds.\n;\t\t\t\t; On the first invocation of SWAT, the system will\n;\t\t\t\t; automatically attempt to establish connection with a remote\n;\t\t\t\t; SWAT system.\n; proxsrch=r[,g] ; Search symbols for matches within range r of units with\n;\t\t\t\t; granularity g (default granularity is 1 for byte).\n; ps4=xxxx\t\t; Periscope 4 hardware debugger board is at I/O port xxxx\n; rmlidt\t\t; Enable Real Mode LIDT redirection\n; savescreen=nnn ; Specify # last screens to save (default = 16)\n; setcom=port,bps[,{IRQ|p}[,base]] ; Initialize specified serial port (1-4) for\n;\t\t\t\t; remote debugging at specified bps.  Optional IRQ number (3,4)\n;\t\t\t\t; overrides default association of ports with IRQs, or p may\n;\t\t\t\t; be specified for polled operation.  Optional port base\n;\t\t\t\t; may be specified to override BIOS value at 40:0.\n; symfilter=text1 [text2 [...]] ; Specify leading text to strip from symbols\n; symsize=nnnnn ; Specify # bytes to reserve for the symbol table (default=4096)\n; trapbound ; Direct INT 05h to 386SWAT (BOUND Fault)\n; trapdebug ; Direct INT 01h/03h to 386SWAT (Same as TRAPSTEP with TRAPSKIP)\n; trapdiv\t\t; Direct INT 00h to 386SWAT (Divide Overflow Fault)\n; trapgenp\t\t; Direct INT 0Dh to 386SWAT (General Protection Fault)\n; trapinv\t\t; Direct INT 06h to 386SWAT (Invalid Opcode Fault)\n; trapnmi\t\t; Direct INT 02h to 386SWAT (Non-maskable interrupt)\n; trappage\t\t; Direct INT 0Eh to 386SWAT (Page Fault)\n; trapsegnp ; Direct INT 0Bh to 386SWAT (Segment Not Present Fault)\n; trapskip\t\t; Direct INT 03h to 386SWAT (Single-skip)\n; trapstack ; Direct INT 0Ch to 386SWAT (Stack Fault)\n; trapstep\t\t; Direct INT 01h to 386SWAT (Single-step)\n; traptss\t\t; Direct INT 0Ah to 386SWAT (TSS Fault)\n; unreal [+|-][cs|ds|es|fs|gs|ss|all] ; Enable (+) or disable (-) Unreal\n;\t\t\t\t; (Flat Real) mode on selected (all) segment registers\n; vcpiswat\t\t; Don't attempt to intrude into a memory manager's PL0 context\n; video=d:\\path\\filename.ext ; Load/create video tables\n; vmscount=n\t; Number of times to intrude on GDT/IDT for VCPI debugging\n; vmsint\t\t; Launder Windows and VCPI mode switches and hook interrupts\n;\t\t\t\t; 00, 01, 02, 03, 05, 06, 08, 0A, 0B, 0C, 0D, and 0E.\n; vmsint=nn,nn,... ; Limit VMSINT debugging to these interrupt #s\n; watchdog=nn\t; Set watchdog timer to nn timer ticks (0-255)\n; wkdls=nnn ; Define # WKD Load Segment entries\n; x15\t\t\t; Pass through all INT 15h memory calls\n; xirqcode\t\t; Skip IRQ code\n\n; debug=caps\t; Signal NMI if CapsLock pressed at startup\n; debug=ibv ; Use Interrupt mask base Vector for Ctrl-Alt-PAD5\n; debug=int ; Signal INT 03h if CapsLock present at startup\n; debug=pmi ; Signal INT 03h near end of INIT_PROT\n; debug=trip\t; Use triple fault method to reboot\n; debug=vmi ; Signal INT 01h on entry to INIT_VIRT\n; debug=wcb\t ; Signal INT 01h on entry to Windows Callback Disable\n; debug=xpushf\t; Don't skip over (INT 03h) PUSHF/PUSHFD\n\n\u001a"
  },
  {
    "path": "swat/386SWAT.DOC",
    "content": "386SWAT   -- A Debugger for All Modes\n   (C) Copyright 1988-2001 Qualitas, Inc.  All rights reserved.\n\nThis protected mode debugger when used in conjunction with 386MAX or\nany other memory manager provides debugging services to protected\nmode, virtual 8086 mode programs, and DPMI and VCPI clients while\noccupying zero bytes of memory in the first megabyte.  It supports\ndisassembly of the full 386, 387, 486, and Pentium CPU instruction\nset through the Pentium 4 MMX & SSE instructions.\n\n\nInstalling 386SWAT\n------------------\n\nCreate a directory on your hard disk (say, C:\\386SWAT), copy the ZIP\nfile to that directory, and unzip it there.  To unzip 386SWAT, use\n\nPKUNZIP 386SWAT\n\nThis debugger can be used in conjunction with any memory manager which\nsupports VCPI, or with just HIMEM.SYS.\n\n*  To install 386SWAT, place the following line into your CONFIG.SYS\n   file:\n\n      DEVICE=d:\\path\\386SWAT.LOD options\n\n   Place the DEVICE= statement for 386SWAT immediately following the\n   DEVICE= for the memory manager (if any), or HIMEM.SYS if no memory\n   manager is being used.  \"d:\\path\\\" represents the drive and path\n   location of 386SWAT and \"options\" represents zero or more profile\n   options.\n\nAs there are several options you may wish to use with 386SWAT, we\nrecommend that you put all 386SWAT keywords in a profile one keyword\nper line, and point to the profile with the PRO= option on the\n386SWAT.LOD line.  For example,\n\n   DEVICE=d:\\path\\386SWAT.LOD PRO=d:\\path\\386SWAT.PRO\n\n\n386SWAT Profile Options\n-----------------------\n\nThe following profile options are recognized by 386SWAT.  Options may\nbe entered in upper and/or lower case.\tSee the file 386SWAT for a\nlist you can use already in profile format.\n\n[section name]\tFor versions of DOS which support MultiConfig, this\n\t\toption limits profile processing to the matching\n\t\tMultiConfig section in CONFIG.SYS.\n\nADDRHBITS=n\tBits to use for address hashing (8-12; default 12).\n\nALTSCR\t\tDisplay debugging information on the screen other\n\t\tthan the current one being used.  That is, in a two\n\t\tmonitor system, if the current screen uses the\n\t\tcolor adapter, display debugging data on the\n\t\tmonochrome screen and vice versa.  This option is\n\t\tvalid only if we detect that there are both a color\n\t\tand monochrome adapter in the system.  Otherwise, it\n\t\tis ignored.  Note that the screens can be swapped via\n\t\tAlt-F7.  An alias for this option is /A.\n\nBUCKETS=n\tSpecify the number of name hashing blocks to allocate\n\t\t(about 1K each).\n\nCMDHIST=nnn\tSpecify the size of the command history buffer.\n\t\tDefault is 1024.\n\nCOLDBOOT\tDon't write 1234h to warm boot flag location when\n\t\trebooting system from within 386SWAT.\n\nDEBUG=TRIP\tUse triple fault method of rebooting.  Sometimes a\n\t\tsystem doesn't reboot when using the 8042 method (the\n\t\tdefault), so here's another way to skin the cat.\n\nDEBUG=WCB1\tSignal an INT 01h at Windows Callback time when entering\n\t\tWindows (VM->RM) so breakpoints can be set.  This keyword\n\t\tis particvularly useful in conjunction with the INSERT\n\t\tcommand.  To change this state later on, use the command\n\t\tWKD WCB1 [ON|OFF].\n\nDVGA\t\tUse a Dual VGA screen as the secondary monitor.\n\nGPSKIP=key[,key]  If a GP Fault occurs on any of the instructions\n\t\tnamed in the list, do not signal this to 386SWAT.  This\n\t\toption allows you to trap GP Faults but filter out\n\t\tones which may commonly occur but not be of interest.\n\t\tThe key values (GP Skip instructions) supported are\n\n\t\tKeyword        Instruction(s)\n\t\t  CLI\t       CLI\n\t\t  CRn\t       MOV r32,CRn/MOV CRn,r32\n\t\t  HLT\t       HLT\n\t\t  IND\t       IN AL/AX/EAX,DX\n\t\t  INI\t       IN AL/AX/EAX,immed\n\t\t  INT\t       INT xx\n\t\t  IRET\t       IRET/IRETD\n\t\t  OUTD\t       OUT DX,AL/AX/EAX\n\t\t  OUTI\t       OUT immed,AL/AX/EAX\n\t\t  PPF\t       PUSHF/POPF/PUSHFD/POPFD\n\t\t  STI\t       STI\n\n\t\tThe keyword ALL covers all of the above options.\n\nINTRUDE \tAttempt to intrude into another memory manager's PL0\n\t\tcontext.  If this is successful, 386SWAT appears as\n\t\ta PL0 debugger in the context of the memory manager.\n\t\tThis option is now the default.  To disable this\n\t\toption, see VCPISWAT.\n\nKEYB=ccidn\tUse international keyboard whose country code/layout\n\t\tis cclay.  Possible values are\n\n\t\t   cclay       Country\n\t\t-------------------------\n\t\t   GR129       Germany\n\t\t   SP172       Spain\n\n\t\tIf your keyboard is not in this list, read the file\n\t\tKEYBIN.TXT to see how you can help.\n\nLCD\t\tAn LCD screen is present (and 386SWAT uses the\n\t\tmonochrome screen attributes).\tDoes anyone know how\n\t\tto detect this case under program control?  I would\n\t\tprefer not to require the user to tell us what the\n\t\tscreen is like.\n\nLOADLOW \tTell 386MAX it's not OK to load us into extended\n\t\tmemory after INIT_REAL and to relocate our INIT_VIRT\n\t\tcode.  It's highly unlikely you'll need this option.\n\nLOADSYM=filename [optional]\n\t\tLoad specified symbol file with optional arguments:\n\n\t\t/b=xxxxxxxx  Optional physical base address in hex\n\t\t/h\t     Optional HPDA flag (enable DPMI services)\n\t\t/li-\t     Optional disable of line numbers\n\t\t/xl\t     Disable larger comparison w/SYMSIZE\n\nLOGSIZE=nnnnn\tDefine size of error log in bytes.  Default is 4096.\n\nMONO\t\tUse monochrome adapter if present.\n\nNOGD\t\tBecause some programs may reset the debug registers\n\t\twhich you've carefully setup, 386SWAT automatically sets\n\t\tthe Global Debug (GD) bit in DR7 on startup so that\n\t\twe can stop such programs before they can do any\n\t\tharm.  In case you don't want 386SWAT to do this, use\n\t\tthis keyword.\n\nNORMLIDT\tDisable Real Mode LIDT redirection.  Device 386SWAT uses\n\t\ta separate IDT to handle nasty bugs which write into\n\t\tthe Real Mode IDT at 0:0 such as DOS 6.x does during\n\t\tits transient CONFIG.SYS processing.  This is the\n\t\tdefault state.\n\nNOSWAP\t\tDon't restore the previous underlying screen when\n\t\tsingle-stepping.  This option is useful in\n\t\tconjunction with the ALTSCR option.  This option\n\t\tspecifies the initial state only.  It can be toggled\n\t\tvia Alt-F6.\n\nNOWINK\t\tDisable Windows Kernel Debugging.\n\nPASSTHROUGH=xx,xx,xx,...\n\t\tAllow one or more hardware interrupts to be passed\n\t\tthrough to the previous protected mode handler while\n\t\t386SWAT is active.  Currently, these are limited to 76,\n\t\t77, 0B, and 0C.  THIS OPTION SHOULD NOT BE USED\n\t\tUNLESS NECESSARY.  For example, when the IBM PS/2\n\t\tSCSI adapter (8EFE or 8EFF) is used, staying in 386SWAT\n\t\tfor more than 1 or 2 minutes will cause the hard disk\n\t\tto lock on the next disk access.  PASSTHROUGH=76 will\n\t\tallow one to stay in 386SWAT indefinitely.\n\nPATH=d:\\dir1[,d:\\dir2[,...]]\n\t\tSpecify source file search path.\n\nPORTINIT=string Initialize serial port.  String may contain any character\n\t\texcept semicolon, including the following escape sequences:\n\t\t\\\\     Send backslash\n\t\t\\r     Send CR\n\t\t\\b     Send a break signal (this is a hardware signal,\n\t\t       not a character)\n\t\t\\p     Pause for about 250ms.\n\t\t\\1 - \\0 Delay for 1 - 10 seconds.\n\t\tSETCOM must be specified to set the parameters for the\n\t\tserial port.  On the first entry to 386SWAT (which may be\n\t\tremotely triggered) 386SWAT will automatically try to\n\t\tconnect for remote debugging.\n\nPRO=d:\\path\\filename.ext\n\t\tRead subsequent command line options from a profile.\n\t\tJust as with 386MAX, as you append more and more\n\t\toptions to the 386SWAT command line, you may prefer\n\t\tto collect them all in a 386SWAT profile, one per\n\t\tline.  These options may be followed by a semicolon\n\t\tand a comment.\tThis profile is handled exactly the\n\t\tsame way as is the corresponding profile for 386MAX.\n\nPROXSRCH=r[,g]\tSet range and granularity for proximity searching on\n\t\tsymbol addresses.\n\nPS4=xxxx\tPeriscope 4 hardware debugger board is installed at\n\t\tI/O port xxxx (for reference, the factory setting is\n\t\t300h).\tThis feature allows 386SWAT to manage the\n\t\ttraceback buffer and other features of the Periscope\n\t\tCompany's 386 hardware debugger.  *NOTE* this\n\t\tfeature isn't finished.\n\nRMLIDT\t\tEnable Real Mode LIDT redirection.  Device 386SWAT uses\n\t\ta separate IDT to handle nasty bugs which write into\n\t\tthe Real Mode IDT at 0:0 such as DOS 6.x does during\n\t\tits transient CONFIG.SYS processing.\n\nSAVESCREEN=nnn\tSpecify the number of last screens to save.  This\n\t\tkeyword allows you to control how many screens back\n\t\tAlt-F10 can display.  The default is sixteen.  Each\n\t\tscreen consumes 4000 bytes of storage in extended\n\t\tmemory.\n\nSETCOM=port,bps[,itype[,portbase]]\n\t\tSpecify port to use for remote debugging.\n\t\tport   From 1-4 for COM1 through COM4.\n\t\tbps    Transfer rate, from 1 to 115200.\n\t\titype  Interrupt mode.\tMay be 3 or 4 to specify\n\t\t       IRQ (default is IRQ3 for COM2/COM4, IRQ4\n\t\t       for COM1/COM3), * for default, or p for\n\t\t       polled operation.  Currently, an IRQ line is\n\t\t       required for remote debugging.\n\t\tportbase UART port base if different from defaults:\n\t\t       COM1=3F8, COM2=2F8, COM3=3E8, COM4=2E8.\n\nSYMFILTER=text1 [text2 [...]]\n\t\tSome symbols, especially from Windows programs\n\t\twritten in C, are prefaced with text such as\n\t\t\"__imp__\", \"_\", and the like which adds to the\n\t\tsymbol's length but not understanding.  This feature\n\t\tallows you to specify in the 386SWAT profile leading\n\t\ttext which is to be stripped from each symbol.\n\n\t\tThe default settings are\n\n\t\t   SYMFILTER=__imp__ _\n\n\t\tUp to 128 characters can be specified in this way.\n\nSYMSIZE=nnnnn\tSpecify the number of bytes to reserve for the symbol\n\t\ttable.\tThe default size is 4096.\n\nTRAPBOUND\tTrap BOUND instruction interrupts, ignoring INT 05h.\n\nTRAPDEBUG\tIntercept INT 01h/03h at installation time.\n\t\tNormally, 386MAX directs protected mode occurrences\n\t\tof INT 01h/03h to 386SWAT and real mode occurrences\n\t\tto the real IDT handler.  This options causes all\n\t\tsuch interrupts to be handled by 386SWAT.  This\n\t\tfeature may be toggled via Alt-F1.\n\nTRAPDIV \tTrap divide overflow interrupts.\n\nTRAPGENP\tTrap General Protection Faults (toggle via Alt-F3).\n\nTRAPINV \tTrap Invalid Opcode interrupts (toggle via Ctl-F3).\n\nTRAPNMI \tTrap Non-Maskable Interrupts.  This option is useful\n\t\tin conjunction with a hardware breakout switch which\n\t\tcan be used to invoke the debugger even if all\n\t\tinterrupts are disabled (toggle via Alt-F2).\n\nTRAPPAGE\tTrap Page Faults (toggle via Alt-F4).\n\nTRAPSEGNP\tTrap Segment Not Present Faults.\n\nTRAPSKIP\tTrap INT 03h instructions (toggle via Ctl-F2).\n\nTRAPSTACK\tTrap Stack Faults (toggle via Ctl-F4).\n\nTRAPSTEP\tTrap INT 01h breakpoints (toggle via Ctl-F1).\n\nTRAPTSS \tTrap TSS Faults.\n\nVCPISWAT\tDo not attempt to intrude into another memory\n\t\tmanager's PL0 context.  This option disables the\n\t\tdefault INTRUDE option.\n\nVIDEO=d:\\path\\filename.ext\n\t\tRead in/write to video tables.\tIf the specified file\n\t\texists, it is read in and used as video table\n\t\tinformation.  If the file doesn't exist, it is\n\t\tcreated.  The information in the video table\n\t\tspecifies how to switch to particular video modes as\n\t\twell as how to set certain cursor types.  Use this\n\t\toption if you wish to bring up 386SWAT on top of\n\t\tgraphic applications on single-monitor systems.\n\t\t*NOTE* this option doesn't fully work as yet, so I\n\t\tsuggest that you don't use it.\n\nVMSCOUNT=n\tUsed with VMSINT (see below).  Limit number of times\n\t\t386SWAT inserts itself into VCPI client's GDT/IDT.  This\n\t\tmay be useful when debugging VCPI applications that\n\t\tcall Enter Protected Mode (AX=DE0C) repeatedly, such\n\t\tas a real-mode int 8 handler that enters protected\n\t\tmode on every clock tick.  The correct value may have\n\t\tto be determined by trial and error.\n\nVMSINT[=xx,xx,..] Trap VCPI Enter Protected Mode switches (AX=DE0C)\n\t\tand blast in sufficient GDT and IDT entries to debug\n\t\tthe client application.  This option is useful when\n\t\tdebugging a VCPI application which does not follow\n\t\tthe preliminary VCPI debugger specification.  Use\n\t\tthis option with care.\tThe argument (if present)\n\t\tlimits the intercepted interrupts to the values.\n\t\tWhen VMSINT is in effect, it may be important to\n\t\tlimit the interrupts.  For example, some DOS16M apps\n\t\t(such as Lotus 1-2-3 Version 3.0) intercept\n\t\tinterrupts but don't set the access rights byte in\n\t\tthe IDT (they assume that it's still set for a 286\n\t\tinterrupt gate, as DOS16M setup originally).  Thus\n\t\twhen 386SWAT blasts its task gate entries into the IDT,\n\t\tsubsequent DOS16M intercepts leave those entries\n\t\tmarked as a task gate.\tThis debug option limits us\n\t\tto intercepting those faults necessary to catch\n\t\tcatastrophic errors, but not everything.  Interrupts\n\t\twhich may be intercepted are 00, 01, 02, 03, 05, 06,\n\t\t0A, 0B, 0C, 0D, and 0E.\n\nWKDLS=nnn\tAllow up to nnn Windows Kernel Debugger Load Segment\n\t\tvalues.  These are the segments of VxDs loaded at\n\t\tWindows startup.  They are identified by the VxD name\n\t\tfollowed by either \"_Code\" or \"_Data\" followed by the\n\t\tsegment number.  For example, VWIN32_Code0001.\tThe\n\t\tdefault count is zero.\n\n\nInvoking The Debugger\n---------------------\n\nGenerally, the debugger lies in the background waiting for some\ncatastrophic event to occur.\n\nTo bring up the debugger from the keyboard, press Ctl-Alt-Pad5.  That\nis, with the Ctl- and Alt-keys held down, pressing the 5 key on the\nnumeric pad invokes the debugger.  This mechanism is useful when your\nprogram is stuck somewhere.  Remember, the keyboard and the keyboard\ninterrupt must be enabled for this to work.  On systems for which the\nPad5 key is inconvenient to use (such as some laptops), the sequence\nCtl-Alt-SysReq also brings up the debugger.\n\nTo run a particular program through the debugger, use the SWATRUN\nutility.\n\nIf remote debugging is active (see SETCOM profile option and SETCOM\ncommand) the debugger may also be activated by sending 'SWT!' followed\nby a break signal.  This is done by pressing Ctl-6 in the CHAT screen.\n\nThe utility SWATCMD.EXE (loaded via Device= or from the DOS command\nline) may be used to pass commands to 386SWAT.\tInvoking SWATCMD with no\noptions brings up 386SWAT at an INT 03h (assuming TRAPSKIP or TRAPDEBUG\nis active).\n\n\nDebugging Aids in 386MAX\n------------------------\n\nThe following options are recognized by 386MAX and may be useful in\nconjunction with 386SWAT.  These options should be placed in your\n386MAX profile.\n\nTo catch even-value stack wraps, use DEBUG=NOWRAP.  This situation\noccurs when an interrupt is encountered with SP = 2 or 4.  In this\ncase, the 386 will push the three words onto the stack and wrap to the\nend of the stack segment leaving SP = FFFC or FFFE.  Quite likely,\nthis is an error as most stack segments aren't meant to be 64 KB in\nlength.  Technically, this event is not an error as far as the 386 is\nconcerned, but logically it almost always is an error.\tThe default\nbehavior of 386MAX is not to signal an error; the DEBUG=NOWRAP keyword\ntells 386MAX to trap this case.\n\nTo catch writes into unmapped EMS pages, use DEBUG=EMSWRIT.  This\noption traps with a Page Fault attempts to write into unmapped EMS\npages as well as after a Save Page Map call.  The latter is presumed\nto have been done by a memory-resident program prior to mapping in its\nown pages.  To catch reads and/or writes in unmapped EMS pages, use\nDEBUG=EMSRDWR.\tTo catch an EMS bug in MS-DOS 4.0x, try this latter\noption with BUFFERS in EMS memory.\n\nTo catch unemulated Invalid Opcodes, use DEBUG=I06.\n\nTo signal an INT 01h on each DPMI error, use DEBUG=DPMIERR.\n\nTo force a new selector on all selector allocates, use\nDEBUG=DPMINEWSEL.  This option is useful if your code has a stale\nselector, that is, you allocate a selector and tuck it away for later\nuse, but then, before its last reference, you free it and allocate\nanother selector.  Without this option you might get the old selector\nnumber (the one you just freed).  When the stale selector is used, it\nmight not generate an error, but surely it won't do what you expected.\n\n\nDebugging Screen\n----------------\n\nThe top of the initial debugging screen consists of a row of the\n32-bit general purpose registers, two rows of the segment registers,\nand one row of CR0, CR2, and extended flags.\n\nThe rest of the initial debugging screen displays the instructions to\nbe executed with the stack appearing on the right in one or two\ncolumns.  If the current instruction references memory, the segment\nregister, offset, and memory value of the reference are displayed on\nthe line separating the registers from the instructions.\n\nThe last line is the command line.\n\nThere are several keystrokes available at this point:\n\nESC\t\tContinue processing.  Equivalent to Go command in\n\t\tother debuggers.\n\nF1\t\tDisplay a help screen with submenus.\n\nF2\t\tDisplay GDT entries.\n\nF3\t\tDisplay LDT entries.\n\nF4\t\tDisplay IDT entries.\n\nF5\t\tDisplay PTE entries.\n\nF6\t\tDisplay search screen.\n\nF7\t\tDisplay memory.  While this display is active, Ctl-B\n\t\tdisplays in byte format, Ctl-W, in word format, Ctl-D\n\t\tin dword format, Ctl-V in vector format, Ctl-G in GDT\n\t\tformat, Ctl-I in IDT format, and Ctl-T in TSS format.\n\nF8\t\tDisplay TSS entries.\n\nF9\t\tDisplay the instruction disassembly screen.\n\nF10\t\tDisplay screen on entry to debugger (this feature has\n\t\tno effect on two-monitor systems).\n\nF11\t\tSingle-step the current instruction (see Padplus).\n\t\tThis key as well as F12 are useful on systems\n\t\twithout a Padplus/Padminus key, or ones for which\n\t\tthis key is difficult to type such as some laptops.\n\nF12\t\tSingle-skip the current instruction (see Padminus).\n\ns-F1\t\tGoto the immediate CALL or JMP address of the\n\t\tinstruction at the top of the screen and save the\n\t\taddress of the current instruction (see Disassembly\n\t\tBookmarks below).\n\ns-F2\t\tReturn from the previous s-F1 goto.\n\ns-F3\t\tGoto the instruction on the top line (see Padstar).\n\ns-F4\t\tDisplay the last AutoFault message.\n\ns-F5\t\tDisplay the Real Mode Interrupt Vector Table.\n\ns-F10\t\tSave the current screen in the last screen buffers.\n\na-F1\t\tToggle intercept of INTs 01h/03h.  The current state\n\t\tappears below the segment/selector register display\n\t\tas 01 or blank, 03 or blank.  The default state is\n\t\tcontrolled by the presence or absence of the\n\t\tTRAPDEBUG keyword.\n\na-F2\t\tToggle intercept of INT 02h.  The current state\n\t\tappears below the segment/selector register display\n\t\tas 02 or blank.  The default state is controlled by\n\t\tthe presence or absence of the TRAPNMI keyword.\n\na-F3\t\tToggle intercept of INT 0Dh.  The current state\n\t\tappears below the segment/selector register display\n\t\tas 0D or blank.  The default state is controlled by\n\t\tthe presence or absence of the TRAPGENP keyword.\n\na-F4\t\tToggle intercept of INT 0Eh.  The current state\n\t\tappears below the segment/selector register display\n\t\tas 0E or blank.  The default state is controlled by\n\t\tthe presence or absence of the TRAPPAGE keyword.\n\na-F5\t\tToggle stack display state between two columns of\n\t\twords and one column of dwords.  The tick marks\n\t\tappear every 16 bytes.\n\na-F6\t\tToggle screen save state (eliminates screen flicker\n\t\twhen single-stepping over instructions which don't\n\t\twrite to the screen).  The current state appears\n\t\tbelow the segment/selector register display as SS=ON\n\t\tor SS=OFF.\n\na-F7\t\tToggle video base (switch debugging screens in a\n\t\ttwo-monitor system).\n\na-F8\t\tDisplay NDP register screen.  Use the same keystroke\n\t\tto remove the NDP screen.\n\na-F9\t\tDisplay debug register screen.\tThis screen remains\n\t\tactive until it is replaced by another screen.\tThat\n\t\tis, you may type on the command line, etc. while the\n\t\tdebug register screen is displayed.\n\na-F10\t\tDisplay previous debugging screens.  This option can\n\t\tbe used to compare changes over a single-step or\n\t\tsingle-skip.  Up to sixteen previous screens can be\n\t\tdisplayed in this manner using the Up and Down arrows.\n\t\tTo change from the default value of sixteen, use the\n\t\tkeyword SAVESCREEN (see above).\n\na-F11\t\tDisplay MMX and SSE2 register screen.\n\na-F\t\tGoto the far return address at SS:SP or SS|eSP\n\t\t(depending upon the current mode).  If the current\n\t\tcode segment is USE16, the far return address is\n\t\tassumed to be word:word (or word|word); if it's\n\t\tUSE32, the format is assumed to be word:dword (or\n\t\tword|dword).  This shortcut is equivalent to typing\n\t\tG .RETF at the command line.\n\na-N\t\tGoto the near return address at SS:SP or SS|eSP\n\t\t(depending upon the current mode).  If the current\n\t\tcode segment is USE16, the near return address is\n\t\tassumed to be word; if it's USE32, the format is\n\t\tassumed to be dword.  This shortcut is equivalent to\n\t\ttyping G .RETN at the command line.\n\nc-F1\t\tToggle intercept of INT 01h only.  The current state\n\t\tappears below the segment/selector register display\n\t\tas 01 or blank.  The default state is controlled by\n\t\tthe presence or absence of the TRAPSTEP keyword.\n\nc-F2\t\tToggle intercept of INT 03h only.  The current state\n\t\tappears below the segment/selector register display\n\t\tas 03 or blank.  The default state is controlled by\n\t\tthe presence or absence of the TRAPSKIP keyword.\n\nc-F3\t\tToggle intercept of INT 06h.  The current state\n\t\tappears below the segment/selector register display\n\t\tas 06 or blank.  The default state is controlled by\n\t\tthe presence or absence of the TRAPINV keyword.\n\nc-F4\t\tToggle intercept of INT 0Ch.  The current state\n\t\tappears below the segment/selector register display\n\t\tas 0C or blank.  The default state is controlled by\n\t\tthe presence or absence of the TRAPSTACK keyword.\n\nc-F5\t\tDisplay PDE entries.\n\nc-F6\t\tDisplay symbols.\n\nc-F7\t\tDisplay file browser.\n\nc-F8\t\tEnter CHAT mode.  This allows two connected machines\n\t\tto test the serial port connection.  What you type is\n\t\tdisplayed on the lower screen and sent to the other\n\t\tsystem; whatever is received is displayed on the top\n\t\tscreen.  If only garbage characters appear the two\n\t\tmachines may not have the same data transfer rate set.\n\nc-F9\t\tAttempt to connect for remote debugging.  See the section\n\t\tat the end of this document on remote debugging.\n\nc-F10\t\tDisplay error log.\n\nc-F11\t\tSingle-step INT-like instruction in VM to PM,\n\t\totherwise just single-step (same as c-Padplus).\n\nc-Up\t\tDecrement the location pointer to the previous entry.\n\t\tThis change has a different effect depending upon the\n\t\ttype of information being displayed.  If used in a\n\t\tdata display, it moves back one data item (byte,\n\t\tword, dword, etc.).  If used in a TSS display, the\n\t\tI/O ports in the I/O bit permission map scroll up.\n\nc-Down\t\tIncrement the location pointer to the next entry.\n\t\tThis change has a different effect depending upon the\n\t\ttype of information being displayed.  If used in a\n\t\tdata display, it moves forward one data item (byte,\n\t\tword, dword, etc.).  If used in a TSS display, the\n\t\tI/O ports in the I/O bit permission map scroll down.\n\nc-Home\t\tPlace the current instruction at the top of the\n\t\tscreen.\n\nc-B\t\tDisplay memory in byte (xx) format.\n\nc-D\t\tDisplay memory in dword (xxxxxxxx) format.\n\nc-G\t\tDisplay memory in GDT format.\n\nc-I\t\tDisplay memory in IDT format.\n\nc-K\t\tDisplay Windows Kernel Debugger Structures menu.\n\t\tThis menu may be displayed only when running under\n\t\tWindows as a kernel debugger.\n\nc-M\t\tDisplay memory allocation chain entries based at the\n\t\tvalue assigned to MACBASE.  By default, this value is\n\t\tthe initial value of .DMAC.\n\nc-T\t\tDisplay memory in TSS format.\n\nc-V\t\tDisplay memory in vector (xxxx:xxxx) format.\n\nc-W\t\tDisplay memory in word (xxxx) format.\n\nc-Z\t\tZap (convert to NOPs) the instruction at the top of\n\t\tthe instruction disassembly window.\n\nc-ESC\t\tSame as ESC, but if you're on an INT 03h, it skips\n\t\tover it first and then continues.  If the current\n\t\tinstruction is not an INT 03h, this keystroke behaves\n\t\tidentically to ESC.\n\nPadplus \tSingle-step the current instruction (same as F11).\n\nc-Padplus\tSingle-step INT-like instruction in VM to PM,\n\t\totherwise just single-step (same as c-F11).\n\nPadminus\tSingle-skip the current instruction (same as F12).\n\t\tThat is, execute the current instruction and put a\n\t\tbreakpoint on the instruction following.  This is\n\t\tused to execute but not single-step through a CALL or\n\t\tLOOP instruction.\n\nPadstar \tGoto the instruction on the top line.\n\nUp\t\tScroll the screen up one line.\tThis key has the same\n\t\teffect in almost all screen displays.\n\nDown\t\tScroll the screen down one line.  This key has the\n\t\tsame effect in almost all screen displays.\n\nPgUp\t\tScroll the screen up one page.\tThis key has the same\n\t\teffect in almost all screen displays.\n\nPgDown\t\tScroll the screen down one page.  This key has the\n\t\tsame effect in almost all screen displays.\n\ns-PrtSc \tPrint the screen.  Note that if either the previous\n\t\tapplication screen (F10) or one of the previous\n\t\tdebugging screens (a-F10) is currently displayed,\n\t\tthat screen is sent to the printer.  The I/O port in\n\t\tthe BIOS data area which corresponds to LPT1 is used.\n\nc-s-PrtSc\tPrint the instruction portion of the screen.  If the\n\t\tcurrent screen displayed is the instruction\n\t\tdisassembly window, print only the instruction\n\t\tportion of that screen.  The I/O port in the BIOS\n\t\tdata area which corresponds to LPT1 is used.\n\nCtl-Alt-Del\tReboot the system.\n\n\nDisassembly Bookmarks\n---------------------\n\nAt times you need to browse through some code (sometimes it's even\nyour own code) following subroutine calls, conditional jumps, etc.\nwherever they might go.  To make this task easier, use the s-F1 and\ns-F2 keys.  To disassemble at the target of some instruction which\ntransfers control, place the instruction at the top of the disassembly\nwindow and press s-F1.\tFor example, say at offset 1234 in the code\nsegment there is a CALL 5678.  Place the CALL at the top of the\ndisassembly window and press s-F1.  The disassembly window now\ndisplays the code at 5678 with an invisible bookmark left at the\nreturn address 1234.  Each time s-F1 is used, it leaves a bookmark at\nthe instruction at the top of the disassembly window and disassembles\nat that instruction's target.  To return to the previous bookmark,\npress s-F2.  386SWAT supports up to 128 nested levels of such\ndisassembly.\n\nAs another example, you should be able to disassemble almost any\ninterrupt (say, U .VMI21 which disassembles at VM interrupt 21h), and\nusing the bookmark feature exclusively, go down to the bottom of the\nchain.\n\nThis feature is clever, but not that clever.  It can figure out where\n(say) JMP Dword Ptr CS:[1234] is going and disassemble at that target,\nbut it can't figure out the same instruction with a DS override.  Nor\ncan it handle effective addresses other than ones with an immediate\ndisplacement only (i.e., no registers such as [BX+SI]).\n\n\nAutofault\n---------\n\nHave you ever been puzzled by some CPU fault as to why it occurred,\nthat is, why did the CPU think there was a problem?  If so, this\nfeature is for you.  Whenever 386SWAT is called on the difficult to\nfigure out CPU faults (TSS Fault, Stack fault, GP Fault, or Page\nFault), the Autofault feature attempts to determine why and to present\na short prose description of the cause.  The description is displayed\nin the lower lefthand corner of the screen.  Pressing a key causes the\nmessage to disappear.  To display it again (up to the time another\nfault occurs), press s-F4.\n\nThis feature is implemented for GP, TSS, and Page Faults.\n\n\nWindows Debugging\n-----------------\n\n386SWAT runs as a debugger under Windows when accompanied by its VxD.\nThis file (SWATVXD.EXE) should be in the same directory as the\ndebugger file (386SWAT.LOD) and is loaded automatically when Windows\nstarts.  To take advantage of the information provided by the VxD, you\nshould have a monochrome monitor and screen attached to your system.\nFor more details about the VxD including how to configure it, see the\nfile SWATVXD.DOC.\n\n\nWindows Kernel Deubugging\n-------------------------\n\nIf you program under Windows 3.1x or Win95 (but not WinNT), 386SWAT\npresents itself to Windows as a very low-level debugger.  Essentially,\n386SWAT is provided the same level of access as the remote debugger\nWDEB386 shipped with Windows.  WDEB386 requires that you run it from a\nseparate system with a COM cable running between the two systems.  In\ncontrast, 386SWAT runs on the same system being debugged, however it does\nrequire that you have a monochrome adapter and monitor installed in\nthe system.\n\nFor more details on this topic, see the file WINKDBG.DOC.\n\n\nUnreal Mode\n-----------\n\nThis mode is a variant of Real Mode in which any segment register can\naccess all of the 4GB address space.  That is, instead of the normal\n64KB length of a segment, the length is 4GB.  This command can enable\nall or just some of the segment registers for Unreal Mode.  To enable\nthis mode, use the command UNREAL as follows:\n\nUNREAL s reg [s reg ...]\n\nwhere s is a sign (+ or -) indicating whether to enable or disable,\nand reg is a segment register CS, DS, ES, FS, GS, SS, or the keyword\nALL.  For example,\n\n\tUNREAL +ALL\tenables UM for all segment registers\n\tUNREAL -ALL\tdisables ...\n\tUNREAL +DS\tenables UM for DS only\n\tUNREAL +DS +ES\tenables UM for DS and ES\n\nTo see if a segment register is enabled for UM, look for the plus sign\nnext to the segment number in the instruction disassembly window.\n\n\nCommand Line\n------------\n\nThe line at the bottom of the screen is used to enter various\ncommands.  The following table summarizes the possibilities.  The\nusual editing keys are available such as Left, Right, Home, End,\nInsert, Backspace, and Delete.\tNote that a colon (:) is used to\nseparate a segment from an offset (Virtual 8086 Mode) and that a\nbroken stile (|) is used to separate a selector from an offset\n(Protected Mode).  The command line is parsed according to the grammar\nfound in the file 386SWAT.GRM.\n\n\nCommand Line Recall\n-------------------\n\nCommands entered on the command line are saved in a ring buffer whose\nlength can be changed from the default of 1024 via the profile keyword\nCMDHIST=nnn.\n\nPrevious commands can be retrieved via the keystrokes Alt-< (previous\ncommand) and Alt-> (next command).  Pressing either of these keys\nrepeatedly scrolls through the buffer in the chosen direction.\tThe\nkeystroke Alt-? displays a history of (up to 25) commands from which a\ncommand can be chosen by scrolling up or down through the list, or by\ntyping the letter next to the command.\tA command may be deleted from\nthis list via the Del key.\n\n\nMonitor mode\n------------\n\nThe GM (go monitor) command takes an expression which will be\nevaluated as the CPU single-steps (equivalent to Pad-plus or F11).\nNo display will occur until 1) the monitor expression evaluates\nTRUE or 2) 386SWAT is invoked by some other means (GP fault, NMI, Ctrl-\nAlt-Pad5, etc.)\n\nBoolean expressions may be constructed using the dyadic operators\n&&, ||, <, <=, ==, >=, and >.  Operator precedence is the same as\nthe C language.  See _Operators_.\n\nFor example:\n\ngm ah\nwill execute until AH is non-zero.\n\ngm [.csip == 21cd && ah!=9\nwill execute until the current instruction is INT 21 and AH is any value\nother than 9 (DOS display string).\n\ngm cx == 0\nwill execute until CX is 0.\n\ngm\nwill execute until the last expression specified with gm is TRUE.\n\n\nFunctions\n---------\n\nA number of arithmetic, bitwise, and logical functions are available.\nThe precedence of evaluation is similar to that of the C programming\nlanguage.  Here they are, listed in order of precedence:\n\nFunctions\t\t\t  Type\n---------------------------------------------------------------\n- ~\t\t\t\t  Monadic\n* /\t\t\t\t  Dyadic\n+ -\t\t\t\t  Dyadic\nsymbols, .code, .data, etc.\t  Address expression\n: |\t\t\t\t  Dyadic (address construction)\n] [ {\t\t\t\t  Monadic (extraction)\n>> <<\t\t\t\t  Dyadic (bit shift)\n< <= >= >\t\t\t  Dyadic (relational)\n== !=\t\t\t\t  Equality\n&\t\t\t\t  Dyadic (bitwise AND)\n^\t\t\t\t  Dyadic (bitwise XOR)\n&&\t\t\t\t  Dyadic (logical AND)\n||\t\t\t\t  Dyadic (logical OR)\n\nFor example, this expression\n\n   2a + 3 * {[.data+2|2c / 4 & ffff == 5af && 3 << bl || 21 ^ 2\n\nis evaluated as\n\n(((2a + (3 * ({([.data+2)|(2c / 4)))) & (ffff == 5af)) && (3 << bl)) || (21 ^ 2)\n\n\n\tCode Breakpoints\nBC\t\t Display all code breakpoints.\nBC addr \t Set code breakpoint at ADDR.\nBC*\t\t Clear all code breakpoints.\nBC* addr\t Clear code breakpoint at ADDR.\nBC+\t\t Enable all code breakpoints.\nBC+ addr\t Enable code breakpoint at ADDR.\nBC-\t\t Disable all code breakpoints.\nBC- addr\t Disable code breakpoint at ADDR.\n\n\tDebug Registers DR0 to DR3\nBD\t\t Display debug registers (also Alt-F9).\nBD addr \t Set DR breakpoint on instruction fetches at\n\t\t  address addr.\nBD addr Ln R\t Set DR breakpoint on read/writes of length n (n=1,\n\t\t  2, 4) at address addr.\nBD addr Ln W\t Set DR breakpoint on writes of length n (n=1, 2,\n\t\t  4) at address addr.\nBDn*\t\t Clear DRn.\nBDn+\t\t Enable DRn.\nBDn-\t\t Disable DRn.\n\n\tData Display\nD\t\t Display next screen of data\nD addr\t\t Data display\nD-\t\t Data display back one page\nDx addr \t Data type (B = Byte,\t W = Word, D = Dword,\n\t\t\t     V = Vector, G = GDT,  I = IDT, T = TSS,\n\t\t\t     T2 = 286 TSS, T3 = 386 TSS)\nDx addr P\t Data display as physical data (say in ROM which has\n\t\t  been mapped over by 386MAX)\nDx addr P exp\t Data display using exp as CR3 - this is useful when\n\t\t  debugging VCPI clients because they use a separate\n\t\t  CR3\nAll data display commands may be followed by an optional width switch\n(e.g., DW/5 which displays the data at five words per line instead of\nthe usual eight).  The data width switch must be placed between the\ndata command and its arguments (if any) as in DW/5 DS:0.\n\n\tDescriptor Table Entry\nDTE expr\t Display on the command line a Descriptor Table Entry.\n\n\tData Entry\nE addr [xx ...]  Enter data starting at ADDR using optional hex\n\t\t  bytes xx.\n\n\tExit To DOS\nEXIT\t\t Exit to DOS.\tThis command is equivalent to the '\n\t\t  following command sequence:\n\t\t  R AH=4C\n\t\t  SIGINT 21\n\t\t  G\n\n\tData Fill\nF addr L len xx  Fill data starting at ADDR of length LEN with\n\t\t   byte value xx.\nF addr L len xx P  Fill physical data starting at ADDR of length\n\t\t  LEN with byte value xx.\nF addr L len xx P exp  Fill data starting at ADDR of length LEN with\n\t\t  byte value xx where ADDR is translated using exp as\n\t\t  CR3 - this is useful when debugging VCPI clients\n\t\t  because they use a separate CR3.\n\n\tData Move\nM addr L len addr  Move data starting at first ADDR of length LEN\n\t\t    to second ADDR\n\n\tHex Arithmetic\nH exp\t\t Display hex arithmetic result\n\n\tInstruction Goto\nG\t\t Go without stopping (same as ESC)\nG addr\t\t Goto to instruction at address ADDR\nGM bool_exp\t Go monitor (single-step until bool_exp is TRUE)\nGM\t\t Go monitor using last boolean expression specified with gm\n\n\tMAC Display\nMACBASE addr\t Set the base address of the MAC chain in case it's\n\t\t  different from .DMAC.  This is handy when\n\t\t  displaying the DOS subsegment chain.\n\n\tInsertion Into PM Context',CR\nINSERT gdtr idtr [cr3 [lapde]]  Insert into PM context.\nINSERT *    idtr\t        Insert into IDT.\n\nwhere gdtr = linear address of fword describing the GDT\n      idtr = ...\t\t\t\t    IDT\n      cr3  = incoming CR3 (optional)\n      lapde= linear address of 4MB block where 386SWAT's\n\t     PDE(s) should be copied\n\nInsert 386SWAT into a PM context while still in RM.\nThis feature is useful when attempting to debug across\nthe boundary from RM to PM.  In particular, it can be used\nto gain control shortly after Windows enters PM.\n\n\tInstruction Disassembly\nU\t\t Display the next screen of instructions\nU addr\t\t Unassemble instructions starting at ADDR\nU-\t\t Unassemble instructions back one page\nU16 addr\t Unassemble instructions starting at ADDR as a\n\t\t  16-bit code segment\nU32 addr\t Unassemble instructions starting at ADDR as a\n\t\t  32-bit code segment\nUx addr P\t Unassemble instructions as physical data (say in\n\t\t  ROM which has been mapped over by 386MAX)\nUx addr P exp\t Unassemble instructions starting at ADDR using exp\n\t\t  as CR3 - this is useful when debugging VCPI clients\n\t\t  because they use a separate CR3\n\n\tPage Table Display\nPTE addr\t Display the Page Directory and Page Table entries\nPTE val \t  which correspond to the address addr or linear\n\t\t  address val.\nSPTE addr/val\t Same as PTE command, but also displays the matching\n\t\t  PTE in the PTE display screen (F5).\n\n\tSignal Interrupt\nSIGINT xx\t Signal interrupt xx (00 to FF, of course).  This\n\t\t  keyword is useful (particularly for hardware\n\t\t  interrupts) when you are debugging a time-critical\n\t\t  piece of code and need to see what would happen if\n\t\t  (say) a timer tick happened at this particular\n\t\t  point.\n\n\tToggle Interrupt Interception\nTOGINT xx [xx ...]  Toggle interception of interrupt xx (00 to FF,\n\t\t  of course).  Valid interrupts are 00, 01, 02, 03,\n\t\t  05, 06, 0C, 0D, 0E.  For example, if TRAPINV does\n\t\t  not appear in the 386SWAT profile and you wish to\n\t\t  enable it, use TOGINT 6.\n\n\tRegister Operations\nR reg=exp\t Set register REG to EXP.  Valid registers include\n\t\t  all GP and EGP as well as FL, EFL, CRn, DRn, TRn,\n\t\t  TR, and LDTR.  There are two ways to crash the\n\t\t  system via this command:  setting CR3 to a bad\n\t\t  value, or setting EFL with a bad value for the VM\n\t\t  or IOPL flags.  The code which sets CR0 forces the\n\t\t  Page Enable and Protect Enable bits on (as\n\t\t  evidenced by typing R CR0=0), so experiment without\n\t\t  fear.  Use the pseudo-register names CSIP or CSEIP\n\t\t  to set both registers to an address.\nR reg.str=exp\t This command also supports bit mask qualifiers on\n\t\t  registers.  For example, to set the AM bit in CR0,\n\t\t  type R CR0.AM=1.  See below for a complete list of\n\t\t  mask values supported.\nRC\t\t Clear saved register state so another RS may\n\t\t  execute.\nRR\t\t Restore saved registers.\nRS\t\t Save registers to restore later via RR.  Only one\n\t\t  RS may be executed at a time without either\n\t\t  restoring the state via RR or clearing the state\n\t\t  via RC.\n\n\tSearch Operations\nS addr1 addr2 tgt  Search from addr1 to addr2 or from ea for len\nS addr L len tgt   bytes for target tgt.  The search results are\n\t\t   displayed on a separate screen which may be made\n\t\t   active at other times by pressing F6.  Only the\nfirst 23 matches are displayed.  In a future release the Up, Down,\nPage Up, and Page Down keys will allow scrolling through successive\nmatches.  The target may take one of several forms:\n\n* Use a target of the form xx, xxxx, xxxxxxxx where x represents a hex\n  digit to search for bytes, words, or dwords of a specified value.\n  For example, the form S 0:0 L FFFF 10CD searches for all occurrences\n  of the hex bytes CD followed by 10 in the first 64KB of conventional\n  memory.  Word and dword searches do not require word or dword\n  alignment of the matching data.  The number of digits entered\n  determines the width of the value.  Thus you should use leading\n  zeros to pad out a small value to a wider width.  For example, 0 and\n  00 both search for a single byte of zeros, 000 and 0000 both search\n  for a word of zeros, and 00000, 000000, 0000000, and 00000000 all\n  search for a dword of zeros.\n\n* Use a target of the form \"search_string\" to search for a case\n  sensitive string.  For example, S 0:0 L FFFF \"386MAX\" searches for\n  all occurrences of the string 386MAX in the first 64KB of conventional\n  memory.  The ability to search for a case insensitive string will be added\n  in the future.\n\n* Use a target of the form !instr to search for a specific assembler\n  instruction.\tFor example, S 0:0 L FFFF !INT 10 searches for all\n  occurrences of video interrupts in the first 64KB of conventional\n  memory.  This target is found by disassembling the code between the\n  start and stop addresses instruction by instruction, thus the\n  alignment of the matching instructions and the starting address is\n  critical.  If data appears within that range, some matches may be\n  missed.  The command S1 (instead of S) can be used to disassemble\n  the code byte by byte.  That is, with the S command, having\n  disassembled an instruction which does not match the specified\n  pattern, the next instruction is searched; with the S1 command, the\n  next byte is searched.\n\n  The code search text may include one or more question marks as\n  wildcards which match any character in the disassembled\n  instructions.  For example, use S 50|0 FFFF !mov e??,cr? to find\n  all moves from a control register to a 32-bit register.  Try the\n  forms S 3BC7:100 FFFF !mov [1234] and S 3BC7:100 FFFF !mov ?s:[1234]\n  to find all moves into location [1234] with or without a segment\n  override.  To find jumps to a specific location, use the code\n  targets !j? 1234, !j?? 1234, and !j??? 1234.\tNote that floating\n  point instructions may be disassembled beginning with either 'F' or\n  'FN' depending upon the presence of a preceding WAIT opcode (9Bh).\n  To be safe, search for both.\n\n* Use a target of the form #PTE to search for a PTE in the Page\n  Tables.  For example, S 0 C0000000 # CF4000 searches for the PTE\n  CF4000 from linear 0 through linear C0000000.  The linear addresses\n  are both rounded down to a 4KB boundary.  A match at a particular\n  linear address means that the PTE was found and it covers the 4KB\n  block at the linear address displayed.  When comparing PTEs, the\n  flag bits are ignored, thus a match might be found when the PTE in\n  the Page Tables is not present.\n\n\tI/O Port Read/Write\nIx port \t Input Byte, Word, or Dword from PORT\nIMR\t\t Display current Interrupt Mask Register values for\n\t\t  master and slave PICs\nIRR\t\t Display current Interrupt Request Register values\nISR\t\t Display current In-Service Register values\nOx port val\t Output Byte, Word, Dword VAL to PORT\n\n\tSymbolic Debugging (see SWATSYM.DOC for details)\nCD [d:][path]\t Change the current directory to path.  If no\nCHDIR [d:][path]  argument, display the current drive/directory.\nFS\t\t Flush symbol table.\nLF filename\t Load file into browser.\nLI +\t\t Enable line number display in disassembly screen.\nLI -\t\t Disable line number display.\nLI dddd \t Go to line dddd (decimal) in file browser.\nLI dddd+\t Go to line dddd forward from current line.\nLI dddd-\t Go to line dddd back from current line.\nLS filename\t Load symbol file.\nLS filename exp  Load symbol file and add 16-bit value to all VM segments.\nPATH d:\\dir1[,d:\\dir2[,...]]  Set source file search path.\nPATH+ d:\\dira[,d:\\dirb[,...]]  Add to source file search path.\nPS r\t\t Set range of symbol proximity searches to r.\nPS r g\t\t Set range and granularity (1=bytes, 2=words, 4=dwords)\n\t\t  of symbol proximity searches.\nQS addr \t Display the symbol nearest to (and below) thegiven address.\nSB+\t\t Enable source browser mode.\nSB-\t\t Disable source browser mode.\nSB*+\t\t Enable source browser mode but disregard module names.\nTS\t\t Force all symbols to be retranslated according to\n\t\t  current GDT and LDT.\nTS sel\t\t Retranslates only for selector/segment sel.\nTS * ID \t Retranslates for all selectors/segments with ID specified.\nTS sel ID\t Retranslates only for selector/segment sel with ID specified.\nTS *|sel *|ID v|p  Change to specified mode for selector and/or ID specified.\nTS *|sel *|ID *|v|p nsel  Replace segment/selector and mode for specified\n\t\t  selectors and IDs.  If * is specified for mode, the mode\n\t\t  is left alone.\nTS *|sel *|ID *|v|p nsel+  nsel is added to all specified segments.\n\n\tRemote debugging\nAPPKEY\t\t Edit application keystroke buffer.  This is primarily\n\t\t  useful for remote debugging.\tIf an application is waiting\n\t\t  for a keystroke, this feature allows you to send one to\n\t\t  the application, as well as to view any that may already\n\t\t  be available.\nCHAT\t\t Enter CHAT mode (also via Ctl-F8)\nSETCOM port bps  Initialize specified serial port for communications.\n\t\t  See SETCOM= profile option for full syntax.\nSETCOM\t\t Reinitialize the serial port with values last specified\n\t\t  by SETCOM or SETCOM=.  This is useful when an application\n\t\t  has reprogrammed the UART.\nSETCOM -\t Ignore all activity on serial port.  Use this if you are\n\t\t  done with remote debugging and wish an application to\n\t\t  have access to the serial port.  When 386SWAT is using the\n\t\t  serial port, no serial port interrupts will be visible\n\t\t  to virtual mode programs.\nSETCOM RTS+\t Pull RTS (Request To Send) line high.\nSETCOM RTS-\t Drop RTS (Request To Send) line low.\nSETCOM DTR+\t Pull DTR (Data Terminal Ready) line high.\nSETCOM DTR-\t Drop DTR (Data Terminal Ready) line low.  This is one\n\t\t  way to hang up a modem that won't respond to (wait)+++\n\t\t  (wait)ATH(ENTER).\nREMDBG\t\t Attempt to establish remote debugging session (also\n\t\t  via Ctl-F9).\tSee the section below on remote debugging.\n\n\tUnreal Mode\nUNREAL s reg [s reg ...]  Turn on or off Unreal Mode.\tThis mode is a\n\t\t  variant of Real Mode in which data registers (DS,\n\t\t  ES, FS, GS, or SS) can access all of the 4GB address\n\t\t  space.  That is, instead of the normal 64KB length\n\t\t  of a data segment, the length is 4GB.  This command\n\t\t  can enable all or just some of the data registers\n\t\t  for Unreal Mode.\n\n\t\t  Legend:  s is either + or - and reg is one of\n\t\t    ALL DS ES FS GS or SS\n\n\t\t  For example:\n\t\t  To enable all registers, use +ALL\n\t\t  To disable all registers, use -ALL\n\t\t  To enable or disable selected registers, use +xS or\n\t\t    -xS, where x is D E F G or S, as in +DS or -ES.\n\t\t    You may specify multiple registers on the same\n\t\t    line as in +DS +ES.\n\n\tVirtual Mode Switches\nVMSCOUNT=val\t Don't intrude into the GDT/IDT for VCPI debugging\n\t\t  until the value in this counter has decremented to\n\t\t  zero.  This keyword is useful for occasions where\n\t\t  the VCPI client shuffles its GDT and IDT around for\n\t\t  a while before deciding just where it's going to be.\nVMSINT=ON\t Enable (ON) or disable (OFF) VCPI debugging.\tUse\nVMSINT=OFF\t  this feature in cases where some VCPI programs\n\t\t  misbehave when VCPI debugging is enabled.  In this\n\t\t  case, enable VCPI debugging only as necessary.\nVMSINT=xx,xx,... Change the default interrupts intercepted by 386SWAT\n\t\t  when debugging VCPI clients.\n\n\tPentium-Pro CPU Specific Commands\nBTF\t\t Display Branch Trace Facility state (ON or OFF).\nBTF ON|OFF\t Turn Branch Trace Facility state ON or OFF.\nLBR\t\t Display Last Branch/Exception values on the\n\t\t  command line.\nLBR ON|OFF\t Turn Last Branch/Exception window display ON or OFF.\n\t\t  The four-line window displays the Last Branch From\n\t\t  EIP, Last Branch To EIP, Last Exception From EIP,\n\t\t  and Last Exception To EIP.  Also, the keywords\n\t\t  .LBRFR, .LBRTO, .LEXFR, .LEXTO contain the value of\n\t\t  the Last Branch/Exception From/To EIP in case these\n\t\t  need to be used in command line expressions\n\t\t  (e.g., U .LBRFR).\n\n\tWindows Debugging Commands\nIPF [/d] [/s] [/r] expr  If Invalid Page Faults are being trapped by\n\t\t  386SWAT's VxD (see SWATVXD.DOC for more details), use\n\t\t  the IPF command to control how these events are to\n\t\t  be handled.  The optional switch /d tells 386SWAT not\n\t\t  to display a message on the mono screen describing\n\t\t  this event, /s tells 386SWAT not to stop when this\n\t\t  event occurs, /r tells 386SWAT to remove this entry\n\t\t  from its local tables, and expr is an expression\n\t\t  which evaulates to a linear address corresponding to\n\t\t  the Invalid Page Fault.\n\nMDB expr\t Display the memory pointed to by the selector expr as\n\t\t  a Windows Module Database.\n\nSGH [/b|/s|/h|/o] [/c] expr  Search through the Windows Global\n\t\t  Heap for values.  The expression (expr) entered is\n\t\t  interpreted as a base address if /b is specified,\n\t\t  size if /s, handle if /h, and owner if /h.  If /c is\n\t\t  specified, the search continues from the currently\n\t\t  displayed entry; otherwise, the search starts at the\n\t\t  top of the heap.\n\nTDB expr\t Display the memory pointed to by the selector expr as\n\t\t  a Windows Task Database.\n\nWKD [ON|OFF]\t Turn ON or OFF Kernel Debugging.  This command\n\t\t  cannot be used from within Windows.\nWKD [QUIET|NOISY]  Disable (QUIET) or Enable (NOISY) reports on\n\t\t  Parameter Errors.\n\nWKD LOGERROR [ON|OFF]  Turn ON or OFF the INT 01h trap of LogErrors.\n\nWKD FAULT [ON|OFF|SKIP]  Turn ON, OFF, or SKIP once traps for Faults.\n\nWKD WCB1 [ON|OFF]  Turn ON or OFF signalling of signalling an INT 01h at\n\t\t  Windows Callback time when entering Windows (VM->RM) so\n\t\t  breakpoints can be set.  This command is particularly\n\t\t  useful in conjunction with the INSERT command.\n\n\nCommon Memory References\n------------------------\n\nThere are a number of points in memory to which it is common to refer,\ne.g., the address of the instruction at the top of the disassembly\nwindow.  These references are made easier by using one of the\nfollowing shortcuts (all of which can be used anywhere on the command\nline where an address is expected such as BD .CODE, or BD .DATA L4 W):\n\n.EA\t\t\tEffective Address of the first (or only)\n\t\t\t   operand to the instruction at the top of\n\t\t\t   the disassembly window\n.EA2\t\t\tEffective Address of the second operand to the\n\t\t\t   instruction at the top of the disassembly\n\t\t\t   window\n.GDT\t\t\tGDT base address (using selector zero)\n.IDT\t\t\tIDT ...\n.LDT\t\t\tLDT ...\n.TSS\t\t\tTSS ...\n.CMAC\t\t\tSeg:Off of next C MAC entry  -- equivalent to\n\t\t\t   .DATA + 2 + FFFE & [.DATA\n.CODE\t\t\tcurrent code display address\n.CSIP\t\t\tcurrent cs:[e]ip\n.DATA\t\t\tcurrent data display address\n.DMAC\t\t\tSeg:0 of first DOS MAC entry\n.NMAC\t\t\tSeg:0 of next DOS MAC entry -- equivalent to\n\t\t\t   ((S..DATA)+1+[.DATA+3):0\n.LBRFR\t\t\tEIP of Last Branch From\n.LBRTO\t\t\t...\t\t   To\n.LEXFR\t\t\t...\t    Exception From\n.LEXTO\t\t\t...\t\t      To\n.MDB\t\t\tSel|0 of current Windows Module Database\n.TDB\t\t\t...\t\t\t Task ...\n.PMIxx\t\t\tSel|Off of PM Interrupt xxh\n.RMIxx\t\t\tSeg:Off of RM interrupt # xx\n.VM\t\t\tSel|Off of current Windows VM structure\n.VMCRS\t\t\tSel|Off of Client Register Struc in .VM\n.VMIxx\t\t\tSeg:Off of VM interrupt # xx\n.VMRET\t\t\tReturn CS|EIP saved in .VMCRS\n.XBDA\t\t\tSeg:Off of XBDA; same as ([40:0E):0\n.XBDA2\t\t\tSeg:Off of 2ndary XBDA; same as ((S..XBDA)+[.XBDA+B4):0\n\nA common address to jump to is the (near or far) return address of a\nsubroutine.  This is made easier by using shortened forms of the\ncommands one might use to extract these addresses.  The various\nflavors of return addresses are (where LaSTK is the address of the\ncurrent stack pointer -- SS:SP if VM, SS|SP if PM and the B-bit in SS\nis clear, and SS|ESP if PM and the B-bit in SS is set):\n\nKeyword \tGrammar Equivalent\tMeaning\n---------------------------------------------------------------------\n.RETND\t\t{LaSTK\t\t\tNear dword\n.RETNS\t\t[LaSTK\t\t\tNear word\n.RETFD\t\t:{LaSTK or |{LaSTK\tFar word:dword or word|dword\n\t\t\t\t\t(depending upon the VM bit in\n\t\t\t\t\tthe current EFL)\n.RETFS\t\t:[LaSTK or |[LaSTK\tFar word:word or word|word\n\t\t\t\t\t(depending upon the VM bit in\n\t\t\t\t\tthe current EFL)\n.RETN\t\t.RETND or .RETNS\tDepending upon the D-bit in CS\n.RETF\t\t.RETFD or .RETFS\t...\n.IRET\t\t.RETF in VM\t\tAlso allows mode switch from\n\t\t.RETFD in PM\t\tPM to VM by checking VM bit\n\t\t\t\t\tin EFL above return address\n\nAs a common shortcut, .RETN and .RETF refer to one of the above forms\ndepending upon the setting of the D-bit in the current CS (that is,\nwhether we're running in a USE16 or USE32 segment).  Moreover, .IRET\ncan be used as a shorthand for .RETF with the added check on the VM\nbit in the EFL above the return address.  If this bit is set, the\nreturn address is interpreted as a VM address even though the current\nmode is PM.\n\nNo magic is invoked to extract the return address if data has been\npushed onto the stack below the return address, so be sure that LaSTK\npoints to the actual return address.\n\nAlso note that the keystrokes A-F and A-N are defined as shortcuts for\nthe commands G .RETF and G .RETN, respectively.\n\n\nRegister Mask Values\n--------------------\n\nThe following pseudo-records describe the bit masks supported by the\nregister command where \"*\" represents reserved bits with no\ncorresponding name:\n\nEFL record  *:13, AC:1, VM:1, RF:1, *:1, NT:1, IOPL:2, OF:1, DF:1,\\\n\t    IF:1, TF:1, SF:1, ZF:1, *:1, AF:1, *:1, PF:1, *:1, CF:1\n\nCR0 record  PG:1, CD:1, NW:1, *:10, AM:1, *:1,\tWP:1,\\\n\t    *:10, NE:1, ET:1, TS:1, EM:1, MP:1, PE:1\n\nPTE record  FRM:20,   PTE_AVL:3, *:2,\t   PTE_D:1,  PTE_A:1,\\\n\t    PTE_CE:1, PTE_WT:1,  PTE_US:1, PTE_RW:1, PTE_P:1\n\nSEL record  SEL:13, TI:1, PL:2\n\nDR6 record  *:16, BT:1, BS:1, BD:1, *:9, B3:1, B2:1, B1:1, B0:1\nDR7 record  LEN3:2, RW3:2, LEN2:2, RW2:2, LEN1:2, RW1:2, LEN0:2, RW0:2,\\\n\t    *:2, GD:1, *:3, GE:1, LE:1, G3:1, L3:1, G2:1, L2:1, G1:1, L1:1,\\\n\t    G0:1, L0:1\n\nTR4 record  TR4_TAG:21, TR4_WVAL:1, TR4_LRU:3, TR4_RVAL:4, *:3\nTR5 record  *:21, TR5_SSEL:7, TR5_ESEL:2, TR5_CTL:2\nTR6 record  FRM:20, TR6_V:1, TR6_D:1, TR6_DP:1, TR6_U:1, TR6_UP:1,\\\n\t    TR6_W:1, TR6_WP:1, *:4, TR6_C:1\nTR7 record  FRM:20,*:7, TR7_HT:1, TR7_REP:2, *:2\n\n\nNDP Register Screen\n-------------------\n\nThis feature is preliminary, but it does allow you to move through the\nNDP registers and settings and change them at will.  Lacking is an\nexact binary to decimal conversion algorithm as well as a decimal to\nbinary conversion algorithm.  It can be displayed and cleared via\nAlt-F8.\n\n\nMMX & SSE Register Screen\n-------------------------\n\nThis feature is preliminary, but it does display all of the registers.\nTo see the register display, press Alt-F11.  If there are things you\nlike to see on this screen, just ask.  Not being an MMX or SSE\nprogrammer, I'm not sure what such programmers need.\n\n\nRemote debugging\n----------------\n\nTwo machines may be connected for remote debugging.  The connection\nmay be made via a null modem cable connecting the serial ports on\nboth machines, or via modem.\n\nThe connection is initiated by using the SETCOM command to initialize\nthe serial port, then pressing Ctl-F9 on each system to attempt to\nconnect.  When a connection is established, the \"Press M to become\nmaster\" prompt appears.  Only one of the two systems may become\nmaster; the other one then becomes the slave.  Processing on the slave\nsystem then proceeds normally; the master system is now running a\nspecial terminal program.\n\nKeystrokes typed in the master terminal program are sent to the remote\nsystem (with some exceptions - see below), and screen output from the\nremote 386SWAT system appears on the master terminal screen.\n\nSpecial keys\n\nCtl-Alt-Del will NOT be sent to the remote system while in the master\nterminal screen - it will reboot the master system.  Ctl-F9 invokes\na menu of special options for the master system:\n  T\tTerminate connection with slave immediately.\n  G\tTerminate connection, but have slave go instead of returning to\n\tthe 386SWAT command prompt.\n  R\tTerminate connection, have slave go, but have slave automatically\n\tattempt to re-establish connection on next invocation of 386SWAT.\n  B\tTerminate connection and reboot slave system.\n  S\tSuspend session temporarily.  This temporarily exits the terminal\n\tprogram.  You may exit 386SWAT.  Ctl-F9 again resumes the connection.\n  U\tUpload program to remote.\n  D\tDownload program from remote.\n  Esc\tContinue with terminal program\n\nOther keys are Ctl-6 (interrupt remote) and Alt-F7 (send remote screen\nonly to master).  Alt-F7 is useful for debugging when the remote\nsystem is in graphics mode or otherwise unable to access the CRT\ncontroller.\n\n\nVCPI Program Debugging\n----------------------\n\nAn API for use by VCPI programs is described in the file VCPIDBG.DOC.\n\n\nReal Mode Debugging\n-------------------\n\nIf you find that an error (such as GP Fault) is signalled at an\naddress other than the expected address, you might have DOS Stacks\nswitched on.  In this case, DOS intercepts all IRQ interrupts inserts\na new stack into the picture and then passes the interrupt onto the\nnext handler.  To avoid this problem (and others which DOS Stacks\nattempts to solve but doesn't), put Stacks=0,0 into your CONIFG.SYS\nfile and reboot.  If you have ever installed Windows 3.x or later\n(including Win 9x/ME) on your system, likely there is a residual\nStacks=9,256 in your CONFIG.SYS.  That statement has the effect of\nwasting 2500 bytes of low DOS memory for nothing.\n\n\nLimitations\n-----------\n\nThis program is very preliminary.  It lacks many of the features of a\nfull-blown debugger.  On the other hand, it has a few features they\ndon't have.\n\n\nTechnical Support\n-----------------\n\nPlease send your problems, praises, and comments to\n\nbsmith@sudleyplace.com\n\n\u001a"
  },
  {
    "path": "swat/386SWAT.GRM",
    "content": "'$Header:   P:/PVCS/386SWAT/386SWAT.GRV   1.32   10 Aug 1998 11:00:44   BOB  $\n\t\t   GRAMMAR FOR 386SWAT COMMAND LINE\n\n// Command lines\nAPPKEY\nBCnx opt_addr\t\tn  {<empty>, 0..7}  x  {<empty>, *, +, -}\nBD opt_addr\nBD addr Ln I\t\tn  {<empty>, 1, 2, 4}\nBD addr Ln R\t\tn  {<empty>, 1, 2, 4}\nBD addr Ln W\t\tn  {<empty>, 1, 2, 4}\nBD addr L1 X\nBDnx\t\t\tx  {*, +, -}\tn  {<empty>, 0, 1, 2, 3}\nBPnx opt_addr\t\tn  {<empty>, 0..7}  x  {<empty>, *, +, -}\nBTF\nBTF {ON|OFF}\nCHAT\nDxy-\t\t\tx  {<empty>, b, d, g, i, t, t2, t3, v, w},\n\t\t\ty  {<empty>, /n} where n is the data width\nDxy opt_addr\t\tx  {<empty>, b, d, g, i, t, t2, t3, v, w},\n\t\t\ty  {<empty>, /n} where n is the data width\nDxy addr P\t\tx  {<empty>, b, d, g, i, t, t2, t3, v, w},\n\t\t\ty  {<empty>, /n} where n is the data width\nDxy addr P exp\t\tx  {<empty>, b, d, g, i, t, t2, t3, v, w},\n\t\t\ty  {<empty>, /n} where n is the data width\nDLGx addr\t\tx  {16, A, 32, W}\nDTE exp\nE  addr\nE  addr lvallist\nEXIT\nF  addr L lval lval\nF  addr L lval lval P\nF  addr L lval lval P exp\nFS\nG  opt_addr\nGM opt_boolexp\nH  addr\nIx lval \t\tx  {<empty>, b, d, w}\nIMR\nINSERT gdtr idtr [cr3 [lapde]]\nINSERT *    idtr\nIPF [/d] [/s] [/r] expr\nIRR\nISR\nLBR\nLBR {ON|OFF}\nLF filename\nLI x\t\t\tx  {+, -}\nLI dcon x\t\tx  {<empty>, +, -}\nLS filename x\t\tx  {<empty>, lval}\nM  addr L lval addr\nMACBASE addr\nMDB exp\nOx lval lval\t\tx  {<empty>, b, d, w}\nPATHx dirlist\t\tx  {<empty>, +}\nPS lval x\t\tx  {<empty>, lval (<256)}\nPTE addr\nPTE exp\nPTE addr P exp\nPTE exp  P exp\nQS addr\nR  reg = exp\nR  reg.str = exp\nREBOOT x\t\tx  {0, 1, 2}\nREMDBG\nRC\nRR\nRS\nSx addr L expr atom\tx  {<empty>, 1}\nSx addr addr   atom\tx  {<empty>, 1}\nS  addr addr   ! instr\nS  addr L expr ! instr\nS  addr addr   # PTE\nS  addr L expr # PTE\nSBx\t\t\tx  {+, -}\nSB*x\t\t\tx  {+, -}\nSETCOM x\t\tx  {<empty>, -}\nSETCOM port bps \tport  {1, 2, 3, 4}\nSETCOM xn\t\tx  {RTS, DTR}\t\tn  {+, -}\nSGH [/b|/s|/h|/o|/n] [/c] expr\nSIGINT lval\nSPTE addr\nSPTE exp\nSPTE addr P exp\nSPTE exp  P exp\nTDB exp\nTOGINT lvallist\nTS\nTS opt_sel opt_group x opt_seln opt_addr\n\t\t\tx  {<empty>, *, P, V}\tn  {<empty>, +, -}\nUx-\t\t\tx  {<empty>, 16, 32}\nUx opt_addr\t\tx  {<empty>, 16, 32}\nUx addr P\t\tx  {<empty>, 16, 32}\nUx addr P exp\t\tx  {<empty>, 16, 32}\n\nVMSCOUNT xx\nVMSINT {ON|OFF}\nVMSINT=xx,xx,...\n\nWKD FAULT [ON|OFF|SKIP]\nWKD LOGERROR [ON|OFF]\nWKD [ON|OFF]\nWKD [QUIET|NOISY]\n\n\n// Lval list\nlvallist  lval\n\t  lval lvallist\n\n\n// Optional addresses\nopt_addr  <empty>\n\t  addr\n\n\n// Addresses\naddr exp\t\tusing default segment/selector as per specific command\n     ea\n\n\n// Optional boolean expression\nopt_boolexp <empty>\n\t    exp\n\n\n// Expressions on values\nexp  ( exp )\n     mfn\t\tmonadic functions\n     dfn\t\tdyadic functions\n\n\n// Monadic functions\nmfn  atom\n     [ ea\t\textract word at effective address\n     { ea\t\textract dword ...\n     O.ea\t\textract offset from effective address\n     S.ea\t\textract segment/selector ...\n     L.ea\t\textract linear address ...\n     P.ea\t\textract physical address ...\n     + exp\n     - exp\n     ~ exp\n\n\n// Lefthand values\nlval atom\n     ( exp )\n\n\n// Effective address with segment/selector\nea   seg : exp\n     sel | exp\n     .EA\t\tEffective Address #1 (or the only one)\n     .EA2\t\t...\t\t  #2\n     .GDT\t\tGDT base address (using selector zero)\n     .IDT\t\tIDT ...\n     .LDT\t\tLDT ...\n     .TSS\t\tTSS ...\n     .CMAC\t\taddress of next C MAC entry\n     .CODE\t\tcurrent code display address\n     .CSIP\t\taddress of current cs:[e]ip\n     .DATA\t\tcurrent data display address\n     .DMAC\t\tsegment of first DOS MAC entry\n     .NMAC\t\tsegment of next  DOS MAC entry\n     .PMIxx\t\tSel|Off of PM Interrupt xxh\n     .RMIxx\t\tSeg:Off of RM interrupt # xx\n     .VM\t\tSel|Off of current Windows VM structure\n     .VMIxx\t\t..\t   VM ...\n     .VMRET\t\treturn cs|eip from Windows VM (|{.vmstk+50 or\n\t\t\t|{.vmstk+150)\n     .VMSTK\t\tcurrent ss|esp saved in Windows VM structure\n\t\t\t(same as |{.vm+40)\n     .IRET\t\tfar word:dword return address on stack\n\t\t\tallowing a mode switch from PM to VM\n     .RETN\t\tnear word or dword return address on stack\n     .RETND\t\tnear dword return address on stack\n     .RETNS\t\tnear word return address on stack\n     .RETF\t\tfar word:word or word:dword return address on stack\n     .RETFD\t\tfar word:dword return address on stack\n     .RETFS\t\tfar word:word return address on stack\n     .XBDA\t\tSeg:Off of XBDA; same as ([40:0E):0\n     .XBDA2\t\tSeg:Off of 2ndary XBDA; same as ((S..XBDA)+[.XBDA+B4):0\n     dotcmd ? exp\tdyadic functions on dot commands (.GDT, .IDT, etc.)\n\t\t\twhere ? is a dyadic function\n     :[ ea\t\textract word:word at effective address\n     :{ ea\t\t...\tword:dword ...\n     |[ ea\t\t...\tword|word ...\n     |{ ea\t\t...\tword|dword ...\n     |G ea\t\t...\t...\t   in GDT-format (using selector zero)\n     |I ea\t\t...\t...\t   in IDT-format (using IDT selector)\n     |L ea\t\t...\t...\t   in LDT-format (same as GDT-format)\n     |T ea\t\t...\t...\t   in TSS-format (using CS|EIP)\n     symbol\t\teffective address of this symbol\n\n\n// Dyadic functions on dot commands\ndotcmd ? exp\n     S.dotcmd : O.dotcmd ? exp \tfor VM addresses\n     S.dotcmd | O.dotcmd ? exp \t... PM ...\n\t\t\twhere ? is a dyadic function\n\n\n// Dyadic functions\ndfn  atom\n     lval + exp\taddition\n     lval - exp\tsubtraction\n     lval * exp\tmultiplication\n     lval / exp\tdivision (with truncation towards zero)\n     lval & exp\tbitwise AND\n     lval ^ exp\tbitwise XOR\n     lval == exp\tis equal (eq)\n     lval != exp\tis not equal (ne)\n     lval <  exp\tis less than (lt)\n     lval <= exp\tlt or eq\n     lval >  exp\tis greater than (gt)\n     lval >= exp\tgt or eq\n     lval && exp\tlogical AND\n     lval || exp\tlogical OR\n\n\nBecause we have usurped the | symbol as the selector separator, it is\nnot available for bitwise OR.  To do bitwise OR between A and B, use\n      (A & ~B) ^ B\n\n// Precedence\nOperators\t\t\t  Type\n- ~\t\t\t\t  Monadic\n* /\t\t\t\t  Dyadic\n+ -\t\t\t\t  Dyadic\nsymbols, .code, .data, etc.\t  Address expression\n: |\t\t\t\t  Dyadic (address construction)\n] [ {\t\t\t\t  Monadic (extraction)\n>> <<\t\t\t\t  Dyadic (bit shift)\n< <= >= >\t\t\t  Dyadic (relational)\n== !=\t\t\t\t  Equality\n&\t\t\t\t  Dyadic (bitwise AND)\n^\t\t\t\t  Dyadic (bitwise XOR)\n&&\t\t\t\t  Dyadic (logical AND)\n||\t\t\t\t  Dyadic (logical OR)\n\n\n\n// Segment or selector\nseg  lval\nsel  lval\n\n// Optional segment or selector\nopt_sel  <empty>\n\t *\n\t seg\n\t sel\n\n// Optional group ID\nopt_group  <empty>\n\t   *\n\t   con\n\n// Atoms\natom con\n     reg\n     .LBRFR\n     .LBRTO\n     .LEXFR\n     .LEXTO\n\n\n// Registers\nreg  GP\t\tAX, AL, AH, BX, ...\n     EGP\t\tEAX, EBX, ECX, ...\n     CRn\t\tControl registers\n     DRn\t\tDebug registers\n     TRn\t\tTest registers\n     Misc\t\tIP, EIP, FL, EFL, TR, LDTR\n\n\n// Constants\ncon\t  <32-bit hex values>\ndcon\t  <16-bit unsigned decimal values>\nfilename  <DOS pathname>\ndirlist   <List of directory names separated by commas (,)>\n\n// Bits per second (BPS) values\nbps  55\n     110\n     300\n     600\n     1200\n     2400\n     4800\n     9600\n     19200\n     38400\n     76800\n     115200\n\nNote that this grammar is mostly precedence-free.  Multiplication and\ndivision have a higher precedence than addition and subtraction, but\neverything else is at the same level.  Moreover, other than the above\nexception, all expressions execute right to left.  When in doubt, use\nparentheses.\n\n\nExamples\n--------\n\n* To display the successive entries in the DOS memory allocation\n  chain, display one such entry via a DB command.  Then type\n\n  /D ((S..DATA)+1+[.DATA+3):0\n\n  Continuing to press Enter displays the successive MAC entries.\n\n* To display the successive entries in the C memory allocation chain,\n  display one such entry (at the count word) via a DB command.\tThen\n  type\n\n  /D .DATA + 2 + FFFE & [.DATA\n\n\n\u001a"
  },
  {
    "path": "swat/FILELIST.TXT",
    "content": "This file contains a list of all files included in 386SWAT.ZIP along\nwith a brief description of each file's contents.\n\nFILELIST.TXT\tThis file.\n\n386SWAT.DOC\tA preliminary documentation file.\n\nSWATSYM.DOC\tA documentation file for 386SWAT symbolic debugging.\n\nVCPIDBG.DOC\tA documentation file describing the API implemented\n\t\t  in 386SWAT for debugging VCPI clients.\n\n386SWAT.LOD\tThe debugger itself.  See 386SWAT.DOC for details.\n\n386SWAT \tA sample profile file listing all profile options.\n\t\t  You may wish to copy this file to *.PRO and use it\n\t\t  as the basis for your customized profile.\n\n386SWAT.GRM\tA listing of the LALR grammar used by 386SWAT's\n\t\t  command line.\n\nMAPSSF.EXE\tA program to convert a .MAP file to a .SSF (SWAT\n\t\t  Symbol File) as well as pass symbols to 386SWAT.\n\t\t  See the file SWATSYM.DOC for details.\n\nSWATCMD.EXE\tA program used to send commands to 386SWAT.  This\n\t\t  program also runs as a device driver to aid in\n\t\t  debugging those programs.\n\nSWATRUN.COM\tA program used to run another program under 386SWAT's\n\t\t  control.  See the file SWATSYM.DOC for details.\n\nSWATVXD.EXE\tA VxD for debugging Windows applications (as well as\n\t\t  other VxDs).\tSee SWATVXD.DOC for details.\n\nDPMITSR.ZIP\tThis program is an example of a simple DPMI TSR.  It\n\t\t  hooks Int 21 function 4B.\n\nEPM.ZIP \tThis program is an example of Entering PM from any of\n\t\t  RM, VM-VCPI, or VM-DPMI.  When debugging VCPI\n\t\t  clients, make sure you have enabled the VMSINT flag\n\t\t  (use VMSINT ON from the SWAT command line).\n\nHELLO_PM.ZIP\tThis program is an example of a DPMI application that\n\t\t  enters protected mode via DPMI services, prints\n\t\t  \"Hello, world,\" then returns to DOS (and V86 mode).\n\nSWATDPMI.ZIP\tThis program is an example of a DPMI application that\n\t\t  copies code into extended memory, then executes it.\n\nKEYBIN.COM\tUse this program on an International keyboard to help\n\t\t  the author of 386SWAT support your keyboard.\n\nKEYBIN.TXT\tConsult this text file to see how to use KEYBIN.\n\n\u001a"
  },
  {
    "path": "swat/KEYBIN.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <TITLE>Documentation For KEYBIN.COM</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Documentation for KEYBIN.COM</FONT></B></CENTER>\n\n\n<P>Use this program on an international keyboard to help the author of\n386SWAT support your keyboard.\n\n<P>First try out the program to see how it works (note Space bar to Exit).&nbsp;\nNext redirect the program's output to a file and type all keys (blindly).\n\n<P>Type every key on your keyboard except for function, arrow, and keypad\nkeys.&nbsp; Type every key in unshifted state as well as with the Shift-,\nControl-, and Alt-keys.&nbsp; If your keyboard distinguishes between the\nleft and right Shift-, Control-, and/or Alt-keys be sure to test all states\nfor all keys.\n\n<P>After exiting the program, annotate the output file with any comments\nyou consider appropriate.&nbsp; Finally, e-mail the file to the author\n(<A HREF=\"mailto:bsmith@sudleyplace.com\">bsmith@sudleyplace.com</A>).\n\n<P>For reference, supported international keyboard layouts include\n<TABLE BORDER=0 CELLSPACING=10 >\n<TR>\n<TD>GR129</TD>\n\n<TD>Germany</TD>\n</TR>\n\n<TR>\n<TD>SP172</TD>\n\n<TD>Spain</TD>\n</TR>\n</TABLE>\nThe keyboard layouts to which I have access and don't currently support\nare as follows:\n<TABLE BORDER=0 CELLSPACING=10 >\n<TR>\n<TD>BE120</TD>\n\n<TD>Belgium</TD>\n</TR>\n\n<TR>\n<TD>CF058</TD>\n\n<TD>Canada (French)</TD>\n</TR>\n\n<TR>\n<TD>DK159</TD>\n\n<TD>Denmark</TD>\n</TR>\n\n<TR>\n<TD>SU153</TD>\n\n<TD>Finland</TD>\n</TR>\n\n<TR>\n<TD>FR120</TD>\n\n<TD>France</TD>\n</TR>\n\n<TR>\n<TD>FR189</TD>\n\n<TD>France</TD>\n</TR>\n\n<TR>\n<TD>IS197</TD>\n\n<TD>Iceland</TD>\n</TR>\n\n<TR>\n<TD>IT142</TD>\n\n<TD>Italy</TD>\n</TR>\n\n<TR>\n<TD>LA171</TD>\n\n<TD>Latin America</TD>\n</TR>\n\n<TR>\n<TD>NL143</TD>\n\n<TD>Netherlands</TD>\n</TR>\n\n<TR>\n<TD>NO155</TD>\n\n<TD>Norway</TD>\n</TR>\n\n<TR>\n<TD>PO163</TD>\n\n<TD>Portugal</TD>\n</TR>\n\n<TR>\n<TD>SF150</TD>\n\n<TD>Switzerland (French)</TD>\n</TR>\n\n<TR>\n<TD>SG150</TD>\n\n<TD>Switzerland (German)</TD>\n</TR>\n\n<TR>\n<TD>TR179</TD>\n\n<TD>Turkey</TD>\n</TR>\n\n<TR>\n<TD>UK166</TD>\n\n<TD>United Kingdom</TD>\n</TR>\n\n<TR>\n<TD>YU234</TD>\n\n<TD>Yugoslavia (Latin)</TD>\n</TR>\n</TABLE>\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/KEYBIN.TXT",
    "content": "Documentation for KEYBIN.COM\n\nUse this program on an international keyboard to help the author of\n386SWAT support your keyboard.\n\nFirst try out the program to see how it works (note Space bar to\nExit).\tNext redirect the program's output to a file and type all keys\n(blindly).\n\nType every key on your keyboard except for function, arrow, and keypad\nkeys.  Type every key in unshifted state as well as with the Shift-,\nControl-, and Alt-keys.  If your keyboard distinguishes between the\nleft and right Shift-, Control-, and/or Alt-keys be sure to test all\nstates for all keys.\n\nAfter exiting the program, annotate the output file with any comments\nyou consider appropriate.  Finally, e-mail the file to the author (see\nthe address at the bottom of the 386SWAT.DOC file).\n\nFor reference, supported keyboard layouts include\n\nGR129\tGermany\nSP172\tSpain\n\nThe keyboard layouts to which I have access and don't currently\nsupport are as follows:\n\nBE120\tBelgium\nCF058\tCanada (French)\nDK159\tDenmark\nSU153\tFinland\nFR120\tFrance\nFR189\tFrance\nIS197\tIceland\nIT142\tItaly\nLA171\tLatin America\nNL143\tNetherlands\nNO155\tNorway\nPO163\tPortugal\nSF150\tSwitzerland (French)\nSG150\tSwitzerland (German)\nTR179\tTurkey\nUK166\tUnited Kingdom\nYU234\tYugoslavia (Latin)\n\n\u001a"
  },
  {
    "path": "swat/SWAT.HTM",
    "content": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n<html>\n<head>\n   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n   <meta name=\"GENERATOR\" content=\"Mozilla/4.76 [en]C-CCK-MCD   (Win98; U) [Netscape]\">\n   <meta name=\"Author\" content=\"Bob Smith\">\n   <title>386SWAT Overview</title>\n</head>\n<body text=\"#000000\" bgcolor=\"#FFFFC0\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF00FF\">\n\n<center><b><font size=+2>386SWAT -- A Protected Mode Debugger</font></b>\n<br>\n  (C) Copyright 1988-2003 Qualitas, Inc. All rights reserved.\n</center>\n\n<table border=\"0\" cellpadding=\"4\">\n  <tr>\n    <td valign=\"top\"> \n      <p>This protected mode debugger provides debugging services to real mode, \n        protected mode, virtual 8086 mode programs, DPMI and VCPI clients, and \n        Win 3.1x and Win95/98 programs under any memory manager while occupying \n        only a few kilobytes of low DOS memory. \n      <p>It supports disassembly of the full 386, 387, 486, Pentium, and Pentium \n        Pro CPU instruction sets through the Pentium MMX &amp; SSE instructions. \n      <p>This debugger is also a Windows Kernel Debugger providing low-level Windows \n        debugging services a la WDEB386, but residing in the same machine, so \n        no COM port hookup is needed. To take advantage of this feature, you must \n        have a separate video adapter (PCI or ISA monochrome) and matching monitor \n        attached to your system. \n      <p>This program started out in early 1988 as an internal tool in Qualitas \n        to help write and debug 386MAX, but has matured into a significant program \n        in itself (the executable is over 400 KB generated from over 3MB of 386 \n        assembly language source code). As it stands now, 386SWAT can debug almost \n        any \n      <ul>\n        <li> Real Mode (RM)</li>\n        <li> Virtual Mode (VM)</li>\n        <li> VCPI- or DPMI-based Protected Mode (PM), and</li>\n        <li> Windows 3.1x and Win95/98 program. </li>\n      </ul>\n      <p>Although 386SWAT was written to debug 386MAX, it can also intrude into \n        the PL0 context of other memory managers as well so as to function as \n        a PL0 debugger there. It also can debug programs remotely (over a modem) \n        and can display source code instead of just disassembly instructions, \n        along with many other features. \n      <p>I'd be interested in getting some feedback from you as to how useful \n        386SWAT is as well as how I can improve it.\n      <p>Questions or comments, please e-mail the author at <a href=\"mailto:bsmith@sudleyplace.com\">bsmith@sudleyplace.com</a>, \n        or perhaps you'd like more detailed <a href=\"swatdoc.htm\">documentation</a>, \n        or just jump right in and <a href=\"../download.htm\">download</a> it.\n    </td>\n    <td valign=\"top\"> \n      <script type=\"text/javascript\"><!--\ngoogle_ad_client = \"pub-5069729984191471\";\ngoogle_ad_width = 120;\ngoogle_ad_height = 600;\ngoogle_ad_format = \"120x600_as\";\ngoogle_color_border = \"FF4500\";\ngoogle_color_bg = \"FFEBCD\";\ngoogle_color_link = \"DE7008\";\ngoogle_color_url = \"E0AD12\";\ngoogle_color_text = \"8B4513\";\n//--></script>\n      <script type=\"text/javascript\"\n  src=\"http://pagead2.googlesyndication.com/pagead/show_ads.js\">\n</script>\n    </td>\n  </tr>\n</table>\n<p>\n  <!--#include virtual=\"/footer.htm\" -->\n</body>\n</html>\n"
  },
  {
    "path": "swat/SWATAFLT.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Autofault</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Autofault</FONT></B></CENTER>\n\n\n<P>Have you ever been puzzled by some CPU fault as to why it occurred,\nthat is, why did the CPU think there was a problem?&nbsp; If so, this feature\nis for you.&nbsp; Whenever 386SWAT is called on the difficult to figure\nout CPU faults (TSS Fault, Stack Fault, GP Fault, or Page Fault), the Autofault\nfeature attempts to determine why and to present a short prose description\nof the cause.&nbsp; The description is displayed in the lower lefthand\ncorner of the screen. Pressing a key causes the message to disappear.&nbsp;\nTo display it again (up to the time another fault occurs), press <A HREF=\"swatscr.htm#s-F4\">s-F4</A>.\n\n<P>This feature is implemented for GP, TSS, and Page Faults, although they\nall could use more tweaking.&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATBMRK.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Disassembly Bookmarks</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Disassembly Bookmarks</FONT></B></CENTER>\n\n\n<P>At times you need to browse through some code (sometimes it's even your\nown code) following subroutine calls, conditional jumps, etc. wherever\nthey might go. To make this task easier, use the <A HREF=\"swatscr.htm#s-F1\">s-F1</A>\nand <A HREF=\"swatscr.htm#s-F2\">s-F2</A> keys. To disassemble at the target\nof some instruction which transfers control, place the instruction at the\ntop of the disassembly window and press s-F1. For example, say at offset\n<TT><FONT SIZE=+1>1234</FONT></TT> in the code segment there is a <TT><FONT SIZE=+1>CALL\n5678</FONT></TT>. Place the <TT><FONT SIZE=+1>CALL</FONT></TT> at the top\nof the disassembly window and press s-F1. The disassembly window now displays\nthe code at <TT><FONT SIZE=+1>5678</FONT></TT> with an invisible bookmark\nleft at the calling address <TT><FONT SIZE=+1>1234</FONT></TT>. Each time\ns-F1 is used, it leaves a bookmark at the instruction at the top of the\ndisassembly window and disassembles at that instruction's target. To return\nto the previous bookmark, press s-F2.&nbsp; 386SWAT supports up to 128\nnested levels of such disassembly.\n\n<P>As another example, you should be able to disassemble almost any interrupt\n(say, <TT><FONT SIZE=+1>U .VMI21</FONT></TT> which disassembles at VM interrupt\n21h), and using the bookmark feature exclusively, go down to the bottom\nof the chain.\n\n<P>This feature is clever, but not that clever. It can figure out where\n(say)<TT><FONT SIZE=+1></FONT></TT>\n\n<P><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; JMP Dword Ptr CS:[1234]</FONT></TT>\n\n<P>is going and disassemble at that target, but it can't figure out the\nsame instruction with a <TT><FONT SIZE=+1>DS</FONT></TT> override. Nor\ncan it handle effective addresses other than ones with an immediate displacement\nonly (i.e., no registers such as <TT><FONT SIZE=+1>[BX+SI]</FONT></TT>).&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATCMD.HTM",
    "content": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n<html>\n<head>\n   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n   <meta name=\"GENERATOR\" content=\"Mozilla/4.6 [en] (Win98; U) [Netscape]\">\n   <meta name=\"Author\" content=\"Bob Smith\">\n   <title>Command Line Actions</title>\n</head>\n<body text=\"#000000\" bgcolor=\"#FFFFC0\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF00FF\">\n\n<center><b><font size=+2>Command Line Actions</font></b></center>\n\n<p>A number of arithmetic, bitwise, and logical functions are available.\nThe precedence of evaluation is similar to that of the C programming language.&nbsp;\nHere they are, listed in order of precedence:\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<tr>\n<th>Functions</th>\n\n<th>Type</th>\n</tr>\n\n<tr>\n<td><tt><font size=+1>- ~</font></tt></td>\n\n<td>Monadic</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>* /</font></tt></td>\n\n<td>Dyadic</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>+ -</font></tt></td>\n\n<td>Dyadic</td>\n</tr>\n\n<tr>\n<td><i>symbols</i>, <tt><font size=+1>.code</font></tt>, <tt><font size=+1>.data</font></tt>,\netc.</td>\n\n<td>Address expression</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>: |</font></tt></td>\n\n<td>Dyadic (address construction)</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>] [ {</font></tt></td>\n\n<td>Monadic (extraction)</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>>> &lt;&lt;</font></tt></td>\n\n<td>Dyadic (bit shift)</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>&lt; &lt;= >= ></font></tt></td>\n\n<td>Dyadic (relational)</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>== !=</font></tt></td>\n\n<td>Equality</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>&amp;</font></tt></td>\n\n<td>Dyadic (bitwise AND)</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>^</font></tt></td>\n\n<td>Dyadic (bitwise XOR)</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>&amp;&amp;</font></tt></td>\n\n<td>Dyadic (logical AND)</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>||</font></tt></td>\n\n<td>Dyadic (logical OR)</td>\n</tr>\n</table>\nFor example, this expression\n<p><tt><font size=+1>2a + 3 * {[.data+2|2c / 4 &amp; ffff == 5af &amp;&amp;\n3 &lt;&lt; bl || 21 ^ 2</font></tt>\n<p>is evaluated as\n<p><tt><font size=+1>(((2a + (3 * ({([.data+2)|(2c / 4)))) &amp; (ffff\n== 5af)) &amp;&amp; (3 &lt;&lt; bl)) || (21 ^ 2)</font></tt>\n<br>&nbsp;\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Code Breakpoints</b></caption>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"BC\"></a><tt><font size=+1>BC</font></tt></td>\n\n<td>Display all code breakpoints.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>BC</font> </tt><i>addr</i></td>\n\n<td>Set code breakpoint at <i>addr.</i></td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>BC*</font></tt></td>\n\n<td>Clear all code breakpoints.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>BC*</font> </tt><i>addr</i></td>\n\n<td>Clear code breakpoint at <i>addr.</i></td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>BC+</font></tt></td>\n\n<td>Enable all code breakpoints.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>BC+</font> </tt><i>addr</i></td>\n\n<td>Enable code breakpoint at <i>addr.</i></td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>BC-</font></tt></td>\n\n<td>Disable all code breakpoints.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>BC-</font> </tt><i>addr</i></td>\n\n<td>Disable code breakpoint at <i>addr.</i></td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n  <caption><b>Debug Registers DR0 to DR3</b></caption>\n  <tr> \n    <td VALIGN=TOP><a NAME=\"BD\"></a><tt><font size=+1>BD</font></tt></td>\n    <td>Display debug registers (also <a href=\"swatscr.htm#a-F9\">Alt-F9</a>).</td>\n  </tr>\n  <tr> \n    <td VALIGN=TOP><tt><font size=+1>BD</font></tt> <i>addr</i></td>\n    <td>Set DR breakpoint on instruction fetches at address <i>addr</i>.</td>\n  </tr>\n  <tr> \n    <td valign=TOP><tt><font size=+1>BD</font></tt> <i>addr</i> <tt><font size=+1>L</font></tt><i>n</i><tt><font size=\"+1\">I</font></tt></td>\n    <td>Set DR breakpoint on I/O of length <i>n</i> (<i>n</i>=1 (byte), 2 (word), \n      4 (dword)) at I/O port <i>addr</i>.</td>\n  </tr>\n  <tr> \n    <td VALIGN=TOP><tt><font size=+1>BD</font></tt> <i>addr</i> <tt><font size=+1>L</font></tt><i>n</i><tt><font size=+1>R</font></tt></td>\n    <td>Set DR breakpoint on read/writes of length <i>n</i> (<i>n</i>=1, 2, 4) \n      at address <i>addr</i>.</td>\n  </tr>\n  <tr> \n    <td VALIGN=TOP><tt><font size=+1>BD</font></tt> <i>addr</i> <tt><font size=+1>L</font></tt><i>n</i><tt><font size=+1>W</font></tt></td>\n    <td>Set DR breakpoint on writes of length <i>n</i> (<i>n</i>=1, 2, 4) at address \n      <i>addr</i>.</td>\n  </tr>\n  <tr> \n    <td VALIGN=TOP><tt><font size=+1>BD</font></tt><i>n</i><tt><font size=+1>*</font></tt></td>\n    <td>Clear DR<i>n.</i></td>\n  </tr>\n  <tr> \n    <td VALIGN=TOP><tt><font size=+1>BD</font></tt><i>n</i><tt><font size=+1>+</font></tt></td>\n    <td>Enable DR<i>n.</i></td>\n  </tr>\n  <tr> \n    <td VALIGN=TOP><tt><font size=+1>BD</font></tt><i>n</i><tt><font size=+1>-</font></tt></td>\n    <td>Disable DR<i>n.</i></td>\n  </tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Data Display</b></caption>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"D\"></a><tt><font size=+1>D</font></tt></td>\n\n<td>Display next screen of data.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>D </font></tt><i>addr</i></td>\n\n<td>Data display.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>D-</font></tt></td>\n\n<td>Data display back one page.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>D</font></tt><i>x addr</i></td>\n\n<td>Data type (<tt><font size=+1>B</font></tt> = Byte, <tt><font size=+1>W</font></tt>\n= Word, <tt><font size=+1>D</font></tt> = Dword, <tt><font size=+1>V</font></tt>\n= Vector, <tt><font size=+1>G</font></tt> = GDT, <tt><font size=+1>I</font></tt>\n= IDT, <tt><font size=+1>T</font></tt> = TSS, <tt><font size=+1>T2</font></tt>\n= 286 TSS, <tt><font size=+1>T3</font></tt> = 386 TSS).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>D</font></tt><i>x addr</i> <tt><font size=+1>P</font></tt></td>\n\n<td>Data display as physical data (say in ROM which has been mapped over\nby 386MAX).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>D</font></tt><i>x addr</i> <tt><font size=+1>P</font></tt><i>exp</i></td>\n\n<td>Data display using <i>exp</i> as <tt><font size=+1>CR3</font></tt>\n- this is useful when debugging VCPI clients because they use a separate\n<tt><font size=+1>CR3</font></tt>.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td COLSPAN=\"2\">All data display commands may be followed by an optional\nwidth switch (e.g., <tt><font size=+1>DW/5</font></tt> which displays the\ndata at five words per line instead of the usual eight). The data width\nswitch must be placed between the data command and its arguments (if any)\nas in <tt><font size=+1>DW/5 DS:0</font></tt>.&nbsp;</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Data Entry</b></caption>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"E\"></a><tt><font size=+1>E</font></tt><i> addr\n[xx ...]</i></td>\n\n<td>Enter data starting at <i>addr</i> using optional hex bytes <i>xx</i>.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Descriptor Table Entry</b></caption>\n\n<tr VALIGN=TOP>\n<td VALIGN=TOP><a NAME=\"DTE\"></a><tt><font size=+1>DTE</font></tt><i> expr</i></td>\n\n<td>Display the Descriptor Table Entry corresponding to the selector in\n<i>expr</i>.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Exit To DOS</b></caption>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"EXIT\"></a><tt><font size=+1>EXIT</font></tt></td>\n\n<td>Exit to DOS. This command is equivalent to the following command sequence:&nbsp;\n<p><tt><font size=+1>R AH=4C</font></tt>\n<br><tt><font size=+1>SIGINT 21</font></tt>\n<br><tt><font size=+1>G</font></tt></td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Data Fill</b></caption>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F\"></a><tt><font size=+1>F</font></tt> <i>addr</i><tt><font size=+1>L</font></tt>\n<i>len xx</i></td>\n\n<td>Fill data starting at <i>addr</i> of length <i>len</i> with byte value\n<i>xx</i>.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>F</font></tt> <i>addr</i> <tt><font size=+1>L</font></tt><i>len\nxx</i> <tt><font size=+1>P</font></tt></td>\n\n<td>Fill physical data starting at <i>addr</i> of length <i>len</i> with\nbyte value <i>xx</i>.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>F</font></tt> <i>addr</i> <tt><font size=+1>L</font></tt><i>len\nxx</i> <tt><font size=+1>P</font></tt><i>exp</i></td>\n\n<td>Fill data starting at <i>addr</i> of length <i>len</i> with byte value\n<i>xx</i>\nwhere <i>addr</i> is translated using <i>exp</i> as <tt><font size=+1>CR3</font></tt>\n- this is useful when debugging VCPI clients because they use a separate\n<tt><font size=+1>CR3</font></tt>.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Data Move</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"M\"></a><tt><font size=+1>M</font></tt> <i>addr</i> <tt><font size=+1>L</font></tt><i>len</i>\n<i>addr</i></td>\n\n<td>Move data starting at first <i>addr</i> of length <i>len</i> to second\n<i>addr</i></td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Hex Arithmetic</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"H\"></a><tt><font size=+1>H</font></tt> <i>exp</i></td>\n\n<td>Display hex arithmetic result</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Instruction Goto</b></caption>\n\n<tr VALIGN=TOP>\n<td VALIGN=TOP><a NAME=\"G\"></a><tt><font size=+1>G</font></tt></td>\n\n<td>Go without stopping (same as ESC)</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td VALIGN=TOP><tt><font size=+1>G</font></tt> <i>addr</i></td>\n\n<td>Goto to instruction at address <i>addr</i></td>\n</tr>\n\n<tr VALIGN=TOP>\n<td VALIGN=TOP><a NAME=\"GM\"></a><tt><font size=+1>GM</font></tt> <i>bool_exp</i></td>\n\n<td>Go monitor (single-step until <i>bool_exp</i> is TRUE) -- see <a href=\"swatmon.htm\">Monitor\nMode</a></td>\n</tr>\n\n<tr VALIGN=TOP>\n<td VALIGN=TOP><tt><font size=+1>GM</font></tt></td>\n\n<td>Go monitor using last boolean expression specified with <tt><font size=+1>GM</font></tt></td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>MAC Display</b></caption>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"MACBASE\"></a><tt><font size=+1>MACBASE </font></tt><i>addr</i></td>\n\n<td>Set the base address of the MAC chain in case it's different from <tt><font size=+1><a href=\"swatcmr.htm#.DMAC\">.DMAC</a></font></tt>.\nThis is handy when displaying the DOS subsegment chain.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Insertion Into PM Context</b></caption>\n\n<tr>\n<td><a NAME=\"INSERT\"></a><tt><font size=+1>INSERT </font></tt><i>gdtridtr</i>\n[<i>cr3</i> [<i>lapde</i>]]</td>\n\n<td>Insert into PM context.</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>INSERT *</font></tt> <i>idtr</i></td>\n\n<td>Insert into IDT.</td>\n</tr>\n\n<tr>\n<td></td>\n\n<td>where&nbsp;\n<br><i>gdtr</i> = linear address of fword describing the GDT&nbsp;\n<br><i>idtr</i> = ... IDT&nbsp;\n<br><i>cr3</i> = incoming <tt><font size=+1>CR3</font></tt> (optional)&nbsp;\n<br><i>lapde</i>= linear address of 4MB block where 386SWAT's PDE(s) should\nbe copied&nbsp;</td>\n</tr>\n\n<tr>\n<td COLSPAN=\"2\">Insert 386SWAT into a PM context while still in RM. This\nfeature is useful when attempting to debug across the boundary from RM\nto PM. In particular, it can be used to gain control shortly after Windows\nenters PM.&nbsp;</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Instruction Disassembly</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"U\"></a><tt><font size=+1>U</font></tt></td>\n\n<td>Display the next screen of instructions.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>U</font></tt> <i>addr</i></td>\n\n<td>Unassemble instructions starting at <i>addr.</i></td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>U-</font></tt></td>\n\n<td>Unassemble instructions back one page.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>U16</font></tt> <i>addr</i></td>\n\n<td>Unassemble instructions starting at <i>addr</i> as a 16-bit code segment.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>U32</font></tt> <i>addr</i></td>\n\n<td>Unassemble instructions starting at <i>addr</i> as a 32-bit code segment.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>U</font></tt><i>x</i> <i>addr</i> <tt><font size=+1>P</font></tt></td>\n\n<td>Unassemble instructions as physical data (say in ROM which has been\nmapped over by 386MAX).</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>U</font></tt><i>x</i> <i>addr</i> <tt><font size=+1>P</font></tt><i>exp</i></td>\n\n<td>Unassemble instructions starting at <i>addr</i> using <i>exp</i> as\n<tt><font size=+1>CR3</font></tt>\n- this is useful when debugging VCPI clients because they use a separate\n<tt><font size=+1>CR3</font></tt>.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Page Table Display</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"PTE\"></a><tt><font size=+1>PTE</font></tt> <i>addr</i>\n<br><tt><font size=+1>PTE</font></tt> <i>val</i></td>\n\n<td>Display the Page Directory and Page Table entries which correspond\nto the address <i>addr</i> or linear address <i>val.</i></td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"SPTE\"></a><tt><font size=+1>SPTE</font></tt> <i>addr/val</i></td>\n\n<td>Same as PTE command, but also displays the matching PTE in the PTE\ndisplay screen (<a href=\"swatscr.htm#F5\">F5</a>).</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Signal Interrupt</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"SIGINT\"></a><tt><font size=+1>SIGINT</font></tt> <i>xx</i></td>\n\n<td>Signal interrupt <i>xx</i> (<tt><font size=+1>00</font></tt> to <tt><font size=+1>FF</font></tt>,\nof course).</td>\n</tr>\n\n<tr>\n<td COLSPAN=\"2\">This keyword is useful (particularly for hardware interrupts)\nwhen you are debugging a time-critical piece of code and need to see what\nwould happen if (say) a timer tick happened at this particular point.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Toggle Interrupt Interception</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"TOGINT\"></a><tt><font size=+1>TOGINT</font></tt> <i>xx [xx\n...]</i></td>\n\n<td>Toggle interception of interrupt xx (<tt><font size=+1>00</font></tt>\nto <tt><font size=+1>FF</font></tt>, of course). Valid interrupts are <tt><font size=+1>00</font></tt>,\n<tt><font size=+1>01</font></tt>,\n<tt><font size=+1>02</font></tt>, <tt><font size=+1>03</font></tt>,\n<tt><font size=+1>05</font></tt>,\n<tt><font size=+1>06</font></tt>, <tt><font size=+1>0C</font></tt>,\n<tt><font size=+1>0D</font></tt>,\n<tt><font size=+1>0E</font></tt>. For example, if <tt><font size=+1>TRAPINV\n</font></tt>does not appear in the 386SWAT profile and you wish to enable\nit, use <tt><font size=+1>TOGINT 6</font></tt>.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Register Operations</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"R\"></a><tt><font size=+1>R</font></tt> <i>reg[<tt><font size=+1>=</font></tt>]exp</i></td>\n\n<td>Set register <i>reg</i> to <i>exp</i>. Valid registers include all\nGP and EGP as well as <tt><font size=+1>FL</font></tt>, <tt><font size=+1>EFL</font></tt>,\n<tt><font size=+1>CR</font></tt>n,\n<tt><font size=+1>DR</font></tt>n, <tt><font size=+1>TR</font></tt>n,\n<tt><font size=+1>TR</font></tt>,\nand <tt><font size=+1>LDTR</font></tt>. There are two ways to crash the\nsystem via this command: setting CR3 to a bad value, or setting EFL with\na bad value for the VM or IOPL flags. The code which sets CR0 forces the\nPage Enable and Protect Enable bits on (as evidenced by typing <tt><font size=+1>R\nCR0=0</font></tt>), so experiment without fear. Use the pseudo-register\nnames <tt><font size=+1>CSIP</font></tt> or <tt><font size=+1>CSEIP</font></tt>\nto set both registers to an address.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>R</font></tt> <i>reg.str[</i><tt><font size=+1>=</font></tt><i>]exp</i></td>\n\n<td>This command also supports bit mask qualifiers on registers. For example,\nto set the AM bit in CR0, type <tt><font size=+1>R CR0.AM=1</font></tt>.\nSee <a href=\"swatrmv.htm\">Register Mask Values</a> for a complete list\nof mask values supported.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"RC\"></a><tt><font size=+1>RC</font></tt></td>\n\n<td>Clear saved register state so another <tt><font size=+1>RS</font></tt>\nmay execute.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"RR\"></a><tt><font size=+1>RR</font></tt></td>\n\n<td>Restore saved registers.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"RS\"></a><tt><font size=+1>RS</font></tt></td>\n\n<td>Save registers to restore later via <tt><font size=+1>RR</font></tt>.\nOnly one <tt><font size=+1>RS</font></tt> may be executed at a time without\neither restoring the state via <tt><font size=+1>RR</font></tt> or clearing\nthe state via <tt><font size=+1>RC</font></tt>.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Search Operations</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"S\"></a><tt><font size=+1>S</font></tt> <i>addr1 addr2 tgt</i>\n<br><tt><font size=+1>S</font></tt> <i>addr <tt><font size=+1>L</font></tt>\nlen tgt</i></td>\n\n<td>Search from <i>addr1</i> to <i>addr2</i> or from <i>ea</i> for <i>len\n</i>bytes\nfor target tgt.</td>\n</tr>\n</table>\nThe search results are displayed on a separate screen which may be made\nactive at other times by pressing <a href=\"swatscr.htm#F6\">F6</a>. Only\nthe first 23 matches are displayed. In a future release the Up, Down, Page\nUp, and Page Down keys will allow scrolling through successive matches.\n<p>The target may take one of several forms:\n<p>* Use a target of the form xx, xxxx, xxxxxxxx where x represents a hex\ndigit to search for bytes, words, or dwords of a specified value. For example,\nthe form <tt><font size=+1>S 0:0 L FFFF 10CD</font></tt> searches for all\noccurrences of the hex bytes CD followed by 10 in the first 64KB of conventional\nmemory. Word and dword searches do not require word or dword alignment\nof the matching data. The number of digits entered determines the width\nof the value.&nbsp; Thus you should use leading zeros to pad out a small\nvalue to a wider width.&nbsp; For example, <tt><font size=+1>0</font></tt>\nand <tt><font size=+1>00</font></tt> both search for a single byte of zeros,\n<tt><font size=+1>000</font></tt>\nand <tt><font size=+1>0000</font></tt> both search for a word of zeros,\nand <tt><font size=+1>00000</font></tt>,\n<tt><font size=+1>000000</font></tt>,\n<tt><font size=+1>0000000</font></tt>, and <tt><font size=+1>00000000</font></tt>\nall search for a dword of zeros.\n<p>* Use a target of the form \"search_string\" to search for a case sensitive\nstring. For example, <tt><font size=+1>S 0:0 L FFFF</font> <font size=+1>\"386MAX\"</font></tt>\nsearches for all occurrences of the string 386MAX in the first 64KB of\nconventional memory. The ability to search for a case insensitive string\nwill be added in the future.\n<p>* Use a target of the form <tt><font size=+1>!</font></tt><i>instr</i>\nto search for a specific assembler instruction. For example, <tt><font size=+1>S\n0:0 L FFFF !INT 10</font></tt> searches for all occurrences of video interrupts\nin the first 64KB of conventional memory. This target is found by disassembling\nthe code between the start and stop addresses instruction by instruction,\nthus the alignment of the matching instructions and the starting address\nis critical. If data appears within that range, some matches may be missed.\nThe command <tt><font size=+1>S1</font></tt> (instead of <tt><font size=+1>S</font></tt>)\ncan be used to disassemble the code byte by byte. That is, with the <tt><font size=+1>S</font></tt>\ncommand, having disassembled an instruction which does not match the specified\npattern, the next instruction is searched; with the <tt><font size=+1>S1</font></tt>\ncommand, the next byte is searched. The code search text may include one\nor more question marks as wildcards which match any character in the disassembled\ninstructions. For example, use <tt><font size=+1>S 50|0 FFFF !mov e??,cr?</font></tt>\nto find all moves from a control register to a 32-bit register. Try the\nforms <tt><font size=+1>S 3BC7:100 FFFF !mov [1234]</font></tt> and <tt><font size=+1>S\n3BC7:100 FFFF !mov ?s:[1234]</font></tt> to find all moves into location\n<tt><font size=+1>[1234]</font></tt>\nwith or without a segment override. To find jumps to a specific location,\nuse the code targets <tt><font size=+1>!j? 1234</font></tt>, <tt><font size=+1>!j??\n1234</font></tt>, and <tt><font size=+1>!j??? 1234</font></tt>. Note that\nfloating point instructions may be disassembled beginning with either <tt><font size=+1>F</font></tt>\nor <tt><font size=+1>FN</font></tt> depending upon the presence of a preceding\nWAIT opcode (9Bh). To be safe, search for both.\n<p>* Use a target of the form <tt><font size=+1>#</font></tt><i>pte</i>\nto search for a PTE in the Page Tables. For example, <tt><font size=+1>S\n0 C0000000 # CF4000 </font></tt>searches for the PTE <tt><font size=+1>CF4000</font></tt>\nfrom linear <tt><font size=+1>0</font></tt> through linear <tt><font size=+1>C0000000</font></tt>.\nThe linear addresses are both rounded down to a 4KB boundary. A match at\na particular linear address means that the PTE was found and it covers\nthe 4KB block at the linear address displayed. When comparing PTEs, the\nflag bits are ignored, thus a match might be found when the PTE in the\nPage Tables is not present.\n<br>&nbsp;\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>I/O Port Read/Write</b></caption>\n\n<tr>\n<td><a NAME=\"I\"></a><tt><font size=+1>I</font></tt><i>x port</i></td>\n\n<td>Input Byte, Word, or Dword from <i>port.</i></td>\n</tr>\n\n<tr>\n<td><a NAME=\"IMR\"></a><tt><font size=+1>IMR</font></tt></td>\n\n<td>Display current Interrupt Mask Register values for master and slave\nPICs.</td>\n</tr>\n\n<tr>\n<td><a NAME=\"IRR\"></a><tt><font size=+1>IRR</font></tt></td>\n\n<td>Display current Interrupt Request Register values.</td>\n</tr>\n\n<tr>\n<td><a NAME=\"ISR\"></a><tt><font size=+1>ISR</font></tt></td>\n\n<td>Display current In-Service Register values.</td>\n</tr>\n\n<tr>\n<td><a NAME=\"O\"></a><tt><font size=+1>O</font></tt><i>x port val</i></td>\n\n<td>Output <tt><font size=+1>B</font></tt>yte, <tt><font size=+1>W</font></tt>ord,\n<tt><font size=+1>D</font></tt>word\n<i>val</i> to <i>port</i>.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 >\n<caption><b>Symbolic Debugging (see <a href=\"swatsym.htm\">SWATSYM.DOC</a>\nfor details)</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"CD\"></a><tt><font size=+1>CD</font></tt> <i>[d:][path]</i>\n<br><tt><font size=+1>CHDIR</font></tt> <i>[d:][path]</i></td>\n\n<td>Change the current directory to path. If no argument, display the current\ndrive/directory.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"FS\"></a><tt><font size=+1>FS</font></tt></td>\n\n<td>Flush symbol table.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"LF\"></a><tt><font size=+1>LF</font></tt> <i>filename</i></td>\n\n<td>Load file into browser.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"LI\"></a><tt><font size=+1>LI +</font></tt></td>\n\n<td>Enable line number display in disassembly screen.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>LI -</font></tt></td>\n\n<td>Disable line number display.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>LI</font></tt> <i>dddd</i></td>\n\n<td>Go to line <i>dddd </i>(decimal) in file browser.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>LI</font></tt> <i>dddd</i><tt><font size=+1>+</font></tt></td>\n\n<td>Go to line <i>dddd </i>forward from current line.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>LI</font></tt> <i>dddd</i><tt><font size=+1>-</font></tt></td>\n\n<td>Go to line <i>dddd </i>back from current line.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"LS\"></a><tt><font size=+1>LS</font></tt> <i>filename</i></td>\n\n<td>Load symbol file.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>LS</font></tt> <i>filename exp</i></td>\n\n<td>Load symbol file and add 16-bit value to all VM segments.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"PATH\"></a><tt><font size=+1>PATH</font></tt> <i>d:\\dir1[,d:\\dir2[,...]]</i></td>\n\n<td>Set source file search path.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>PATH+</font></tt> <i>d:\\dira[,d:\\dirb[,...]]</i></td>\n\n<td>Add to source file search path.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"PS\"></a><tt><font size=+1>PS</font></tt> <i>r</i></td>\n\n<td>Set range of symbol proximity searches to <i>r</i>.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>PS</font></tt> <i>r g</i></td>\n\n<td>Set range <i>r</i> and granularity <i>g</i> (<tt><font size=+1>1</font></tt>=bytes,\n<tt><font size=+1>2</font></tt>=words,\n<tt><font size=+1>4</font></tt>=dwords) of symbol proximity searches.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"QS\"></a><tt><font size=+1>QS</font></tt> <i>addr</i></td>\n\n<td>Display the symbol which is nearest to (and below) the given address.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"SB\"></a><tt><font size=+1>SB+</font></tt></td>\n\n<td>Enable source browser mode.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>SB-</font></tt></td>\n\n<td>Disable source browser mode.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>SB*+</font></tt></td>\n\n<td>Enable source browser mode but disregard module names.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"TS\"></a><tt><font size=+1>TS</font></tt></td>\n\n<td>Force all symbols to be retranslated according to current GDT and LDT.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>TS</font></tt> <i>sel</i></td>\n\n<td>Retranslates only for selector/segment sel.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>TS *</font></tt> <i>ID</i></td>\n\n<td>Retranslates for all selectors/segments with ID specified.</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>TS</font></tt> <i>sel ID</i></td>\n\n<td>Retranslates only for selector/segment sel with ID specified.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>TS *</font></tt>|<i>sel </i><tt><font size=+1>*</font></tt>|<i>IDv|p</i></td>\n\n<td>Change to specified mode for selector and/or ID specified.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>TS *</font></tt>|<i>sel </i><tt><font size=+1>*</font></tt>|<i>ID\n</i><tt><font size=+1>*</font></tt>|<i>v</i>|<i>p\nnsel</i></td>\n\n<td>Replace segment/selector and mode for specified selectors and IDs.\nIf <tt><font size=+1>*</font></tt> is specified for mode, the mode is left\nalone.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>TS *</font></tt>|<i>sel </i><tt><font size=+1>*</font></tt>|<i>ID\n</i><tt><font size=+1>*</font></tt>|<i>v</i>|<i>p\nnsel</i><tt><font size=+1>+</font></tt></td>\n\n<td><i>nsel</i> is added to all specified segments.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Remote debugging (see <a href=\"swatrem.htm\">SWATREM.DOC</a>)</b></caption>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"APPKEY\"></a><tt><font size=+1>APPKEY</font></tt></td>\n\n<td>Edit application keystroke buffer. This is primarily useful for remote\ndebugging. If an application is waiting for a keystroke, this feature allows\nyou to send one to the application, as well as to view any that may already\nbe available.&nbsp;</td>\n</tr>\n\n<tr>\n<td><a NAME=\"CHAT\"></a><tt><font size=+1>CHAT</font></tt></td>\n\n<td>Enter CHAT mode (also via <a href=\"swatscr.htm#c-F8\">Ctl-F8</a>).</td>\n</tr>\n\n<tr>\n<td><a NAME=\"SETCOM\"></a><tt><font size=+1>SETCOM </font></tt><i>port bps</i></td>\n\n<td>Initialize specified serial port for communications. See <tt><font size=+1><a href=\"swatpro.htm#SETCOM\">SETCOM</a>=</font></tt>\nprofile option for full syntax.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>SETCOM</font></tt></td>\n\n<td>Reinitialize the serial port with values last specified by <tt><font size=+1>SETCOM</font></tt>\nor <tt><font size=+1><a href=\"swatpro.htm#SETCOM\">SETCOM</a>=</font></tt>.\nThis is useful when an application has reprogrammed the UART.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>SETCOM -</font></tt></td>\n\n<td>Ignore all activity on serial port. Use this if you are done with remote\ndebugging and wish an application to have access to the serial port. When\n386SWAT is using the serial port, no serial port interrupts will be visible\nto virtual mode programs.</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>SETCOM RTS+</font></tt></td>\n\n<td>Pull RTS (Request To Send) line high.</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>SETCOM RTS-</font></tt></td>\n\n<td>Drop RTS (Request To Send) line low.</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>SETCOM DTR+</font></tt></td>\n\n<td>Pull DTR (Data Terminal Ready) line high.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>SETCOM DTR-</font></tt></td>\n\n<td>Drop DTR (Data Terminal Ready) line low. This is one way to hang up\na modem that won't respond to (wait)<tt><font size=+1>+++</font></tt> (wait)<tt><font size=+1>ATH</font></tt>(ENTER).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"REMDBG\"></a><tt><font size=+1>REMDBG</font></tt></td>\n\n<td>Attempt to establish remote debugging session (also via <a href=\"swatscr.htm#c-F9\">Ctl-F9</a>).\nSee the section below on remote debugging.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 WIDTH=\"100%\" VALIGN=\"TOP\" >\n<caption><b>Unreal Mode</b></caption>\n\n<tr VALIGN=TOP>\n<td WIDTH=\"25%\"><a NAME=\"UNREAL\"></a><font size=+1><tt>UNREAL</tt> </font><i>s\nreg [s reg...]</i>\n<p>where <i>s</i> is a sign (<tt><font size=+1>+</font></tt> or <tt><font size=+1>-</font></tt>)\nindicating whether to enable or disable, and <i>reg</i> is a segment register\n<tt><font size=+1>CS</font></tt>,\n<tt><font size=+1>DS</font></tt>,&nbsp;\n<br><tt><font size=+1>ES</font></tt>, <tt><font size=+1>FS</font></tt>,\n<tt><font size=+1>GS</font></tt>,\n<tt><font size=+1>SS</font></tt>, or the keyword <tt><font size=+1>ALL</font></tt>.</td>\n\n<td>Turn on and off Unreal Mode for all or selected segment registers.&nbsp;\nThis mode is a variant of Real Mode in which any segment register can access\nall of the 4GB address space.&nbsp; That is, instead of the normal 64KB\nlength of a segment, the length is 4GB.&nbsp; This command can enable all\nor just some of the segment registers for Unreal Mode.&nbsp; For example,&nbsp;\n<table>\n<tr>\n<td><tt><font size=+1>UNREAL +ALL</font></tt></td>\n\n<td>enables UM for all segment registers</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>UNREAL -ALL</font></tt></td>\n\n<td>disables ...</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>UNREAL +DS</font></tt></td>\n\n<td>enables UM for <tt><font size=+1>DS</font></tt> only</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>UNREAL +DS +ES</font></tt></td>\n\n<td>enables UM for <tt><font size=+1>DS</font></tt> and <tt><font size=+1>ES</font></tt></td>\n</tr>\n</table>\nTo see if a segment register is enabled for UM, look for the plus sign\nnext to the segment number in the instruction disassembly window.</td>\n</tr>\n</table>\n\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Virtual Mode Switches</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"VMSCOUNT\"></a><tt><font size=+1>VMSCOUNT=</font></tt><i>val</i></td>\n\n<td>Don't intrude into the GDT/IDT for VCPI debugging until the value in\nthis counter has decremented to zero. This keyword is useful for occasions\nwhere the VCPI client shuffles its GDT and IDT around for a while before\ndeciding just where it's going to be.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"VMSINT\"></a><font size=+1><tt>VMSINT=ON</tt>|<tt>OFF</tt></font></td>\n\n<td>Enable (<tt><font size=+1>ON</font></tt>) or disable (<tt><font size=+1>OFF</font></tt>)\nVCPI debugging. Use this feature in cases where some VCPI programs misbehave\nwhen VCPI debugging is enabled. In this case, enable VCPI debugging only\nas necessary.</td>\n</tr>\n\n<tr>\n<td><tt><font size=+1>VMSINT=</font></tt><i>xx,xx,...</i></td>\n\n<td>Change the default interrupts intercepted by 386SWAT when debugging\nVCPI clients.</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Pentium-Pro CPU Specific Commands</b></caption>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"BTF\"></a><tt><font size=+1>BTF</font></tt></td>\n\n<td>Display Branch Trace Facility state (ON or OFF).</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>BTF ON|OFF</font></tt></td>\n\n<td>Turn Branch Trace Facility state <tt><font size=+1>ON</font></tt> or\n<tt><font size=+1>OFF</font></tt>.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"LBR\"></a><tt><font size=+1>LBR</font></tt></td>\n\n<td>Display Last Branch/Exception values on the command line.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><tt><font size=+1>LBR ON|OFF</font></tt></td>\n\n<td>Turn Last Branch/Exception window display <tt><font size=+1>ON</font></tt>\nor <tt><font size=+1>OFF</font></tt>. The four-line window displays the\nLast Branch From EIP, Last Branch To EIP, Last Exception From EIP, and\nLast Exception To EIP. Also, the keywords <tt><font size=+1><a href=\"swatcmr.htm#.LBRFR\">.LBRFR</a></font></tt>,\n<tt><font size=+1><a href=\"swatcmr.htm#.LBRTO\">.LBRTO</a></font></tt>,\n<tt><font size=+1><a href=\"swatcmr.htm#.LEXFR\">.LEXFR</a></font></tt>,\n<tt><font size=+1><a href=\"swatcmr.htm#.LEXTO\">.LEXTO</a></font></tt>\ncontain the value of the Last Branch/Exception From/To EIP in case these\nneed to be used in command line expressions (e.g., <tt><font size=+1>U\n.LBRFR</font></tt>).</td>\n</tr>\n</table>\n\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<caption><b>Windows Debugging Commands (see <a href=\"winkdbg.htm\">WINKDBG.DOC</a>)</b></caption>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"IPF\"></a><tt><font size=+1>IPF</font></tt> [<tt><font size=+1>/d</font></tt>]\n[<tt><font size=+1>/s</font></tt>] [<tt><font size=+1>/r</font></tt>] <i>expr</i></td>\n\n<td VALIGN=TOP>If Invalid Page Faults are being trapped by 386SWAT's VxD\n(see <a href=\"swatvxd.htm\">SWATVXD.DOC</a> for more details), use the IPF\ncommand to control how these events are to be handled. The optional switch\n<tt><font size=+1>/d</font></tt>\ntells 386SWAT not to display a message on the mono screen describing this\nevent, <tt><font size=+1>/s</font></tt> tells 386SWAT not to stop when\nthis event occurs, <tt><font size=+1>/r</font></tt> tells 386SWAT to remove\nthis entry from its local tables, and <i>expr</i> is an expression which\nevaulates to a linear address corresponding to the Invalid Page Fault.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"MDB\"></a><tt><font size=+1>MDB</font></tt> <i>expr</i></td>\n\n<td>Display the memory which corresponds to the selector <i>expr</i> as\na Module Database.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"SGH\"></a><tt><font size=+1>SGH</font></tt> [<tt><font size=+1>/b</font></tt>|<tt><font size=+1>/s</font></tt>|<tt><font size=+1>/h</font></tt>|<tt><font size=+1>/o</font></tt>]\n[<tt><font size=+1>/c</font></tt>] <i>expr</i></td>\n\n<td VALIGN=TOP>Search through the Windows Global Heap for values. The expression\n(<i>expr</i>) entered is interpreted as a base address if <tt><font size=+1>/b</font></tt>\nis specified, size if <tt><font size=+1>/s</font></tt>, handle if <tt><font size=+1>/h</font></tt>,\nand owner if <tt><font size=+1>/h</font></tt>. If <tt><font size=+1>/c</font></tt>\nis specified, the search continues from the currently displayed entry;\notherwise, the search starts at the top of the heap.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"TDB\"></a><tt><font size=+1>TDB</font></tt> <i>expr</i></td>\n\n<td>Display the memory which corresponds to the selector <i>expr</i> as\na Task Database.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"WKD\"></a><tt><font size=+1>WKD</font></tt> [<tt><font size=+1>ON</font></tt>|<tt><font size=+1>OFF</font></tt>]</td>\n\n<td VALIGN=TOP>Turn <tt><font size=+1>ON</font></tt> or <tt><font size=+1>OFF</font></tt>\nKernel Debugging. This command cannot be used from within Windows.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>WKD</font></tt> [<tt><font size=+1>QUIET</font></tt>|<tt><font size=+1>NOISY</font></tt>]</td>\n\n<td VALIGN=TOP>Disable (<tt><font size=+1>QUIET</font></tt>) or Enable\n(<tt><font size=+1>NOISY</font></tt>) reports on Parameter Errors.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>WKD LOGERROR </font></tt>[<tt><font size=+1>ON</font></tt>|<tt><font size=+1>OFF</font></tt>]</td>\n\n<td VALIGN=TOP>Turn <tt><font size=+1>ON</font></tt> or <tt><font size=+1>OFF</font></tt>\nthe INT 01h trap of calls to LogError ().</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><tt><font size=+1>WKD FAULT </font></tt>[<tt><font size=+1>ON</font></tt>|<tt><font size=+1>OFF</font></tt>|<tt><font size=+1>SKIP</font></tt>]</td>\n\n<td VALIGN=TOP>Turn <tt><font size=+1>ON</font></tt>, <tt><font size=+1>OFF</font></tt>,\nor <tt><font size=+1>SKIP</font></tt> once traps for Faults.</td>\n</tr>\n</table>\n<!--#include virtual=\"/footer.htm\" -->\n</body>\n</html>\n"
  },
  {
    "path": "swat/SWATCMR.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Common Memory References</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Common Memory References</FONT></B></CENTER>\n\n\n<P>There are a number of points in memory to which it is common to refer,\ne.g., the address of the instruction at the top of the disassembly window.\nThese references are made easier by using one of the following shortcuts\n(all of which can be used anywhere on the command line where an address\nis expected such as <TT><FONT SIZE=+1>BD .CODE</FONT></TT>, or <TT><FONT SIZE=+1>BD\n.DATA L4 W</FONT></TT>):\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP><A NAME=\".EA\"></A><TT><FONT SIZE=+1>.EA</FONT>&nbsp;</TT></TD>\n\n<TD>Effective Address of the first (or only) operand to the instruction\nat the top of the disassembly window</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".EA2\"></A><TT><FONT SIZE=+1>.EA2</FONT></TT></TD>\n\n<TD>Effective Address of the second operand to the instruction at the top\nof the disassembly window</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".GDT\"></A><TT><FONT SIZE=+1>.GDT</FONT></TT></TD>\n\n<TD>GDT base address (using selector zero)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".IDT\"></A><TT><FONT SIZE=+1>.IDT</FONT></TT></TD>\n\n<TD>IDT base address (using selector zero)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".LDT\"></A><TT><FONT SIZE=+1>.LDT</FONT></TT></TD>\n\n<TD>LDT base address (using selector zero)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".TSS\"></A><TT><FONT SIZE=+1>.TSS</FONT></TT></TD>\n\n<TD>TSS base address (using selector zero)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".CMAC\"></A><TT><FONT SIZE=+1>.CMAC</FONT></TT></TD>\n\n<TD>Seg:Off of next C MAC entry -- equivalent to <TT><FONT SIZE=+1>.DATA\n+ 2 + FFFE &amp; [.DATA</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".CODE\"></A><TT><FONT SIZE=+1>.CODE</FONT></TT></TD>\n\n<TD>current code display address</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".CSIP\"></A><TT><FONT SIZE=+1>.CSIP</FONT></TT></TD>\n\n<TD>current cs:[e]ip</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".DATA\"></A><TT><FONT SIZE=+1>.DATA</FONT></TT></TD>\n\n<TD>current data display address</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".DMAC\"></A><TT><FONT SIZE=+1>.DMAC</FONT></TT></TD>\n\n<TD>Seg:0 of first DOS MAC entry</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".NMAC\"></A><TT><FONT SIZE=+1>.NMAC</FONT></TT></TD>\n\n<TD>Seg:0 of next DOS MAC entry -- equivalent to <TT><FONT SIZE=+1>((S..DATA)+1+[.DATA+3):0</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".LBRFR\"></A><TT><FONT SIZE=+1>.LBRFR</FONT></TT></TD>\n\n<TD>EIP of Last Branch From</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".LBRTO\"></A><TT><FONT SIZE=+1>.LBRTO</FONT></TT></TD>\n\n<TD>EIP of Last Branch To</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".LEXFR\"></A><TT><FONT SIZE=+1>.LEXFR</FONT></TT></TD>\n\n<TD>EIP of Exception From</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".LEXTO\"></A><TT><FONT SIZE=+1>.LEXTO</FONT></TT></TD>\n\n<TD>EIP of Exception To</TD>\n</TR>\n\n<TR>\n<TD><A NAME=\".MDB\"></A><TT><FONT SIZE=+1>.MDB</FONT></TT></TD>\n\n<TD>Base address of the current Module Database (Windows only)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".PMI\"></A><TT><FONT SIZE=+1>.PMI</FONT></TT><I>xx</I></TD>\n\n<TD>Sel|Off of PM Interrupt <I>xx</I>h</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".RMI\"></A><TT><FONT SIZE=+1>.RMI</FONT></TT><I>xx</I></TD>\n\n<TD>Seg:Off of RM interrupt # <I>xx</I></TD>\n</TR>\n\n<TR>\n<TD><A NAME=\".TDB\"></A><TT><FONT SIZE=+1>.TDB</FONT></TT></TD>\n\n<TD>Base address of the current Task Database (Windows only)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".VM\"></A><TT><FONT SIZE=+1>.VM</FONT></TT></TD>\n\n<TD>Sel|Off of current Windows VM structure</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".VMI\"></A><TT><FONT SIZE=+1>.VMI</FONT></TT><I>xx</I></TD>\n\n<TD>Seg:Off of VM interrupt # <I>xx</I></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".VMRET\"></A><TT><FONT SIZE=+1>.VMRET</FONT></TT></TD>\n\n<TD>Return CS|EIP saved in <TT><FONT SIZE=+1>.VMSTK</FONT></TT> at <TT><FONT SIZE=+1>.VMSTK+50</FONT></TT>\n(DPMI fn 0300) or <TT><FONT SIZE=+1>.VMSTK+150</FONT></TT> (emulated INT)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".VMSTK\"></A><TT><FONT SIZE=+1>.VMSTK</FONT></TT></TD>\n\n<TD>Sel|Off of stack saved in <TT><FONT SIZE=+1>.VM</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".XBDA\"></A><TT><FONT SIZE=+1>.XBDA</FONT></TT></TD>\n\n<TD>Seg:Off of XBDA; same as <TT><FONT SIZE=+1>([40:0E):0</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".XBDA2\"></A><TT><FONT SIZE=+1>.XBDA2</FONT></TT></TD>\n\n<TD>Seg:Off of 2ndary XBDA; same as <TT><FONT SIZE=+1>((S..XBDA)+[.XBDA+B4):0</FONT></TT></TD>\n</TR>\n</TABLE>\nA common address to jump to is the (near or far) return address of a subroutine.\nThis is made easier by using shortened forms of the commands one might\nuse to extract these addresses. The various flavors of return addresses\nare (where LaSTK is the address of the current stack pointer -- SS:SP if\nVM, SS|SP if PM and the B-bit in SS is clear, and SS|ESP if PM and the\nB-bit in SS is set):\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP><B>Keyword&nbsp;</B></TD>\n\n<TD VALIGN=TOP><B>Grammar Equivalent</B></TD>\n\n<TD VALIGN=TOP><B>Meaning</B></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".RETND\"></A><TT><FONT SIZE=+1>.RETND</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>{</FONT></TT>LaSTK</TD>\n\n<TD VALIGN=TOP>Near dword</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".RETNS\"></A><TT><FONT SIZE=+1>.RETNS</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>[</FONT></TT>LaSTK&nbsp;</TD>\n\n<TD VALIGN=TOP>Near word</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".RETFD\"></A><TT><FONT SIZE=+1>.RETFD</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>:{</FONT></TT>LaSTK or <TT><FONT SIZE=+1>|{</FONT></TT>LaSTK</TD>\n\n<TD VALIGN=TOP>Far word:dword or word|dword (depending upon the VM bit\nin the current EFL)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".RETFS\"></A><TT><FONT SIZE=+1>.RETFS</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>:[</FONT></TT>LaSTK or <TT><FONT SIZE=+1>|[</FONT></TT>LaSTK</TD>\n\n<TD VALIGN=TOP>Far word:word or word|word (depending upon the VM bit in\nthe current EFL)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".RETN\"></A><TT><FONT SIZE=+1>.RETN</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>.RETND</FONT></TT> or <TT><FONT SIZE=+1>.RETNS</FONT></TT></TD>\n\n<TD VALIGN=TOP>Depending upon the D-bit in CS</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".RETF\"></A><TT><FONT SIZE=+1>.RETF</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>.RETFD</FONT></TT> or <TT><FONT SIZE=+1>.RETFS</FONT></TT></TD>\n\n<TD VALIGN=TOP>Depending upon the D-bit in CS</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\".IRET\"></A><TT><FONT SIZE=+1>.IRET</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>.RETF</FONT></TT> in VM&nbsp;\n<BR><TT><FONT SIZE=+1>.RETFD</FONT></TT> in PM</TD>\n\n<TD VALIGN=TOP>Also allows mode switch from PM to VM by checking VM bit\nin EFL above return address</TD>\n</TR>\n</TABLE>\nAs a common shortcut, <TT><FONT SIZE=+1>.RETN </FONT></TT>and <TT><FONT SIZE=+1>.RETF</FONT></TT>\nrefer to one of the above forms depending upon the setting of the D-bit\nin the current CS (that is, whether we're running in a USE16 or USE32 segment).\nMoreover, <TT><FONT SIZE=+1>.IRET</FONT></TT> can be used as a shorthand\nfor <TT><FONT SIZE=+1>.RETF</FONT></TT> with the added check on the VM\nbit in the EFL above the return address. If this bit is set, the return\naddress is interpreted as a VM address even though the current mode is\nPM.\n\n<P>No magic is invoked to extract the return address if data has been pushed\nonto the stack below the return address, so be sure that LaSTK points to\nthe actual return address.\n\n<P>Also note that the keystrokes <A HREF=\"swatscr.htm#a-F\">A-F</A> and\n<A HREF=\"swatscr.htm#a-N\">A-N</A> are defined as shortcuts for the commands\n<TT><FONT SIZE=+1>G .RETF</FONT></TT> and <TT><FONT SIZE=+1>G .RETN</FONT></TT>,\nrespectively.&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATDEF.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/x-server-parsed-html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.03 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>386SWAT Default Options</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>386SWAT Default Options</FONT></B></CENTER>\n\n\n<P>\n<HR WIDTH=\"100%\"><TT><FONT SIZE=+1>; Recommended options are</FONT></TT><TT><FONT SIZE=+1></FONT></TT>\n\n<P><TT><FONT SIZE=+1>&nbsp; trapdiv&nbsp;&nbsp;&nbsp; ; Direct INT 00h\nto 386SWAT (Divide Overflow Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; trapnmi&nbsp;&nbsp;&nbsp; ; Direct INT 02h\nto 386SWAT (Non-maskable interrupt)</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; trapbound&nbsp; ; Direct INT 05h to 386SWAT\n(BOUND Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; trapinv&nbsp;&nbsp;&nbsp; ; Direct INT 06h\nto 386SWAT (Invalid Opcode Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; trapstack&nbsp; ; Direct INT 0Ch to 386SWAT\n(Stack Fault)</FONT></TT><TT><FONT SIZE=+1></FONT></TT>\n\n<P>\n<HR WIDTH=\"100%\"><TT><FONT SIZE=+1>; The default options are</FONT></TT>\n<BR><TT><FONT SIZE=+1>;</FONT></TT>\n<BR><TT><FONT SIZE=+1>; addrhbits=12 ; Specify bits in addresses to hash\n(8-12)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; cmdhist=1024 ; Specify the size of the command\nhistory buffer</FONT></TT>\n<BR><TT><FONT SIZE=+1>; intrude&nbsp;&nbsp;&nbsp; ; Attempt to intrude\ninto another memory manager's PL0 context</FONT></TT>\n<BR><TT><FONT SIZE=+1>; logsize=4096 ; Specify size of error log buffer\nin bytes</FONT></TT>\n<BR><TT><FONT SIZE=+1>; normlidt&nbsp;&nbsp; ; Disable Real Mode LIDT redirection</FONT></TT>\n<BR><TT><FONT SIZE=+1>; proxsrch=2,1 ; Search symbols for matches within\nrange 2 of units with</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; granularity 1 (default granularity is 1 for byte).</FONT></TT>\n<BR><TT><FONT SIZE=+1>; savescreen=16 ; Specify # last screens to save</FONT></TT>\n<BR><TT><FONT SIZE=+1>; symfilter=__imp__ _ ; Specify leading text to strip\nfrom symbols</FONT></TT>\n<BR><TT><FONT SIZE=+1>; symsize=4096 ; Specify # bytes to reserve for the\nsymbol table</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapskip&nbsp;&nbsp; ; Direct INT 03h to 386SWAT\n(Single-skip)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapstep&nbsp;&nbsp; ; Direct INT 01h to 386SWAT\n(Single-step)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; wkdls=0&nbsp;&nbsp;&nbsp; ; No Windows Kernel Debugger\nLoad Segment symbols</FONT></TT>\n<BR><TT><FONT SIZE=+1>;</FONT></TT>\n<BR>\n<HR WIDTH=\"100%\"><TT><FONT SIZE=+1>; The default services are</FONT></TT>\n<BR><TT><FONT SIZE=+1>;</FONT></TT>\n<BR><TT><FONT SIZE=+1>; Windows Kernel Debugger services enabled (disable\nvia nowink)</FONT></TT>\n<BR><TT><FONT SIZE=+1>;</FONT></TT>\n<BR>\n<HR WIDTH=\"100%\">\n<BR><TT><FONT SIZE=+1>; All possible options are</FONT></TT>\n<BR><TT><FONT SIZE=+1>;</FONT></TT>\n<BR><TT><FONT SIZE=+1>; [section name] ; Limit profile processing to the\nmatching MultiConfig</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; section in CONFIG.SYS</FONT></TT>\n<BR><TT><FONT SIZE=+1>; addrhbits=nn ; Specify bits in addresses to hash\n(8-12, default=12)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; altscr&nbsp;&nbsp;&nbsp;&nbsp; ; Use alternate\nscreen for debugging</FONT></TT>\n<BR><TT><FONT SIZE=+1>; /a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Alias for ALTSCR</FONT></TT>\n<BR><TT><FONT SIZE=+1>; buckets=nnn ; Specify # 1K hash bucket blocks (1-255)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; cmdhist=nnn ; Specify the size of the command history\nbuffer</FONT></TT>\n<BR><TT><FONT SIZE=+1>; coldboot&nbsp;&nbsp; ; Do not try to warm boot\non Ctrl-Alt-Del</FONT></TT>\n<BR><TT><FONT SIZE=+1>; dvga&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Use\nDual VGA screen</FONT></TT>\n<BR><TT><FONT SIZE=+1>; gpskip=key[,key] ; GP Skip instructions:&nbsp;\nALL, INT, HLT, OUTD, OUTI, IND,</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; INI, CLI, STI, IRET, PPF, and CRn so far</FONT></TT>\n<BR><TT><FONT SIZE=+1>; intrude&nbsp;&nbsp;&nbsp; ; Obsolete option which\nis now the default</FONT></TT>\n<BR><TT><FONT SIZE=+1>; keyb=cclay ; Use international keyboard whose country\ncode/layout is cclay.</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Possible values are</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n;&nbsp;&nbsp; cclay&nbsp; Country</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; ----------------------</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n;&nbsp;&nbsp; GR129&nbsp; Germany</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n;&nbsp;&nbsp; SP172&nbsp; Spain</FONT></TT>\n<BR><TT><FONT SIZE=+1>; lcd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ;\nLCD screen present</FONT></TT>\n<BR><TT><FONT SIZE=+1>; loadhigh&nbsp;&nbsp; ; Obsolete option which is\nnow the default</FONT></TT>\n<BR><TT><FONT SIZE=+1>; loadlow&nbsp;&nbsp;&nbsp; ; Tell 386MAX it's not\nOK to load us into extended memory</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; after INIT_REAL and to relocate our INIT_VIRT code.</FONT></TT>\n<BR><TT><FONT SIZE=+1>; loadsym&nbsp;&nbsp;&nbsp; ; Enable command line\nloading of symbols</FONT></TT>\n<BR><TT><FONT SIZE=+1>; loadsym=d:\\path\\filename.ext [optional args] ;\nLoad SSF file at PM init time</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; [/b=xxxxxxxx]&nbsp;&nbsp;&nbsp; Optional physical base address in hex</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; [/h]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Optional HPDA flag\n(enable DPMI services)</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; [/li-]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Optional disable of line numbers</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; [/xl]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Disable larger comparison\nw/SYMSIZE</FONT></TT>\n<BR><TT><FONT SIZE=+1>; logsize=nnnnn ; Specify size of error log buffer\nin bytes (default=4096)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; mono&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Use\nmonochrome adapter if present</FONT></TT>\n<BR><TT><FONT SIZE=+1>; nogd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Don't\nautomatically set the GD bit in DR7</FONT></TT>\n<BR><TT><FONT SIZE=+1>; normlidt&nbsp;&nbsp; ; Disable Real Mode LIDT redirection</FONT></TT>\n<BR><TT><FONT SIZE=+1>; noswap&nbsp;&nbsp;&nbsp;&nbsp; ; Don't swap screens\nover single-step/skip</FONT></TT>\n<BR><TT><FONT SIZE=+1>; nowink&nbsp;&nbsp;&nbsp;&nbsp; ; Disable Windows\nKernel Debugger services</FONT></TT>\n<BR><TT><FONT SIZE=+1>; passthrough=nn,nn,... ; Specify one or more hardware\ninterrupt handlers</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; (numbers in hex) to pass through while SWAT is active.</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; The only ones currently supported are B, C, 76, and 77.</FONT></TT>\n<BR><TT><FONT SIZE=+1>; path=dir[,dir2[...]] ; Specify source code search\npath for symbolic debugging</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; (current directory is NOT included by default)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; portinit=string ; Specify a modem initialization\nstring (setcom must be</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; specified as well).&nbsp; Valid escape sequences are:</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; \\\\ Send a backslash</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; \\r Send a carriage return</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; \\b Send a break signal</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; \\p Pause about 250 ms.</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; \\1 - \\0 Wait 1 - 10 seconds.</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; On the first invocation of SWAT, the system will</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; automatically attempt to establish connection with a remote</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; SWAT system.</FONT></TT>\n<BR><TT><FONT SIZE=+1>; proxsrch=r[,g] ; Search symbols for matches within\nrange r of units with</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; granularity g (default granularity is 1 for byte).</FONT></TT>\n<BR><TT><FONT SIZE=+1>; ps4=xxxx&nbsp;&nbsp; ; Periscope 4 hardware debugger\nboard is at I/O port xxxx</FONT></TT>\n<BR><TT><FONT SIZE=+1>; rmlidt&nbsp;&nbsp;&nbsp;&nbsp; ; Enable Real Mode\nLIDT redirection</FONT></TT>\n<BR><TT><FONT SIZE=+1>; savescreen=nnn ; Specify # last screens to save\n(default = 16)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; setcom=port,bps[,{IRQ|p}[,base]] ; Initialize specified\nserial port (1-4) for</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; remote debugging at specified bps.&nbsp; Optional IRQ number (3,4)</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; overrides default association of ports with IRQs, or p may</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; be specified for polled operation.&nbsp; Optional port base</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; may be specified to override BIOS value at 40:0.</FONT></TT>\n<BR><TT><FONT SIZE=+1>; symfilter=text1 [text2 [...]] ; Specify leading\ntext to strip from symbols</FONT></TT>\n<BR><TT><FONT SIZE=+1>; symsize=nnnnn ; Specify # bytes to reserve for\nthe symbol table (default=4096)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapbound&nbsp; ; Direct INT 05h to 386SWAT (BOUND\nFault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapdebug&nbsp; ; Direct INT 01h/03h to 386SWAT\n(Same as TRAPSTEP with TRAPSKIP)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapdiv&nbsp;&nbsp;&nbsp; ; Direct INT 00h to 386SWAT\n(Divide Overflow Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapgenp&nbsp;&nbsp; ; Direct INT 0Dh to 386SWAT\n(General Protection Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapinv&nbsp;&nbsp;&nbsp; ; Direct INT 06h to 386SWAT\n(Invalid Opcode Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapnmi&nbsp;&nbsp;&nbsp; ; Direct INT 02h to 386SWAT\n(Non-maskable interrupt)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trappage&nbsp;&nbsp; ; Direct INT 0Eh to 386SWAT\n(Page Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapsegnp&nbsp; ; Direct INT 0Bh to 386SWAT (Segment\nNot Present Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapskip&nbsp;&nbsp; ; Direct INT 03h to 386SWAT\n(Single-skip)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapstack&nbsp; ; Direct INT 0Ch to 386SWAT (Stack\nFault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; trapstep&nbsp;&nbsp; ; Direct INT 01h to 386SWAT\n(Single-step)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; traptss&nbsp;&nbsp;&nbsp; ; Direct INT 0Ah to 386SWAT\n(TSS Fault)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; vcpiswat&nbsp;&nbsp; ; Don't attempt to intrude\ninto a memory manager's PL0 context</FONT></TT>\n<BR><TT><FONT SIZE=+1>; video=d:\\path\\filename.ext ; Load/create video\ntables</FONT></TT>\n<BR><TT><FONT SIZE=+1>; vmscount=n ; Number of times to intrude on GDT/IDT\nfor VCPI debugging</FONT></TT>\n<BR><TT><FONT SIZE=+1>; vmsint&nbsp;&nbsp;&nbsp;&nbsp; ; Launder Windows\nand VCPI mode switches and hook interrupts</FONT></TT>\n<BR><TT><FONT SIZE=+1>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; 00, 01, 02, 03, 05, 06, 08, 0A, 0B, 0C, 0D, and 0E.</FONT></TT>\n<BR><TT><FONT SIZE=+1>; vmsint=nn,nn,... ; Limit VMSINT debugging to these\ninterrupt #s</FONT></TT>\n<BR><TT><FONT SIZE=+1>; watchdog=nn ; Set watchdog timer to nn timer ticks\n(0-255)</FONT></TT>\n<BR><TT><FONT SIZE=+1>; wkdls=nnn&nbsp; ; Define # WKD Load Segment entries</FONT></TT><TT><FONT SIZE=+1></FONT></TT>\n\n<P><TT><FONT SIZE=+1>; debug=caps ; Signal NMI if CapsLock pressed at startup</FONT></TT>\n<BR><TT><FONT SIZE=+1>; debug=ibv&nbsp; ; Use Interrupt mask base Vector\nfor Ctrl-Alt-PAD5</FONT></TT>\n<BR><TT><FONT SIZE=+1>; debug=int&nbsp; ; Signal INT 03h if CapsLock present\nat startup</FONT></TT>\n<BR><TT><FONT SIZE=+1>; debug=pmi&nbsp; ; Signal INT 03h near end of INIT_PROT</FONT></TT>\n<BR><TT><FONT SIZE=+1>; debug=trip ; Use triple fault method to reboot</FONT></TT>\n<BR><TT><FONT SIZE=+1>; debug=vmi&nbsp; ; Signal INT 03h on entry to INIT_VIRT</FONT></TT>\n<BR><TT><FONT SIZE=+1>; debug=wcb1 ; Signal INT 01h on WCB VM->RM</FONT></TT>\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATDISP.HTM",
    "content": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n<html>\n<head>\n   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n   <meta name=\"GENERATOR\" content=\"Mozilla/4.6 [en] (Win98; U) [Netscape]\">\n   <meta name=\"Author\" content=\"Bob Smith\">\n   <title>386SWAT Display Options</title>\n</head>\n<body text=\"#000000\" bgcolor=\"#FFFFC0\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF00FF\">\n\n<center><b><font size=+2>386SWAT Display Options</font></b></center>\n\n<p>The debugger presents its output on various display devices in various\ncontexts.&nbsp; Typically, it uses the primary display, but other options\nare possible.&nbsp; If you have a secondary display, such as a monochrome\nadapter/monitor or if you are running on a PCI system with a second PCI\nVGA adapter, 386SWAT can use those also.\n<p>If you have a monochrome adapter in your system, place the keyword <a href=\"swatpro.htm#MONO\">MONO</a>\nin your 386SWAT profile.&nbsp; The debugger determines whether or not your\nmonochrome adapter is always visible or is hidden by a PCI VGA card, even\nan AGP controller.&nbsp; In either case, 386SWAT ferrets out the adapter\nand displays its output there.&nbsp; Pressing <a href=\"swatscr.htm#a-F7\">Alt-F7</a>\nswitches between the monochrome and color adapters.\n<p>If you have a secondary PCI VGA adapter in your system, place the keyword\n<a href=\"swatpro.htm#DVGA\">DVGA</a>\nin your 386SWAT profile.&nbsp; The debugger displays its output on this\nscreen, even if it's hidden by an AGP controller.&nbsp; Pressing <a href=\"swatscr.htm#a-F7\">Alt-F7</a>\nswitches between the two PCI VGA adapters.\n<p>I learned a bit about PCI programming getting the above to work, so\nI've gathered together <a href=\"ftp://ftp.sudleyplace.com/sudleyplace/dpci.zip\">assembler\ncode</a> to demonstrate the techniques used for you to browse.&nbsp; Thanks\ngo to Dominik Behr, Federico Bianchi, Ralf Brown, and others for their\nhelpful suggestions and/or source code.<!--#include virtual=\"/footer.htm\" -->\n</body>\n</html>\n"
  },
  {
    "path": "swat/SWATDOC.HTM",
    "content": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n<html>\n<head>\n   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n   <meta name=\"GENERATOR\" content=\"Mozilla/4.76 [en]C-CCK-MCD   (Win98; U) [Netscape]\">\n   <title>386SWAT Documentation</title>\n</head>\n<body text=\"#000000\" bgcolor=\"#FFFFC0\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF00FF\">\n\n<center><b><font size=+2>386SWAT Documentation</font></b></center>\n\n<p>This protected mode debugger when used in conjunction with 386MAX or\nany other memory manager provides debugging services to protected mode,\nvirtual 8086 mode programs, Windows 3.1x and Win95/98 programs, and DPMI\nand VCPI clients while occupying only a few kilobytes of conventional memory.\nIt supports disassembly of the full 386, 387, 486, Pentium, Pentium Pro\nthrough the Pentium 4 MMX &amp; SSE instruction set.&nbsp; Note that all\nof this documentation is included in the download file in HTML format.\n<p><a href=\"swatinst.htm\">Installing 386SWAT</a> -- getting it into your\nsystem\n<p><a href=\"swatpro.htm\">386SWAT Profile Options</a> -- configuring it\n<p><a href=\"swatinv.htm\">Invoking The Debugger</a> -- bringing it up\n<p><a href=\"swatdisp.htm\">Monochrome and Dual PCI VGA Support</a> -- displaying\nit\n<p><a href=\"swatmax.htm\">Debugging Aids in 386MAX</a> -- in case you're\nrunning my favorite memory manager\n<p><a href=\"swatscr.htm\">Debugging Screen and Keystrokes</a> -- what it\nlooks like and what you can type\n<p><a href=\"swatbmrk.htm\">Disassembly Bookmarks</a> -- a feature for browsing\nthrough assembly code\n<p><a href=\"swataflt.htm\">Autofault</a> -- a feature for understanding\nfaults\n<p><a href=\"swatwdbg.htm\">Windows Debugging</a> -- how it works under Windows\n<p><a href=\"swatwkd.htm\">Windows Kernel Debugging</a> -- very low-level\ndebugging\n<p><a href=\"swatmon.htm\">Monitor mode</a> -- conditional tracing\n<p><a href=\"swatcmd.htm\">Command Line Actions</a> -- built-in commands\n<p><a href=\"swatcmr.htm\">Common Memory References</a> -- dot commands\n<p><a href=\"swatrmv.htm\">Register Mask Values</a> -- bit mask modifiers\nfor registers\n<p><a href=\"swatndp.htm\">NDP Register Screen</a> -- Numeric Data Processor\ndisplay\n<p><a href=\"swatrem.htm\">Remote debugging</a> -- over a COM line\n<p><a href=\"vcpidbg.htm\">VCPI Program Debugging</a> -- going where no debugger\nhad gone before\n<p><a href=\"swatwish.htm\">Wish List</a> -- it'll never be finished\n<p><a href=\"swatver.htm\">Version History</a> -- what's been done\n<br>&nbsp;\n<p><b>Limitations</b>\n<p>This program is very preliminary. It lacks many of the features of a\nfull-blown debugger. On the other hand, it has a few features they don't\nhave.\n<br>&nbsp;\n<p><b>Technical Support</b>\n<p>Please send your problems, praises, and comments to <a href=\"mailto:bsmith@sudleyplace.com\">bsmith@sudleyplace.com</a><!--#include virtual=\"/footer.htm\" -->\n</body>\n</html>\n"
  },
  {
    "path": "swat/SWATGRM.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <TITLE>386SWAT Grammar</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Grammar For 386SWAT Command Line</FONT></B></CENTER>\n\n\n<P>// Command lines\n<BR><TT><FONT SIZE=+1>APPKEY</FONT></TT>\n<BR><TT><FONT SIZE=+1>BC</FONT></TT><I>x</I> <I><A HREF=\"#opt_addr\">opt_addr</A>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nx</I> = {&lt;empty>, <TT><FONT SIZE=+1>*</FONT></TT>, <TT><FONT SIZE=+1>+</FONT></TT>,<TT><FONT SIZE=+1>\n-</FONT></TT>}\n<BR><TT><FONT SIZE=+1>BD</FONT></TT> <I><A HREF=\"#opt_addr\">opt_addr</A></I>\n<BR><TT><FONT SIZE=+1>BD</FONT></TT> <I><A HREF=\"#addr\">addr</A> </I><TT><FONT SIZE=+1>L</FONT></TT><I>n</I>\n<TT><FONT SIZE=+1>R&nbsp;</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>n</I>\n= {&lt;empty>, <TT><FONT SIZE=+1>1</FONT></TT>, <TT><FONT SIZE=+1>2</FONT></TT>,\n<TT><FONT SIZE=+1>4</FONT></TT>}\n<BR><TT><FONT SIZE=+1>BD</FONT></TT> <I><A HREF=\"#addr\">addr</A> </I><TT><FONT SIZE=+1>L</FONT></TT><I>n\n</I><TT><FONT SIZE=+1>W&nbsp;&nbsp;&nbsp; </FONT></TT><I>n</I> = {&lt;empty>,\n<TT><FONT SIZE=+1>1</FONT></TT>, <TT><FONT SIZE=+1>2</FONT></TT>, <TT><FONT SIZE=+1>4</FONT></TT>}\n<BR><TT><FONT SIZE=+1>BD</FONT></TT><I>nx</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {<TT><FONT SIZE=+1>*</FONT></TT>, <TT><FONT SIZE=+1>+</FONT></TT>,\n<TT><FONT SIZE=+1>-</FONT></TT>}&nbsp;&nbsp; <I>n</I> = {&lt;empty>, <TT><FONT SIZE=+1>0</FONT></TT>,\n<TT><FONT SIZE=+1>1</FONT></TT>, <TT><FONT SIZE=+1>2</FONT></TT>, <TT><FONT SIZE=+1>3</FONT></TT>}\n<BR><TT><FONT SIZE=+1>BTF</FONT></TT>\n<BR><TT><FONT SIZE=+1>BTF</FONT></TT> {<TT><FONT SIZE=+1>ON</FONT></TT>|<TT><FONT SIZE=+1>OFF</FONT></TT>}\n<BR><TT><FONT SIZE=+1>CHAT</FONT></TT>\n<BR><TT><FONT SIZE=+1>D</FONT></TT><I>xy</I><TT><FONT SIZE=+1>-</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>b</FONT></TT>, <TT><FONT SIZE=+1>d</FONT></TT>,\n<TT><FONT SIZE=+1>g</FONT></TT>, <TT><FONT SIZE=+1>i</FONT></TT>, <TT><FONT SIZE=+1>t</FONT></TT>,\n<TT><FONT SIZE=+1>t2</FONT></TT>, <TT><FONT SIZE=+1>t3</FONT></TT>, <TT><FONT SIZE=+1>v</FONT></TT>,\n<TT><FONT SIZE=+1>w</FONT></TT>},\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>y</I> = {&lt;empty>, <TT><FONT SIZE=+1>/</FONT></TT><I>n</I>} where\n<I>n</I> is the data width\n<BR><TT><FONT SIZE=+1>D</FONT></TT><I>xy <A HREF=\"#opt_addr\">opt_addr</A></I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>b</FONT></TT>, <TT><FONT SIZE=+1>d</FONT></TT>,\n<TT><FONT SIZE=+1>g</FONT></TT>, <TT><FONT SIZE=+1>i</FONT></TT>, <TT><FONT SIZE=+1>t</FONT></TT>,\n<TT><FONT SIZE=+1>t2</FONT></TT>, <TT><FONT SIZE=+1>t3</FONT></TT>, <TT><FONT SIZE=+1>v</FONT></TT>,\n<TT><FONT SIZE=+1>w</FONT></TT>},\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>y</I> = {&lt;empty>,<TT><FONT SIZE=+1> /</FONT></TT><I>n</I>} where\n<I>n</I> is the data width\n<BR><TT><FONT SIZE=+1>D</FONT></TT><I>xy <A HREF=\"#addr\">addr</A></I> <TT><FONT SIZE=+1>P</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>b</FONT></TT>, <TT><FONT SIZE=+1>d</FONT></TT>,\n<TT><FONT SIZE=+1>g</FONT></TT>, <TT><FONT SIZE=+1>i</FONT></TT>, <TT><FONT SIZE=+1>t</FONT></TT>,\n<TT><FONT SIZE=+1>t2</FONT></TT>, <TT><FONT SIZE=+1>t3</FONT></TT>, <TT><FONT SIZE=+1>v</FONT></TT>,\n<TT><FONT SIZE=+1>w</FONT></TT>},\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\ny = {&lt;empty>, <TT><FONT SIZE=+1>/</FONT></TT><I>n</I>} where <I>n </I>is\nthe data width\n<BR><TT><FONT SIZE=+1>D</FONT></TT><I>xy <A HREF=\"#addr\">addr</A></I> <TT><FONT SIZE=+1>P</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>x</I> =\n{&lt;empty>, <TT><FONT SIZE=+1>b</FONT></TT>, <TT><FONT SIZE=+1>d</FONT></TT>,\n<TT><FONT SIZE=+1>g</FONT></TT>, <TT><FONT SIZE=+1>i</FONT></TT>, <TT><FONT SIZE=+1>t</FONT></TT>,\n<TT><FONT SIZE=+1>t2</FONT></TT>, <TT><FONT SIZE=+1>t3</FONT></TT>, <TT><FONT SIZE=+1>v</FONT></TT>,\n<TT><FONT SIZE=+1>w</FONT></TT>},\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>y</I> = {&lt;empty>, <TT><FONT SIZE=+1>/</FONT></TT><I>n</I>} where\n<I>n</I> is the data width\n<BR><FONT SIZE=+1><TT>DTE</TT> <I><A HREF=\"#exp\">exp</A></I></FONT>\n<BR><TT><FONT SIZE=+1>E</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A></I>\n<BR><TT><FONT SIZE=+1>E</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A> <A HREF=\"#lvallist\">lvallist</A></I>\n<BR><TT><FONT SIZE=+1>EXIT</FONT></TT>\n<BR><TT><FONT SIZE=+1>F</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A></I>\nL <I><A HREF=\"#lval\">lval</A> <A HREF=\"#lval\">lval</A></I>\n<BR><TT><FONT SIZE=+1>F</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A> </I>L\n<I><A HREF=\"#lval\">lval</A> <A HREF=\"#lval\">lval</A> </I><TT><FONT SIZE=+1>P</FONT></TT>\n<BR><TT><FONT SIZE=+1>F</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A> </I>L\n<I><A HREF=\"#lval\">lval</A> <A HREF=\"#lval\">lval</A> </I><TT><FONT SIZE=+1>P\n</FONT></TT><I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>FS</FONT></TT>\n<BR><TT><FONT SIZE=+1>G</FONT></TT>&nbsp; <I><A HREF=\"#opt_addr\">opt_addr</A></I>\n<BR><TT><FONT SIZE=+1>GM</FONT></TT> <I><A HREF=\"#opt_boolexp\">opt_boolexp</A></I>\n<BR><TT><FONT SIZE=+1>H</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A></I>\n<BR><TT><FONT SIZE=+1>I</FONT></TT><I>x <A HREF=\"#lval\">lval</A>&nbsp;&nbsp;</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>b</FONT></TT>, <TT><FONT SIZE=+1>d</FONT></TT>,\n<TT><FONT SIZE=+1>w</FONT></TT>}\n<BR><TT><FONT SIZE=+1>IMR</FONT></TT>\n<BR><TT><FONT SIZE=+1>INSERT</FONT></TT> <I>gdtr idtr [cr3 [lapde]]</I>\n<BR><TT><FONT SIZE=+1>INSERT *</FONT></TT> <I>idtr</I>\n<BR><TT><FONT SIZE=+1>IPF</FONT></TT> [<TT><FONT SIZE=+1>/d</FONT></TT>]\n[<TT><FONT SIZE=+1>/s</FONT></TT>] [<TT><FONT SIZE=+1>/r</FONT></TT>] <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>IRR</FONT></TT>\n<BR><TT><FONT SIZE=+1>ISR</FONT></TT>\n<BR><TT><FONT SIZE=+1>LBR</FONT></TT>\n<BR><TT><FONT SIZE=+1>LBR</FONT></TT> {<TT><FONT SIZE=+1>ON</FONT></TT>|<TT><FONT SIZE=+1>OFF</FONT></TT>}\n<BR><TT><FONT SIZE=+1>LF</FONT></TT> <I><A HREF=\"#filename\">filename</A></I>\n<BR><TT><FONT SIZE=+1>LI</FONT></TT> <I>x</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {<TT><FONT SIZE=+1>+</FONT></TT>, <TT><FONT SIZE=+1>-</FONT></TT>}\n<BR><TT><FONT SIZE=+1>LI</FONT></TT> <I><A HREF=\"#dcon\">dcon</A> x&nbsp;</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>+</FONT></TT>, <TT><FONT SIZE=+1>-</FONT></TT>}\n<BR><TT><FONT SIZE=+1>LS</FONT></TT> <I><A HREF=\"#filename\">filename</A>\nx</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <I>x</I> = {&lt;empty>, <I><A HREF=\"#lval\">lval</A></I>}\n<BR><TT><FONT SIZE=+1>M</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A> </I><TT><FONT SIZE=+1>L</FONT></TT>\n<I><A HREF=\"#lval\">lval</A> <A HREF=\"#addr\">addr</A></I>\n<BR><TT><FONT SIZE=+1>MACBASE</FONT></TT> <I><A HREF=\"#addr\">addr</A></I>\n<BR><TT><FONT SIZE=+1>MDB</FONT></TT> <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>O</FONT></TT><I>x <A HREF=\"#lval\">lval</A> <A HREF=\"#lval\">lval</A></I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>b</FONT></TT>, <TT><FONT SIZE=+1>d</FONT></TT>,\n<TT><FONT SIZE=+1>w</FONT></TT>}\n<BR><TT><FONT SIZE=+1>PATH</FONT></TT><I>x <A HREF=\"#dirlist\">dirlist</A></I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>+</FONT></TT>}\n<BR><TT><FONT SIZE=+1>PS</FONT></TT> <I><A HREF=\"#lval\">lval</A> x&nbsp;</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <I><A HREF=\"#lval\">lval</A></I> (&lt;<TT><FONT SIZE=+1>256</FONT></TT>)}\n<BR><TT><FONT SIZE=+1>PTE</FONT></TT> <I><A HREF=\"#addr\">addr</A></I>\n<BR><TT><FONT SIZE=+1>PTE</FONT></TT> <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>PTE</FONT></TT> <I><A HREF=\"#addr\">addr</A> </I><TT><FONT SIZE=+1>P</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>PTE</FONT></TT> <I><A HREF=\"#exp\">exp</A>&nbsp; </I><TT><FONT SIZE=+1>P</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>QS</FONT></TT> <I><A HREF=\"#addr\">addr</A></I>\n<BR><TT><FONT SIZE=+1>R</FONT></TT>&nbsp; <I><A HREF=\"#reg\">reg</A></I>\n[<TT><FONT SIZE=+1>=</FONT></TT>] <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>R</FONT></TT>&nbsp; <I><A HREF=\"#reg\">reg</A></I><TT><FONT SIZE=+1>.</FONT></TT><I>str</I>\n[<TT><FONT SIZE=+1>=</FONT></TT>] <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>REMDBG</FONT></TT>\n<BR><TT><FONT SIZE=+1>RC</FONT></TT>\n<BR><TT><FONT SIZE=+1>RR</FONT></TT>\n<BR><TT><FONT SIZE=+1>RS</FONT></TT>\n<BR><TT><FONT SIZE=+1>S</FONT></TT><I>x <A HREF=\"#addr\">addr</A></I> L\n<I><A HREF=\"#exp\">exp</A> <A HREF=\"#atom\">atom</A> x</I> = {&lt;empty>,\n<TT><FONT SIZE=+1>1</FONT></TT>}\n<BR><TT><FONT SIZE=+1>S</FONT></TT><I>x <A HREF=\"#addr\">addr</A> <A HREF=\"#addr\">addr</A>&nbsp;&nbsp;\n<A HREF=\"#atom\">atom</A> x</I> = {&lt;empty>, <TT><FONT SIZE=+1>1</FONT></TT>}\n<BR><TT><FONT SIZE=+1>S</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A> <A HREF=\"#addr\">addr</A></I>\n<TT><FONT SIZE=+1>!</FONT></TT><I> instr</I>\n<BR><TT><FONT SIZE=+1>S</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A> </I><TT><FONT SIZE=+1>L</FONT></TT>\n<I><A HREF=\"#exp\">exp</A> </I><TT><FONT SIZE=+1>!</FONT></TT><I> instr</I>\n<BR><TT><FONT SIZE=+1>S</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A> <A HREF=\"#addr\">addr</A>&nbsp;&nbsp;\n</I><TT><FONT SIZE=+1>#</FONT></TT> <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>S</FONT></TT>&nbsp; <I><A HREF=\"#addr\">addr</A> </I><TT><FONT SIZE=+1>L</FONT></TT>\n<I><A HREF=\"#exp\">exp</A> </I><TT><FONT SIZE=+1>#</FONT></TT> <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>SB</FONT></TT><I>x</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {<TT><FONT SIZE=+1>+</FONT></TT>, <TT><FONT SIZE=+1>-</FONT></TT>}\n<BR><TT><FONT SIZE=+1>SB*</FONT></TT><I>x</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {<TT><FONT SIZE=+1>+</FONT></TT>, <TT><FONT SIZE=+1>-</FONT></TT>}\n<BR><TT><FONT SIZE=+1>SETCOM</FONT></TT> <I>x</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>-</FONT></TT>}\n<BR><TT><FONT SIZE=+1>SETCOM</FONT></TT> <I>port <A HREF=\"#bps\">bps</A></I>&nbsp;&nbsp;&nbsp;&nbsp;\n<I>port</I> = {<TT><FONT SIZE=+1>1</FONT></TT>, <TT><FONT SIZE=+1>2</FONT></TT>,\n<TT><FONT SIZE=+1>3</FONT></TT>, <TT><FONT SIZE=+1>4</FONT></TT>}\n<BR><TT><FONT SIZE=+1>SETCOM</FONT></TT> <I>xn&nbsp;</I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {<TT><FONT SIZE=+1>RTS</FONT></TT>, <TT><FONT SIZE=+1>DTR</FONT></TT>}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>n</I> = {<TT><FONT SIZE=+1>+</FONT></TT>, <TT><FONT SIZE=+1>-</FONT></TT>}\n<BR><TT><FONT SIZE=+1>SGH</FONT></TT> [<TT><FONT SIZE=+1>/b</FONT></TT>|<TT><FONT SIZE=+1>/s</FONT></TT>|<TT><FONT SIZE=+1>/h</FONT></TT>|<TT><FONT SIZE=+1>/o</FONT></TT>|<TT><FONT SIZE=+1>/n</FONT></TT>]&nbsp;\n[<TT><FONT SIZE=+1>/c</FONT></TT>] <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>SIGINT</FONT></TT> <I><A HREF=\"#lval\">lval</A></I>\n<BR><TT><FONT SIZE=+1>SPTE</FONT></TT> <I><A HREF=\"#addr\">addr</A></I>\n<BR><TT><FONT SIZE=+1>SPTE</FONT></TT> <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>SPTE</FONT></TT> <I><A HREF=\"#addr\">addr</A> </I><TT><FONT SIZE=+1>P</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>SPTE</FONT></TT> <I><A HREF=\"#exp\">exp</A>&nbsp;\n</I><TT><FONT SIZE=+1>P</FONT></TT> <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>TDB</FONT></TT> <I><A HREF=\"#exp\">exp</A></I>\n<BR><TT><FONT SIZE=+1>TOGINT</FONT></TT> <I><A HREF=\"#lvallist\">lvallist</A></I>\n<BR><TT><FONT SIZE=+1>TS</FONT></TT>\n<BR><TT><FONT SIZE=+1>TS</FONT></TT> <I><A HREF=\"#opt_sel\">opt_sel</A></I>\n<I><A HREF=\"#opt_group\">opt_group</A></I> x <A HREF=\"#opt_sel\">opt_sel</A><I>n</I>\n<A HREF=\"#opt_addr\">opt_addr</A>\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>*</FONT></TT>, <TT><FONT SIZE=+1>P</FONT></TT>,\n<TT><FONT SIZE=+1>V</FONT></TT>}&nbsp; <I>n</I> = {&lt;empty>, <TT><FONT SIZE=+1>+</FONT></TT>,\n<TT><FONT SIZE=+1>-</FONT></TT>}\n<BR><TT><FONT SIZE=+1>U</FONT></TT><I>x</I><TT><FONT SIZE=+1>-</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>16</FONT></TT>, <TT><FONT SIZE=+1>32</FONT></TT>}\n<BR><TT><FONT SIZE=+1>U</FONT></TT><I>x</I> <I><A HREF=\"#opt_addr\">opt_addr</A></I>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>16</FONT></TT>, <TT><FONT SIZE=+1>32</FONT></TT>}\n<BR><TT><FONT SIZE=+1>U</FONT></TT><I>x</I> <I><A HREF=\"#addr\">addr</A></I>\n<TT><FONT SIZE=+1>P</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>16</FONT></TT>, <TT><FONT SIZE=+1>32</FONT></TT>}\n<BR><TT><FONT SIZE=+1>U</FONT></TT><I>x</I> <I><A HREF=\"#addr\">addr</A></I>\n<TT><FONT SIZE=+1>P</FONT></TT> <I><A HREF=\"#exp\">exp</A></I>&nbsp;&nbsp;&nbsp;&nbsp;\n<I>x</I> = {&lt;empty>, <TT><FONT SIZE=+1>16</FONT></TT>, <TT><FONT SIZE=+1>32</FONT></TT>}\n\n<P><TT><FONT SIZE=+1>VMSCOUNT</FONT></TT> <I>xx</I>\n<BR><TT><FONT SIZE=+1>VMSINT</FONT></TT> {<TT><FONT SIZE=+1>ON</FONT></TT>|<TT><FONT SIZE=+1>OFF</FONT></TT>}\n<BR><TT><FONT SIZE=+1>VMSINT=</FONT></TT><I>xx</I>,<I>xx</I>,...\n\n<P><TT><FONT SIZE=+1>WKD FAULT </FONT></TT>[<TT><FONT SIZE=+1>ON</FONT></TT>|<TT><FONT SIZE=+1>OFF</FONT></TT>|<TT><FONT SIZE=+1>SKIP</FONT></TT>]\n<BR><TT><FONT SIZE=+1>WKD LOGERROR </FONT></TT>[<TT><FONT SIZE=+1>ON</FONT></TT>|<TT><FONT SIZE=+1>OFF</FONT></TT>]\n<BR><TT><FONT SIZE=+1>WKD [ON|OFF]</FONT></TT>\n<BR><TT><FONT SIZE=+1>WKD [QUIET|NOISY]</FONT></TT>\n<BR>&nbsp;\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Lval list</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"lvallist\"></A><I>lvallist</I></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A> lvallist</I></TD>\n</TR>\n</TABLE>\n&nbsp;\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Optional addresses</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"opt_addr\"></A><I>opt_addr</I></TD>\n\n<TD>&lt;empty></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#addr\">addr</A></I></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Addresses</B></CAPTION>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"addr\"></A><I>addr</I></TD>\n\n<TD><I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>using default segment/selector as per specific command</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#ea\">ea</A></I></TD>\n\n<TD></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Optional boolean expression</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"opt_boolexp\"></A><I>opt_boolexp</I></TD>\n\n<TD>&lt;empty></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#exp\">exp</A></I></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Expressions on values</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"exp\"></A><I>exp</I></TD>\n\n<TD><TT><FONT SIZE=+1>(</FONT></TT> <I>exp</I> <TT><FONT SIZE=+1>)</FONT></TT></TD>\n\n<TD></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#mfn\">mfn</A></I></TD>\n\n<TD>monadic functions</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#dfn\">dfn</A></I></TD>\n\n<TD>dyadic functions</TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Monadic functions</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"mfn\"></A>mfn</TD>\n\n<TD><I><A HREF=\"#atom\">atom</A></I></TD>\n\n<TD></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>[</FONT></TT> <I><A HREF=\"#ea\">ea</A></I></TD>\n\n<TD>extract word at effective address</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>{</FONT></TT> <I><A HREF=\"#ea\">ea</A></I></TD>\n\n<TD>extract dword ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>O.</FONT></TT><I><A HREF=\"#ea\">ea</A></I></TD>\n\n<TD>extract offset from effective address</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>S.</FONT></TT><I><A HREF=\"#ea\">ea</A></I></TD>\n\n<TD>extract segment/selector ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>L.</FONT></TT><I><A HREF=\"#ea\">ea</A></I></TD>\n\n<TD>extract linear address ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>P.</FONT></TT><I><A HREF=\"#ea\">ea</A></I></TD>\n\n<TD>extract physical address ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>+</FONT></TT><I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>-</FONT></TT><I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>~</FONT></TT><I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Lefthand values</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"lval\"></A><I>lval</I></TD>\n\n<TD><I><A HREF=\"#atom\">atom</A></I></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>(</FONT></TT> <I><A HREF=\"#exp\">exp</A></I> <TT><FONT SIZE=+1>)</FONT></TT></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Effective address with segment/selector</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"ea\"></A><I>ea</I></TD>\n\n<TD><I><A HREF=\"#seg\">seg</A></I> <TT><FONT SIZE=+1>:</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#sel\">sel</A></I> <TT><FONT SIZE=+1>|</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.EA</FONT></TT></TD>\n\n<TD>Effective Address #1 (or the only one)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.EA2</FONT></TT></TD>\n\n<TD>...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n#2&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.GDT</FONT></TT>&nbsp;</TD>\n\n<TD>GDT base address (using selector zero)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.IDT</FONT></TT></TD>\n\n<TD>IDT ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.LDT</FONT></TT></TD>\n\n<TD>LDT ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.TSS</FONT></TT></TD>\n\n<TD>TSS ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.CMAC</FONT></TT></TD>\n\n<TD>address of next C MAC entry</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.CODE</FONT></TT></TD>\n\n<TD>current code display address</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.CSIP</FONT></TT></TD>\n\n<TD>address of current <TT><FONT SIZE=+1>cs:</FONT></TT>[<TT><FONT SIZE=+1>e</FONT></TT>]<TT><FONT SIZE=+1>ip</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.DATA</FONT></TT></TD>\n\n<TD>current data display address</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.DMAC</FONT></TT></TD>\n\n<TD>segment of first DOS MAC entry</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.NMAC</FONT></TT></TD>\n\n<TD>segment of next&nbsp; DOS MAC entry</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.PMI</FONT></TT><I>xx</I></TD>\n\n<TD>Sel<TT><FONT SIZE=+1>|</FONT></TT>Off of PM Interrupt <I>xx</I>h&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.RMI</FONT></TT><I>xx</I></TD>\n\n<TD>Seg:Off of RM interrupt xxh</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.VM</FONT></TT></TD>\n\n<TD>Sel<TT><FONT SIZE=+1>|</FONT></TT>Off of current Windows VM structure</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.VMI</FONT></TT><I>xx</I></TD>\n\n<TD>...&nbsp;&nbsp;&nbsp;&nbsp; VM ...&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.VMRET</FONT></TT></TD>\n\n<TD>return <TT><FONT SIZE=+1>cs|eip</FONT></TT> from Windows VM (<TT><FONT SIZE=+1>|{.vmstk+50</FONT></TT>\nor <TT><FONT SIZE=+1>|{.vmstk+150</FONT></TT>)&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.VMSTK</FONT></TT></TD>\n\n<TD>current <TT><FONT SIZE=+1>ss|esp</FONT></TT> saved in Windows VM structure\n(same as <TT><FONT SIZE=+1>|{.vm+40</FONT></TT>)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.IRET</FONT></TT></TD>\n\n<TD>far word:dword return address on stack allowing a mode switch from\nPM to VM</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.RETN</FONT></TT></TD>\n\n<TD>near word or dword return address on stack</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.RETND</FONT></TT></TD>\n\n<TD>near dword return address on stack</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.RETNS</FONT></TT></TD>\n\n<TD>near word return address on stack&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.RETF</FONT></TT></TD>\n\n<TD>far word:word or word:dword return address on stack&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.RETFD</FONT></TT></TD>\n\n<TD>far word:dword return address on stack</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.RETFS</FONT></TT></TD>\n\n<TD>far word:word return address on stack</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.XBDA</FONT></TT></TD>\n\n<TD>Seg:Off of XBDA; same as <TT><FONT SIZE=+1>([40:0E):0</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.XBDA2</FONT></TT></TD>\n\n<TD>Seg:Off of 2ndary XBDA; same as <TT><FONT SIZE=+1>((S..XBDA)+[.XBDA+B4):0</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#dotcmd ? exp\">dotcmd ? exp</A></I></TD>\n\n<TD>dyadic functions on dot commands (<TT><FONT SIZE=+1>.GDT</FONT></TT>,\n<TT><FONT SIZE=+1>.IDT</FONT></TT>, etc.) where ? is a dyadic function</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>:[</FONT></TT> <I>ea</I></TD>\n\n<TD>extract word:word at effective address</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>:{</FONT></TT> <I>ea</I></TD>\n\n<TD>extract word:dword at effective address</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>|[</FONT></TT> <I>ea</I></TD>\n\n<TD>... word|word ...&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>|{</FONT></TT> <I>ea</I></TD>\n\n<TD>... word|dword ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>|G</FONT></TT> <I>ea</I></TD>\n\n<TD>... ...&nbsp;&nbsp;&nbsp; in GDT-format (using selector zero)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>|I</FONT></TT> <I>ea</I></TD>\n\n<TD>... ...&nbsp;&nbsp;&nbsp; in IDT-format (using IDT selector)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>|L</FONT></TT> <I>ea</I></TD>\n\n<TD>... ...&nbsp;&nbsp;&nbsp; in LDT-format (same as GDT-format)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>|T</FONT></TT> <I>ea</I></TD>\n\n<TD>... ...&nbsp;&nbsp;&nbsp; in TSS-format (using <TT><FONT SIZE=+1>CS|EIP</FONT></TT>)&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I>symbol</I></TD>\n\n<TD>effective address of this symbol</TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Dyadic functions on dot commands</B></CAPTION>\n\n<TR VALIGN=TOP>\n<TD><A NAME=\"dotcmd ? exp\"></A><I>dotcmd ? exp</I>&nbsp;\n<BR>&nbsp;</TD>\n\n<TD><TT><FONT SIZE=+1>S.</FONT></TT>dotcmd <TT><FONT SIZE=+1>: O.</FONT></TT>dotcmd\n<I>?</I> <A HREF=\"#exp\">exp</A></TD>\n\n<TD>for VM addresses</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>S.</FONT></TT>dotcmd <TT><FONT SIZE=+1>| O.</FONT></TT>dotcmd\n<I>?</I> <A HREF=\"#exp\">exp</A></TD>\n\n<TD>for PM addresses&nbsp;\n<BR>where <I>?</I> is a dyadic function</TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Dyadic Functions</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"dfn\"></A><I>dfn</I></TD>\n\n<TD><I><A HREF=\"#atom\">atom</A></I></TD>\n\n<TD></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>+</FONT></TT> <A HREF=\"#exp\">exp</A></TD>\n\n<TD>addition</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>-</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>subtraction</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>*</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>multiplication</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>/</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>division (with truncation towards zero)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>&amp;</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>bitwise AND</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>^</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>bitwise XOR</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>==</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>is equal (eq)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>!=</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>is not equal (ne)&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>&lt;&nbsp;</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>is less than (lt)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>&lt;=</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>lt or eq</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>>&nbsp;</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>is greater than (gt)</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>>=</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>gt or eq</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>&amp;&amp;</FONT></TT>\n<I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>logical AND</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I> <TT><FONT SIZE=+1>||</FONT></TT> <I><A HREF=\"#exp\">exp</A></I></TD>\n\n<TD>logical OR</TD>\n</TR>\n</TABLE>\nBecause we have usurped the | symbol as the selector separator, it is\n<BR>not available for bitwise OR.&nbsp; To do bitwise OR between A and\nB, use\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>(A &amp; ~B) ^ B</FONT></TT>\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Precedence</B></CAPTION>\n\n<TR>\n<TD>Operators</TD>\n\n<TD>Type</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>- ~</FONT></TT></TD>\n\n<TD>Monadic</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>* /</FONT></TT></TD>\n\n<TD>Dyadic</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>+ -</FONT></TT></TD>\n\n<TD>Dyadic</TD>\n</TR>\n\n<TR>\n<TD><I>symbols</I>, <TT><FONT SIZE=+1>.code</FONT></TT>, <TT><FONT SIZE=+1>.data</FONT></TT>,\netc.</TD>\n\n<TD>Address expression</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>: |</FONT></TT></TD>\n\n<TD>Dyadic (address construction)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>] [ {</FONT></TT></TD>\n\n<TD>Monadic (extraction)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>>> &lt;&lt;</FONT></TT></TD>\n\n<TD>Dyadic (bit shift)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>&lt; &lt;= >= ></FONT></TT></TD>\n\n<TD>Dyadic (relational)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>== !=</FONT></TT></TD>\n\n<TD>Equality</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>&amp;</FONT></TT></TD>\n\n<TD>Dyadic (bitwise AND)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>^</FONT></TT></TD>\n\n<TD>Dyadic (bitwise XOR)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>&amp;&amp;</FONT></TT></TD>\n\n<TD>Dyadic (logical AND)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>||</FONT></TT></TD>\n\n<TD>Dyadic (logical OR)</TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Segment or Selector</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"seg\"></A><I>seg</I></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I></TD>\n</TR>\n\n<TR>\n<TD><A NAME=\"sel\"></A><I>sel</I></TD>\n\n<TD><I><A HREF=\"#lval\">lval</A></I></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Optional segment or selector</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"opt_sel\"></A><I>opt_sel</I></TD>\n\n<TD><I>&lt;empty></I></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>*</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#seg\">seg</A></I></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#sel\">sel</A></I></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Optional Group ID</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"opt_group\"></A><I>opt_group</I></TD>\n\n<TD><I>&lt;empty></I></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>*</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#con\">con</A></I></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Atoms</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"atom\"></A><I>atom</I></TD>\n\n<TD><I><A HREF=\"#con\">con</A></I></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I><A HREF=\"#reg\">reg</A></I></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.LBRFR</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.LBRTO</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.LEXFR</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>.LEXTO</FONT></TT></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Registers</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"reg\"></A><I>reg</I></TD>\n\n<TD><I>GP</I></TD>\n\n<TD><TT><FONT SIZE=+1>AX</FONT></TT>, <TT><FONT SIZE=+1>AL</FONT></TT>,\n<TT><FONT SIZE=+1>AH</FONT></TT>, <TT><FONT SIZE=+1>BX</FONT></TT>, ...&nbsp;</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I>EGP</I></TD>\n\n<TD><TT><FONT SIZE=+1>EAX</FONT></TT>, <TT><FONT SIZE=+1>EBX</FONT></TT>,\n<TT><FONT SIZE=+1>ECX</FONT></TT>, ...</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>CR</FONT></TT><I>n</I></TD>\n\n<TD>Control registers</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>DR</FONT></TT><I>n</I></TD>\n\n<TD>Debug registers</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>TR</FONT></TT><I>n</I></TD>\n\n<TD>Test registers</TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><I>Misc</I></TD>\n\n<TD><TT><FONT SIZE=+1>IP</FONT></TT>, <TT><FONT SIZE=+1>EIP</FONT></TT>,\n<TT><FONT SIZE=+1>FL</FONT></TT>, <TT><FONT SIZE=+1>EFL</FONT></TT>, <TT><FONT SIZE=+1>TR</FONT></TT>,\n<TT><FONT SIZE=+1>LDTR</FONT></TT></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Constants</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"con\"></A><I>con</I></TD>\n\n<TD>&lt;32-bit hex values></TD>\n</TR>\n\n<TR>\n<TD><A NAME=\"dcon\"></A><I>dcon</I></TD>\n\n<TD>&lt;16-bit unsigned decimal values></TD>\n</TR>\n\n<TR>\n<TD><A NAME=\"filename\"></A><I>filename</I></TD>\n\n<TD>&lt;DOS pathname></TD>\n</TR>\n\n<TR>\n<TD><A NAME=\"dirlist\"></A><I>dirlist</I></TD>\n\n<TD>&lt;List of directory names separated by commas (<TT><FONT SIZE=+1>,</FONT></TT>)></TD>\n</TR>\n</TABLE>\n&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<CAPTION><B>Bits per second (BPS) values</B></CAPTION>\n\n<TR>\n<TD><A NAME=\"bps\"></A><I>bps</I></TD>\n\n<TD><TT><FONT SIZE=+1>55</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>110</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>300</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>600</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>1200</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>2400</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>4800</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>9600</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>19200</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>38400</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>76800</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD></TD>\n\n<TD><TT><FONT SIZE=+1>115200</FONT></TT></TD>\n</TR>\n</TABLE>\n&nbsp;\n\n<P><B>Examples</B>\n\n<P>* To display the successive entries in the DOS memory allocation chain,\ndisplay one such entry via a <TT><FONT SIZE=+1>DB</FONT></TT> command.&nbsp;\nThen type\n\n<P><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; /D ((S..DATA)+1+[.DATA+3):0</FONT></TT>\n\n<P>&nbsp; Continuing to press Enter displays the successive MAC entries.\n\n<P>* To display the successive entries in the C memory allocation chain,\ndisplay one such entry (at the count word) via a <TT><FONT SIZE=+1>DB</FONT></TT>\ncommand.&nbsp; Then type\n\n<P><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; /D .DATA + 2 + FFFE &amp; [.DATA</FONT></TT>&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATINST.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Installing 386SWAT</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Installing 386SWAT</FONT></B></CENTER>\n\n\n<P>Create a directory on your hard disk (say, <TT><FONT SIZE=+1>C:\\386SWAT</FONT></TT>),\ncopy the ZIP file to that directory, and unzip it there. To unzip 386SWAT,\nuse\n\n<P><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; PKUNZIP 386SWAT</FONT></TT>\n\n<P>This debugger can be used in conjunction with any memory manager which\nsupports VCPI, or with just HIMEM.SYS.\n\n<P>To install 386SWAT, place the following line into your CONFIG.SYS file:\n\n<P><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; Device=</FONT></TT><I>d:\\path\\</I><TT><FONT SIZE=+1>386SWAT.LOD\n</FONT></TT><I>options</I>\n\n<P>Place the <TT><FONT SIZE=+1>Device=</FONT></TT> statement for 386SWAT\nimmediately following the <TT><FONT SIZE=+1>Device=</FONT></TT> for the\nmemory manager (if any), or HIMEM.SYS if no memory manager is being used.\n<I>d:\\path\\</I> represents the drive and path location of 386SWAT and <I>options</I>\nrepresents zero or more profile options.\n\n<P>As there are several options you may wish to use with 386SWAT, we recommend\nthat you put all 386SWAT keywords in a profile one keyword per line, and\npoint to the profile with the <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#PRO\">PRO</A>=</FONT></TT>\noption on the 386SWAT.LOD line. For example,\n\n<P><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; Device=</FONT></TT><I>d:\\path\\</I><TT><FONT SIZE=+1>386SWAT.LOD\nPRO=</FONT></TT><I>d:\\path\\</I><TT><FONT SIZE=+1>386SWAT.PRO</FONT></TT>\n<BR><!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATINV.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/x-server-parsed-html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.03 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Invoking 386SWAT</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Invoking 386SWAT</FONT></B></CENTER>\n\n\n<P>Generally, the debugger lies in the background waiting for some catastrophic\nevent to occur.\n\n<P>To bring up the debugger from the keyboard, press Ctl-Alt-Pad5. That\nis, with the Ctl- and Alt-keys held down, pressing the 5 key on the numeric\npad invokes the debugger. This mechanism is useful when your program is\nstuck somewhere. Remember, the keyboard and the keyboard interrupt must\nbe enabled for this to work. On systems for which the Pad5 key is inconvenient\nto use (such as some laptops), the sequence Ctl-Alt-SysReq also brings\nup the debugger.\n\n<P>It is also handy to install an NMI switch for when the system really\ngets locked up.&nbsp; Be sure to put the keyword <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#TRAPNMI\">TRAPNMI</A></FONT></TT>\nin the 386SWAT profile.\n\n<P>To run a particular program through the debugger, use the <TT><FONT SIZE=+1><A HREF=\"swatsym.htm#SWATRUN\">SWATRUN</A>\n</FONT></TT>utility.\n\n<P>If remote debugging is active (see <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#SETCOM\">SETCOM</A></FONT></TT>\nprofile option and <TT><FONT SIZE=+1><A HREF=\"swatcmd.htm#SETCOM\">SETCOM</A></FONT></TT>\ncommand) the debugger may also be activated by sending <TT><FONT SIZE=+1>SWT!</FONT></TT>\nfollowed by a break signal. This is done by pressing Ctl-6 in the CHAT\nscreen.\n\n<P>The utility <TT><FONT SIZE=+1><A HREF=\"swatsym.htm#SWATCMD\">SWATCMD</A></FONT></TT>\n(loaded via <TT><FONT SIZE=+1>Device=</FONT></TT> or from the DOS command\nline) may be used to pass commands to 386SWAT.&nbsp; Invoking <TT><FONT SIZE=+1>SWATCMD</FONT></TT>\nwith no options brings up 386SWAT at an INT 03h (assuming <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#TRAPSKIP\">TRAPSKIP</A>\n</FONT></TT>or <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#TRAPDEBUG\">TRAPDEBUG</A>\n</FONT></TT>is active).\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATMAX.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/x-server-parsed-html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.03 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Debugging Aids in 386MAX</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Debugging Aids in 386MAX</FONT></B></CENTER>\n\n\n<P>The following options are recognized by 386MAX and may be useful in\nconjunction with 386SWAT. These options should be placed in your 386MAX\nprofile.\n\n<P>To catch even-value stack wraps, use <TT><FONT SIZE=+1>DEBUG=NOWRAP</FONT></TT>.\nThis situation occurs when an interrupt is encountered with SP = 2 or 4.\nIn this case, the 386 will push the three words onto the stack and wrap\nto the end of the stack segment leaving SP = FFFC or FFFE. Quite likely,\nthis is an error as most stack segments aren't meant to be 64 KB in length.\nTechnically, this event is not an error as far as the 386 is concerned,\nbut logically it almost always is an error. The default behavior of 386MAX\nis to emulate the behavior of the CPU and not signal an error; the <TT><FONT SIZE=+1>DEBUG=NOWRAP</FONT></TT>\nkeyword tells 386MAX to trap this case.\n\n<P>To catch writes into unmapped EMS pages, use <TT><FONT SIZE=+1>DEBUG=EMSWRIT</FONT></TT>.\nThis option traps with a Page Fault attempts to write into unmapped EMS\npages as well as after a Save Page Map call. The latter is presumed to\nhave been done by a memory-resident program prior to mapping in its own\npages. To catch reads and/or writes in unmapped EMS pages, use <TT><FONT SIZE=+1>DEBUG=EMSRDWR</FONT></TT>.\nTo catch an EMS bug in MS-DOS 4.0x, try this latter option with BUFFERS\nin EMS memory.\n\n<P>To catch unemulated Invalid Opcodes, use <TT><FONT SIZE=+1>DEBUG=I06</FONT></TT>.\n\n<P>To signal an INT 01h on each DPMI error, use <TT><FONT SIZE=+1>DEBUG=DPMIERR</FONT></TT>.\n\n<P>To force a new selector on all selector allocates, use <TT><FONT SIZE=+1>DEBUG=DPMINEWSEL</FONT></TT>.\nThis option is useful if your code has a stale selector, that is, you allocate\na selector and tuck it away for later use, but then, before its last reference,\nyou free it and allocate another selector. Without this option you might\nget the old selector number (the one you just freed). When the stale selector\nis used, it might not generate an error, but surely it won't do what you\nexpected.\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATMON.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/x-server-parsed-html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.03 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Monitor Mode</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Monitor Mode</FONT></B></CENTER>\n\n\n<P>The <TT><FONT SIZE=+1>GM </FONT></TT>(go monitor) command takes an expression\nwhich will be evaluated as the CPU single-steps (equivalent to <A HREF=\"swatscr.htm#Padplus\">Padplus</A>\nor <A HREF=\"swatscr.htm#F11\">F11</A>). No display will occur until\n\n<P>1) the monitor expression evaluates TRUE, or\n<BR>2) 386SWAT is invoked by some other means (GP fault, NMI, Ctrl-Alt-Pad5,\netc.)\n\n<P>Boolean expressions may be constructed using the dyadic functions <TT><FONT SIZE=+1>&amp;&amp;</FONT></TT>,\n<TT><FONT SIZE=+1>||</FONT></TT>, <TT><FONT SIZE=+1>&lt;</FONT></TT>, <TT><FONT SIZE=+1>&lt;=</FONT></TT>,\n<TT><FONT SIZE=+1>==</FONT></TT>, <TT><FONT SIZE=+1>>=</FONT></TT>, and\n<TT><FONT SIZE=+1>></FONT></TT>. Function precedence is the same as the\nC language. See <A HREF=\"swatcmd.htm\">Command Line Actions</A>.\n\n<P>For example:\n\n<P><TT><FONT SIZE=+1>gm ah</FONT></TT>\n<BR>will execute until <TT><FONT SIZE=+1>AH </FONT></TT>is non-zero.\n\n<P><TT><FONT SIZE=+1>gm [.csip == 21cd &amp;&amp; ah!=9</FONT></TT>\n<BR>will execute until the current instruction is INT 21 and <TT><FONT SIZE=+1>AH\n</FONT></TT>is any value other than 9 (DOS display string).\n\n<P><TT><FONT SIZE=+1>gm cx == 0</FONT></TT>\n<BR>will execute until <TT><FONT SIZE=+1>CX </FONT></TT>is 0.\n\n<P><TT><FONT SIZE=+1>gm</FONT></TT>\n<BR>will execute until the last expression specified with <TT><FONT SIZE=+1>gm\n</FONT></TT>is TRUE.\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATNDP.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/x-server-parsed-html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.03 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>NDP Register Screen</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>NDP Register Screen</FONT></B></CENTER>\n\n\n<P>This feature is preliminary, but it does allow you to move through the\nNumeric Data Processor (NDP) registers and settings and change them at\nwill.&nbsp; Lacking is an exact binary to decimal conversion algorithm\nas well as a decimal to binary conversion algorithm.&nbsp; This screen\ncan be displayed and cleared via <A HREF=\"swatscr.htm#a-F8\">Alt-F8</A>.\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATPRO.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>386SWAT Profile Options</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>386SWAT Profile Options</FONT></B></CENTER>\n\n\n<P>The following profile options are recognized by 386SWAT.&nbsp; Options\nmay be entered in upper and/or lower case.&nbsp; See the file <A HREF=\"swatdef.htm\">386SWAT</A>\nfor a list you can use already in profile format.\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>[</FONT></TT><I>section name</I><TT><FONT SIZE=+1>]</FONT></TT></TD>\n\n<TD VALIGN=TOP>For versions of DOS which support MultiConfig, this option\nlimits profile processing to the matching MultiConfig section in CONFIG.SYS.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"ADDRHBITS\"></A><TT><FONT SIZE=+1>ADDRHBITS=</FONT></TT><I>n</I></TD>\n\n<TD VALIGN=TOP>Bits to use for address hashing (<TT><FONT SIZE=+1>8</FONT></TT>-<TT><FONT SIZE=+1>12</FONT></TT>;\ndefault <TT><FONT SIZE=+1>12</FONT></TT>).&nbsp; See <A HREF=\"swatsym.htm#ADDRHBITS\">SWATSYM.DOC</A>.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"ALTSCR\"></A><TT><FONT SIZE=+1>ALTSCR</FONT></TT></TD>\n\n<TD VALIGN=TOP>Display debugging information on the screen other than the\ncurrent one being used. That is, in a two monitor system, if the current\nscreen uses the color adapter, display debugging data on the monochrome\nscreen and vice versa. This option is valid only if we detect that there\nare both a color and monochrome adapter in the system. Otherwise, it is\nignored. Note that the screens can be swapped via <A HREF=\"swatscr.htm#a-F7\">Alt-F7</A>.\nAn alias for this option is <TT><FONT SIZE=+1>/A</FONT></TT>.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"BUCKETS\"></A><TT><FONT SIZE=+1>BUCKETS=</FONT></TT><I>n</I></TD>\n\n<TD VALIGN=TOP>Specify the number of name hashing blocks to allocate (about\n1K each).&nbsp; See <A HREF=\"swatsym.htm#BUCKETS\">SWATSYM.DOC</A>.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"CMDHIST\"></A><TT><FONT SIZE=+1>CMDHIST=</FONT></TT><I>nnn</I></TD>\n\n<TD VALIGN=TOP>Specify the size of the command history buffer used by <A HREF=\"swatscr.htm#Command Line Recall\">command\nlie recall</A>. Default is 1024.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"COLDBOOT\"></A><TT><FONT SIZE=+1>COLDBOOT</FONT></TT></TD>\n\n<TD VALIGN=TOP>Don't write <TT><FONT SIZE=+1>1234h </FONT></TT>to warm\nboot flag location when rebooting system from within 386SWAT.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"DEBUG=TRIP\"></A><TT><FONT SIZE=+1>DEBUG=TRIP</FONT></TT></TD>\n\n<TD VALIGN=TOP>Use triple fault method of rebooting. Sometimes a system\ndoesn't reboot when using the 8042 method (the default), so here's another\nway to skin the cat.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"DVGA\"></A><TT><FONT SIZE=+1>DVGA</FONT></TT></TD>\n\n<TD VALIGN=TOP>Use a Dual VGA screen as the secondary monitor.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"GPSKIP\"></A><TT><FONT SIZE=+1>GPSKIP=</FONT></TT><I>key[,key]</I></TD>\n\n<TD VALIGN=TOP>If a GP Fault occurs on any of the instructions named in\nthe list, do not signal this to 386SWAT. This option allows you to trap\nGP Faults but filter out ones which may commonly occur but not be of interest.\nThe key values (GP Skip instructions) supported are&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP><B>Keyword</B></TD>\n\n<TD VALIGN=TOP><B>Instruction(s)</B></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>CLI</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>CLI</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>CRn</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>MOV </FONT></TT><I>r32</I><TT><FONT SIZE=+1>,CRn&nbsp;</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>MOV CRn,</FONT></TT><I>r32</I></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>HLT</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>HLT</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>IND</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>IN AL,DX</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>IN AX,DX</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>IN EAX,DX</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>INI</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>IN AL,</FONT></TT><I>immed</I>&nbsp;\n<BR><TT><FONT SIZE=+1>IN AX,</FONT></TT><I>immed</I>&nbsp;\n<BR><TT><FONT SIZE=+1>IN EAX,</FONT></TT><I>immed</I></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>INT</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>INT</FONT></TT> <I>xx</I></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>IRET</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>IRET&nbsp;</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>IRETD</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>OUTD</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>OUT DX,AL</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>OUT DX,AX</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>OUT DX,EAX</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>OUTI</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>OUT</FONT> </TT><I>immed</I><TT><FONT SIZE=+1>,AL</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>OUT </FONT></TT><I>immed</I><TT><FONT SIZE=+1>,AX</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>OUT </FONT></TT><I>immed</I><TT><FONT SIZE=+1>,EAX</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>PPF</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>PUSHF&nbsp;</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>POPF&nbsp;</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>PUSHFD&nbsp;</FONT></TT>&nbsp;\n<BR><TT><FONT SIZE=+1>POPFD</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>STI</FONT></TT></TD>\n\n<TD VALIGN=TOP><TT><FONT SIZE=+1>STI</FONT></TT></TD>\n</TR>\n</TABLE>\nThe keyword ALL covers all of the above options.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"INTRUDE\"></A><TT><FONT SIZE=+1>INTRUDE</FONT></TT></TD>\n\n<TD VALIGN=TOP>Attempt to intrude into another memory manager's PL0 context.\nIf this is successful, 386SWAT appears as a PL0 debugger in the context\nof the memory manager. This option is now the default. To disable this\noption, use <TT><FONT SIZE=+1><A HREF=\"#VCPISWAT\">VCPISWAT</A></FONT></TT>.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"KEYB\"></A><TT><FONT SIZE=+1>KEYB=</FONT></TT><I>cclay</I></TD>\n\n<TD VALIGN=TOP>Use international keyboard whose country code/layout is\n<I>cclay</I>. Possible values are&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD><B><I>cclay</I></B></TD>\n\n<TD><B>Country</B></TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>GR129</FONT></TT></TD>\n\n<TD>Germany</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>SP172</FONT></TT></TD>\n\n<TD>Spain</TD>\n</TR>\n</TABLE>\nIf your international keyboard is not in this list, read the file <A HREF=\"keybin.htm\">KEYBIN.TXT</A>\nto see how you can help.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"LCD\"></A><TT><FONT SIZE=+1>LCD</FONT></TT></TD>\n\n<TD VALIGN=TOP>Specify that an LCD screen is present (and 386SWAT uses\nthe LCD screen attributes). Does anyone know how to detect this case under\nprogram control? I would prefer not to require the user to tell us what\nthe screen is like.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"LOADLOW\"></A><TT><FONT SIZE=+1>LOADLOW</FONT></TT></TD>\n\n<TD VALIGN=TOP>Tell 386MAX it's not OK to load us into extended memory\nafter INIT_REAL and to relocate our INIT_VIRT code. It's highly unlikely\nyou'll need this option.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"LOADSYM\"></A><TT><FONT SIZE=+1>LOADSYM=</FONT></TT><I>filename\n[optional]</I></TD>\n\n<TD VALIGN=TOP>Load specified symbol file with optional arguments:&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>/b=</FONT></TT><I>xxxxxxxx</I>&nbsp;</TD>\n\n<TD>Optional physical base address in hex</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>/h</FONT></TT>&nbsp;</TD>\n\n<TD>Optional HPDA flag (enable DPMI services)</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>/li-</FONT></TT></TD>\n\n<TD>Optional disable of line numbers</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>/xl</FONT></TT></TD>\n\n<TD>Disable larger comparison w/<TT><FONT SIZE=+1><A HREF=\"#SYMSIZE\">SYMSIZE</A></FONT></TT></TD>\n</TR>\n</TABLE>\n&nbsp;</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"LOGSIZE\"></A><TT><FONT SIZE=+1>LOGSIZE=</FONT></TT><I>nnnnn</I></TD>\n\n<TD VALIGN=TOP>Define size of error log in bytes. Default is 4096.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"MONO\"></A><TT><FONT SIZE=+1>MONO</FONT></TT></TD>\n\n<TD VALIGN=TOP>Use monochrome adapter if present.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"NOGD\"></A><TT><FONT SIZE=+1>NOGD</FONT></TT></TD>\n\n<TD VALIGN=TOP>Because some programs may reset the debug registers which\nyou've carefully setup, 386SWAT automatically sets the Global Debug (GD)\nbit in DR7 on startup so that we can stop such programs before they can\ndo any harm. In case you don't want 386SWAT to do this, use this keyword.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"NORMLIDT\"></A><TT><FONT SIZE=+1>NORMLIDT</FONT></TT></TD>\n\n<TD VALIGN=TOP>Disable Real Mode LIDT redirection. Device 386SWAT uses\na separate IDT to handle nasty bugs which write into the Real Mode IDT\nat 0:0 such as DOS 6.x does during its transient CONFIG.SYS processing.\nThis is the default state.&nbsp; Use <TT><FONT SIZE=+1><A HREF=\"#RMLIDT\">RMLIDT</A></FONT></TT>\nto find this kind of bug.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"NOSWAP\"></A><TT><FONT SIZE=+1>NOSWAP</FONT></TT></TD>\n\n<TD VALIGN=TOP>Don't restore the previous underlying screen when single-stepping.\nThis option is useful in conjunction with the <TT><FONT SIZE=+1><A HREF=\"#ALTSCR\">ALTSCR</A></FONT></TT>\noption. This option specifies the initial state only. It can be toggled\nvia <A HREF=\"swatscr.htm#a-F6\">Alt-F6</A>.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><A NAME=\"NOWINK\"></A><TT><FONT SIZE=+1>NOWINK</FONT></TT></TD>\n\n<TD>Disable <A HREF=\"swatwkd.htm\">Windows Kernel Debugging</A>.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"PASSTHROUGH\"></A><TT><FONT SIZE=+1>PASSTHROUGH=</FONT></TT><I>xx,xx,xx,...</I></TD>\n\n<TD VALIGN=TOP>Allow one or more hardware interrupts to be passed through\nto the previous protected mode handler while 386SWAT is active. Currently,\nthese are limited to <TT><FONT SIZE=+1>76</FONT></TT>, <TT><FONT SIZE=+1>77</FONT></TT>,\n<TT><FONT SIZE=+1>0B</FONT></TT>, and <TT><FONT SIZE=+1>0C</FONT></TT>.\nTHIS OPTION SHOULD NOT BE USED UNLESS NECESSARY. For example, when the\nIBM PS/2 SCSI adapter (8EFE or 8EFF) is used, staying in 386SWAT for more\nthan 1 or 2 minutes will cause the hard disk to lock on the next disk access.\n<TT><FONT SIZE=+1>PASSTHROUGH=76</FONT></TT> will allow one to stay in\n386SWAT indefinitely.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"PATH\"></A><TT><FONT SIZE=+1>PATH=</FONT></TT><I>d:\\dir1[,d:\\dir2[,...]]</I></TD>\n\n<TD VALIGN=TOP>Specify source file search path (see <A HREF=\"swatsym.htm#PATH\">SWATSYM.DOC</A>).</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"PORTINIT\"></A><TT><FONT SIZE=+1>PORTINIT=</FONT></TT><I>string</I></TD>\n\n<TD VALIGN=TOP>Initialize serial port. String may contain any character\nexcept semicolon, including the following escape sequences:&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>\\\\</FONT></TT>&nbsp;</TD>\n\n<TD>Send backslash.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>\\r</FONT></TT></TD>\n\n<TD>Send CR.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>\\b</FONT></TT></TD>\n\n<TD>Send a break signal (this is a hardware signal, not a character).</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>\\p</FONT></TT></TD>\n\n<TD>Pause for about 250ms.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><TT><FONT SIZE=+1>\\1</FONT></TT> - <TT><FONT SIZE=+1>\\0</FONT></TT></TD>\n\n<TD>Delay for 1 - 10 seconds.</TD>\n</TR>\n</TABLE>\n<TT><FONT SIZE=+1><A HREF=\"#SETCOM\">SETCOM</A></FONT></TT> must be specified\nto set the parameters for the serial port. On the first entry to 386SWAT\n(which may be remotely triggered) 386SWAT will automatically try to connect\nfor remote debugging.&nbsp;</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"PRO\"></A><TT><FONT SIZE=+1>PRO=</FONT></TT><I>d:\\path\\filename.ext</I></TD>\n\n<TD VALIGN=TOP>Read subsequent command line options from a profile. Just\nas with 386MAX, as you append more and more options to the 386SWAT command\nline, you may prefer to collect them all in a 386SWAT profile, one per\nline. These options may be followed by a semicolon and a comment. This\nprofile is handled exactly the same way as is the corresponding profile\nfor 386MAX.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"PROXSRCH\"></A><TT><FONT SIZE=+1>PROXSRCH=</FONT></TT><I>r[,g]</I></TD>\n\n<TD VALIGN=TOP>Set range and granularity for proximity searching on symbol\naddresses.&nbsp; See <A HREF=\"swatsym.htm#PROXSRCH\">SWATSYM.DOC</A>.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"PS4\"></A><TT><FONT SIZE=+1>PS4=</FONT></TT><I>xxxx</I></TD>\n\n<TD VALIGN=TOP>Periscope 4 hardware debugger board is installed at I/O\nport <I>xxxx</I> (for reference, the factory setting is 300h). This feature\nallows 386SWAT to manage the traceback buffer and other features of the\nPeriscope Company's 386 hardware debugger. *NOTE* this feature isn't finished.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"RMLIDT\"></A><TT><FONT SIZE=+1>RMLIDT</FONT></TT></TD>\n\n<TD VALIGN=TOP>Enable Real Mode LIDT redirection. Device 386SWAT uses a\nseparate IDT to handle nasty bugs which write into the Real Mode IDT at\n0:0 such as DOS 6.x does during its transient CONFIG.SYS processing.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"SAVESCREEN\"></A><TT><FONT SIZE=+1>SAVESCREEN=</FONT></TT><I>nnn</I></TD>\n\n<TD VALIGN=TOP>Specify the number of last screens to save. This keyword\nallows you to control how many screens back <A HREF=\"swatscr.htm#a-F10\">Alt-F10</A>\ncan display. The default is sixteen. Each screen consumes 4000 bytes of\nstorage in extended memory.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><A NAME=\"SETCOM\"></A><TT><FONT SIZE=+1>SETCOM=</FONT></TT><I>port,bps[,itype[,portbase]]</I></TD>\n\n<TD VALIGN=TOP>Specify port to use for remote debugging.&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP><I>port</I></TD>\n\n<TD>From <TT><FONT SIZE=+1>1</FONT></TT>-<TT><FONT SIZE=+1>4</FONT></TT>\nfor COM1 through COM4.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><I>bps</I></TD>\n\n<TD>Transfer rate, from <TT><FONT SIZE=+1>1</FONT></TT> to <TT><FONT SIZE=+1>115200</FONT></TT>.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><I>itype</I></TD>\n\n<TD>Interrupt mode. May be <TT><FONT SIZE=+1>3</FONT></TT> or <TT><FONT SIZE=+1>4</FONT></TT>\nto specify IRQ (default is IRQ3 for COM2/COM4, IRQ4 for COM1/COM3), <TT>*</TT>\nfor default, or <TT><FONT SIZE=+1>p </FONT></TT>for polled operation. Currently,\nan IRQ line is required for remote debugging.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP><I>portbase</I></TD>\n\n<TD>UART port base if different from defaults: COM1=<TT><FONT SIZE=+1>3F8</FONT></TT>,\nCOM2=<TT><FONT SIZE=+1>2F8</FONT></TT>, COM3=<TT><FONT SIZE=+1>3E8</FONT></TT>,\nCOM4=<TT><FONT SIZE=+1>2E8</FONT></TT>.</TD>\n</TR>\n</TABLE>\n&nbsp;</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"SYMFILTER\"></A><TT><FONT SIZE=+1>SYMFILTER=</FONT></TT><I>text1\n[text2 [...]]</I></TD>\n\n<TD VALIGN=TOP>Some symbols, especially from Windows programs written in\nC, are prefaced with text such as <TT>\"<FONT SIZE=+1>__imp__</FONT>\"</TT>,\n<TT>\"<FONT SIZE=+1>_</FONT>\"</TT>, and the like which adds to the symbol's\nlength but not understanding. This feature allows you to specify in the\n386SWAT profile leading text which is to be stripped from each symbol.&nbsp;\n\n<P>The default settings are&nbsp;\n\n<P><TT><FONT SIZE=+1>SYMFILTER=__imp__ _&nbsp;</FONT></TT>&nbsp;\n\n<P>Up to 128 characters can be specified in this way.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"SYMSIZE\"></A><TT><FONT SIZE=+1>SYMSIZE=</FONT></TT><I>nnnnn</I></TD>\n\n<TD VALIGN=TOP>Specify the number of bytes to reserve for the symbol table.\nThe default size is 4096.&nbsp; See <A HREF=\"swatsym.htm#SYMSIZE\">SWATSYM.DOC</A>.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPBOUND\"></A><TT><FONT SIZE=+1>TRAPBOUND</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap BOUND instruction interrupts, ignoring INT 05h.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPDEBUG\"></A><TT><FONT SIZE=+1>TRAPDEBUG</FONT></TT></TD>\n\n<TD VALIGN=TOP>Intercept INT 01h/03h at installation time. Normally, 386MAX\ndirects protected mode occurrences of INT 01h/03h to 386SWAT and real mode\noccurrences to the real IDT handler. This options causes all such interrupts\nto be handled by 386SWAT. This feature may be toggled via <A HREF=\"swatscr.htm#a-F1\">Alt-F1</A>.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPDIV\"></A><TT><FONT SIZE=+1>TRAPDIV</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap divide overflow interrupts.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPGENP\"></A><TT><FONT SIZE=+1>TRAPGENP</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap General Protection Faults (toggle via <A HREF=\"swatscr.htm#a-F3\">Alt-F3</A>).</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPINV\"></A><TT><FONT SIZE=+1>TRAPINV</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap Invalid Opcode interrupts (toggle via <A HREF=\"swatscr.htm#c-F3\">Ctl-F3</A>).</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPNMI\"></A><TT><FONT SIZE=+1>TRAPNMI</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap Non-Maskable Interrupts. This option is useful in conjunction\nwith a hardware breakout switch which can be used to invoke the debugger\neven if all interrupts are disabled (toggle via <A HREF=\"swatscr.htm#a-F2\">Alt-F2</A>).</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPPAGE\"></A><TT><FONT SIZE=+1>TRAPPAGE</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap Page Faults (toggle via <A HREF=\"swatscr.htm#a-F4\">Alt-F4</A>).</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPSEGNP\"></A><TT><FONT SIZE=+1>TRAPSEGNP</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap Segment Not Present Faults.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPSKIP\"></A><TT><FONT SIZE=+1>TRAPSKIP</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap INT 03h instructions (toggle via <A HREF=\"swatscr.htm#c-F2\">Ctl-F2</A>).</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPSTACK\"></A><TT><FONT SIZE=+1>TRAPSTACK</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap Stack Faults (toggle via <A HREF=\"swatscr.htm#c-F4\">Ctl-F4</A>).</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPSTEP\"></A><TT><FONT SIZE=+1>TRAPSTEP</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap INT 01h breakpoints (toggle via <A HREF=\"swatscr.htm#c-F1\">Ctl-F1</A>).</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"TRAPTSS\"></A><TT><FONT SIZE=+1>TRAPTSS</FONT></TT></TD>\n\n<TD VALIGN=TOP>Trap TSS Faults.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"VCPISWAT\"></A><TT><FONT SIZE=+1>VCPISWAT</FONT></TT></TD>\n\n<TD VALIGN=TOP>Do not attempt to intrude into another memory manager's\nPL0 context. This option disables the default <TT><FONT SIZE=+1><A HREF=\"#INTRUDE\">INTRUDE</A>\n</FONT></TT>option.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"VIDEO\"></A><TT><FONT SIZE=+1>VIDEO=</FONT></TT><I>d:\\path\\filename.ext</I></TD>\n\n<TD VALIGN=TOP>Read in/write to video tables. If the specified file exists,\nit is read in and used as video table information. If the file doesn't\nexist, it is created. The information in the video table specifies how\nto switch to particular video modes as well as how to set certain cursor\ntypes. Use this option if you wish to bring up 386SWAT on top of graphic\napplications on single-monitor systems. *NOTE* this option doesn't fully\nwork as yet, so I suggest that you don't use it.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"VMSCOUNT\"></A><TT><FONT SIZE=+1>VMSCOUNT=</FONT></TT><I>n</I></TD>\n\n<TD VALIGN=TOP>Used with <TT><FONT SIZE=+1><A HREF=\"#VMSINT\">VMSINT</A></FONT></TT>.&nbsp;\nLimit number of times 386SWAT inserts itself into a VCPI client's GDT/IDT.\nThis may be useful when debugging VCPI applications that call Enter Protected\nMode (<TT><FONT SIZE=+1>AX=DE0C</FONT></TT>) repeatedly, such as a real-mode\nint 08h handler that enters protected mode on every clock tick. The correct\nvalue may have to be determined by trial and error.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD VALIGN=TOP><A NAME=\"VMSINT\"></A><TT><FONT SIZE=+1>VMSINT</FONT></TT><I>[</I><TT><FONT SIZE=+1>=</FONT></TT><I>xx,xx,...]</I></TD>\n\n<TD VALIGN=TOP>Trap VCPI Enter Protected Mode switches (<TT><FONT SIZE=+1>AX=DE0C</FONT></TT>)\nand blast in sufficient GDT and IDT entries to debug the client application.\nThis option is useful when debugging a VCPI application which does not\nfollow the preliminary VCPI debugger specification. Use this option with\ncare. The argument (if present) limits the intercepted interrupts to the\nvalues. When <TT><FONT SIZE=+1>VMSINT</FONT></TT> is in effect, it may\nbe important to limit the interrupts. For example, some DOS16M apps (such\nas Lotus 1-2-3 Version 3.0) intercept interrupts but don't set the access\nrights byte in the IDT (they assume that it's still set for a 286 interrupt\ngate, as DOS16M setup originally). Thus when 386SWAT blasts its task gate\nentries into the IDT, subsequent DOS16M intercepts leave those entries\nmarked as a task gate. This debug option limits us to intercepting those\nfaults necessary to catch catastrophic errors, but not everything. Interrupts\nwhich may be intercepted are <TT><FONT SIZE=+1>00</FONT></TT>, <TT><FONT SIZE=+1>01</FONT></TT>,\n<TT><FONT SIZE=+1>02</FONT></TT>, <TT><FONT SIZE=+1>03</FONT></TT>, <TT><FONT SIZE=+1>05</FONT></TT>,\n<TT><FONT SIZE=+1>06</FONT></TT>, <TT><FONT SIZE=+1>0A</FONT></TT>, <TT><FONT SIZE=+1>0B</FONT></TT>,\n<TT><FONT SIZE=+1>0C</FONT></TT>, <TT><FONT SIZE=+1>0D</FONT></TT>, and\n<TT><FONT SIZE=+1>0E</FONT></TT>.</TD>\n</TR>\n\n<TR>\n<TD><A NAME=\"WKDLS\"></A><TT><FONT SIZE=+1>WKDLS=</FONT></TT><I>nnn</I></TD>\n\n<TD>Reserve space for <I>nnn </I><A HREF=\"winkdbg.htm#WKDLS\">WKD load segment</A>\nentries.</TD>\n</TR>\n</TABLE>\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATREM.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/x-server-parsed-html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.03 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Remote Debugging</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Remote Debugging</FONT></B></CENTER>\n\n\n<P>Two machines may be connected for remote debugging. The connection may\nbe made via a null modem cable connecting the serial ports on both machines,\nor via modem.\n\n<P>The connection is initiated by using the <A HREF=\"swatcmd.htm#SETCOM\">SETCOM</A>\ncommand to initialize the serial port, then pressing <A HREF=\"swatscr.htm#c-F9\">Ctl-F9</A>\non each system to attempt to connect. When a connection is established,\nthe \"Press M to become master\" prompt appears. Only one of the two systems\nmay become master; the other one then becomes the slave. Processing on\nthe slave system then proceeds normally; the master system is now running\na special terminal program.\n\n<P>Keystrokes typed in the master terminal program are sent to the remote\nsystem (with some exceptions - see below), and screen output from the remote\n386SWAT system appears on the master terminal screen.\n<BR>&nbsp;\n\n<P><U>Special keys</U>\n\n<P><A HREF=\"swatscr.htm#Ctl-Alt-Del\">Ctl-Alt-Del</A> will NOT be sent to\nthe remote system while in the master terminal screen - it will reboot\nthe master system.&nbsp; <A HREF=\"swatscr.htm#c-F9\">Ctl-F9</A> invokes\na menu of special options for the master system:\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP>T</TD>\n\n<TD>Terminate connection with slave immediately.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>G</TD>\n\n<TD>Terminate connection, but have slave go instead of returning to the\n386SWAT command prompt.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>R</TD>\n\n<TD>Terminate connection, have slave go, but have slave automatically attempt\nto re-establish connection on next invocation of 386SWAT.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>B</TD>\n\n<TD>Terminate connection and reboot slave system.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>S</TD>\n\n<TD>Suspend session temporarily. This temporarily exits the terminal program.\nYou may exit 386SWAT. <A HREF=\"swatscr.htm#c-F9\">Ctl-F9</A> again resumes\nthe connection.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>U</TD>\n\n<TD>Upload program to remote.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>D</TD>\n\n<TD>Download program from remote.</TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>Esc</TD>\n\n<TD>Continue with terminal program</TD>\n</TR>\n</TABLE>\nOther keys are Ctl-6 (interrupt remote) and <A HREF=\"swatscr.htm#a-F7\">Alt-F7</A>\n(send remote screen only to master). <A HREF=\"swatscr.htm#a-F7\">Alt-F7</A>\nis useful for debugging when the remote system is in graphics mode or otherwise\nunable to access the CRT controller.\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATRMV.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/x-server-parsed-html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.03 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Register Mask Values</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Register Mask Values</FONT></B></CENTER>\n\n\n<P>The following pseudo-records describe the bit masks supported by the\nregister command where \"<TT><FONT SIZE=+1>*</FONT></TT>\" represents reserved\nbits with no corresponding name:\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<TR>\n<TD VALIGN=TOP>EFL</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>*:13, AC:1, VM:1, RF:1, *:1, NT:1, IOPL:2, OF:1,\nDF:1, IF:1, TF:1, SF:1, ZF:1, *:1, AF:1, *:1, PF:1, *:1, CF:1</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>CR0</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>PG:1, CD:1, NW:1, *:10, AM:1, *:1, WP:1, *:10, NE:1,\nET:1, TS:1, EM:1, MP:1, PE:1</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>PTE</TD>\n\n<TD VALIGN=TOP>record&nbsp;</TD>\n\n<TD><TT><FONT SIZE=+1>FRM:20, PTE_AVL:3, *:2, PTE_D:1, PTE_A:1, PTE_CE:1,\nPTE_WT:1, PTE_US:1, PTE_RW:1, PTE_P:1</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>SEL</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>SEL:13, TI:1, PL:2</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>DR6</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>*:16, BT:1, BS:1, BD:1, *:9, B3:1, B2:1, B1:1, B0:1</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>DR7</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>LEN3:2, RW3:2, LEN2:2, RW2:2, LEN1:2, RW1:2, LEN0:2,\nRW0:2, *:2, GD:1, *:3, GE:1, LE:1, G3:1, L3:1, G2:1, L2:1, G1:1, L1:1,\nG0:1, L0:1</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>TR4</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>TR4_TAG:21, TR4_WVAL:1, TR4_LRU:3, TR4_RVAL:4, *:3</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>TR5</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>*:21, TR5_SSEL:7, TR5_ESEL:2, TR5_CTL:2</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>TR6</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>FRM:20, TR6_V:1, TR6_D:1, TR6_DP:1, TR6_U:1, TR6_UP:1,\nTR6_W:1, TR6_WP:1, *:4, TR6_C:1</FONT></TT></TD>\n</TR>\n\n<TR>\n<TD VALIGN=TOP>TR7</TD>\n\n<TD VALIGN=TOP>record</TD>\n\n<TD><TT><FONT SIZE=+1>FRM:20,*:7, TR7_HT:1, TR7_REP:2, *:2</FONT></TT></TD>\n</TR>\n</TABLE>\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATSCR.HTM",
    "content": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n<html>\n<head>\n   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n   <meta name=\"GENERATOR\" content=\"Mozilla/4.76 [en]C-CCK-MCD   (Win98; U) [Netscape]\">\n   <meta name=\"Author\" content=\"Bob Smith\">\n   <title>Debugging Screen and Keystrokes</title>\n</head>\n<body text=\"#000000\" bgcolor=\"#FFFFC0\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF00FF\">\n\n<center><b><font size=+2>Debugging Screen and Keystrokes</font></b></center>\n\n<p><u>Debugging Screen</u>\n<p>The top of the initial debugging screen consists of a row of the 32-bit\ngeneral purpose registers, two rows of the segment registers, and one row\nof CR0, CR2, and extended flags.\n<p>The rest of the initial debugging screen displays the instructions to\nbe executed with the stack appearing on the right in one or two columns.\nIf the current instruction references memory, the segment register, offset,\nand memory value of the reference are displayed on the line separating\nthe registers from the instructions.\n<p>The line at the bottom of the screen is used to enter various commands.&nbsp;\nThe following table summarizes the possibilities. The usual editing keys\nare available such as Left, Right, Home, End, Insert, Backspace, and Delete.&nbsp;\nNote that a colon (:) is used to separate a segment from an offset (Virtual\n8086 Mode) and that a stile (<tt><font size=+1>|</font></tt>) is used to\nseparate a selector from an offset (Protected Mode).&nbsp; The command\nline is parsed according to the grammar found in the file <a href=\"swatgrm.htm\">386SWAT.GRM</a>.\n<br>&nbsp;\n<p><a NAME=\"Command Line Recall\"></a><u>Command Line Recall</u>\n<p>Commands entered on the command line are saved in a ring buffer whose\nlength can be changed from the default of 1024 via the profile keyword\n<tt><font size=+1><a href=\"swatpro.htm#CMDHIST\">CMDHIST</a>=</font></tt><i>nnn</i>.\n<p>Previous commands can be retrieved via the keystrokes <a href=\"#a-<\">Alt-&lt;</a>\n(previous command) and <a href=\"#a->\">Alt-></a> (next command). Pressing\neither of these keys repeatedly scrolls through the buffer in the chosen\ndirection. The keystroke <a href=\"#a-?\">Alt-?</a> displays a history of\n(up to 24) commands from which a command can be chosen by scrolling up\nor down through the list, or by typing the letter next to the command.\nA command may be deleted from this list via the Del key.\n<br>&nbsp;\n<p><a NAME=\"Special Keystrokes\"></a><u>Special Keystrokes</u>\n<p>Special keystrokes available from the command line include:\n<br>&nbsp;\n<table BORDER=0 CELLSPACING=10 VALIGN=\"TOP\" >\n<tr>\n<td VALIGN=TOP><a NAME=\"ESC\"></a>ESC</td>\n\n<td VALIGN=TOP>Continue processing. Equivalent to the <a href=\"swatcmd.htm#G\">Go</a>\ncommand.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F1\"></a>F1</td>\n\n<td VALIGN=TOP>Display a help screen with submenus.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F3\"></a>F3</td>\n\n<td VALIGN=TOP>Display LDT entries.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F4\"></a>F4</td>\n\n<td VALIGN=TOP>Display IDT entries.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F5\"></a>F5</td>\n\n<td VALIGN=TOP>Display PTE entries.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F6\"></a>F6</td>\n\n<td VALIGN=TOP>Display search screen.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F7\"></a>F7</td>\n\n<td VALIGN=TOP>Display memory. While this display is active, <a href=\"#c-B\">Ctl-B</a>\ndisplays in byte format, <a href=\"#c-W\">Ctl-W</a>, in word format, <a href=\"#c-D\">Ctl-D</a>\nin dword format, <a href=\"#c-V\">Ctl-V</a> in vector format, <a href=\"#c-G\">Ctl-G</a>\nin GDT format, <a href=\"#c-I\">Ctl-I</a> in IDT format, and <a href=\"#c-T\">Ctl-T</a>\nin TSS format.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F8\"></a>F8</td>\n\n<td VALIGN=TOP>Display TSS entries.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F9\"></a>F9</td>\n\n<td VALIGN=TOP>Display the instruction disassembly screen.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F10\"></a>F10</td>\n\n<td VALIGN=TOP>Display screen on entry to debugger.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F11\"></a>F11</td>\n\n<td VALIGN=TOP>Single-step the current instruction (see <a href=\"#Padplus\">Padplus</a>).\nThis key as well as <a href=\"#F12\">F12</a> are useful on systems without\na <a href=\"#Padplus\">Padplus</a>/<a href=\"#Padminus\">Padminus</a> key,\nor ones for which those keys are difficult to type such as some laptops.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"F12\"></a>F12</td>\n\n<td VALIGN=TOP>Single-skip the current instruction (see <a href=\"#Padminus\">Padminus</a>).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"s-F1\"></a>s-F1</td>\n\n<td VALIGN=TOP>Goto the immediate CALL or JMP address of the instruction\nat the top of the screen and save the address of the current instruction\n(see <a href=\"swatbmrk.htm\">Disassembly Bookmarks</a>).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"s-F2\"></a>s-F2</td>\n\n<td VALIGN=TOP>Return from the previous <a href=\"#s-F1\">s-F1</a> goto (see\n<a href=\"swatbmrk.htm\">Disassembly\nBookmarks</a>).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"s-F3\"></a>s-F3</td>\n\n<td VALIGN=TOP>Goto the instruction on the top line (see <a href=\"#Padstar\">Padstar</a>).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"s-F4\"></a>s-F4</td>\n\n<td VALIGN=TOP>Display the last <a href=\"swataflt.htm\">AutoFault</a> message.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"s-F5\"></a>s-F5</td>\n\n<td VALIGN=TOP>Display the Real Mode Interrupt Vector Table.</td>\n</tr>\n\n<tr>\n<td><a NAME=\"s-F10\"></a>s-F10</td>\n\n<td>Save the current screen into the last screen buffers.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F1\"></a>a-F1</td>\n\n<td VALIGN=TOP>Toggle intercept of INTs 01h/03h. The current state appears\nbelow the segment/selector register display as 01 or blank, 03 or blank.\nThe default state is controlled by the presence or absence of the <tt><font size=+1><a href=\"swatpro.htm#TRAPDEBUG\">TRAPDEBUG</a></font></tt>keyword.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F2\"></a>a-F2</td>\n\n<td VALIGN=TOP>Toggle intercept of INT 02h. The current state appears below\nthe segment/selector register display as 02 or blank. The default state\nis controlled by the presence or absence of the <tt><font size=+1><a href=\"swatpro.htm#TRAPNMI\">TRAPNMI</a></font></tt>keyword.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F3\"></a>a-F3</td>\n\n<td VALIGN=TOP>Toggle intercept of INT 0Dh. The current state appears below\nthe segment/selector register display as 0D or blank. The default state\nis controlled by the presence or absence of the <tt><font size=+1><a href=\"swatpro.htm#TRAPGENP\">TRAPGENP</a></font></tt>keyword.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F4\"></a>a-F4</td>\n\n<td VALIGN=TOP>Toggle intercept of INT 0Eh. The current state appears below\nthe segment/selector register display as 0E or blank. The default state\nis controlled by the presence or absence of the <tt><font size=+1><a href=\"swatpro.htm#TRAPPAGE\">TRAPPAGE</a></font></tt>keyword.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F5\"></a>a-F5</td>\n\n<td VALIGN=TOP>Toggle stack display state between two columns of words\nand one column of dwords. The tick marks appear every 16 bytes.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F6\"></a>a-F6</td>\n\n<td VALIGN=TOP>Toggle screen save state (eliminates screen flicker when\nsingle-stepping over instructions which don't write to the screen). The\ncurrent state appears below the segment/selector register display as <tt><font size=+1>SS=ON</font></tt>\nor <tt><font size=+1>SS=OFF</font></tt>.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F7\"></a>a-F7</td>\n\n<td VALIGN=TOP>Toggle video base (switch debugging screens in a two-monitor\nsystem).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F8\"></a>a-F8</td>\n\n<td VALIGN=TOP>Display NDP (floating point) register screen. Use the same\nkeystroke to remove the NDP screen.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F9\"></a>a-F9</td>\n\n<td VALIGN=TOP>Display debug register screen. This screen remains active\nuntil it is replaced by another screen. That is, you may type on the command\nline, etc. while the debug register screen is displayed.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F10\"></a>a-F10</td>\n\n<td VALIGN=TOP>Display previous debugging screens. This option can be used\nto compare changes over a single-step or single-skip. Up to sixteen previous\nscreens can be displayed in this manner using the <a href=\"#Up\">Up</a>\nand <a href=\"#Down\">Down</a> arrows. To change from the default value of\nsixteen, use the keyword <tt><font size=+1><a href=\"swatpro.htm#SAVESCREEN\">SAVESCREEN</a></font></tt>(see\nabove).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F11\"></a>a-F11</td>\n\n<td>Display MMX and SSE2 register screen.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-F\"></a>a-F</td>\n\n<td VALIGN=TOP>Goto the far return address at <tt><font size=+1>SS:SP</font></tt>\nor <tt><font size=+1>SS|eSP</font></tt> (depending upon the current mode).\nIf the current code segment is USE16, the far return address is assumed\nto be word:word (or word|word); if it's USE32, the format is assumed to\nbe word<tt><font size=+1>:</font></tt>dword (or word<tt><font size=+1>|</font></tt>dword).\nThis shortcut is equivalent to typing <tt><font size=+1><a href=\"swatcmr.htm#.RETF\">G\n.RETF</a></font></tt> at the command line.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"a-N\"></a>a-N</td>\n\n<td VALIGN=TOP>Goto the near return address at <tt><font size=+1>SS:SP</font></tt>\nor <tt><font size=+1>SS|eSP</font></tt> (depending upon the current mode).\nIf the current code segment is USE16, the near return address is assumed\nto be word; if it's USE32, the format is assumed to be dword. This shortcut\nis equivalent to typing <tt><font size=+1><a href=\"swatcmr.htm#.RETN\">G\n.RETN</a></font></tt> at the command line.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"a-<\"></a>a-&lt;</td>\n\n<td>Retrieve the previous command from the <a href=\"#Command Line Recall\">command\nhistory</a> buffer.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"a->\"></a>a-></td>\n\n<td>Retrieve the next command from the <a href=\"#Command Line Recall\">command\nhistory</a> buffer.</td>\n</tr>\n\n<tr VALIGN=TOP>\n<td><a NAME=\"a-?\"></a>a-?</td>\n\n<td>Display the <a href=\"#Command Line Recall\">command history</a> buffer.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F1\"></a>c-F1</td>\n\n<td VALIGN=TOP>Toggle intercept of INT 01h only. The current state appears\nbelow the segment/selector register display as 01 or blank. The default\nstate is controlled by the presence or absence of the <tt><font size=+1><a href=\"swatpro.htm#TRAPSTEP\">TRAPSTEP</a></font></tt>keyword.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F2\"></a>c-F2</td>\n\n<td VALIGN=TOP>Toggle intercept of INT 03h only. The current state appears\nbelow the segment/selector register display as 03 or blank. The default\nstate is controlled by the presence or absence of the <tt><font size=+1><a href=\"swatpro.htm#TRAPSKIP\">TRAPSKIP</a></font></tt>keyword.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F3\"></a>c-F3</td>\n\n<td VALIGN=TOP>Toggle intercept of INT 06h. The current state appears below\nthe segment/selector register display as 06 or blank. The default state\nis controlled by the presence or absence of the <tt><font size=+1><a href=\"swatpro.htm#TRAPINV\">TRAPINV</a></font></tt>keyword.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F4\"></a>c-F4</td>\n\n<td VALIGN=TOP>Toggle intercept of INT 0Ch. The current state appears below\nthe segment/selector register display as 0C or blank. The default state\nis controlled by the presence or absence of the <tt><font size=+1><a href=\"swatpro.htm#TRAPSTACK\">TRAPSTACK</a></font></tt>keyword.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F5\"></a>c-F5</td>\n\n<td VALIGN=TOP>Display PDE entries.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F6\"></a>c-F6</td>\n\n<td VALIGN=TOP>Display symbols.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F7\"></a>c-F7</td>\n\n<td VALIGN=TOP>Display file browser.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F8\"></a>c-F8</td>\n\n<td VALIGN=TOP>Enter <a href=\"swatcmd.htm#CHAT\">CHAT</a> mode. This allows\ntwo connected machines to test the serial port connection. What you type\nis displayed on the lower screen and sent to the other system; whatever\nis received is displayed on the top screen. If only garbage characters\nappear the two machines may not have the same data transfer rate set.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F9\"></a>c-F9</td>\n\n<td VALIGN=TOP>Attempt to connect for remote debugging. See the section\nat the end of this document on remote debugging.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F10\"></a>c-F10</td>\n\n<td VALIGN=TOP>Display error log.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-F11\"></a>c-F11</td>\n\n<td VALIGN=TOP>Single-step INT-like instruction in VM to PM, otherwise\njust single-step (same as <a href=\"#c-Padplus\">c-Padplus</a>).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-Up\"></a>c-Up</td>\n\n<td VALIGN=TOP>Decrement the location pointer to the previous entry. This\nchange has a different effect depending upon the type of information being\ndisplayed. If used in a data display, it moves back one data item (byte,\nword, dword, etc.). If used in a TSS display, the I/O ports in the I/O\nbit permission map scroll up.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-Down\"></a>c-Down</td>\n\n<td VALIGN=TOP>Increment the location pointer to the next entry. This change\nhas a different effect depending upon the type of information being displayed.\nIf used in a data display, it moves forward one data item (byte, word,\ndword, etc.). If used in a TSS display, the I/O ports in the I/O bit permission\nmap scroll down.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-Home\"></a>c-Home</td>\n\n<td VALIGN=TOP>Place the current instruction at the top of the screen.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-B\"></a>c-B</td>\n\n<td VALIGN=TOP>Display memory in byte (xx) format.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-D\"></a>c-D</td>\n\n<td VALIGN=TOP>Display memory in dword (xxxxxxxx) format.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-G\"></a>c-G</td>\n\n<td VALIGN=TOP>Display memory in GDT format.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-I\"></a>c-I</td>\n\n<td VALIGN=TOP>Display memory in IDT format.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-K\"></a>c-K</td>\n\n<td VALIGN=TOP>Display Windows Kernel Debugger Structures menu. This menu\nmay be displayed only when running under Windows as a kernel debugger.&nbsp;\nSee <a href=\"winkdbg.htm#c-K\">WINKDBG.DOC</a>.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-M\"></a>c-M</td>\n\n<td VALIGN=TOP>Display memory allocation chain entries based at the value\nassigned to <tt><font size=+1><a href=\"swatcmd.htm#MACBASE\">MACBASE</a></font></tt>.\nBy default, this value is the initial value of <tt><font size=+1><a href=\"swatcmr.htm#.DMAC\">.DMAC</a></font></tt>.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-T\"></a>c-T</td>\n\n<td VALIGN=TOP>Display memory in TSS format.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-V\"></a>c-V</td>\n\n<td VALIGN=TOP>Display memory in vector (xxxx:xxxx) format.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-W\"></a>c-W</td>\n\n<td>Display memory in word (xxxx) format.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-Z\"></a>c-Z</td>\n\n<td VALIGN=TOP>Zap (convert to NOPs) the instruction at the top of the\ninstruction disassembly window.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-ESC\"></a>c-ESC</td>\n\n<td VALIGN=TOP>Same as ESC, but if you're on an INT 03h, it skips over\nit first and then continues. If the current instruction is not an INT 03h,\nthis keystroke behaves identically to <a href=\"#ESC\">ESC</a>.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"Padplus\"></a>Padplus</td>\n\n<td VALIGN=TOP>Single-step the current instruction (same as <a href=\"#F11\">F11</a>).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"c-Padplus\"></a>c-Padplus</td>\n\n<td VALIGN=TOP>Single-step INT-like instruction in VM to PM, otherwise\njust single-step (same as <a href=\"#c-F11\">c-F11</a>).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"Padminus\"></a>Padminus</td>\n\n<td VALIGN=TOP>Single-skip the current instruction (same as <a href=\"#F12\">F12</a>).\nThat is, execute the current instruction and put a breakpoint on the instruction\nfollowing. This is used to execute but not single-step through a CALL or\nLOOP instruction.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"Padstar\"></a>Padstar</td>\n\n<td VALIGN=TOP>Goto the instruction on the top line (same as <a href=\"#s-F3\">s-F3</a>).</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"Up\"></a>Up</td>\n\n<td VALIGN=TOP>Scroll the screen up one line. This key has the same effect\nin almost all screen displays.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"Down\"></a>Down</td>\n\n<td VALIGN=TOP>Scroll the screen down one line. This key has the same effect\nin almost all screen displays.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"PgUp\"></a>PgUp</td>\n\n<td VALIGN=TOP>Scroll the screen up one page. This key has the same effect\nin almost all screen displays.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"PgDown\"></a>PgDown</td>\n\n<td VALIGN=TOP>Scroll the screen down one page. This key has the same effect\nin almost all screen displays.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"s-PrtSc\"></a>s-PrtSc</td>\n\n<td VALIGN=TOP>Print the screen. Note that if either the previous application\nscreen (<a href=\"#F10\">F10</a>) or one of the previous debugging screens\n(<a href=\"#a-F10\">a-F10</a>) is currently displayed, that screen is sent\nto the printer. The I/O port in the BIOS data area which corresponds to\nLPT1 is used.</td>\n</tr>\n\n<tr>\n<td VALIGN=TOP><a NAME=\"Ctl-Alt-Del\"></a>Ctl-Alt-Del</td>\n\n<td VALIGN=TOP>Reboot the system.</td>\n</tr>\n</table>\n<!--#include virtual=\"/footer.htm\" -->\n</body>\n</html>\n"
  },
  {
    "path": "swat/SWATSYM.DOC",
    "content": "386SWAT symbolic debugging\n\nThis document covers the basics of symbolic debugging support for\n386SWAT.  The 386SWAT API specifics are documented in SYMBOLS.TXT; here we\nwill describe actual usage of SWAT for symbolic debugging, and the\ntools needed to load symbols.\n\nThere are three sections:\n386SWAT - new profile options and commands\nSWATRUN - program loader for debugging .COM and .EXE files\nMAPSSF\t- symbol loader/translator\n\n386SWAT\nThree profile options are new to SWAT:\n\nSYMSIZE=n\tThis option sets the number of bytes to be used for the\n\t\tSWAT symbol table.  The internal format of SWAT's symbol\n\t\ttable is 12 bytes larger than the symbol table used for\n\t\tthe SWAT API calls.  Each public or line number occupies\n\t\t23 bytes plus the length of the symbol name.\n\n\t\tSYMSIZE is used to calculate a default value for BUCKETS\n\t\t(described below).  If BUCKETS is not explicitly defined\n\t\tin the profile, it will be set to min (255, max (1,\n\t\tSYMSIZE / 4096)).\n\n\t\tIf SYMSIZE is not specified, it will default to 4096 bytes.\n\t\tThe default BUCKETS value (if also not specified) will then\n\t\tbe 1.  See below for BUCKETS storage requirements.\n\n\t\tUse SYMSIZE=0 to minimize symbol storage requirements.\n\t\tThis will save 4K over the default.\n\nBUCKETS=n\tSpecify number of 1K blocks to be used for symbol name\n\t\thashing.  Values less than 1 and over 255 are ignored.\n\n\t\tTo speed symbol name searches, all names are hashed using\n\t\tthe following algorithm:\n\n\t\textern unsigned int HASHPRIME;\n\n\t\tint hashpjw(char *s)\n\t\t{\n\t\t char *p;\n\t\t unsigned long h=0, g;\n\n\t\t for (p=s; *p; p++) {\n\t\t\th = (h << 4) + (unsigned) tolower (*p);\n\t\t\tif (g = (h & 0xf0000000)) {\n\t\t\t  h = h ^ (g >> 24);\n\t\t\t  h = h ^ g;\n\t\t\t}\n\t\t }\n\n\t\t return ((int) (h % HASHPRIME));\n\n\t\t}\n\n\t\tHASHPRIME is derived from a table of prime numbers closest\n\t\tto multiples of 256.  Here are some examples:\n\t\tBUCKETS \tHASHPRIME\n\t\t1\t\t257\n\t\t2\t\t509\n\t\t3\t\t769\n\t\t254\t\t65027\n\t\t255\t\t65287\n\n\t\tThe storage occupied by the name hashing table is\n\t\tHASHPRIMES[BUCKETS-1] * 4, or approximately BUCKETS * 1K.\n\n\t\tWhen a hash value is calculated from a name, that value is\n\t\tshifted left 2 bits and used as an index into the table\n\t\tof dword bucket pointers based at the address contained\n\t\tin SYMNHASH.  A bucket pointer may contain -1 (FFFFFFFF)\n\t\tor an offset from the address contained in SYMBASE.  In\n\t\tthis case, a \"bucket\" actually points to a symbol record.\n\t\tNext name pointers in each symbol record form a linked\n\t\tlist which may be traversed to find an exact name match.\n\n\t\tThe smaller the BUCKETS value, the longer these bucket\n\t\tchains will be, thus increasing name search time.  This\n\t\tis only likely to be a performance hit when loading\n\t\tsymbols, since SWAT checks for existing symbols by name.\n\t\tSearches for symbols entered at the command line would\n\t\tnot be visibly impacted by longer searches.\n\nADDRHBITS=n\tSpecify number of address bits to use for address hash\n\t\ttable.\tValues less than 8 and over 12 are ignored.\n\n\t\tAddress hash table storage in bytes is 2 ^ (ADDRHBITS + 2).\n\t\tThe minimum is therefore 1K and the maximum, 16K.\n\n\t\tADDRHBITS defaults to 12.  When symbols are present,\n\t\tall possible addresses in the disassembly screen\n\t\tare searched against the address hash table.  Possible\n\t\thits require traversal of the address hash buckets chain,\n\t\tsimilar to name hash bucket traversal.\tA \"next address\n\t\tbucket\" pointer is part of the symbol record.  Thus the\n\t\tset of symbol records forms two interleaved linked lists:\n\t\tthe address bucket chain and the name bucket chain.\n\n\t\tThe number of bits specified by ADDRHBITS are taken from\n\t\ta resolved linear address, shifted left 2 bits, and used\n\t\tas an index into the table of dword pointers based at the\n\t\taddress contained in SYMNHASH.\tThe address pointed to is\n\t\tan offset from the address in SYMBASE, and points to the\n\t\tbeginning symbol record in that address bucket chain.  If\n\t\tthe value is -1 (FFFFFFFF), there is no such address.\n\n\t\tSmaller address hash tables may significantly impact\n\t\tunassembly.\n\nUsing symbols\n\nAny symbol may be used as an effective address.  For example,\n\ndd 180|{SYMHASH\n\nwill display the symbol address hash table.  Symbol display will occur\nautomatically if the symbols are loaded properly.  See sections below\non SWATRUN and MAPSSF.\n\nSymbols are displayed in the Unassemble (F9) screen.  Code addresses\nmay be displayed as public names or line numbers (if line numbers\nwere specified with the linker's /LI option).  Addresses within the\nunassembly are handled as intelligently as possible.  For example,\n\nmov ax,[bx+7c39]\n\nmay be displayed as\n\nmov ax,[bx+FOOBAR]\n\nif FOOBAR's offset is 7c39 and the default segment/selector (DS in this case)\nmatches the segment/selector specified for the symbol FOOBAR.\n\nSWAT can now resolve addresses CLOSE TO symbols; a construction commonly\nseen in C code might be:\n\nmov [FOOBAR],bx\nmov [7c3b],es\n\nSWAT will disassemble this as\n\nmov [FOOBAR],bx\nmov [FOOBAR+02],es\n\nThe PROXSRCH variable determines how far SWAT continues proximity searches\nand with what granularity.  The default is 1 word.  Currently, the only\nway to change this is by editing the memory location where PROXSRCH is\nstored.  The high order byte of PROXSRCH contains the granularity in bytes,\nand the low order byte contains the number of units to search.\tThe default\nis 0201h.  0108h would do byte granular searches from x+1 to x+8.\n\nProximity searches should not visibly impact disassembly performance.\nA separate check for an empty symbol table ensures that no time is\nwasted in unnecessary calls to the symbol search routine (which has\nits own check for empty tables).  No proximity searches are done for\nlabel display and data display; this only affects values within the\ndisassembly.\n\nA future enhancement would be to implement a profile option to set\nPROXSRCH.  It should also be settable from the command line.\n\nAnother useful feature would be to turn off case sensitivity when searching\nfor symbol matches.  This is more of an issue when debugging C code. Again,\nit could be settable in the profile as well as from the command line.\n\nNew commands within SWAT\n\nThe Translate Symbols (TS) command may be used to adjust segment/selector\nvalues, as well as to add a constant to symbol offsets, after the symbols\nare loaded.  This is needed for debugging the VXD.  The VXD symbols would\nbe loaded with MAPSSF, using a .wsg file to assign selector values and\ngroup ID's to the different linker groups.  Once SWATVXD has located the\noffsets of the different VXD groups, they may be translated one at a time.\n\nFor example, the VXD's DGROUP is assigned selector 28, group ID 2001, and\nIGROUP is assigned selector 30, group ID 2002.\tThe .WSG file entries are:\n\n  2001\tP\t28\tDGROUP\t\t; Comments\n  2002\tP\t30\tIGROUP\t\t; More comments\n\nWe load the .MAP file before entering Windows:\n\nMAPSSF -wVXD.WSG VXD.MAP\n\nWe find that the offsets within the Windows flat model segment are\nDGROUP\t8001BE24\nIGROUP\t8020397C\n\nThe TS command is used to translate both groups:\n\nts 28 2001 P 28 8001BE24\nts 30 2002 P 30 8020397C\n\nThe complete syntax of the TS command is:\n\nTS osel ogrp nflag nsel nbase\n\nosel\tOld selector value\nogrp\tTarget group value (unless specified in .WSG file, 0)\nnflag\tP for PM symbols\n\tV for VM symbols\nnsel\tNew selector value (in above example, unchanged)\nnbase\tBase value to be added to all symbol offsets\n\n\nSWATRUN\n\nSyntax: SWATRUN [options] progname [arguments]\n\nSWATRUN is a program loader for debugging V86 mode programs.  It\ncreates a breakpoint before the first instruction of the target\nprogram, and will also attempt to load symbols into SWAT via the\nVCPI debugger API with the appropriate segment fixup.\n\nIf no file extension is specified, SWATRUN looks first for a .COM\nfile then an .EXE file.  The filename specified is converted into\na fully qualified pathname including drive letter, directory, and\nextension.  SWATRUN will load this file using the undocumented DOS\nfunction 4B01 to determine the segment fixup.\n\nSWATRUN will then look for a matching .SSF file, and\nif found, will load it directly into SWAT.  If an .SSF file is not\nfound, SWATRUN will look for a matching .MAP file.  If a .MAP file\nis found, SWATRUN will invoke MAPSSF with the proper parameters\nto fixup and load the parsed .MAP file.  See the section on MAPSSF\nfor further information on .MAP file formats supported and on\ncreation of .SSF files.  .SSF file loading is faster, but does not\ncurrently report symbol allocation table shortages.  If your\nsymbols do not appear to be loaded from an .SSF file, delete\nthe .SSF file.\tSWATRUN will try to load symbols from the .MAP file\nwith MAPSSF.  MAPSSF will report any changes required to the\n386SWAT.PRO file.\n\n\n  Valid SWATRUN options are:\n\n    /b\t Generate Int 1 at beginning of SWATRUN\n\t This is useful only for debugging the loading process\n\n    /mMAPFILE Load MAPFILE instead of progname.map\n\t If no .SSF file is present, SWATRUN constructs a map file\n\t name by taking the path and basename of the .EXE or .COM\n\t file and adding .MAP.\tThis filename is passed to MAPSSF\n\t if it exists.\tThis option may be used to specify a map\n\t file on another drive:directory.\n\n    /n\t Do not load symbols\n\t If SWATRUN has already run once, the target program did not\n\t go resident, and symbols were loaded, run SWATRUN with this\n\t option on subsequent invocations.\n\n    /o\t Overwrite existing SWAT symbols\n\t This option is passed to MAPSSF.  Any existing symbols will\n\t be destroyed.\n\n    /sSYMFILE Load SYMFILE instead of progname.ssf\n\t SWATRUN normally constructs a .ssf file name by taking\n\t the path and basename of the .EXE or .COM file and adding\n\t .SSF.\tIf this file exists and is in the proper format\n\t created by MAPSSF, it will be loaded into 386SWAT.\n\n    /?\t Display this message\n\n\nMAPSSF\n\nThis program is called by SWATRUN to load .MAP files on the fly.\nIt may also be used to produce .SSF files for loading at CONFIG.SYS time\n(not currently supported by SWAT).  .SSF files may also be loaded\ndirectly by SWATRUN.  This is faster than calling MAPSSF every time\nsymbols are loaded.\n\nBesides reading .MAP files, MAPSSF will also process Windows SYM32 files.\nMAPSSF has been tested with the following .MAP file formats:\n- Microsoft LINK\n- Microsoft LINK386 flat model\n- Borland TLINK\n\nSyntax:\n\nMapSSF [options] fspec1 [fspec2 [...]]\n\nAll options are preceded with - or /:\n\n  -g#,# \trestrict symbol group types to specified #'s\n\t\t(SYM32 files only)  Only symbols with group types matching\n\t\tone of these values will be loaded.  The group type in\n\t\tSYM32 files is NOT the same as the group ID defined\n\t\tin a .WSG file.\n\n  -l\t\tignore line number information in .MAP file\n\t\tThis option may be used to suppress loading of line number\n\t\tsymbols when space is at a premium.  Typically, line\n\t\tnumbers take about 80% of symbol space.\n\n  -o\t\toverwrite existing symbol table (default is append)\n\t\tNormally, new symbols are added to SWAT.  Existing\n\t\tsymbols will be updated.  This option forces the\n\t\tsymbol table to be flushed at the beginning of MAPSSF.\n\n  -sxxxxm\tset selector to xxxx hex, where m is\n\t\tv for V86/real mode\n\t\tv+ for V86/real mode, add value to segment,\n\t\tp for protected mode\n\t\tThe -sxxxxv+ form is used by SWATRUN to add a fixup to all\n\t\tsegment values.\n\n  -tfname\techo SWAT tables to file fname\n\t\tThis option may be used to create a file in SWAT symbol\n\t\tformat (.ssf file).\n\n  -wfname[.wsg] read Windows Symbol Group file fname.wsg\n\t\tThis feature may be used for .MAP files or for .SYM files.\n\t\tAs an example, the QMAX.WSG file contains:\n\n; group mode\tsel\tgroup[!segment]\n\n  3000\tP\t50\tPGROUP\t\t; 386MAX code\n  3001\tP\t18\tPGROUP!EDATA\t; 386MAX data\n  3001\tP\t18\tPGROUP!VALSEG\t; 386MAX data\n  0\tD\t 0\tPGROUP!NCODE\t; 386MAX non-resident code\n  0\tD\t 0\tPGROUP!NDATA\t; 386MAX non-resident data\n  3002\tP      118\tIGROUP!ICODE\t; 386MAX extra code\n  3003\tP      120\tIGROUP!IDATA\t; 386MAX extra data\n  0\tD\t 0\tXGROUP\t\t; 386MAX non-resident code/data\n  0\tD\t 0\tPSPGRP\t\t; PSP group (non-resident)\n  3004\tP\t70\tPDTGRP\t\t; OFFPDT group (uninitialized)\n\n\t\tNote that all groups listed with unique segment values\n\t\tin the Group section of the MAP file are listed.  The\n\t\treal mode groups XGROUP and PSPGRP will not be loaded.\n\n\t\tAssociation of public symbols with groups is sometimes\n\t\tnot sufficient.  Both code and data are in PGROUP, but\n\t\tdifferent selectors are used.  We therefore specify the\n\t\tindividual data segments within PGROUP that will be\n\t\tassigned selector 18 (EDATA and VALSEG).  Since segments\n\t\tare more completely specified in the MAP file than\n\t\tgroups, MAPSSF will check for segment matches before\n\t\tchecking for group matches.  We also use this mechanism\n\t\tto avoid loading the NCODE and NDATA segments within\n\t\tPGROUP.\n\n\t\tGroup matches are made by checking group origin values,\n\t\twhich are sorted by value in descending order, against\n\t\taddresses.  ALL groups which COULD include an address,\n\t\tfrom highest to lowest, are checked for inclusion in\n\t\tthe .WSG file.\tThe first match determines what changes\n\t\tare made to the matching symbol address.\n\n  -v\t\tsort symbols by value (default is by name)\n\t\tThis option controls which section of the .MAP file is\n\t\tread.  If included on the command line, the \"By Value\"\n\t\tsection is read.  By default, the \"By Name\" section is\n\t\tread.  By controlling the order in which symbols are passed\n\t\tto SWAT, the display in SWAT's Ctrl-F6 screen may be\n\t\tsorted by name or by value.\n\n  -x#\t\tset debugging level to # (default is 0 -- no messages)\n\t\tThis is useful for debugging only.\n\n  -y\t\tdefault to recognizing files as SYM32 format\n\t\tNormally, MAPSSF recognizes files as .MAP or .SYM by\n\t\ttheir extension.  If neither extension is used, this\n\t\toption forces recognition as SYM32.\n\n\u001a"
  },
  {
    "path": "swat/SWATSYM.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <TITLE>386SWAT Symbols Documentation</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>386SWAT Symbolic Debugging</FONT></B></CENTER>\n\n\n<P>This document covers the basics of symbolic debugging support for 386SWAT.&nbsp; \n  The 386SWAT API specifics are documented in <a href=\"vcpidbg.htm#DEF6\">VCPIDBG.DOC</a>; \n  here we will describe actual usage of SWAT for symbolic debugging, and the tools \n  needed to load symbols. \n<P><A HREF=\"#386SWAT Profile Options\">386SWAT Profile Options</A>\n\n<P><A HREF=\"#Using Symbols\">Using symbols</A>\n\n<P><A HREF=\"#New Commands Within 386SWAT\">New Commands Within 386SWAT</A>\n\n<P><A HREF=\"#Utility Programs\">Utility Programs</A>\n<CENTER><A NAME=\"386SWAT Profile Options\"></A><B>386SWAT Profile Options</B></CENTER>\n\n\n<P>Several profile options are new to 386SWAT:\n\n<P><A NAME=\"ADDRHBITS\"></A><B><TT><FONT SIZE=+1>ADDRHBITS=</FONT></TT><I>n</I></B>\n\n<P>Specify number of address bits to use for address hash table.&nbsp;\nValues less than 8 and over 12 are ignored.\n\n<P>Address hash table storage in bytes is <TT><FONT SIZE=+1>2 ^ (ADDRHBITS\n+ 2)</FONT></TT>.&nbsp; The minimum is therefore 1K and the maximum, 16K.\n\n<P><TT><FONT SIZE=+1>ADDRHBITS</FONT></TT> defaults to 12.&nbsp; When symbols\nare present, all possible addresses in the disassembly screen are searched\nagainst the address hash table.&nbsp; Possible hits require traversal of\nthe address hash buckets chain, similar to name hash bucket traversal.&nbsp;\nA \"next address bucket\" pointer is part of the symbol record.&nbsp; Thus\nthe set of&nbsp; symbol records forms two interleaved linked lists: the\naddress bucket chain and the name bucket chain.\n\n<P>The number of bits specified by <TT><FONT SIZE=+1>ADDRHBITS</FONT></TT>\nare taken from a resolved linear address, shifted left 2 bits, and used\nas an index into the table of dword pointers based at the address contained\nin <TT><FONT SIZE=+1>SYMNHASH</FONT></TT>.&nbsp; The address pointed to\nis an offset from the address in <TT><FONT SIZE=+1>SYMBASE</FONT></TT>,\nand points to the beginning symbol record in that address bucket chain.&nbsp;\nIf the value is -1 (FFFFFFFF), there is no such address.\n\n<P>Smaller address hash tables may significantly impact unassembly.\n<BR>&nbsp;\n\n<P><A NAME=\"BUCKETS\"></A><B><TT><FONT SIZE=+1>BUCKETS=</FONT></TT><I>n</I></B>\n\n<P>Specify number of 1K blocks to be used for symbol name hashing.&nbsp;\nValues less than 1 and over 255 are ignored.\n\n<P>To speed symbol name searches, all names are hashed using the following\nalgorithm:\n\n<P><TT><FONT SIZE=+1>extern unsigned int HASHPRIME;</FONT></TT>\n\n<P><TT><FONT SIZE=+1>int hashpjw(char *s)</FONT></TT>\n<BR><TT><FONT SIZE=+1>{</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; char *p;</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; unsigned long h=0, g;</FONT></TT>\n\n<P><TT><FONT SIZE=+1>&nbsp; for (p=s; *p; p++) {</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; h = (h &lt;&lt;\n4) + (unsigned) tolower (*p);</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (g = (h &amp;\n0xf0000000)) {</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nh = h ^ (g >> 24);</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nh = h ^ g;</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; }</FONT></TT>\n\n<P><TT><FONT SIZE=+1>&nbsp; return ((int) (h % HASHPRIME));</FONT></TT>\n<BR><TT><FONT SIZE=+1>}</FONT></TT>\n\n<P><TT><FONT SIZE=+1>HASHPRIME</FONT></TT> is derived from a table of prime\nnumbers closest to multiples of 256.&nbsp; Here are some examples:\n\n<P><TT><FONT SIZE=+1>BUCKETS&nbsp;&nbsp;&nbsp; HASHPRIME</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n257</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n509</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n769</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; 254&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 65027</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; 255&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 65287</FONT></TT>\n\n<P>The storage occupied by the name hashing table is <TT><FONT SIZE=+1>HASHPRIMES[BUCKETS-1]\n* 4</FONT></TT>, or approximately <TT><FONT SIZE=+1>BUCKETS * 1K</FONT></TT>.\n\n<P>When a hash value is calculated from a name, that value is shifted left\n2 bits and used as an index into the table of dword bucket pointers based\nat the address contained in <TT><FONT SIZE=+1>SYMNHASH</FONT></TT>.&nbsp;\nA bucket pointer may contain -1 (FFFFFFFF) or an offset from the address\ncontained in <TT><FONT SIZE=+1>SYMBASE</FONT></TT>.&nbsp; In this case,\na \"bucket\" actually points to a symbol record.&nbsp; Next name pointers\nin each symbol record form a linked list which may be traversed to find\nan exact name match.\n\n<P>The smaller the <TT><FONT SIZE=+1>BUCKETS</FONT></TT> value, the longer\nthese bucket chains will be, thus increasing name search time.&nbsp; This\nis only likely to be a performance hit when loading symbols, since 386SWAT\nchecks for existing symbols by name.&nbsp; Searches for symbols entered\nat the command line would not be visibly impacted by longer searches.\n<BR>&nbsp;\n\n<P><A NAME=\"LOADSYM\"></A><B><TT><FONT SIZE=+1>LOADSYM</FONT></TT></B>&nbsp;&nbsp;&nbsp;&nbsp;\nEnable file I/O functions within 386SWAT.&nbsp; This is needed for using\nthe file browser, and for source level debugging.\n\n<P><B><TT><FONT SIZE=+1>LOADSYM=</FONT></TT></B><I>filename.ssf</I>\n\n<P>Enables file I/O (same as <TT><FONT SIZE=+1>LOADSYM</FONT></TT>).&nbsp;\nAlso loads symbols from the specified .SSF file (created by <TT><FONT SIZE=+1><A HREF=\"#MAPSSF\">MAPSSF</A></FONT></TT>)\nat initialization time.\n<BR>&nbsp;\n\n<P><A NAME=\"PATH\"></A><B><TT><FONT SIZE=+1>PATH=</FONT></TT><I>d:\\dir1[,d:\\dir2[,...]]</I></B>\n\n<P>Specify search path for source browser.&nbsp; If not specified, only\nthe current directory is searched.&nbsp; If a path is specified, the current\ndirectory (.) must be included explicitly.&nbsp; For example, <TT><FONT SIZE=+1>PATH=c:\\qui\\quilib,c:\\qui\\inst</FONT></TT>\nwill not search the current directory for source files.\n<BR>&nbsp;\n\n<P><A NAME=\"PROXSRCH\"></A><B><TT><FONT SIZE=+1>PROXSRCH=</FONT></TT><I>r</I>[<TT><FONT SIZE=+1>,</FONT></TT><I>g</I>]</B>\n\n<P>Specify how far 386SWAT continues proximity searches and with what granularity.&nbsp;\nThe default is 1 word.&nbsp; The high order byte of PROXSRCH contains the\ngranularity in bytes, and the low order byte contains the number of units\nto search.&nbsp; The default is <TT><FONT SIZE=+1>0201h</FONT></TT>.&nbsp;\n<TT><FONT SIZE=+1>0108h</FONT></TT> would do byte granular searches from\nx+1 to x+8.\n\n<P>Proximity searches should not visibly impact disassembly performance.&nbsp;\nA separate check for an empty symbol table ensures that no time is wasted\nin unnecessary calls to the symbol search routine (which has its own check\nfor empty tables).&nbsp; No proximity searches are done for label display\nand data display; this only affects values within the disassembly.\n\n<P>The command line option <TT><FONT SIZE=+1><A HREF=\"swatcmd.htm#PS\">PS</A></FONT></TT>\nallows these settings to be changed on the fly.\n<BR>&nbsp;\n\n<P><A NAME=\"SYMSIZE\"></A><B><TT><FONT SIZE=+1>SYMSIZE=</FONT></TT><I>n</I></B>\n\n<P>This option sets the number of bytes to be used for the 386SWAT symbol\ntable.&nbsp; The internal format of 386SWAT's symbol table is 12 bytes\nlarger than the symbol table used for the 386SWAT API calls.&nbsp; Each\npublic or line number occupies 23 bytes plus the length of the symbol name.\n\n<P>SYMSIZE is used to calculate a default value for BUCKETS (described\nbelow).&nbsp; If BUCKETS is not explicitly defined in the profile, it will\nbe set to <TT><FONT SIZE=+1>min (255, max (1, SYMSIZE / 4096))</FONT></TT>.\n\n<P>If SYMSIZE is not specified, it will default to 4096 bytes.&nbsp; The\ndefault BUCKETS value (if also not specified) will then be 1.&nbsp; See\nbelow for BUCKETS storage requirements.\n\n<P>Use <TT><FONT SIZE=+1>SYMSIZE=0</FONT></TT> to minimize symbol storage\nrequirements.&nbsp; This will save 4K over the default.\n<BR>&nbsp;\n<CENTER><A NAME=\"Using Symbols\"></A><B>Using symbols</B></CENTER>\n\n\n<P>Any symbol may be used as an effective address.&nbsp; For example,\n\n<P><TT><FONT SIZE=+1>dd 180|{SYMHASH</FONT></TT>\n\n<P>will display the symbol address hash table.&nbsp; Symbol display occurs\nautomatically if the symbols are loaded properly.&nbsp; See sections below\non <A HREF=\"#SWATRUN\">SWATRUN</A> and <A HREF=\"#MAPSSF\">MAPSSF</A>.\n\n<P>Symbols are displayed in the Unassemble (F9) screen.&nbsp; Code addresses\nmay be displayed as public names or line numbers (if line numbers were\nspecified with the linker's <TT><FONT SIZE=+1>/LI</FONT></TT> option).&nbsp;\nAddresses within the unassembly are handled as intelligently as possible.&nbsp;\nFor example,\n\n<P><TT><FONT SIZE=+1>mov ax,[bx+7c39]</FONT></TT>\n\n<P>may be displayed as\n\n<P><TT><FONT SIZE=+1>mov ax,[bx+FOOBAR]</FONT></TT>\n\n<P>if FOOBAR's offset is <TT><FONT SIZE=+1>7C39</FONT></TT> and the default\nsegment/selector (DS in this case) matches the segment/selector specified\nfor the symbol FOOBAR.\n\n<P>386SWAT can now resolve addresses CLOSE TO symbols; a construction commonly\nseen in C code might be:\n\n<P><TT><FONT SIZE=+1>mov [FOOBAR],bx</FONT></TT>\n<BR><TT><FONT SIZE=+1>mov [7c3b],es</FONT></TT>\n\n<P>386SWAT will disassemble this as\n\n<P><TT><FONT SIZE=+1>mov [FOOBAR],bx</FONT></TT>\n<BR><TT><FONT SIZE=+1>mov [FOOBAR+02],es</FONT></TT>\n\n<P>Another useful feature would be to turn off case sensitivity when searching\nfor symbol matches.&nbsp; This is more of an issue when debugging C code.\nAgain, it could be settable in the profile as well as from the command\nline.\n<BR>&nbsp;\n<CENTER><A NAME=\"New Commands Within 386SWAT\"></A><B>New Commands Within\n386SWAT</B></CENTER>\n\n\n<P>The Translate Symbols (<TT><FONT SIZE=+1>TS</FONT></TT>) command may\nbe used to adjust segment/selector values, as well as to add a constant\nto symbol offsets, after the symbols are loaded.&nbsp; This is needed for\ndebugging the VxD.&nbsp; The VxD symbols would be loaded with <A HREF=\"#MAPSSF\">MAPSSF</A>,\nusing a .wsg file to assign selector values and group ID's to the different\nlinker groups.&nbsp; Once <A HREF=\"swatvxd.htm\">SWATVXD</A> has located\nthe offsets of the different VxD groups, they may be translated one at\na time.\n\n<P><A NAME=\".WSG File\"></A>For example, the VxD's <TT><FONT SIZE=+1>DGROUP</FONT></TT>\nis assigned selector <TT><FONT SIZE=+1>28</FONT></TT>, group ID <TT><FONT SIZE=+1>2001</FONT></TT>,\nand <TT><FONT SIZE=+1>IGROUP</FONT></TT> is assigned selector <TT><FONT SIZE=+1>30</FONT></TT>,\ngroup ID <TT><FONT SIZE=+1>2002</FONT></TT>.&nbsp; The .WSG file entries\nare\n\n<P><TT><FONT SIZE=+1>&nbsp; 2001&nbsp; P&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DGROUP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Comments</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp; 2002&nbsp; P&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n30&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IGROUP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; More comments</FONT></TT>\n\n<P>We load the .MAP file before entering Windows:\n\n<P><TT><FONT SIZE=+1>MAPSSF -wVXD.WSG VXD.MAP</FONT></TT>\n\n<P>We find that the offsets within the Windows flat model segment are\n\n<P><TT><FONT SIZE=+1>DGROUP&nbsp; 8001BE24</FONT></TT>\n<BR><TT><FONT SIZE=+1>IGROUP&nbsp; 8020397C</FONT></TT>\n\n<P>The TS command is used to translate both groups:\n\n<P><TT><FONT SIZE=+1>ts 28 2001 P 28 8001BE24</FONT></TT>\n<BR><TT><FONT SIZE=+1>ts 30 2002 P 30 8020397C</FONT></TT>\n\n<P>The complete syntax of the TS command is\n\n<P><TT><FONT SIZE=+1>TS </FONT></TT><I>osel ogrp nflag nsel nbase</I>\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<TR VALIGN=TOP>\n<TD><I>osel</I></TD>\n\n<TD>Old selector value</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><I>ogrp</I></TD>\n\n<TD>Target group value (unless specified in .WSG file, <TT><FONT SIZE=+1>0</FONT></TT>)</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><I>nflag</I></TD>\n\n<TD><TT><FONT SIZE=+1>P</FONT></TT> for PM symbols&nbsp;\n<BR><TT><FONT SIZE=+1>V</FONT></TT> for VM symbols</TD>\n</TR>\n\n<TR>\n<TD><I>nsel</I></TD>\n\n<TD>New selector value (in above example, unchanged)</TD>\n</TR>\n\n<TR>\n<TD><I>nbase</I></TD>\n\n<TD>Base value to be added to all symbol offsets</TD>\n</TR>\n</TABLE>\n&nbsp;\n\n<P>The Query Symbol (<TT><FONT SIZE=+1>QS</FONT></TT>) command may be used\nto display on the command line the name and distance from a given address.&nbsp;\nFor example,\n\n<P><TT><FONT SIZE=+1>QS .code</FONT></TT>\n\n<P>might display as\n\n<P><TT><FONT SIZE=+1>QS .code = VWIN32_Code0001+00005678</FONT></TT>\n<BR>&nbsp;\n<CENTER><A NAME=\"Utility Programs\"></A><B>Utility Programs</B></CENTER>\n\n\n<P><A NAME=\"MAPSSF\"></A><B>MAPSSF</B>\n\n<P>This program is called by SWATRUN to load .MAP files on the fly.&nbsp;\nIt may also be used to produce .SSF files for loading at CONFIG.SYS time\n(not currently supported by SWAT).&nbsp; .SSF files may also be loaded\ndirectly by SWATRUN.&nbsp; This is faster than calling MAPSSF every time\nsymbols are loaded.\n\n<P>Besides reading .MAP files, MAPSSF will also process Windows SYM32 files.&nbsp;\nMAPSSF has been tested with the following .MAP file formats:\n\n<P>- Microsoft LINK\n<BR>- Microsoft LINK386 flat model\n<BR>- Borland TLINK\n\n<P>Syntax:\n\n<P><TT><FONT SIZE=+1>MapSSF </FONT></TT>[<I>options</I>]<I> fspec1 </I>[<I>fspec2\n</I>[...]]\n\n<P>All options are preceded with <TT><FONT SIZE=+1>-</FONT></TT> or <TT><FONT SIZE=+1>/</FONT></TT>\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-g</FONT></TT><I>#</I><TT><FONT SIZE=+1>,</FONT></TT><I>#</I></TD>\n\n<TD>restrict symbol group types to specified #'s (SYM32 files only).&nbsp;\nOnly symbols with group types matching one of these values will be loaded.&nbsp;\nThe group type in SYM32 files is NOT the same as the group ID defined in\na .WSG file.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-l</FONT></TT></TD>\n\n<TD>ignore line number information in .MAP file.&nbsp; This option may\nbe used to suppress loading of line number symbols when space is at a premium.&nbsp;\nTypically, line numbers take about 80% of symbol space.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-o</FONT></TT></TD>\n\n<TD>overwrite existing symbol table (default is append).&nbsp; Normally,\nnew symbols are added to SWAT.&nbsp; Existing&nbsp;\n<BR>symbols will be updated.&nbsp; This option forces the symbol table\nto be flushed at the beginning of MAPSSF.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-s</FONT></TT><I>xxxxm</I></TD>\n\n<TD>set selector to <I>xxxx</I> hex, where <I>m</I> is&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>v</FONT></TT></TD>\n\n<TD>for V86/real mode</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>v+</FONT></TT></TD>\n\n<TD>for V86/real mode, add value to segment,</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>p</FONT></TT></TD>\n\n<TD>for protected mode</TD>\n</TR>\n</TABLE>\nThe <TT><FONT SIZE=+1>-s</FONT></TT><I>xxxx</I><TT><FONT SIZE=+1>v+</FONT></TT>\nform is used by SWATRUN to add a fixup to all segment values.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-t</FONT></TT><I>fname</I></TD>\n\n<TD>echo 386SWAT tables to file <I>fname</I>.&nbsp; This option may be\nused to create a file in 386SWAT symbol format (.SSF file).</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-w</FONT></TT><I>fname[.wsg]</I></TD>\n\n<TD>read Windows Symbol Group file fname.wsg.&nbsp; This feature may be\nused for .MAP files or for .SYM files.&nbsp; As an example, the QMAX.WSG\nfile contains:&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>group</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>mode</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>sel</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>group[!segment]</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; comment</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>3000</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>P</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>50</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>PGROUP</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; 386MAX code</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>3001</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>P</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>18</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>PGROUP!EDATA</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; 386MAX data</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>3001</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>P</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>18</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>PGROUP!VALSEG</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; 386MAX data</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>0</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>D</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>0</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>PGROUP!NCODE</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; 386MAX non-resident code</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>0</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>D</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>0</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>PGROUP!NDATA</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; 386MAX non-resident data</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>3002</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>P</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>118</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>IGROUP!ICODE</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; 386MAX extra code</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>3003</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>P</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>120</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>IGROUP!IDATA</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; 386MAX extra data</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>0</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>D</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>0</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>XGROUP</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; 386MAX non-resident code/data</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>0</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>D</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>0</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>PSPGRP</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; PSP group (non-resident)</FONT></TT></TD>\n</TR>\n\n<TR ALIGN=RIGHT VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>3004</FONT></TT></TD>\n\n<TD ALIGN=CENTER><TT><FONT SIZE=+1>P</FONT></TT></TD>\n\n<TD><TT><FONT SIZE=+1>70</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>PDTGRP</FONT></TT></TD>\n\n<TD ALIGN=LEFT><TT><FONT SIZE=+1>; OFFPDT group (uninitialized)</FONT></TT></TD>\n</TR>\n</TABLE>\nNote that all groups listed with unique segment values in the Group section\nof the MAP file are listed.&nbsp; The real mode groups a <TT><FONT SIZE=+1>XGROUP</FONT></TT>\nand <TT><FONT SIZE=+1>PSPGRP</FONT></TT> will not be loaded.&nbsp;\n\n<P>Association of public symbols with groups is sometimes not sufficient.&nbsp;\nBoth code and data are in <TT><FONT SIZE=+1>PGROUP</FONT></TT>, but different\nselectors are used.&nbsp; We therefore specify the individual data segments\nwithin <TT><FONT SIZE=+1>PGROUP</FONT></TT> that will be assigned selector\n<TT><FONT SIZE=+1>18h</FONT></TT> (<TT><FONT SIZE=+1>EDATA</FONT></TT>\nand <TT><FONT SIZE=+1>VALSEG</FONT></TT>).&nbsp; Since segments are more\ncompletely specified in the MAP file than groups, MAPSSF will check for\nsegment matches before checking for group matches.&nbsp; We also use this\nmechanism to avoid loading the <TT><FONT SIZE=+1>NCODE</FONT></TT> and\n<TT><FONT SIZE=+1>NDATA</FONT></TT> segments within <TT><FONT SIZE=+1>PGROUP</FONT></TT>.&nbsp;\n\n<P>Group matches are made by checking group origin values, which are sorted\nby value in descending order, against addresses.&nbsp; ALL groups which\nCOULD include an address, from highest to lowest, are checked for inclusion\nin the .WSG file.&nbsp; The first match determines what changes are made\nto the matching symbol address.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-v</FONT></TT></TD>\n\n<TD>sort symbols by value (default is by name).&nbsp; This option controls\nwhich section of the .MAP file is read.&nbsp; If included on the command\nline, the \"By Value\" section is read.&nbsp; By default, the \"By Name\" section\nis read.&nbsp; By controlling the order in which symbols are passed to\nSWAT, the display in SWAT's Ctrl-F6 screen may be sorted by name or by\nvalue.&nbsp;</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-x</FONT></TT><I>#</I></TD>\n\n<TD>set debugging level to <I>#</I> (default is <TT><FONT SIZE=+1>0</FONT></TT>\n-- no messages).&nbsp; This is useful for debugging only.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>-y</FONT></TT></TD>\n\n<TD>default to recognizing files as SYM32 format.&nbsp; Normally, MAPSSF\nrecognizes files as .MAP or .SYM by their extension.&nbsp; If neither extension\nis used, this option forces recognition as SYM32.&nbsp;</TD>\n</TR>\n</TABLE>\n&nbsp;\n\n<P><A NAME=\"SWATCMD\"></A><B>SWATCMD</B>\n\n<P>Syntax:&nbsp; <TT><FONT SIZE=+1>Device=</FONT></TT><I>d:\\path\\</I>swatcmd.exe\n<I>command</I>\n<BR>&nbsp; or&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; swatcmd <I>command</I>\n\n<P><TT><FONT SIZE=+1>SWATCMD</FONT></TT> can be loaded via <TT><FONT SIZE=+1>Device=</FONT></TT>\nor from the DOS command line.&nbsp; It may be used to pass commands to\n386SWAT under program control.&nbsp; Invoking <TT><FONT SIZE=+1>SWATCMD</FONT></TT>\nwith no options brings up 386SWAT at an INT 03h (assuming <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#TRAPSKIP\">TRAPSKIP</A>\n</FONT></TT>or <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#TRAPDEBUG\">TRAPDEBUG</A>\n</FONT></TT>is active).\n<BR>&nbsp;\n\n<P><A NAME=\"SWATRUN\"></A><B>SWATRUN</B>\n\n<P>Syntax: <TT><FONT SIZE=+1>SWATRUN</FONT></TT> <I>[options] progname\n[arguments]</I>\n\n<P>SWATRUN is a program loader for debugging V86 mode programs.&nbsp; It\ncreates a breakpoint before the first instruction of the target program,\nand will also attempt to load symbols into 386SWAT via the VCPI debugger\nAPI (<A HREF=\"vcpidbg.htm\">VCPIDBG.DOC</A>) with the appropriate segment\nfixup.\n\n<P>If no file extension is specified, SWATRUN looks first for a .COM file\nthen an .EXE file.&nbsp; The filename specified is converted into a fully\nqualified pathname including drive letter, directory, and extension.&nbsp;\nSWATRUN will load this file using&nbsp; DOS function 4B01 to determine\nthe segment fixup.\n\n<P>SWATRUN will then look for a matching .SSF file, and if found, will\nload it directly into 386SWAT.&nbsp; If an .SSF file is not found, SWATRUN\nwill look for a matching .MAP file.&nbsp; If a .MAP file is found, SWATRUN\nwill invoke MAPSSF with the proper parameters to fixup and load the parsed\n.MAP file.&nbsp; See the section on MAPSSF for further information on .MAP\nfile formats supported and on creation of .SSF files.&nbsp; .SSF file loading\nis faster, but does not currently report symbol allocation table shortages.&nbsp;\nIf your symbols do not appear to be loaded from an .SSF file, delete the\n.SSF file.&nbsp; SWATRUN will try to load symbols from the .MAP file with\nMAPSSF.&nbsp; MAPSSF will report any changes required to the 386SWAT.PRO\nfile.\n<BR>&nbsp;\n<BR>Valid SWATRUN options are\n<BR>&nbsp;\n<TABLE BORDER=0 CELLSPACING=10 >\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>/b</FONT></TT></TD>\n\n<TD>Generate Int 1 at beginning of SWATRUN.&nbsp; This is useful only for\ndebugging the loading process</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>/m</FONT></TT><I>MAPFILE</I></TD>\n\n<TD>Load <I>MAPFILE</I> instead of progname.map.&nbsp; If no .SSF file\nis present, SWATRUN constructs a map file name by taking the path and basename\nof the .EXE or .COM file and adding .MAP.&nbsp; This filename is passed\nto MAPSSF if it exists.&nbsp; This option may be used to specify a map\nfile on another drive:directory.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>/n</FONT></TT></TD>\n\n<TD>Do not load symbols.&nbsp; If SWATRUN has already run once, the target\nprogram did not go resident, and symbols were loaded, run SWATRUN with\nthis option on subsequent invocations.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>/o</FONT></TT></TD>\n\n<TD>Overwrite existing SWAT symbols.&nbsp; This option is passed to MAPSSF.&nbsp;\nAny existing symbols will be destroyed.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>/s</FONT></TT><I>SYMFILE</I></TD>\n\n<TD>Load SYMFILE instead of progname.ssf.&nbsp; SWATRUN normally constructs\na .ssf file name by taking the path and basename of the .EXE or .COM file\nand adding .SSF.&nbsp; If this file exists and is in the proper format\ncreated by MAPSSF, it will be loaded into 386SWAT.</TD>\n</TR>\n\n<TR VALIGN=TOP>\n<TD><TT><FONT SIZE=+1>/?</FONT></TT></TD>\n\n<TD>Display a help message.</TD>\n</TR>\n</TABLE>\n<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATVER.HTM",
    "content": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n<html>\n<head>\n   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n   <meta name=\"GENERATOR\" content=\"Mozilla/4.76 [en]C-CCK-MCD   (Win98; U) [Netscape]\">\n   <meta name=\"Author\" content=\"Bob Smith\">\n   <title>386SWAT Version History</title>\n</head>\n<body text=\"#000000\" bgcolor=\"#FFFFC0\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF00FF\">\n\n<center><b><font size=+2>386SWAT Version History</font></b></center>\n\n<p>Version 6.03\n<ul>\n<li>\nSupport for display of MMX &amp; SSE instructions</li>\n\n<li>\nDisplay MMX and SSE registers via Alt-F11.</li>\n\n<li>\nSupport for display of FCMOVcc, FCOMI, FUCOMI, FCOMIP, FUCOMIP&nbsp; instructions</li>\n\n<li>\nImplement FSONLY keyword to allow SWAT to install in Windows w/o DVGA or\nMDA because you promise to bring up SWAT in a Full Screen DOS window only.</li>\n\n<li>\nImplement X15 keyword to tell SWAT to pass through INT 15h memory size\ncalls (thus not protecting its own allocated memory).&nbsp; This is a debugging\nkeyword only, not for general use.</li>\n\n<li>\nFix bug where all Family 6 CPUs were thought to support the Last Branch/Exception\nfeature, whereas, in fact, only Intel CPUs do.&nbsp; This would cause SWAT\nto reboot during initialization on certain Cyrix CPUs.</li>\n\n<li>\nDisplay + or - sign after jcc instruction if a Branch Hint prefix (2Eh\nor 3Eh) is present.</li>\n</ul>\nVersion 6.02\n<ul>\n<li>\nSupport MDA hidden by PCI VGA or PCI AGP controller, and secondary PCI\nVGA adapter.&nbsp; See <a href=\"swatdisp.htm\">SWATDISP.HTM</a> for more\ndetails.</li>\n\n<li>\nSupport 4MB pages in PTE display as well as the PTE and SPTE commands.</li>\n\n<li>\nFix bug when using BC on current instruction and G to another instruction.</li>\n\n<li>\nFix bug in display of MOV r32,[EBP*n+disp32].</li>\n\n<li>\nDisplay appropriate comments on PCI calls (INT 1Ah).</li>\n\n<li>\nEmulate references to the debug registers (DRn) if the GD bit is set in\nDR7.\\</li>\n\n<li>\nImplement search for not a value, e.g., <tt><font size=+1>S</font></tt><i>addr</i>\n<i>addr</i> <tt><font size=+1>~</font></tt><i>val</i>.</li>\n\n<li>\nImplement DLG16 &amp; DLG32 commands to display dialogs when in Windows.</li>\n</ul>\nVersion 6.01\n<ul>\n<li>\nImplement <tt><font size=+1>UNREAL</font></tt> command to allow debugging\nof Unreal Mode</li>\n</ul>\n\n<dl>\n<dd>\nThis mode is a variant of Real Mode in which any segment register can access\nall of the 4GB address space.&nbsp; That is, instead of the normal 64KB\nlength of a segment, the length is 4GB.&nbsp; This command can enable all\nor just some of the segment registers for Unreal Mode.&nbsp; See <a href=\"swatcmd.htm\">SWATCMD.HTM</a>\nfor more details.</dd>\n</dl>\nVersion 6.00.002\n<ul>\n<li>\nImplement <tt><font size=+1><a href=\"swatscr.htm#s-F10\">s-F10</a></font></tt>\nto save the current screen into the last screen buffers.</li>\n\n<li>\nFix various bugs in 386SWAT's RM Windows support.</li>\n\n<li>\nImplement <tt><font size=+1><a href=\"swatcmd.htm#QS\">QS</a></font></tt>\ncommand to display nearest symbol at or before a given address.</li>\n\n<li>\nImplement <tt><font size=+1><a href=\"swatcmd.htm#DTE\">DTE</a></font></tt>\ncommand to display Descriptor Table Entry on the command line.</li>\n\n<li>\nImplement <tt><font size=+1><a href=\"swatcmd.htm#MDB\">MDB</a></font></tt>\ncommand to display a Windows Module Database.</li>\n\n<li>\nImplement <tt><font size=+1><a href=\"swatcmd.htm#TDB\">TDB</a></font></tt>\ncommand to display a Windows Task Database.</li>\n\n<li>\nImplement <tt><font size=+1><a href=\"swatcmr.htm#.MDB\">.MDB</a></font></tt>\nto return <tt><font size=+1>Sel|0</font></tt> of current MDB.</li>\n\n<li>\nImplement <tt><font size=+1><a href=\"swatcmr.htm#.TDB\">.TDB</a></font></tt>\nto return <tt><font size=+1>Sel|0</font></tt> of current TDB.</li>\n\n<li>\nDisplay PDE and PTE bits with <tt><font size=+1><a href=\"swatcmd.htm#PTE\">PTE</a></font></tt>\ncommand.</li>\n</ul>\nVersion 6.00.001\n<ul>\n<li>\nCode reorganization to accommodate logged in versions 5.10.071-9</li>\n\n<li>\nDocumentation moved over to HTML format.</li>\n</ul>\nVersion 6.00.000\n<ul>\n<li>\nImplement support for Windows kernel debugging</li>\n</ul>\n\n<dl>\n<dd>\nThis major upgrade is described (to some degree) in <a href=\"winkdbg.htm\">WINKDBG.DOC</a>;\nalso see <a href=\"swatdoc.htm\">386SWAT.DOC</a> and <a href=\"swatvxd.htm\">SWATVXD.DOC</a>.</dd>\n</dl>\nVersion 5.10.079\n<ul>\n<li>\nAdd More Service Routine Text</li>\n</ul>\n\n<dl>\n<dd>\nAdd service routine text displays for Win95 VMM routines.&nbsp; This text\nis displayed when decoding <tt><font size=+1>INT 20h</font></tt> calls.</dd>\n</dl>\nVersion 5.10.078\n<ul>\n<li>\nFix .VMSTK and .VMRET Commands</li>\n</ul>\n\n<dl>\n<dd>\nFor some reason, the implementations of the <tt><font size=+1><a href=\"swatcmr.htm#.VMSTK\">.VMSTK</a></font></tt>\nand <tt><font size=+1><a href=\"swatcmr.htm#.VMRET\">.VMRET</a></font></tt>\ncommands didn't work, so now they do.&nbsp; Moreover, <tt><font size=+1><a href=\"swatcmr.htm#.VMSTK\">.VMSTK</a></font></tt>\nis now called <tt><font size=+1><a href=\"swatcmr.htm#.VMSTK\">.VMCRS</a></font></tt>\n(for Client Register Struc).</dd>\n</dl>\nVersion 5.10.077\n<ul>\n<li>\nImplement Time Stamp Counter Display</li>\n</ul>\n\n<ul>On CPUs which support it (TSC bit set in <tt><font size=+1>CR4</font></tt>),\ndisplay the # clocks executed since the last time 386SWAT was entered.&nbsp;\nThere is a certain amount of overhead in each entry to 386SWAT, so the\nnumbers displayed will never be at the level of single instruction clock\ncounts, but it is a good measure of time over a longer set of instructions.</ul>\nVersion 5.10.076\n<ul>\n<li>\nHandle New Windows Keyboard Keys</li>\n</ul>\n\n<dd>\nThe Microsoft Natural keyboard contains three new keys:</dd>\n\n<dd>\nLeft Windows key</dd>\n\n<dd>\nRight Windows key</dd>\n\n<dd>\nApplication key</dd>\n\n<dl>\n<dd>\nThese keys have new scan codes which our keyboard handler now recognizes,\nalthough we don't do much with them as yet.&nbsp; The left and right Windows\nkeys are meant to be modifiers just as Shift, Ctl-, and Alt-keys are modifiers.&nbsp;\nThe Application key is meant to be an actual keystroke, so I've assigned\narbitrary key codes to it in its Unshifted, Shift-, Ctl-, and Alt-states.</dd>\n\n<dd>\nFor the moment, until someone can think of something better, the&nbsp;&nbsp;\nApplication key invokes the Help menu.</dd>\n</dl>\nVersion 5.10.075\n<ul>\n<li>\nMiscellaneous internal changes</li>\n</ul>\nVersion 5.10.074\n<ul>\n<li>\nUse Ctrl-Shift-PrtSc To Print Instruction Window Only</li>\n</ul>\n\n<dl>\n<dd>\nWhen printing multiple instruction screens, repeating the register display\nand other information on the second and subsequent screens is unnecessary.&nbsp;\nTo this end, the key combination Ctrl-Shift-PrtSc prints the instruction\nportion of the display only, assuming the instruction window is displayed\n(if not, the entire screen is printed as usual).</dd>\n</dl>\nVersion 5.10.073\n<ul>\n<li>\nImplement Saved Register Clear Command</li>\n\n<br>&nbsp;\n<p>&nbsp;\n<br>&nbsp;\n<br>&nbsp;\n<br>&nbsp;\n<br>&nbsp;\n<br>&nbsp;\n<br>&nbsp;\n<p>In case you do not need to restore a saved register set, the saved state\ncan be cleared with the <tt><font size=+1><a href=\"swatcmd.htm#RC\">RC</a></font></tt>\ncommand.</ul>\n\n<ul>\n<li>\nIn the operand analysis display for an IRETd with NT=1, the back link TSS\nselector is omitted as there's no room for it and all of the other information\nbeing displayed.</li>\n</ul>\nVersion 5.10.072\n<ul>\n<li>\nImplement Command Recall</li>\n</ul>\n\n<dl>\n<dd>\nCommands entered on the command line are saved in a ring buffer whose length\ncan be changed from the default of 1024 via the profile keyword <tt><font size=+1>CMDHIST=</font></tt><i>nnn</i>.</dd>\n</dl>\n\n<dl>\n<dd>\nPrevious commands can be retrieved via the keystrokes <tt><font size=+1><a href=\"swatscr.htm#a-<\">Alt-&lt;</a></font></tt>\n(previous command) and <tt><font size=+1><a href=\"swatscr.htm#a-\">Alt-></a></font></tt>\n(next command).&nbsp; Pressing either of these keys repeatedly scrolls\nthrough the buffer in the chosen direction.&nbsp; The keystroke <tt><font size=+1><a href=\"swatscr.htm#a-?\">Alt-?</a></font></tt>&nbsp;\ndisplays a history of (up to 25) commands from which a command can be chosen\nby scrolling up or down through the list, or by typing the letter next\nto the command.&nbsp; A command may be deleted from this list via the Del\nkey.</dd>\n</dl>\n\n<ul>\n<li>\nA bug was fixed when running under Windows where a jump was taken with\nthe wrong sense (JZ vs.&nbsp; JNZ) if Win386 services are available.</li>\n\n<li>\nA new help screen to describe the various searching options is defined.</li>\n</ul>\nVersion 5.10.071\n<ul>\n<li>\nFix Bug When Searching For Bytes</li>\n</ul>\n\n<dl>\n<dd>\nIn an earlier TWT, when handling Page Faults, the ZF flag was cleared without\nrealizing that subsequent code depended upon it being set.&nbsp; The effect\nwas that searches for bytes were never found.&nbsp; This change fixes that.</dd>\n</dl>\nVersion 5.10.070\n<ul>\n<li>\nImplement <tt><font size=+1><a href=\"swatcmd.htm#INSERT\">INSERT</a></font></tt>\nCommand</li>\n</ul>\n\n<dl>\n<dd>\nTo debug Windows at the lowest level, we need to be able to insert ourselves\ninto Windows startup shortly after it enters PM.&nbsp; To this end, the\n<a href=\"swatcmd.htm#INSERT\">INSERT</a>\ncommand is available.&nbsp; It is used from the 386SWAT command line at\nthe point just before Windows enters PM.</dd>\n</dl>\nVersion 5.10.069\n<ul>\n<li>\nAllow Fill Command On Physical Memory</li>\n</ul>\n\n<dl>\n<dd>\nThe Fill (<a href=\"swatcmd.htm#F\">F</a>) command used to change data in\nmemory now allows an optional trailing <tt><font size=+1>P</font></tt>\nalso optionally followed by a CR3, just as the Unassemble and other commands\nallow.</dd>\n</dl>\nVersion 5.10.068\n<ul>\n<li>\nFix Bug In Implicit Stack References</li>\n</ul>\n\n<dl>\n<dd>\nWhen displaying the data (if any) pointed to by the current instruction,\nif the instruction used an implicit stack reference (such as the PUSH instruction)\nwe sometimes would use the wrong base register (ESP vs. SP).&nbsp; This\nTWT fixes that bug.</dd>\n</dl>\nVersion 5.10.067\n<ul>\n<li>\nAutoFault for GP Faults</li>\n</ul>\n\n<dl>\n<dd>\nThe Autofault facility has been extended to GP Faults.&nbsp; This means\nthat an attempt is made to interpret each GP Fault intercepted by 386SWAT\nin a short sentence.&nbsp; Type <a href=\"swatscr.htm#s-F4\">Shift-F4</a>\nto see the last Autofault error message.&nbsp; Because GP Faults are many\nand varied, some cases will be missed (marked as unknown) or mistaken.&nbsp;\nPlease notify the author as you encounter such cases with the exact circumstances\nof the GP Fault so they may be corrected.</dd>\n</dl>\nVersion 5.10.066\n<ul>\n<li>\nWhen Running Under Windows, Map In/Out VM's First Megabyte</li>\n</ul>\n\n<dl>\n<dd>\nPreviously, when our local keyboard handler was active, we avoided checking\nand setting the keyboard values in the BIOS data area if Windows was active\nbecause we couldn't be sure that that memory region was mapped in.&nbsp;\nNow that I have discovered Win386 (<tt><font size=+1>INT 22h</font></tt>)\nservices, we can map in/out that region around references to it.</dd>\n</dl>\nVersion 5.10.065\n<ul>\n<li>\nSet the GD Bit In DR7</li>\n</ul>\n\n<dl>\n<dd>\nBecause some programs get a kick out of resetting the debug registers which\nwe've carefully setup, this change has 386SWAT automatically set the Global\nDebug (GD) bit in DR7 on startup so that we can stop such programs before\nthey can do any harm.&nbsp; Perhaps it doesn't surprise you that Windows\nis the chief reason for this feature.</dd>\n</dl>\nVersion 5.10.064\n<ul>\n<li>\nDisplay Real Mode Interrupt Vector Table</li>\n</ul>\n\n<dl>\n<dd>\nAs it's a very common data structure to view, the keystroke <tt><font size=+1><a href=\"swatscr.htm#s-F5\">Shift-F5</a></font></tt>\nnow displays the RM IVT.</dd>\n</dl>\nVersion 5.10.063\n<ul>\n<li>\nFilter Leading Text From Symbols</li>\n</ul>\n\n<dl>\n<dd>\nSome symbols, especially from Windows programs written in C, are prefaced\nwith text such as \"<tt><font size=+1>__imp__</font></tt>\", \"<tt><font size=+1>_</font></tt>\",\nand the like which adds the symbol's length but not understanding.&nbsp;\nThis feature allows you to specify in the 386SWAT profile leading text\nwhich is to be stripped from each symbol.</dd>\n\n<dd>\n&nbsp;&nbsp;&nbsp;&nbsp; <tt><font size=+1>SYMFILTER=</font></tt> <i>text1\n[text2 [...]]</i></dd>\n\n<dd>\nThe default settings are</dd>\n\n<dd>\n&nbsp;&nbsp;&nbsp;&nbsp; <tt><font size=+1>SYMFILTER=__imp__ _</font></tt></dd>\n\n<dd>\nUp to 128 characters can be specified in this way.</dd>\n</dl>\nVersion 5.10.062\n<ul>\n<li>\nFix Bug When Displaying Long Symbol Names</li>\n</ul>\n\n<dl>\n<dd>\nWhen we display a symbol names of 50 chars or greater at the top of a data\nscreen, we're off by one in our calculations which can cause the name to\nfold to the next line.</dd>\n</dl>\nVersion 5.10.061\n<ul>\n<li>\nFix Bug In The Stack Width Change Calculation</li>\n</ul>\n\n<dl>\n<dd>\nPreviously, the calculation of when to change stack width (words or dwords)\noccurred only when the code selector changed.&nbsp; In fact, it should\nbe checked when the stack selector changes (duh!).</dd>\n</dl>\nVersion 5.10.060\n<ul>\n<li>\nFix Bug With Mis-aligned Stack In GP Fault Handler</li>\n</ul>\n\n<dl>\n<dd>\nIf the user hooks GP Faults, the handler in LCL_INT0D uses a stack structure\nwhich is missing one word in the middle.&nbsp; It's amazing it has worked\nat all so far.</dd>\n</dl>\nVersion 5.10.059\n<ul>\n<li>\nImplement Support For P6 Features</li>\n</ul>\n\n<ul>Two P6 features are supported by this TWT.\n<p>1.&nbsp; The Branch Trace Facility (<a href=\"swatcmd.htm#BTF\">BTF</a>)\ncan be turned on and off via the command line <tt><font size=+1>BTF ON/OFF</font></tt>.\n<br>2.&nbsp; The Last Branch/Exception From/To registers can be displayed\nat all times in the lower right corner of the screen.&nbsp; This feature\ncan be turned on and off via the command line LBR ON/OFF.\n<li>\nSkip Over Read/Write From/To Debug Registers If GD Bit Is Set</li>\n</ul>\n\n<dl>\n<dd>\nWhen the GD bit in DR7 is set, any read from or write to a debug</dd>\n\n<dd>\nregister triggers a Debug Fault (and the CPU clears the GD bit from</dd>\n\n<dd>\nDR7 so the Debug Fault handler can use those registers).</dd>\n\n<dd>\nSome environments (Microsoft Windows comes to mind) clear the debug registers\nupon entry (and at other times) thus making it difficult debug in that\ncontext.&nbsp; With this change, setting the GD bit traps reads and writes\nof those registers and handles them transparently.&nbsp; A read from a\ndebug register returns the actual value.&nbsp; A write to a debug register\nis ignored.&nbsp; The GD bit can be set from the 386SWAT command line via</dd>\n\n<dd>\n&nbsp;&nbsp;&nbsp; <tt><font size=+1>R DR7.GD=1</font></tt></dd>\n\n<dd>\nIf you desire this behavior to be the default, use SWATCMD with the above\nargument.</dd>\n</dl>\nVersion 5.10.058\n<ul>\n<li>\nAdd .VM addresses for Windows debugging</li>\n</ul>\n\n<dl>\n<dd>\nEspecially when debugging calls from a Windows app down to a VM interrupt\nhandler, it is sometimes useful to know where we'll come back to in Windows\non the other side of the ARPL wall.&nbsp; <tt><font size=+1><a href=\"swatcmr.htm#.VMRET\">.VMRET</a></font></tt>\nwill often work if the call was made via DPMI SIMVMI (function 0300h) or\nan INT instruction emulated by the DPMI host (Windows).</dd>\n</dl>\n\n<ul>\n<li>\nAdd Go Monitor command and .CSIP to 386SWAT</li>\n</ul>\n\n<dl>\n<dd>\nThe GM (go monitor) command takes an expression which will be evaluated\nas the CPU single-steps (equivalent to <tt><font size=+1><a href=\"swatscr.htm#Padplus\">Pad-plus</a></font></tt>\nor <tt><font size=+1><a href=\"swatscr.htm#F11\">F11</a></font></tt>).&nbsp;\nNo display will occur until 1) the monitor expression evaluates TRUE or\n2) 386SWAT is invoked by some other means (GP fault, NMI, <tt><font size=+1>Ctrl-Alt-Pad5</font></tt>,\netc.)</dd>\n\n<dd>\nBoolean expressions may be constructed using the dyadic functions <tt><font size=+1>&amp;&amp;</font></tt>,\n<tt><font size=+1>||</font></tt>,<tt><font size=+1>&lt;</font></tt>,\n<tt><font size=+1>&lt;=</font></tt>,\n<tt><font size=+1>==</font></tt>,\n<tt><font size=+1>>=</font></tt>,\nand\n<tt><font size=+1>></font></tt>.&nbsp; Operator precedence is the same\nas the C language.</dd>\n\n<dd>\nFor example:</dd>\n\n<dd>\n<tt><font size=+1>GM ah</font></tt></dd>\n\n<dd>\n&nbsp;&nbsp; executes until AH is non-zero.</dd>\n\n<dd>\n<tt><font size=+1>GM [.csip == 21cd &amp;&amp; ah!=9</font></tt></dd>\n\n<dd>\n&nbsp;&nbsp; executes until the current instruction is INT 21 and AH is\nany value other than 9 (DOS display string).</dd>\n\n<dd>\n<tt><font size=+1>GM cx == 0</font></tt></dd>\n\n<dd>\n&nbsp;&nbsp; executes until CX is 0.</dd>\n\n<dd>\n<tt><font size=+1>GM</font></tt></dd>\n\n<dd>\n&nbsp; executes until the last expression specified with GM is TRUE.</dd>\n\n<dd>\nThere are some limitations:</dd>\n\n<dd>\n1. Currently, GM does not single-step across mode switches via INT (but\nwill handle any mode switch handled by Pad Plus).</dd>\n\n<dd>\n2. It is slow as molasses.</dd>\n\n<dd>\n3. With the addition of boolean operators like &amp;&amp; and || precedence\nbecomes more of something one would reasonably expect.</dd>\n\n<dd>\n4. GM will not work in TSS mode currently (non-critical, failure mode is\nthe expression doesn't trigger).</dd>\n</dl>\nVersion 5.10.057\n<ul>\n<li>\nFix Bug When Testing For Extended Memory</li>\n</ul>\n\n<dl>\n<dd>\nDue to an oversight, when I put in the code to determine the amount of\nextended memory using the <tt><font size=+1>INT 15h/0E801h</font></tt>\ncall, I put it in after the <tt><font size=+1>INT 15h/0DA88h</font></tt>,\ninstead of before.&nbsp; Because of a bug in Phoenix 4.04 BIOSes, which\ncrash on the <tt><font size=+1>0DA88h</font></tt> call, the order is important.</dd>\n\n<dd>\nAlso, when setting up the IDT entry for VCPI debugging using TSSes, we\nused to set the offset to <tt><font size=+1>-1</font></tt> (because the\nIDT selector is a TSS and the offset isn't used).&nbsp; For convenience,\nI'm now setting the low-order byte of the offset to the interrupt #.&nbsp;\nThat way, when looking at the IDT in memory (not via <a href=\"swatscr.htm#F4\">F4</a>)\nit's easy to tell which interrupt it covers.</dd>\n</dl>\nVersion 5.10.056\n<ul>\n<li>\nWorkaround Feature In Win95</li>\n</ul>\n\n<dl>\n<dd>\nBecause of a quirk in Win95 (what, only one!), when we blast in the PTEs\nfor 386SWAT to address the monochrome and color video buffers from local\naddresses, we need to preserve the AVL bits and set the accessed bit so\nthis PTE won't be thought of as one available for allocation.</dd>\n</dl>\nVersion 5.10.055\n<ul>\n<li>\nHandle Large Size 386SWAT With VCPI Clients</li>\n</ul>\n\n<dl>\n<dd>\nIf the resident portion of 386SWAT becomes too large (perhaps a large <tt><font size=+1><a href=\"swatpro.htm#SYMSIZE\">SYMSIZE</a></font></tt>\nor <tt><font size=+1><a href=\"swatpro.htm#SAVESCREEN\">SAVESCREEN</a></font></tt>),\nthen we might not be able to debug VCPI clients because our footprint exceeds\nthe 4MB limit (one page directory) for VCPI.&nbsp; If this happens, we\nshould at least warn the user in case s/he intends to debug VCPI clients.</dd>\n</dl>\n\n<ul>\n<li>\nFix Bug With Unused GDT Entry</li>\n</ul>\n\n<dl>\n<dd>\nWhen 386SWAT loads via the 386MAX profile, it is passed its linear address\nwhen it is a VCPI client in the third of the three GDT entries allocated\nfor load modules.&nbsp; This is done because 386SWAT's PTEs are part of\n386MAX's and get relocated by 386MAX when a VCPI client loads.</dd>\n\n<dd>\nWhen 386SWAT intrudes into a Memory Manager, we don't use the third GDT\nentry in the same way, and in some cases we might not even allocate a third\nGDT entry if we have found existing GDT entries for an all memory selector\nand one which maps CR3.&nbsp; In this case (I encountered it when intruding\ninto QEMM), we can mistakenly reference the third GDT entry.&nbsp; This\nTWT fixes that.</dd>\n</dl>\n\n<ul>\n<li>\nCheck For Additional Autofault Errors For TSS Faults</li>\n</ul>\n\n<dl>\n<dd>\nIf a TSS fault occurs, there are some additional reasons for it which we\nnow test for and report on, such as invalid selectors in the back link\nTSS when a return from a nested TSS occurs.</dd>\n\n<dd>\nAt the same time, I included some additional fault error messages which\noccur when we're using TSSs ourselves (typically when we're debugging VCPI\nclients) which we we're checking for before.&nbsp; This also involves moving\nthat error message text from the data to the code segment to match where\nthe Autofault code expects it.</dd>\n\n<dd>\nAlso, I changed references to $PTE_0 to $PTE_G as that's its new definition,\nand checked for Page Fault problems related to that bit if PTE Global Extensions\nare enabled in CR4.</dd>\n</dl>\nVersion 5.10.054\n<ul>\n<li>\nHandle Multiple GDTs When VCPI Debugging</li>\n</ul>\n\n<dl>\n<dd>\nWhile tracking down a bug in the CDROM game The 11th Hour, I found that\n386SWAT needed to handle intruding into multiple GDTs as this game appear\nto use up to three different ones, alternating between two quite frequently.&nbsp;\nWe now support up to eight alternating GDTs.</dd>\n\n<dd>\nAt the same time, I fixed a bug where 386SWAT was not correctly recognizing\nwhether or not it had already intruded into a GDT.&nbsp; This had the effect\nof filling up the GDT with 386SWAT's TSS selectors which crashed the system\nin quick order.</dd>\n\n<dd>\nFinally, while running VCPITEST to see if I had broken anything in the\nprocess, I decided to remove the check for <tt><font size=+1>VMSINT=ON</font></tt>\nfrom the VCPI call DE01 (Get PM Interface) in order to allow Intrude 386SWAT\nto work with a cooperating VCPI client without having to set that variable.&nbsp;\nThis means that Intrude 386SWAT will insert its PTEs into every such call,\nbut that should be harmless.&nbsp; The <tt><font size=+1>VMSINT=ON</font></tt>\nsetting still controls whether or not 386SWAT intrudes into the VCPI call\nDE0C (Switch From VM To PM).</dd>\n</dl>\nVersion 5.10.053\n<ul>\n<li>\nEnable Debugging Extensions (If Supported) At Virtual Init Time</li>\n</ul>\n\n<dl>\n<dd>\nThe Pentium CPU's debugging extensions are supported in 386SWAT via the\n<tt><font size=+1><a href=\"swatcmd.htm#BD\">BD</a></font></tt>\ncommand on an I/O port at which time the <tt><font size=+1>$DE</font></tt>\nbit is set in CR4.&nbsp; This change enables them at an earlier time so\nany other program (such as 386MAX) can modify its behavior depending upon\nwhether or not the <tt><font size=+1>$DE</font></tt> bit is set.</dd>\n</dl>\nVersion 5.10.052\n<ul>\n<li>\nMake Device Driver 386SWAT Sensitive to Another Extended Memory Function</li>\n</ul>\n\n<dl>\n<dd>\nThe recent change to 386MAX to support the <tt><font size=+1>0E801h</font></tt>\nExtended Memory function call needs to be copied to device-loading 386SWAT\nnot only so it can detect how much extended memory is in the system, but\nalso so it can lie to any subsequent program requesting the extended memory\nsize through that interface.</dd>\n</dl>\nVersion 5.10.051\n<ul>\n<li>\nImplement Show PTE Command</li>\n</ul>\n\n<dl>\n<dd>\nStrolling through a large set of Page Tables such as under Windows can\nbe tiresome, hence there's a new command.&nbsp; The <tt><font size=+1><a href=\"swatcmd.htm#SPTE\">SPTE</a></font></tt>\ncommand works exactly likely the <tt><font size=+1><a href=\"swatcmd.htm#PTE\">PTE</a></font></tt>\ncommand (displaying the Linear address/PDE/PTE on the command line) as\nwell as displaying the corresponding PTE (as if you had pressed <tt><font size=+1><a href=\"swatscr.htm#F5\">F5</a></font></tt>\nand scrolled down to the appropriate entry).</dd>\n\n<dd>\nAt the same time, I allowed <tt><font size=+1><a href=\"swatscr.htm#c-Up\">Ctrl-Up</a></font></tt>\nand <tt><font size=+1><a href=\"swatscr.htm#c-Down\">-Down</a></font></tt>\nto scroll through the PDEs/PTEs one entry at a time (<tt><font size=+1><a href=\"swatscr.htm#Up\">Up</a></font></tt>\nand <tt><font size=+1><a href=\"swatscr.htm#Down\">Down</a></font></tt> scroll\nthrough one line at a time).</dd>\n</dl>\nVersion 5.10.050\n<ul>\n<li>\nFix Bug When Using TSS For Faults</li>\n</ul>\n\n<dl>\n<dd>\nA previous TWT changed a local routine to be more self-sufficient by setting\nDS within the routine instead of relying upon the caller to set this register.&nbsp;\nAlas, that was a mistake as in some cases we rely upon the Invisible Descriptor\nCache, particularly when we're accessing selector values in the caller's\nLDT.&nbsp; This TWT fixes that to use two routines, one which assumes the\nglobal DS has been set, one which does not.</dd>\n\n<dd>\nAt the same time, I fixed a problem with device-loading 386SWAT where software\nINTs 01h, 02h, 03h, and 68h are not being enabled if VME is.</dd>\n</dl>\nVersion 5.10.049\n<ul>\n<li>\nFix Bug With <tt><font size=+1>DEBUG=PMI</font></tt> And Device-Loading\n386SWAT</li>\n</ul>\n\n<dl>\n<dd>\nIf we're loading as Device 386SWAT at startup, INIT_PROT is called at the\npoint where 386SWAT is a temporary VCPI client of the MM.&nbsp; Thus the\nactive IDT is that of the VCPI client and INIT_PROT is setting up the MM's\nIDT where the VCPI client has calculated the IDT's linear address in the\nVCPI client's linear address space.</dd>\n\n<dd>\nAll this is background to say that we can't signal an INT 01h if <tt><font size=+1>DEBUG=PMI</font></tt>\nis specified because the active IDT (that of the VCPI client) does not\nhave its IDT entries setup for debugging unless there's a preceding 386SWAT\nin the picture.&nbsp; This changes enforces that condition.</dd>\n</dl>\nVersion 5.10.048\n<ul>\n<li>\nCall REST_PROT/INIT_PROT On Windows Entry/Exit With Device-Loading 386SWAT</li>\n</ul>\n\n<dl>\n<dd>\nWhen 386SWAT is loaded as a device driver (whether it was intruding into\nan existing memory manager or loading as VCPI 386SWAT), previously it wasn't\nhandling the transitions into and out of Windows.</dd>\n\n<dd>\nWhen Windows starts up, 386SWAT needs to disable itself (by calling its\nREST_PROT entry point) so that it is in the proper state when the 386SWAT\nVxD calls 386SWAT's INIT_PROT entry point after Windows loads.&nbsp; Correspondingly,\nwhen Windows terminates, the VxD calls 386SWAT at its REST_PROT and 386SWAT\nneeds to call its INIT_PROT entry point to re-enable it.</dd>\n\n<dd>\nWhen 386SWAT is loaded from within 386MAX, MAX handles calling the proper\nREST_PROT/INIT_PROT entry points.&nbsp; When 386SWAT is loaded as a device\ndriver, these calls were not made.</dd>\n\n<dd>\nNow they are.</dd>\n</dl>\nVersion 5.10.047\n<ul>\n<li>\nSwap Out Local IDT Entries Around TOGINT Call</li>\n</ul>\n\n<dl>\n<dd>\nWhen 386SWAT is active, it hooks various interrupts for its own use such\nas the timer, keyboard, cascade, and mouse (the latter two in case there's\na PS/2-style mouse which goes through the keyboard controller).</dd>\n\n<dd>\nWhen we toggle an interrupt via command line (<tt><font size=+1><a href=\"swatcmd.htm#TOGINT\">TOGINT</a></font></tt>\nxx xx ...), or keystroke (<tt><font size=+1><a href=\"swatscr.htm#a-F1\">Alt-F1</a></font></tt>,\netc.), we need to swap out our local entries around the toggle so that\nwe save the new entry in the proper (global) location.&nbsp; In particular,\nthis affects <tt><font size=+1>TOGINT 0A</font></tt> which is hooked locally.</dd>\n</dl>\nVersion 5.10.045 &amp; 5.10.046\n<ul>\n<li>\nAllow Search Command Of PTEs</li>\n\n<br>&nbsp;\n<dd>\nWhen tracking down a bug in Win95, I found it useful to extend the search\ncommand to search through the PTEs for a specific value.&nbsp; The new\nsyntax is</dd>\n\n<dd>\n&nbsp;&nbsp; <tt><font size=+1>S</font></tt>&nbsp; <i>addr</i> <i>addr</i><tt><font size=+1>#</font></tt><i>PTE</i></dd>\n\n<dd>\n&nbsp;&nbsp; <tt><font size=+1>S</font></tt>&nbsp; <i>addr</i> <tt><font size=+1>L</font></tt><i>expr</i><tt><font size=+1>#</font></tt><i>PTE</i></dd>\n\n<dd>\n&nbsp;where <i>PTE</i> can be any expression.</dd>\n\n<dd>\nAt the same time, I fixed a bug where a Page Fault during the display of\nthe searched for data caused a crash.</dd>\n\n<li>\nMiscellaneous Changes</li>\n</ul>\n\n<dl>\n<dd>\n1.&nbsp; Display appropriate comment on DPMI interrupt lines.&nbsp; This\nalso involves defining a new segment to hold the DPMI function values (as\nwords).</dd>\n\n<dd>\n2.&nbsp; For display of PTEs, note the PDE which contains the top line\nof the display as well as the range of linear addresses covered by the\ntop line.</dd>\n\n<dd>\n3.&nbsp; For display of PDEs, note the range of linear addresses covered\nby the top line.</dd>\n\n<dd>\n4.&nbsp; Display display of PTEs and PDEs, handle not present entries by\ndisplaying \"<tt><font size=+1>????????</font></tt>\".</dd>\n\n<dd>\n5.&nbsp; Change the initial mask for memory display to allow 32-bit values.</dd>\n\n<dd>\n6.&nbsp; Change the number of entries displayed in dword format to eight\nby squeezing the entries together.&nbsp; Note that the previous width can\nbe obtained via the <tt><font size=+1>dd/4</font></tt> command.</dd>\n\n<dd>\n7.&nbsp; Save the previous d?/?? value for later use separately for each\nwidth.</dd>\n\n<dd>\n8.&nbsp; If the selector passed to any routine which calls GETARWBASE is\nnot present, return with <tt><font size=+1>CF=1</font></tt> to indicate\nan error.&nbsp; This change is needed by WINSWAT to avoid displaying an\nincorrect label for not present selectors.&nbsp; As it turns out, without\nthis change and with the new KRNL386, USER, GDI symbol display in WINSWAT\nthe label displayed for not present selectors is that of the Windows routine\nBOZOSLIVEHERE.</dd>\n</dl>\nVersion 5.10.044\n<ul>\n<li>\nPrepare for Winswat</li>\n</ul>\n\n<dl>\n<dd>\nA feature needed by WINSWAT is the ability to set a temporary breakpoint\nfrom a Windows program.&nbsp; This requires that we fill in the rest of\nthe fields where else this feature is used.</dd>\n\n<dd>\nA feature needed by WINSWAT is the ability to refresh debug hooks when\na selector's linear address changes.</dd>\n</dl>\nVersion 5.10.043\n<ul>\n<li>\nMake Device Driver 386SWAT Sensitive to PCI Extended Memory Function</li>\n</ul>\n\n<dl>\n<dd>\nThe recent change to 386MAX to support the PCI Extended Memory function\ncall needs to be copied to device-loading 386SWAT not only so it can detect\nhow much extended memory is in the system, but also so it can lie to any\nsubsequent program requesting the extended memory size through that interface.</dd>\n</dl>\nVersion 5.10.042\n<ul>\n<li>\nImplement Data Width Switch</li>\n</ul>\n\n<dl>\n<dd>\nWhen displaying data via the <tt><font size=+1>D</font></tt><i>x</i> command,\na new switch allows you to specify the number of elements to be displayed\nper line.&nbsp; For example, to display five (instead of the usual eight)\nwords per line, use <tt><font size=+1>DW/5</font></tt>.</dd>\n\n<dd>\nThis feature is a stopgap until I implement a more general data record\ndisplay as in the Periscope debugger.</dd>\n</dl>\nVersion 5.10.041\n<ul>\n<li>\nUse Monochrome Adapter If Present</li>\n</ul>\n\n<dl>\n<dd>\nRather than switch to the mono adapter every time I startup the system,\nI thought it easier to implement a keyword to do the same.&nbsp; With this\nkeyword (<tt><font size=+1><a href=\"swatpro.htm#MONO\">MONO</a></font></tt>)\npresent, if a monochrome adapter is present in the system, it becomes the\ninitial display screen for 386SWAT.&nbsp; The monochrome adapter has always\nbeen supported by 386SWAT -- this just makes it the initial display screen\nas opposed to the color monitor.</dd>\n</dl>\nVersion 5.10.040\n<ul>\n<li>\nAllow TSS Debugging In VM</li>\n</ul>\n\n<dl>\n<dd>\nIf a program enters PM from RM and asks 386SWAT to enter its GDT and IDT,\nas usual we setup TSS selectors for the interrupts we manage.&nbsp; If\nthis program subsequently enters VM, we need to handle the interrupt via\na TSS from VM differently as the stack and register interpretation (segments\nvs. selectors) are different.&nbsp; Previously, our TSS interrupt code\nexpected to be entered from PM only, so a change is needed.</dd>\n\n<dd>\nAlso, when debugging such a RM program where the user sets a breakpoint\nshortly after entering PM (via setting the PE bit in CR0) but before setting\nTR, I found that 386SWAT failed miserably because it was depending upon\nthere being a valid back link in the local TSS.&nbsp; Thus, more changes\nwere needed to handle an invalid back link.&nbsp; In conjunction with this\nchange, the register set command (R) is enhanced to allow TR and LDTR (a.k.a.&nbsp;\nLDT) to be read and set, so the user can setup a valid back link should\nthe need arise.</dd>\n\n<dd>\nAlso, when 386SWAT is installed as a RM debugger, avoid setting TR to our\nlocal TSS as that changes it from an invalid value to a valid value.&nbsp;\nUnfortunately, this doesn't prevent another program from doing the same,\nbut at least we're not the culprit.&nbsp; BTW, unlike the LDTR, there seems\nto be no way to clear (and thus invalidate) the Task Register once it's\nset.&nbsp; Setting TR to zero (which is after all its initial state), causes\na GP Fault even though the current value of TR may be already be invalid.&nbsp;\nThus, once TR is set to an invalid (and possibly non-zero) value, it stays\nthat way until set to a valid value.</dd>\n</dl>\n\n<ul>\n<li>\nClear NT bit in EPM.ASM</li>\n</ul>\n\n<dl>\n<dd>\nAfter switching into PM, the code in EPM.ASM should clear the NT bit in\ncase a subsequent IRET/D occurs (as it does) in order to avoid a TSS Fault.&nbsp;\nThanks to John Fine for pointing this out.</dd>\n</dl>\nVersion 5.10.039\n<ul>\n<li>\nSupport Spain 172 Keyboard Layout</li>\n</ul>\n\n<dl>\n<dd>\nThanks to Roberto Deza Asensio, 386SWAT now supports this keyboard layout.</dd>\n\n<br>&nbsp;\n<p>&nbsp;\n<br>&nbsp;\n<br>&nbsp;\n<br>&nbsp;\n<br>&nbsp;\n<p>Version 5.10.038</dl>\n\n<ul>\n<li>\nInclude Function-Specific Text in INT 21h Comments</li>\n</ul>\n\n<dl>\n<dd>\nBecause they occur so often in code, the display of INT 21h instructions\nwhich are the current instruction now includes function-specific text (e.g.,\n\"Write File (handle)\").</dd>\n</dl>\nVersion 5.10.037\n<ul>\n<li>\nCalculate <tt><font size=+1><a href=\"swatpro.htm#SYMSIZE\">SYMSIZE</a></font></tt>\nbased upon the size of the loaded symbol table</li>\n</ul>\n\n<ul>\n<dd>\nPreviously, I had attempted to calculate <tt><font size=+1><a href=\"swatpro.htm#SYMSIZE\">SYMSIZE</a></font></tt>\nbased upon the size of the incoming <tt><font size=+1>.SSF</font></tt>\nfile and it didn't work.&nbsp; This time it does.&nbsp; The effect is that\nyou don't need to use <tt><font size=+1><a href=\"swatpro.htm#SYMSIZE\">SYMSIZE</a></font></tt>\nwith a <tt><font size=+1><a href=\"swatpro.htm#LOADSYM\">LOADSYM</a></font></tt>,\nthus reducing wasted space in 386SWAT's symbol table as well as perhaps\navoiding a mistake when calculating <tt><font size=+1><a href=\"swatpro.htm#SYMSIZE\">SYMSIZE</a></font></tt>\nand finding it is too small.</dd>\n\n<li>\nFix Bug In MAPSSF</li>\n</ul>\n\n<dl>\n<dd>\nDue to a bug in my linker, certain far calls weren't fixed up properly.</dd>\n</dl>\nVersion 5.10.036\n<ul>\n<li>\nSupport International Keyboards</li>\n</ul>\n\n<dl>\n<dd>\nOne of 386SWAT's design goals is to be as unassuming about the system as\npossible, intruding into the system at an absolute minimum.&nbsp; As part\nof achieving this goal, 386SWAT has its own keyboard handler so it can\ndebug keyboard actions within the BIOS as well as not depend upon the system's\nkeyboard routines or data being intact and functional.</dd>\n\n<dd>\nOne consequence of this is that 386SWAT needs to be changed in order to\nsupport international keyboards which is what this TWT accomplishes.</dd>\n\n<dd>\nTo this end, the keyword <tt><font size=+1><a href=\"swatpro.htm#KEYB\">KEYB=</a></font></tt>\nis recognized in the 386SWAT profile.&nbsp; At the start, the only keyboard\nsupported is the German one -- its keyboard layout is 129, so the <tt><font size=+1><a href=\"swatpro.htm#KEYB\">KEYB=</a></font></tt>\nvalue is <tt><font size=+1>GR129</font></tt>.&nbsp; Others can be supported\nas the need arises.&nbsp; See file <tt><font size=+1><a href=\"swatdoc.htm\">386SWAT.DOC</a></font></tt>\nunder the <tt><font size=+1><a href=\"swatpro.htm#KEYB\">KEYB=</a></font></tt>\nentry for the list of supported keyboards.</dd>\n\n<dd>\nThanks to Armin Kunaschik, 386SWAT now supports this keyboard layout.</dd>\n</dl>\nVersion 5.10.035\n<ul>\n<li>\nInclude <tt><font size=+1>INT 03h</font></tt> and <tt><font size=+1>INTO</font></tt>\nin <tt><font size=+1>GPSKIP=INT</font></tt> Processing</li>\n</ul>\n\n<dl>\n<dd>\nWhen I put in <tt><font size=+1>GPSKIP=INT</font></tt>, I checked for the\nINT xxh opcode (<tt><font size=+1>0CDh</font></tt>), but forgot about <tt><font size=+1>INT\n03h</font></tt> (<tt><font size=+1>0CCh</font></tt>) and <tt><font size=+1>INTO</font></tt>\n(<tt><font size=+1>0CEh</font></tt>).&nbsp; These cases are now covered.</dd>\n</dl>\nVersion 5.10.034\n<ul>\n<li>\nImplement Return Address and Goto Return Address</li>\n</ul>\n\n<dl>\n<dd>\nA common address to jump to is the (near or far) return address of a subroutine.&nbsp;\nThis is made easier by using shortened forms of the commands one might\nuse to extract these addresses.&nbsp; For details, see the \"<a href=\"swatcmr.htm\">Common\nMemory References</a>\" section in <tt><font size=+1><a href=\"swatdoc.htm\">386SWAT.DOC</a></font></tt>.</dd>\n</dl>\nVersion 5.10.033\n<ul>\n<li>\nMake <tt><font size=+1><a href=\"swatpro.htm#NORMLIDT\">NORMLIDT</a></font></tt>\nThe Default</li>\n</ul>\n\n<dl>\n<dd>\nI've encountered enough circumstances debugging RM where RM LIDT redirection\nhas gotten in the way, that I've decided that it's best to make <tt><font size=+1><a href=\"swatpro.htm#NORMLIDT\">NORMLIDT</a></font></tt>\nthe default and use the (new) keyword <tt><font size=+1><a href=\"swatpro.htm#RMLIDT\">RMLIDT</a></font></tt>\nto enable it when necessary.</dd>\n</dl>\nVersion 5.10.032\n<ul>\n<li>\nParse I/O Command line Instructions as LVALs</li>\n</ul>\n\n<dl>\n<dd>\nFor greater generality, the command line I/O instructions now allow an\nLVAL instead of just an atom.&nbsp; Also, the <tt><font size=+1><a href=\"swatcmd.htm#IMR\">IMR</a></font></tt>\ncommand line action displays the original values not the ones set by 386SWAT.</dd>\n</dl>\nVersion 5.10.031\n<ul>\n<li>\nValidate Back Link In Operand Analysis Display for <tt><font size=+1>IRET/D</font></tt></li>\n</ul>\n\n<dl>\n<dd>\nOn occasion, I've had the system go poof on an IRET/D when the NT bit was\nset (and I didn't notice that) and the back link TSS was invalid for some\nreason (either bad TSS selector, or something was wrong with the TSS, such\nas the CR3 value was invalid).&nbsp; This TWT checks for that condition\nand reports it as part of the operand analysis display for the <tt><font size=+1>IRET/D</font></tt>\ninstructions.</dd>\n</dl>\nVersion 5.10.030\n<ul>\n<li>\nEnsure Default Options Set If No Profile</li>\n</ul>\n\n<dl>\n<dd>\nIf the user omits a profile on the 386SWAT device line, we skip out before\nsetting default options.&nbsp; Now we don't.</dd>\n</dl>\nVersion 5.10.029\n<ul>\n<li>\nHandle Invalid Symbol Selectors</li>\n</ul>\n\n<dl>\n<dd>\nIf we upload symbols with an invalid selector (say, the <tt><font size=+1>*.WSG</font></tt>\nfile is for another context -- DPMI vs.&nbsp; VCPI vs.&nbsp; RM), the call\nto GETBASE returns an error along with <tt><font size=+1>EAX=-1</font></tt>.&nbsp;\nIf this value is used for the linear address, the symbol is marked as invalid\nand the address hash code gets confused.&nbsp; This change checks for the\nabove eventuality and sets the pseudo-linear address to zero to avoid this\nproblem.&nbsp; BTW, the symptom is that (say) SWATRUN hangs when uploading\nsymbols if it has two or more symbols with the same (invalid) linear address,\ne.g.&nbsp; <tt><font size=+1>300|0</font></tt>.</dd>\n</dl>\n\n<ul>\n<li>\nAt the same time, I upgraded the grammar for <tt><font size=+1><a href=\"swatcmd.htm#LS\">LS</a></font></tt>\nand <tt><font size=+1><a href=\"swatcmd.htm#PS\">PS</a></font></tt> to accept\nlvals instead of just atoms, thus allowing a wider variety of ways of specifying\nthe arguments to these commands.&nbsp; Others in this same vein to follow.</li>\n</ul>\nVersion 5.10.028\n<ul>\n<li>\nMake <tt><font size=+1><a href=\"swatpro.htm#INTRUDE\">INTRUDE</a></font></tt>\nThe Default Option</li>\n</ul>\n\n<dl>\n<dd>\nNow that <tt><font size=+1><a href=\"swatpro.htm#INTRUDE\">INTRUDE</a></font></tt>\nis reasonably well debugged, I'm making it the default option so users\ndon't need to remember to use it (which has happened several times).&nbsp;\nThis will reduce the number of tech support questions I get from users\nof 386SWAT on the Internet.&nbsp; In case the user needs to use the VCPI\nclient version of 386SWAT, the disabling option VCPISWAT is defined.</dd>\n</dl>\nVersion 5.10.027\n<ul>\n<li>\nFix Bug When Running in RM</li>\n</ul>\n\n<dl>\n<dd>\nAn earlier TWT introduced a bug (for RM 386SWAT only) which set the B-bit\nin the stack selector.&nbsp; The problem is that I forgot to reset that\nbit when returning to RM.&nbsp; The solution is to define a new selector\nwhich has the same characteristics as DTE_SS, except with the B-bit is\nclear.&nbsp; Before returning to RM, we switch to this new selector so\nas to return to an environment which is compatible with RM.</dd>\n</dl>\nVersion 5.10.026\n<ul>\n<li>\nHandle SIGINT 1/3</li>\n</ul>\n\n<dl>\n<dd>\nWhile debugging an incompatibilty with ViruSafe, I needed a minor enhancement\nto SIGINT to overcome their attempts to fool a RM debugger.&nbsp; They\nused many tricks including self-modifying code, as well as installing their\nown INT 01h/03h handlers.&nbsp; At one point their code signals INT 01h\nwhich 386SWAT intercepts, of course.&nbsp; I needed to signal this interrupt\nto them, but SIGINT 1 invoked it as a PM interrupt, which proceeded to\ncrash the system.&nbsp; The solution was to signal INT 01h/03h as a VM\ninterrupt, as well as ensure that TF is set in the return flags if it's\nINT 01h from a single-step (as opposed to a software interrupt INT 01h).</dd>\n</dl>\n\n<ul>\n<li>\nAt the same time, I needed to save the incoming value of <tt><font size=+1>DR6</font></tt>\nwhich triggered another change (and bug fix).&nbsp; The bug fixed is an\nincorrect data value width in a struc missed when I changed the code segment\nfrom\n<tt><font size=+1>USE16</font></tt> to <tt><font size=+1>USE32</font></tt>.</li>\n\n<li>\nA related change cleaned up (and documented) the tests which handle the\ncase where 386SWAT is entered other than through a debug exception, but\nwith the GD bit set.</li>\n</ul>\nVersion 5.10.025\n<ul>\n<li>\nDisplay MAC Entries</li>\n</ul>\n\n<dl>\n<dd>\nAfter many years of wading through MAC entries, I decided to implement\na separate display screen for them (actually, Win95 pushed me over the\nedge -- this is a variant of \"The devil made me do it\").</dd>\n\n<dd>\nThe keyboard combination of <tt><font size=+1><a href=\"swatscr.htm#c-M\">Ctl-M</a></font></tt>\nbrings up this screen.</dd>\n</dl>\n\n<ul>\n<li>\nThere's also a separate command <tt><font size=+1><a href=\"swatcmd.htm#MACBASE\">MACBASE</a></font></tt>\nwhich allows you to set the base address of the MAC chain in case it's\ndifferent from <tt><font size=+1><a href=\"swatcmr.htm#.DMAC\">.DMAC</a></font></tt>.&nbsp;\nThis is handy when displaying the DOS subsegment chain.</li>\n</ul>\nVersion 5.10.024\n<ul>\n<li>\nFix Bug In <tt><font size=+1>PATH=</font></tt> Profile Routine</li>\n</ul>\n\n<dl>\n<dd>\nWhen converting over to <tt><font size=+1>USE32</font></tt> data, I missed\na place where I should have cleared the high-order word of a 32-bit register.</dd>\n\n<dd>\nAlso, in the process of debugging this problem, I put in several more Shift\ndebugging messages.</dd>\n</dl>\nVersion 5.10.023\n<ul>\n<li>\nFix Bug With VCPI Get Protected Mode Interface Calls</li>\n</ul>\n\n<dl>\n<dd>\nIn order for us to provide debugging services to VCPI clients, we need\nto insert our PTEs into the VCPI client's address space.&nbsp; There are\nseveral contexts in which this might occur:</dd>\n\n<dd>\n1.&nbsp; 386SWAT is loaded via <tt><font size=+1>LOAD=</font></tt> with\n386MAX:&nbsp; our PTEs are automatically copied to the VCPI client's address\nspace as part of 386MAX's response to the Get Protected Mode Interface\n(GPMI -- <tt><font size=+1>DE01h</font></tt>) call.</dd>\n\n<dd>\n2.&nbsp; 386SWAT is loaded as a VCPI client to a memory manager:&nbsp;\npreviously we didn't handle this case.&nbsp; Now we use the newly defined\nRMDEV_GPMITAIL label in low DOS memory which this TWT defines an return\npoint in order to catch the tail of the GPMI call.&nbsp; At this point,\nwe switch back to our code in extended memory, and copy our PTEs to the\nend of the GPMI caller's PTE buffer.</dd>\n\n<dd>\n3.&nbsp; 386SWAT intruded into a MM (possibly 386MAX):&nbsp; previously\nwe placed a PM return address on the stack and passed control on to the\nMM.&nbsp; This doesn't work with all MMs as some check the VM bit in the\nflags when interpreting the segment registers saved on the stack.&nbsp;\nNow we use the newly defined DEV_GPMITAIL label which this TWT defines\nas a return point in order to catch the tail of the GPMI call.&nbsp; At\nthis point, we switch back to our code in extended memory, and copy our\nPTEs to the end of the GPMI caller's PTE buffer.</dd>\n</dl>\nVersion 5.10.022\n<ul>\n<li>\nAvoid Page Fault on LIN2PPTE Accesses</li>\n</ul>\n\n<dl>\n<dd>\nThe LIN2PPTE subroutine translates a linear address to a pointer to the\ncorresponding PTE according to a specific CR3.&nbsp; Sometimes we need\nto read more than one PTE from the Page Directory which doesn't always\nwork (because the subroutine doesn't know how many PTEs to map in the case\nwe're not mapping relative to the current CR3).&nbsp; A solution to this\nis to tell the subroutine how many PTEs are to be mapped in.</dd>\n</dl>\nVersion 5.10.021\n<ul>\n<li>\nCompatibility With PMODE</li>\n</ul>\n\n<dl>\n<dd>\nThere is a popular shareware DOS extender available on the Internet called\nPMODE which is used to create PM programs.&nbsp; When it is run as a VCPI\nclient, it allocates selectors from the top down in the GDT -- the same\nas 386SWAT does.&nbsp; PMODE uses the AVL bit in the DTE to mark a selector\nas in use, so this change has us set that bit in the selectors we allocate\nso PMODE doesn't write on top of our selectors.</dd>\n</dl>\nVersion 5.10.020\n<ul>\n<li>\nFix Bug When Swapping INTs</li>\n</ul>\n\n<dl>\n<dd>\nWhen we swap IDT entries (say when displaying the IDT via <tt><font size=+1><a href=\"swatscr.htm#F4\">F4</a></font></tt>)\nso we see or act upon the global IDT entries, we don't swap INTs 74h and\n76h.&nbsp; Now we do.</dd>\n</dl>\nVersion 5.10.019\n<ul>\n<li>\nUse Same DPL When Hooking Interrupts</li>\n</ul>\n\n<dl>\n<dd>\nSome memory managers (pssst, it's EMM386) set the DPL of various entries\nin the IDT to zero expecting the CPU to signal a GP Fault if the corresponding\nsoftware interrupt occurs.&nbsp; When we intrude into their PL0 context,\npreviously we were setting the DPL to three because we didn't expect to\nencounter a MM which had a fetish with GP Faults.&nbsp; Now we retain the\nsame DPL as the original IDT entry except for INTs 01h and 03h.&nbsp; They\nare handled differently so we can issue the corresponding software interrupts\nand gain control immediately instead of having to hook the GP Fault handler\nand pick them off there.</dd>\n</dl>\nVersion 5.10.018\n<ul>\n<li>\nFix Disappearing Cursor Bug</li>\n</ul>\n\n<dl>\n<dd>\nFor years we've put up with this bug.&nbsp; Now it's fixed.</dd>\n\n<dd>\nThe problem occurs in any of three contexts:</dd>\n\n<dd>\n* when reviewing last screens (Alt-F10),</dd>\n\n<dd>\n* when switching between color and mono adapters (Alt-F7), or</dd>\n\n<dd>\n* when swapping screens (say, when exiting 386SWAT).</dd>\n\n<dd>\nThe problem occurs because not all programs maintain a consistent set of\ndata values in the BIOS data area on which we rely (e.g., the dependence\nbetween the cursor type and the cursor emulation bit).</dd>\n\n<dd>\nThe fix is to read the cursor start and end line values upon entry and\nrestore those values in the above circumstances.&nbsp; A new routine, GET6845\nis defined for the read starting value part.&nbsp; I seem to recall that\nthe original definition of the 6845 registers was that they were write-only,\nbut apparently they are now readable as well.</dd>\n\n<dd>\nAt the same time, while testing the different contexts in which 386SWAT\nchanges the cursor type, I noticed that the Enter command handles the <tt><font size=+1>INS</font></tt>\nkey, but not the <tt><font size=+1>XINS</font></tt> key, so I changed it.</dd>\n</dl>\nVersion 5.10.017\n<ul>\n<li>\nImplement Exit Command</li>\n</ul>\n\n<dl>\n<dd>\nA common command line sequence is to set AH to 4C, SIGINT 21, and G.&nbsp;\nThis is now done via a command called <tt><font size=+1><a href=\"swatcmd.htm#EXIT\">EXIT</a></font></tt>.</dd>\n</dl>\nVersion 5.10.016\n<ul>\n<li>\nAdd Debugging Displays To 386SWAT During Initialization</li>\n</ul>\n\n<dl>\n<dd>\nTo help me figure out why 386SWAT wasn't installing under Win95, I made\nseveral changes:</dd>\n\n<dd>\n* Add some debugging displays (press and hold either shift key when 386SWAT\nis loading ala Shift-MAX).</dd>\n\n<dd>\n* If there are no VCPI services (<tt><font size=+1>DEBUG=NOVCPI</font></tt>\nin 386MAX), fail gracefully.</dd>\n\n<dd>\n* Ensure interrupts are re-enabled upon returning from VCPI/PM.</dd>\n\n<dd>\n* Ensure that the B-bit is set in our stack selector.</dd>\n\n<dd>\n* Avoid calling CHECK_I92 if we're in VM as it can reboot the system (learned\nthe hard way).</dd>\n\n<dd>\n* Put in a check to avoid calling OLDINT67_VEC if it's zero (who can argue\nwith that?).</dd>\n\n<dd>\n* Avoid a bug in MASM 5.10b which generates a word fixup when it should\ngenerate a dword fixup.&nbsp; Any questions on why I want to write my own\nassembler?</dd>\n</dl>\n<!--#include virtual=\"/footer.htm\" -->\n</body>\n</html>\n"
  },
  {
    "path": "swat/SWATVXD.DOC",
    "content": "SWATVXD  -- Version 3.02 -- A Debugger for WIN386\n   (C) Copyright 1990-8 Qualitas, Inc.\tAll rights reserved.\n\nThe SWATVXD.EXE file is the accompanying VxD to 386SWAT.  As long as\nit is in the same directory as the debugger file (386SWAT.LOD), it is\nloaded automatically by 386SWAT.  If for some reason you don't wish\nthat to happen, using the command \"WIN NOSWAT\" prevents the VxD from\nloading.\n\n\nSwitches\n--------\n\nThe VxD provides Windows services for 386SWAT, and is useful for\ndebugging VxDs.\n\nThe VxD's operation is controlled by various switches all of which\nappear in the [386SWAT] section of your SYSTEM.INI file.\n\nSWATDualDisplay\n  Squirt cool info to the mono display -- you must use this option to\nget the most useful output to the mono screen.\n\nSSF=d:\\path\\name.SSF\n  Specify the WIN.SSF file -- this file is generated when SWAT VxD is\nbuilt and contains useful symbol information about Windows VxDs.\n\nSWATVxDROM\n  In Sys_Critical_Init, mark the Page Table Entries of all VxD code\nsegments as read-only (normally, they are read-writable!).\tThis\nfeature was implemented in an attempt to figure out why Windows was\ncrashing (I thought that there might be a bad pointer out there).\nWhile I didn't find anything in particular, it is handy to rule out\nthis problem.  If a VxD code segment is written into, an Invalid Page\nFault is generated (see below).  Likely, you'll find that a single IPF\ndue to this feature is generated at the start of Windows.  The default\naction (taken by pressing Esc at the command line) is to test for a RO\npage and set the RW bit.  This clears the IPF for this one page only.\nFrom that point on, all IPFs should be examined carefully.\tIf this\nswitch is set, the SWATVxDIPF and SWATPL0WP switches are also set\nautomatically.\n\nSWATVxDIPF\n  In Sys_Critical_Init, hook the Invalid Page Fault handler.  This\nfeature, in conjunction with the IPF command in SWAT can be useful for\ndebugging these beasts.  The mono screen contains a formatted message\nof the incoming data to the IPF hook procedure.  This feature is\npreliminary and provides a way to get control at the point of the IPF\n-- after that, you're on your own.  If you can suggest more things\nSWAT can do to help debug IPFs, I'm very open to suggestions.\n\nSWATPL0WP\n  In Sys_Critical_Init, set the WP bit in CR0 so we can trap writes\ninto Read-Only pages at PL0.\n\nHookIRQ\n  Hook IRQ0-7 locally if SWAT hooks them.  This switch is necessary\nfor some VxDs (RAM Doubler in particular) as they don't install\ncorrectly if they find some IRQs not hooked by selector 28h.  Go\nfigure.\n\n\nDebugging VxDs\n--------------\n\nTo debug VxDs at their entry points, use the following switches:\n\nHookVxD=DDB_Name[,#s]\n  Trap at a particular VxD by name.  Note that <DDB_Name> is case\nsensitive, and <#> specifies message numbers (optional).  See the VxD\nFilename and Message # tables below.\n\nHookPM=DDB_Name,reg,#\n  Trap at a particular VxD's PM API entry.  <reg> specifies a 16-bit\nregister used by the VxD for the function code, and <#> specifies the\nfunctions to trap.\tFor example, HookPM=SHELL,DX,3 traps at the\nWINOLDAP hook\n\n\nVxD Filenames\n-------------\n\nSome VxD filenames, DDB names, Device_ID, and their switches:\nWINA20.386\t 'LA20HMA ' xxxxh\n\t\t\t    NOLOW64KPAGING\n\t\t\t    NOLOW64KPAGINGPORT\nDebug\t\t '        ' 0002h\n*VPICD\t\t 'VPICD   ' 0003h\n*VDMAD\t\t 'VDMAD   ' 0004h\n*VTD\t\t 'VTD     ' 0005h\n*V86MMGR\t 'V86MMGR ' 0006h\n*PAGESWAP\t 'PageSwap' 0007h\n*VKD\t\t 'VKD     ' 000Dh\n\t\t\t    INITPS2MOUSEATEXIT=ON/OFF\n*DOSMGR \t 'DOSMGR  ' 0015h\n*WSHELL \t 'SHELL   ' 0017h\n*PAGEFILE\t 'PageFile' 0021h\n386MAX.VXD\t 'LoadHi  ' 001Ch\nSWATVXD.EXE  'SWATVXD ' 2400h\nVDDVGA.386\t 'VDD     ' 000Ah\nVNETWARE.386 'DOSNET  ' 001Ah\nPM_BIOS.386  'PMVDD   ' 2250h\n\n\nVxD Message #s\n--------------\n\n0000h  Sys_Critical_Init\t\t 001Bh Sys_Dynamic_Device_Init\n0001h  Device_Init\t\t\t\t 001Ch Sys_Dynamic_Device_Exit\n0002h  Init_Complete\t\t\t 001Dh Create_Thread\n0003h  Sys_VM_Init\t\t\t\t 001Eh Thread_Init\n0004h  Sys_VM_Terminate \t\t 001Fh Terminate_Thread\n0005h  System_Exit\t\t\t\t 0020h Thread_Not_Executeable\n0006h  Sys_Critical_Exit\t\t 0021h Destroy_Thread\n0007h  Create_VM\t\t\t\t 0022h PNP_New_Devnode\n0008h  VM_Critical_Init \t\t 0023h W32_DeviceIOControl\n0009h  VM_Init\t\t\t\t\t 0024h Sys_VM_Terminate2\n000Ah  VM_Terminate\t\t\t 0025h System_Exit2\n000Bh  VM_Not_Executeable\t\t 0026h Sys_Critical_Exit2\n000Ch  Destroy_VM\t\t\t\t 0027h Vm_Terminate2\n000Dh  VM_Suspend\t\t\t\t 0028h Vm_Not_Executeable2\n000Eh  VM_Resume\t\t\t\t 0029h Destroy_VM2\n000Fh  Set_Device_Focus \t\t 002Ah VM_Suspend2\n0010h  Begin_Message_Mode\t\t 002Bh End_Message_Mode2\n0011h  End_Message_Mode \t\t 002Ch End_PM_App2\n0012h  Reboot_Processor \t\t 002Dh Device_Reboot_Notify2\n0013h  Query_Destroy\t\t\t 002Eh Crit_Reboot_Notify2\n0014h  Debug_Query\t\t\t\t 002Fh Close_VM_Notify2\n0015h  Begin_PM_App\t\t\t 0030h Get_Contention_Handler\n0016h  End_PM_App\t\t\t\t 0031h Kernel32_Initialized\n0017h  Device_Reboot_Notify\t 0032h Kernel32_Shutdown\n0018h  Crit_Reboot_Notify\n0019h  Close_VM_Notify\n001Ah  Power_Event\n\n\nMessage Number Traps\n--------------------\n\nTo stop inside SWAT at various message numbers, use the following\nswitches:\n\nSWATSysCriticalInit\nSWATDeviceInit\nSWATInitComplete\nSWATSysVMInit\nSWATSysVMTerminate\nSWATSystemExit\nSWATSysCriticalExit\nSWATCreateVM\nSWATVMCriticalInit\nSWATVMInit\nSWATVMTerminate\nSWATVMNotExecuteable\nSWATDestroyVM\nSWATVMSuspend\nSWATVMResume\nSWATSetDeviceFocus\nSWATBeginMessageMode\nSWATEndMessageMode\nSWATRebootProcessor\nSWATQueryDestroy\nSWATDebugQuery\nSWATBeginPMApp\nSWATEndPMApp\nSWATDeviceRebootNotify\nSWATCritRebootNotify\nSWATCloseVMNotify\nSWATPowerEvent\nSWATSysDynamicDeviceInit\nSWATSysDynamicDeviceExit\nSWATCreateThread\nSWATThreadInit\nSWATTerminateThread\nSWATThreadNotExecuteable\nSWATDestroyThread\nSWATPNPNewDevnode\nSWATW32DeviceIOControl\nSWATSysVMTerminate2\nSWATSystemExit2\nSWATSysCriticalExit2\nSWATVMTerminate2\nSWATVMNotExecuteable2\nSWATDestroyVM2\nSWATVMSuspend2\nSWATEndMessageMode2\nSWATEndPMApp2\nSWATDeviceRebootNotify2\nSWATCritRebootNotify2\nSWATCloseVMNotify2\nSWATGetContentionHandler\nSWATKernel32Initialized\nSWATKernel32Shutdown\n\n\nInternal Use Only\n-----------------\n\nThe following switches are for internal use only.\n\nSSFPrefix=name\n  Specify device name and DDB prefix.\n\nSWATDebugThruExit\n  Call SWAT's INIT_PROT during Critical_Exit.  This allows debugging\non the way out of SWAT.  Now that SWAT is a Windows kernel debugger,\nthis switch is unnecessary.\n\nRealModeBreak=ON/OFF\n  Hit an INT 1 early in RealModeInit.\n\nRehook123=ON/OFF\n  Blast INTs 1, 2, and 3 into the IDT.\tTo avoid trouble with WDEB386.\nNow that SWAT is a Windows kernel debugger, there should be less need\nto run WDEB386.\n\n\u001a"
  },
  {
    "path": "swat/SWATVXD.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.04 [en] (Win95; I) [Netscape]\">\n   <TITLE>SWAT VxD Documentation</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>SWATVXD -- A Debugger for WIN386</FONT></B></CENTER>\n\n<CENTER>(C) Copyright 1990-7 Qualitas, Inc.&nbsp; All rights reserved.</CENTER>\n\n\n<P>The SWATVXD.EXE file is the accompanying VxD to 386SWAT.&nbsp; As long\nas it is in the same directory as the debugger file (386SWAT.LOD), it is\nloaded automatically by 386SWAT.&nbsp; If for some reason you don't wish\nthat to happen, using the command <TT><FONT SIZE=+1>WIN NOSWAT</FONT></TT>\nprevents the VxD from loading.\n<BR>&nbsp;\n\n<P><B>Switches</B>\n\n<P>The VxD provides Windows services for 386SWAT, and is useful for debugging\nVxDs.\n\n<P>The VxD's operation is controlled by various switches all of which appear\nin the <TT><FONT SIZE=+1>[386SWAT]</FONT></TT> section of your SYSTEM.INI\nfile.\n\n<P><TT><FONT SIZE=+1>SWATDualDisplay</FONT></TT>\n<BR>Squirt cool info to the mono display -- you must use this option to\nget the most useful output to the mono screen.\n\n<P><TT><FONT SIZE=+1>SSF=</FONT></TT><I>d:\\path\\name</I><TT><FONT SIZE=+1>.SSF</FONT></TT>\n<BR>Specify the WIN.SSF file -- this file is generated when 386SWAT VxD\nis built and contains useful symbol information about Windows VxDs.\n\n<P><TT><FONT SIZE=+1>SWATVxDROM</FONT></TT>\n<BR>In Sys_Critical_Init, mark the Page Table Entries of all VxD code segments\nas read-only (normally, they are read-writable!).&nbsp; This feature was\nimplemented in an attempt to figure out why Windows was crashing (I thought\nthat there might be a bad pointer out there). While I didn't find anything\nin particular, it is handy to rule out this problem.&nbsp; If a VxD code\nsegment is written into, an Invalid Page Fault is generated (see below).&nbsp;\nLikely, you'll find that a single IPF due to this feature is generated\nat the start of Windows.&nbsp; The default action (taken by pressing Esc\nat the command line) is to test for a RO page and set the RW bit.&nbsp;\nThis clears the IPF for this one page only. From that point on, all IPFs\nshould be examined carefully.&nbsp; If this switch is set, the <TT><FONT SIZE=+1>SWATVxDIPF\n</FONT></TT>switch is also set automatically.\n\n<P><TT><FONT SIZE=+1>SWATVxDIPF</FONT></TT>\n<BR>In Sys_Critical_Init, hook the Invalid Page Fault handler.&nbsp; This\nfeature, in conjunction with the <A HREF=\"swatcmd.htm#IPF\">IPF</A> command\nin 386SWAT can be useful for debugging these beasts.&nbsp; The mono screen\ncontains a formatted message of the incoming data to the IPF hook procedure.&nbsp;\nThis feature is preliminary and provides a way to get control at the point\nof the IPF -- after that, you're on your own.&nbsp; If you can suggest\nmore things 386SWAT can do to help debug IPFs, I'm very open to suggestions.\n<BR>&nbsp;\n<BR><TT><FONT SIZE=+1>HookIRQ</FONT></TT>\n<BR>Hook IRQ0-7 locally if 386SWAT hooks them.&nbsp; This switch is necessary\nfor some VxDs (RAM Doubler in particular) as they don't install correctly\nif they find some IRQs not hooked by selector 28h.&nbsp; Go figure.\n<BR>&nbsp;\n\n<P><B>Debugging VxDs</B>\n\n<P>To debug VxDs at their entry points, use the following switches:\n\n<P><TT><FONT SIZE=+1>HookVxD=</FONT></TT><I>DDB_Name[,#s]</I>\n<BR>Trap at a particular VxD by name.&nbsp; Note that <I>DDB_Name</I> is\ncase sensitive, and <I>#</I> specifies message numbers (optional).&nbsp;\nSee the <A HREF=\"#VxD Filenames\">VxD Filename</A> and <A HREF=\"#VxD Message #s\">Message\n#</A> tables below.\n\n<P><TT><FONT SIZE=+1>HookPM=</FONT></TT><I>DDB_Name,reg,#</I>\n<BR>Trap at a particular VxD's PM API entry.&nbsp; <I>reg</I> specifies\na 16-bit register used by the VxD for the function code, and <I>#</I> specifies\nthe functions to trap.&nbsp; For example, <TT><FONT SIZE=+1>HookPM=SHELL,DX,3</FONT></TT>\ntraps at the WINOLDAP hook\n<BR>&nbsp;\n\n<P><A NAME=\"VxD Filenames\"></A><B>VxD Filenames</B>\n\n<P>Some VxD filenames, DDB names, Device_ID, and their switches:\n\n<P><TT><FONT SIZE=+1>WINA20.386&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'LA20HMA\n' xxxxh</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nNOLOW64KPAGING</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nNOLOW64KPAGINGPORT</FONT></TT>\n<BR><TT><FONT SIZE=+1>Debug&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' 0002h</FONT></TT>\n<BR><TT><FONT SIZE=+1>*VPICD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'VPICD&nbsp;&nbsp; ' 0003h</FONT></TT>\n<BR><TT><FONT SIZE=+1>*VDMAD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'VDMAD&nbsp;&nbsp; ' 0004h</FONT></TT>\n<BR><TT><FONT SIZE=+1>*VTD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'VTD&nbsp;&nbsp;&nbsp;&nbsp; ' 0005h</FONT></TT>\n<BR><TT><FONT SIZE=+1>*V86MMGR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'V86MMGR ' 0006h</FONT></TT>\n<BR><TT><FONT SIZE=+1>*PAGESWAP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'PageSwap' 0007h</FONT></TT>\n<BR><TT><FONT SIZE=+1>*VKD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'VKD&nbsp;&nbsp;&nbsp;&nbsp; ' 000Dh</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nINITPS2MOUSEATEXIT=ON/OFF</FONT></TT>\n<BR><TT><FONT SIZE=+1>*DOSMGR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'DOSMGR&nbsp; ' 0015h</FONT></TT>\n<BR><TT><FONT SIZE=+1>*WSHELL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'SHELL&nbsp;&nbsp; ' 0017h</FONT></TT>\n<BR><TT><FONT SIZE=+1>*PAGEFILE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n'PageFile' 0021h</FONT></TT>\n<BR><TT><FONT SIZE=+1>386MAX.VXD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'LoadHi&nbsp;\n' 001Ch</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVXD.EXE&nbsp; 'SWATVXD ' 2400h</FONT></TT>\n<BR><TT><FONT SIZE=+1>VDDVGA.386&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 'VDD&nbsp;&nbsp;&nbsp;&nbsp;\n' 000Ah</FONT></TT>\n<BR><TT><FONT SIZE=+1>VNETWARE.386 'DOSNET&nbsp; ' 001Ah</FONT></TT>\n<BR><TT><FONT SIZE=+1>PM_BIOS.386&nbsp; 'PMVDD&nbsp;&nbsp; ' 2250h</FONT></TT>\n<BR>&nbsp;\n\n<P><A NAME=\"VxD Message #s\"></A><B>VxD Message #s</B>\n\n<P><TT><FONT SIZE=+1>0000h&nbsp; Sys_Critical_Init&nbsp;&nbsp;&nbsp;&nbsp;\n001Bh Sys_Dynamic_Device_Init</FONT></TT>\n<BR><TT><FONT SIZE=+1>0001h&nbsp; Device_Init&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n001Ch Sys_Dynamic_Device_Exit</FONT></TT>\n<BR><TT><FONT SIZE=+1>0002h&nbsp; Init_Complete&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n001Dh Create_Thread</FONT></TT>\n<BR><TT><FONT SIZE=+1>0003h&nbsp; Sys_VM_Init&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n001Eh Thread_Init</FONT></TT>\n<BR><TT><FONT SIZE=+1>0004h&nbsp; Sys_VM_Terminate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n001Fh Terminate_Thread</FONT></TT>\n<BR><TT><FONT SIZE=+1>0005h&nbsp; System_Exit&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0020h Thread_Not_Executeable</FONT></TT>\n<BR><TT><FONT SIZE=+1>0006h&nbsp; Sys_Critical_Exit&nbsp;&nbsp;&nbsp;&nbsp;\n0021h Destroy_Thread</FONT></TT>\n<BR><TT><FONT SIZE=+1>0007h&nbsp; Create_VM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0022h PNP_New_Devnode</FONT></TT>\n<BR><TT><FONT SIZE=+1>0008h&nbsp; VM_Critical_Init&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0023h W32_DeviceIOControl</FONT></TT>\n<BR><TT><FONT SIZE=+1>0009h&nbsp; VM_Init&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0024h Sys_VM_Terminate2</FONT></TT>\n<BR><TT><FONT SIZE=+1>000Ah&nbsp; VM_Terminate&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0025h System_Exit2</FONT></TT>\n<BR><TT><FONT SIZE=+1>000Bh&nbsp; VM_Not_Executeable&nbsp;&nbsp;&nbsp;\n0026h Sys_Critical_Exit2</FONT></TT>\n<BR><TT><FONT SIZE=+1>000Ch&nbsp; Destroy_VM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0027h Vm_Terminate2</FONT></TT>\n<BR><TT><FONT SIZE=+1>000Dh&nbsp; VM_Suspend&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0028h Vm_Not_Executeable2</FONT></TT>\n<BR><TT><FONT SIZE=+1>000Eh&nbsp; VM_Resume&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0029h Destroy_VM2</FONT></TT>\n<BR><TT><FONT SIZE=+1>000Fh&nbsp; Set_Device_Focus&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n002Ah VM_Suspend2</FONT></TT>\n<BR><TT><FONT SIZE=+1>0010h&nbsp; Begin_Message_Mode&nbsp;&nbsp;&nbsp;\n002Bh End_Message_Mode2</FONT></TT>\n<BR><TT><FONT SIZE=+1>0011h&nbsp; End_Message_Mode&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n002Ch End_PM_App2</FONT></TT>\n<BR><TT><FONT SIZE=+1>0012h&nbsp; Reboot_Processor&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n002Dh Device_Reboot_Notify2</FONT></TT>\n<BR><TT><FONT SIZE=+1>0013h&nbsp; Query_Destroy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n002Eh Crit_Reboot_Notify2</FONT></TT>\n<BR><TT><FONT SIZE=+1>0014h&nbsp; Debug_Query&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n002Fh Close_VM_Notify2</FONT></TT>\n<BR><TT><FONT SIZE=+1>0015h&nbsp; Begin_PM_App&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0030h Get_Contention_Handler</FONT></TT>\n<BR><TT><FONT SIZE=+1>0016h&nbsp; End_PM_App&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n0031h Kernel32_Initialized</FONT></TT>\n<BR><TT><FONT SIZE=+1>0017h&nbsp; Device_Reboot_Notify&nbsp; 0032h Kernel32_Shutdown</FONT></TT>\n<BR><TT><FONT SIZE=+1>0018h&nbsp; Crit_Reboot_Notify</FONT></TT>\n<BR><TT><FONT SIZE=+1>0019h&nbsp; Close_VM_Notify</FONT></TT>\n<BR><TT><FONT SIZE=+1>001Ah&nbsp; Power_Event&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></TT>\n<BR>&nbsp;\n\n<P><B>Message Number Traps</B>\n\n<P>To stop inside 386SWAT at various message numbers, use the following\nswitches:\n\n<P><TT><FONT SIZE=+1>SWATSysCriticalInit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATDeviceInit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATInitComplete</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSysVMInit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSysVMTerminate</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSystemExit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSysCriticalExit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATCreateVM</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMCriticalInit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMInit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMTerminate</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMNotExecuteable</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATDestroyVM</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMSuspend</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMResume</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSetDeviceFocus</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATBeginMessageMode</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATEndMessageMode</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATRebootProcessor</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATQueryDestroy</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATDebugQuery</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATBeginPMApp</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATEndPMApp</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATDeviceRebootNotify</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATCritRebootNotify</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATCloseVMNotify</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATPowerEvent</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSysDynamicDeviceInit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSysDynamicDeviceExit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATCreateThread</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATThreadInit</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATTerminateThread</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATThreadNotExecuteable</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATDestroyThread</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATPNPNewDevnode</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATW32DeviceIOControl</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSysVMTerminate2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSystemExit2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATSysCriticalExit2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMTerminate2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMNotExecuteable2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATDestroyVM2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATVMSuspend2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATEndMessageMode2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATEndPMApp2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATDeviceRebootNotify2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATCritRebootNotify2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATCloseVMNotify2</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATGetContentionHandler</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATKernel32Initialized</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWATKernel32Shutdown</FONT></TT>\n<BR>&nbsp;\n\n<P><B>Internal Use Only</B>\n\n<P>The following switches are for internal use only.\n\n<P><TT><FONT SIZE=+1>SSFPrefix=</FONT></TT><I>name</I>\n<BR>Specify device name and DDB prefix.\n<BR>&nbsp;\n<BR><TT><FONT SIZE=+1>SWATDebugThruExit</FONT></TT>\n<BR>Call 386SWAT's INIT_PROT during Sys_Critical_Exit.&nbsp; This allows\ndebugging on the way out of 386SWAT.&nbsp; Now that 386SWAT is a Windows\nkernel debugger, this switch is unnecessary.\n\n<P><TT><FONT SIZE=+1>RealModeBreak=ON</FONT></TT>/<TT><FONT SIZE=+1>OFF</FONT></TT>\n<BR>Hit an INT 1 early in RealModeInit.\n<BR>&nbsp;\n<BR><TT><FONT SIZE=+1>Rehook123=ON</FONT></TT>/<TT><FONT SIZE=+1>OFF</FONT></TT>\n<BR>Blast INTs 1, 2, and 3 into the IDT.&nbsp; To avoid trouble with WDEB386.\nNow that 386SWAT is a Windows kernel debugger, there should be less need\nto run WDEB386.&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATWDBG.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Windows Debugging</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Windows Debugging</FONT></B></CENTER>\n\n\n<P>386SWAT runs as a debugger under Windows 3.x and 95/98 when accompanied\nby its VxD. This file (<TT><FONT SIZE=+1>SWATVXD.EXE</FONT></TT>) should\nbe in the same directory as the debugger file (<TT><FONT SIZE=+1>386SWAT.LOD</FONT></TT>)\nand is loaded automatically when Windows starts. To take advantage of the\ninformation provided by the VxD, you should have a monochrome monitor attached\nto your system. For more details about the VxD including how to configure\nit, see the file <A HREF=\"swatvxd.htm\">SWATVXD.DOC</A>.&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/SWATWISH.HTM",
    "content": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\n<html>\n<head>\n   <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n   <meta name=\"GENERATOR\" content=\"Mozilla/4.6 [en] (Win98; U) [Netscape]\">\n   <meta name=\"Author\" content=\"Bob Smith\">\n   <title>386SWAT Wish List</title>\n</head>\n<body text=\"#000000\" bgcolor=\"#FFFFC0\" link=\"#0000FF\" vlink=\"#800080\" alink=\"#FF00FF\">\n\n<center><b><font size=+2>386SWAT Wish List</font></b></center>\n\n<p>Here's my wish list (in no particular order) of things I would like\nthis debugger to do.&nbsp; Feel free to contribute yours in our newsgroup:\n<ul>\n<li>\nInternal assembler to insert code into memory</li>\n\n<li>\nUser defined macro expansion on the command line</li>\n\n<li>\nWrite Master Boot Record loader to get in at the very beginning</li>\n\n<li>\nDisplay remaining Windows internal structures</li>\n\n<li>\nFigure out how to install under Windows NT (where there's no starting DOS\nsession)</li>\n\n<li>\nAllow the user to configure the screen display</li>\n\n<li>\nAllow the user to define and display custom data records (such as three\nwords followed by two bytes, followed by an ASCIIZ text string, etc.)</li>\n\n<li>\nDefine PL3 Windows application for displaying 386SWAT screens</li>\n\n<li>\nGet DOS extender library authors to add support for 386SWAT to their programs</li>\n\n<li>\nBetter documentation</li>\n\n<li>\nRedo internal symbol table to allow deletion</li>\n</ul>\n<!--#include virtual=\"/footer.htm\" -->\n</body>\n</html>\n"
  },
  {
    "path": "swat/SWATWKD.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <TITLE>Windows Kernel Debugging</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Windows Kernel Debugging</FONT></B></CENTER>\n\n\n<P>If you program under Windows 3.1x or Win95/98 (but not WinNT), 386SWAT\npresents itself to Windows as a very low-level debugger. Essentially, 386SWAT\nis provided the same level of access as the remote debugger WDEB386 shipped\nwith Windows. WDEB386 requires that you run it from a separate system with\na COM cable running between the two systems. In contrast, 386SWAT runs\non the same system being debugged, however it does require that you have\na monochrome adapter and monitor installed in the system.\n\n<P>For more details on this topic, see the file <A HREF=\"winkdbg.htm\">WINKDBG.DOC</A>.&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/VCPIDBG.DOC",
    "content": "\t\t\t Preliminary Proposal\n\t\t\t\t For\n\t\t\t Debugger Extensions\n\t\t\t\t  to\n\t\t\t  VCPI Specification\n\t\t\t      30 May 89\n\t\t\t  Amended 22 Aug 90\n\t\t\t  Amended  9 Aug 94\n\n\t\t\t    Ŀ\n\t\t\t     Rationale \n\t\t\t    \n\nThe premise is that there is already a resident debugger in the system\nwhich the client wishes to use.  These calls provide an interface\nbetween the client and the debugger to allow that to happen.  In order\nfor the debugger to support this interface, it should intercept INT\n67h during its initialization and troll for the following calls,\nignoring most others.  The debugger may wish to troll for the \"Set\n8259A Interrupt Vector Mappings\" call in order to properly determine\nwhere the timer and keyboard interrupts start.\n\n\n\t\t    Ŀ\n\t\t     V86 Mode Program Interface \n\t\t    \n\n\t\t\t       OVERVIEW\n\nIf your program enters PM via DPMI using a memory manager with an\nintegrated DPMI host, skip all this as 386SWAT hooks into the host's\nGDT and IDT through the INTRUDE option.  Note that DPMI hosts which\ninstall as a separate device driver appear to the memory manager (and\nthus to 386SWAT) as a VCPI client, so the above advice to skip this\ndocument does not apply.  I haven't tried to debug a DPMI client in\nthis context, so I'm not sure how to do it.\n\nIf your program enters PM via VCPI, use functions DEF0, DE01, DEF4,\nDEF2, and DEF3 in that order so that 386SWAT is properly initialized\nin your program's GDT and IDT.\n\nIf your program enters PM from RM and uses paging, use functions DEF0,\nDEF4, DEF2, DEF3, and DEF9 in that order although function DEF9 can be\nexecuted anytime after function DEF0 executes successfully.\n\nIf your program enters PM from RM and does not use paging, use\nfunctions DEF0, DEF4, DEF2, and DEF3 in that order.\n\nWhen debugging VCPI clients, be sure to enable the VMSINT flag either\nby putting the keyword VMSINT into your 386SWAT profile, or by typing\nVMSINT ON from the 386SWAT command line.\n\n\n\nINT 67h\nAX = 0DEF0h\t Determine Debugger Presence\n\nINPUTS: \t None.\n\nOUTPUTS:\t AH = 00h if successful\n\t\t    = 84h if VCPI not supported\n\t\t    = 8Fh if debugger support not present\n\t\t BH = Debugger specification major version #\n\t\t BL = ...\t\t     minor ...\n\n\nThis call determines whether or not a resident debugger is present in\nthe system.  The current specification version number is 5.00; that\nis, BH = 05, BL = 00.  These values are in binary such that if the\nspecification version number were 10.12, this call would return BH =\n0Ah, BL = 0Ch.\n\n\nINT 67h\nAX = 0DEF1h\t Get Debugger Information\n\nINPUTS: \t None.\n\nOUTPUTS:\t AH = 00h if successful\n\t\t EDX = Physical address of debugger information\n\n\nThis call returns the physical address of a certain data structure\ninside 386SWAT for use in conjunction with the 386SWAT Virutal Device\nfor Windows 3.\tThe contents of the structure is as follows:\n\nINFO_LEN\tdw\t?\t; Byte count of structure\nINFO_BASE\tdd\t?\t; Physical base address of SWAT code segment\nSWTINF_VER\tdw\t?\t; Version # of structure\nMore fields are defined which are used by SWATVXD.\n\n\nINT 67h\nAX = 0DEF2h\t Initialize Debugger Interface, Task Gate\n\nINPUTS: \t ES:DI ==> GDT entries for debugger support\n\t\t If ES = 0, EDI ==> ...\n\t\t BX = initial selector\n\nOUTPUTS:\t AH = 00h if successful\n\t\t    = 84h if VCPI not supported\n\t\t    = 8Fh if debugger support not present\n\t\t BX:EDX = Address of protected mode entry point\n\n\nThis call allows the debugger to setup its own GDT entries as it\npleases.  The number of entries it may use is limited to thirty (30)\nso the client can statically allocate space in its GDT.  Each GDT\nentry used by SWAT is a TSS selector, and the IDT entries used (when\nDEF3 is called) are Task Gates (cf. DEFD).  The starting selector\nnumber in BX is needed so that the \"Initialize Debugger IDT Entry\"\ncall knows what selectors to use when initializing an IDT entry.\nConsequently, this call must precede that call in order to know the\nproper selector value.\n\nIf you are writing a PM program which enters PM via VCPI, your call to\nthe VCPI Get PM Interface (DE01) must precede this call as 386SWAT\nneeds to hook into the latter call in order to ensure that its PTEs\nare visible when the VCPI client is active (and thus know what its new\nlinear address is).\n\nThe selector and offset returned identify the address of the protected\nmode entry point in the debugger (see below).  This entry point should\nbe called via a USE32 far call as it might be a task gate.\n\n\nINT 67h\nAX = 0DEF3h\t Initialize Debugger IDT Entry\n\nINPUTS: \t BX = interrupt #\n\t\t ES:DI ==> IDT entry for interrupt BX\n\t\t If ES = 0, EDI ==> ...\n\nOUTPUTS:\t AH = 00h if successful\n\t\t    = 83h if interrupt # not supported by the debugger\n\t\t    = 84h if VCPI not supported\n\t\t    = 8Fh if debugger support not present\n\n\nThis call allows the client to selectively activate the debugger's\ninterrupt handlers.  Because some debuggers may support more interrupt\nhandlers than others, it is recommended that the client call this\nfunction for all interrupts between 00h and 1Fh.  If the debugger\ndoesn't support a particular interrupt number, it will return an error\ncode which the caller can ignore.\n\nSome interrupt numbers may be handled wholly by the debugger (not\npassed on to the previous handler).  Some may be chained, with the\ndebugger handling only certain situations (as may be the case if the\n8259A's interrupt numbers overlay CPU fault interrupt numbers).  For\nthis reason, the client should initialize the IDT entry with a valid\nhandler in case the debugger passes along the interrupt.\n\nBecause this call may be invoked multiple times on the same interrupt\nnumber, the debugger must check the existing entry to see if it is the\nsame as the value to which it would initialize the entry.  If that's\nthe case, the debugger should ignore the call and return a successful\nresult code.\n\nIf you are writing a PM program which enters PM via VCPI, your call to\nthe VCPI Get PM Interface (DE01) must precede this call as 386SWAT\nneeds to hook into the latter call in order to ensure that its PTEs\nare visible when the VCPI client is active (and thus know what its new\nlinear address is).\n\n\nINT 67h\nAX = 0DEF4h\t Set New Debugger CR3 and Linear Address\n\nINPUTS: \t EBX = new CR3 or -1 if unchanged\n\t\t EDX = new linear address or -1 if unchanged.\n\nOUTPUTS:\t AH = 00h if successful\n\n\nThis call is used in conjunction with functions DEF2 and DEF3 if your\nprogram enters PM without using either VCPI or DPMI.  In that case,\nthis case must precede the calls to functions DEF2 and DEF3 and you\nmust also call function DEF9.  If EDX == -1 on entry, SWAT will return\nthe current linear address in EDX upon return.\n\n\nINT 67h\nAX = 0DEF5h\t (Reserved)\n\n\nINT 67h\nAX = 0DEF6h\t Symbol Table Management Functions\n\nINPUTS: \t BL = 00h   Append ECX names from DS:ESI\n\t\t ECX = # names to append\n\t\t DS:ESI ==> table of names to append (see SYMC_STR)\n\nOUTPUTS:\t AH = 00h if successful\n\t\t AH = 88h if not\n\t\t ECX = # symbols appended\n\n\nSYMC_STR struc\n\nSYMC_FVEC df\t ?\t\t; Seg:Off or Sel|Off\nSYMC_FLAG dw\t ?\t\t; Flags:  see SYMFL_REC below\nSYMC_GRP  dw\t ?\t\t; Group # (arbitray value may be used\n\t\t\t\t; with TS command from the command\n\t\t\t\t; line to group symbols)\nSYMC_NAMLEN db\t ?\t\t; Length byte\n\t db\t ? dup (?)\t; ASCII name (no terminating zero)\n\nSYMC_STR ends\n\nSYMFL_REC record $SYMFL_VM:1,$SYMFL_TYP:5,$SYMFL_RSV:10\n\n@SYMFL_VM equ\t mask $SYMFL_VM ; 1 = symbol is for VM\n\t\t\t\t; 0 = ...\t    PM\n\t\t\t\t; The above flag is meaningful for _DAT and _LN\n\t\t\t\t; types only.\n@SYMFL_TYP equ\t mask $SYMFL_TYP ; Data types:\tsee @SYMTYP_xxx below\n@SYMTYP_DAT equ  0\t\t; Code or data\n@SYMTYP_LN  equ  1\t\t; Line number record constructed by MAPSSF\n@SYMTYP_ABS equ  2\t\t; ABS record\n@SYMTYP_SWT equ  3\t\t; Symbol is for SWAT internal use\n\n\nINPUTS: \t BL = 01h   Search for name DS:ESI\n\t\t DS:ESI ==> name to search for (see SYMC_STR)\n\nOUTPUTS:\t AH = 00h if successful\n\t\t AH = A0h if not found\n\nINPUTS: \t BL = 02h   Translate old symbol to new\n\t\t DS:ESI ==> SYMTRAN_STR (see below)\n\nOUTPUTS:\t AH = 00h if successful\n\n\nUse this call to translate a symbol's segment/selector and group to a\nnew segment/selector and base.\n\nSYMTRAN_STR struc\n\nSYMTRAN_OSEL dw  ?\t\t; Old segment/selector\nSYMTRAN_OGRP dw  ?\t\t; Old group #\nSYMTRAN_NFLAG dw ?\t\t; New flags\nSYMTRAN_NSEL dw  ?\t\t; New segment/selector\nSYMTRAN_NBASE dd ?\t\t; New base (to be added to all offsets)\nSYMTRAN_FLAGS dw ?\t\t; Flags for match significance\n\nSYMTRAN_STR ends\n\n; Flags used in SYMTRAN_FLAGS to indicate which elements in SYMTRAN_STR\n; are to be ignored.\n; $SYMFL_ADDVMSEG indicates that the new segment value is to be added\n; to all V86 mode segments.\nSYMTFL_REC record $SYMTFL_IGOSEL:1,$SYMTFL_IGOGRP:1,$SYMTFL_IGNFLAG:1,\\\n\t$SYMTFL_IGNSEL:1,$SYMTFL_ADDVMSEG:1,$SYMTFL_RSVD:11\n\n\nINPUTS: \t BL = 03h   Flush the symbol table\n\nOUTPUTS:\t AH = 00h if successful\n\nINPUTS: \t BL = 04h   Append without replacing existing symbols\n\t\t\t    (allow duplicates of existing symbols)\n\t\t\t    (same as BL=00h)\n\nOUTPUTS:\t AH = 00h if successful\n\nINPUTS: \t BL = 05h   Execute ASCIIZ command in 386SWAT\n\t\t DS:ESI ==> ASCIIZ string containing a command\n\nOUTPUTS:\t AH = 00h if successful\n\nUse this call to execute a command on the 386SWAT command line.  This\nfunction is used by the SWATCMD.EXE device driver.\n\nINPUTS: \t BL = 06h   Copy ASCIIZ string to error log\n\t\t DS:ESI ==> ASCIIZ string\n\nOUTPUTS:\t AH = 00h if successful\n\n\nINT 67h\nAX = 0DEF7h\t (Reserved)\n\nINT 67h\nAX = 0DEF8h\t (Reserved)\n\nINT 67h\nAX = 0DEF9h\t Fill in 386SWAT's PTEs\n\nINPUTS: \t ECX = maximum # PTEs ES:DI can hold\n\t\t ES:DI ==> save area for PTEs\n\t\t If ES = 0, EDI ==> ...\n\nOUTPUTS:\t AH = 00h if successful\n\t\t AH = 8Bh if 386SWAT needs more PTEs than specified\n\t\t ECX = # additional PTEs 386SWAT needs\n\n\nUse this call in conjunction with function DEF4 if your program enters\nPM without using VCPI or DPMI so that 386SWAT's PTEs are visible in\nyour program's address space.\n\nTo determine how many PTEs SWAT needs without filling them in, call\nthis function with ECX = 0, and on return (with AH = 8Bh), ECX has the\nnumber of PTEs SWAT needs.\n\n\nINT 67h\nAX = 0DEFAh\t (Reserved)\n\nINT 67h\nAX = 0DEFBh\t (Reserved)\n\nINT 67h\nAX = 0DEFCh\t (Reserved)\n\nINT 67h\nAX = 0DEFDh\t Initialize Debugger Interface, Interrupt Gate\n\nINPUTS: \t ES:DI ==> GDT entries for debugger support\n\t\t If ES = 0, EDI ==> ...\n\t\t BX = initial selector\n\nOUTPUTS:\t AH = 00h if successful\n\t\t    = 84h if VCPI not supported\n\t\t    = 8Fh if debugger support not present\n\t\t BX:EDX = Address of protected mode entry point\n\n\nThis call allows the debugger to setup its own GDT entries as it\npleases.  The number of entries it may use is limited to four (4) so\nthe client can statically allocate space in its GDT.  Each GDT entry\nused by SWAT is a Code, Data, or LDT selector, and the IDT entries\nused (when DEF3 is called) are Interrupt Gates (cf. DEF2).  The\nstarting selector number in BX is needed so that the \"Initialize\nDebugger IDT Entry\" call knows what selectors to use when initializing\nan IDT entry.  Consequently, this call must precede that call in order\nto know the proper selector value.\n\nIf you are writing a PM program which enters PM via VCPI, your call to\nthe VCPI Get PM Interface (DE01) must precede this call as 386SWAT\nneeds to hook into the latter call in order to ensure that its PTEs\nare visible when the VCPI client is active (and thus know what its new\nlinear address is).\n\nThe selector and offset returned identify the address of the protected\nmode entry point in the debugger (see below).  This entry point should\nbe called via a USE32 far call as it might be a task gate.\n\n\n\n\t\t Ŀ\n\t\t  Protected Mode Program Interface \n\t\t \n\nFor the moment, there are no defined functions.  However, when there\nare, we will require that AH = 0DEh and that the subfunction code be\nin AL.\n\n\n\n\n\t\t Ŀ\n\t\t  Tips On Debugging DPMI Programs \n\t\t \n\nIf you are using an integrated DPMI host such as 386MAX, no special\naction is needed on your part to debug a DPMI program.\t386SWAT\ninstalls itself as a PL0 extension to the memory manager and thus also\nto the DPMI host.  Place breakpoints in your code as needed as well as\nstep right over the far call to the DPMI host which switches from VM\nto PM.\n\nIf you using a non-integrated DPMI host such as QDPMI.SYS which is\ndistributed with QEMM, then essentially you are debugging a VCPI\nclient which provides DPMI services to its clients.  See the next\nsection for details on debugging VCPI programs.\n\n\n\n\n\t\t Ŀ\n\t\t  Tips On Debugging VCPI Programs \n\t\t \n\nAssuming SWAT has successfully intruded into the MM's (memory\nmanager's) PM context, it is on the same level as MM -- that is, you\nshould think of it as a PL0 extension of the VCPI host.  This means\nthat you need to tell SWAT to intrude into the VCPI client's context.\n\nSome VCPI clients are easy to break into, some are quite hostile (not\nmaliciously, it's just that they don't leave any wiggle room).\nThere's no magic to this.  Fundamentally, SWAT needs room in the GDT\nfor its selectors.  See the above description on how to get your\nprogram to cooperate with SWAT, but if you want to get up and running\nquickly, you might first try these steps:\n\n* Allocate about 30 selectors at the end of the GDT,\n* Initialize the selectors to all zero,\n* Plant an INT 01h/03h in the PM portion of your code or whatever you\n  prefer,\n* Type VMSINT ON on the SWAT command line,\n* Start your program.\n\nThe only tricky part is to ensure that any breakpoints you set to\nwhich SWAT would respond occur after the stack in the VCPI client has\nbeen setup (and preferably also DS, ES, FS, and GS).  Typically, this\nmeans that you can debug through every single instruction except for\nthe handful which occur during the handoff from the VCPI host's PM\ncontext to the VCPI client's PM context.  The reason for this is that\nthe VCPI PM handoff depends upon descriptor caching.  In particular,\nthe VCPI spec has the client specifying the state of all EGP\nregisters, but only the CS segment registers.  Thus the VCPI client\nstarts off execution with its own environment (GDT, LDT, IDT, TR, and\nCR3) in effect, but on the VCPI host's stack.  The value of that stack\nselector quite likely is invalid in the client's GDT/LDT, so the VCPI\nclient must switch to its own stack ASAP.  Of course, if an\ninterrupt/exception occurs before then, when the CPU attempts to use\nthe (presumably) invalid stack it would trigger a Double Fault,\nquickly followed by a Triple Fault and system shutdown.\n\nOne other sharp corner I've run into is with VCPI clients which assume\nthat their TSS won't be used by the CPU, so they \"save\" a few bytes by\nre-using that data area.  SWAT uses TSS selectors for its IDT entries,\nso when SWAT gains control the CPU saves the preceding context into\nthe caller's TSS.  Also, it's a nice touch to save your CR3 into the\nappropriate place in the TSS, but SWAT will do that for you in case\nyou forget.  Other debuggers might not be so thoughtful.\n\nAlso, if you switch LDTs from the original one, be sure to save the\ncurrent one in the TSS as that field is read-only.  That is, the CPU\ndoesn't save the current LDT there when it performs a task switch, so\nSWAT can't \"see\" your LDT otherwise.\n\nIf your program changes the PIC base(s), use the VCPI call (DE0B) to\ninform SWAT of the change.\n\nAs far as symbols are concerned, use MAPSSF with a .WSG file.  See the\nSWATSYM.DOC for more details.  After SWAT pops up in PM within your\nprogram, type TS on the SWAT command line to tell SWAT to recalculate\nthe base address of all symbols and symbols should appear.  The .WSG\nfile tells SWAT the value of various selectors, but of course it can't\nknow at that time the base address.  That's why you need to tell SWAT\nto recalculate.\n\n\n\n\n\t\t Ŀ\n\t\t  Tips On Debugging RM Programs \n\t\t \n\nDebugging Real Mode programs is quite similar to debugging VCPI\nprograms, except that you must use the debugging interface to allow\nSWAT to gain a foothold into your PM context.  Because there is no\ninterrupt (such as INT 67h for VCPI) when a RM programs enters PM,\nyour program must cooperate with SWAT in order for it to be of use.\n\nAlso note that you cannot trace through the instructions which setup the\nresources the CPU needs to run in PM.  In particular, this includes LGDT,\nLIDT, and MOV CR0,r32 (or LMSW), as well as those instructions which\nsetup the segment registers in PM, especially CS and SS (note that CS\nis setup by executing a far jump).\n\n\u001a"
  },
  {
    "path": "swat/VCPIDBG.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <TITLE>VCPI Debugger Extensions</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B>Preliminary Proposal</B></CENTER>\n\n<CENTER><B>For</B></CENTER>\n\n<CENTER><B>Debugger Extensions</B></CENTER>\n\n<CENTER><B>to</B></CENTER>\n\n<CENTER><B>VCPI Specification</B></CENTER>\n\n<CENTER>30 May 89</CENTER>\n\n<CENTER>Amended 22 Aug 90</CENTER>\n\n<CENTER>Amended&nbsp; 9 Aug 94</CENTER>\n\n<HR NOSHADE WIDTH=\"100%\">\n<CENTER>Rationale&nbsp;\n<HR NOSHADE WIDTH=\"100%\"></CENTER>\n\n\n<P>The premise is that there is already a resident debugger in the system\nwhich the client wishes to use.&nbsp; These calls provide an interface\nbetween the client and the debugger to allow that to happen.&nbsp; In order\nfor the debugger to support this interface, it should intercept INT 67h\nduring its initialization and troll for the following calls, ignoring most\nothers.&nbsp; The debugger may wish to troll for the \"Set 8259A Interrupt\nVector Mappings\" call in order to properly determine where the timer and\nkeyboard interrupts start.\n<BR>&nbsp;\n<CENTER><B>V86 Mode Program Interface</B>&nbsp;\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"></CENTER>\n\n<CENTER><B>OVERVIEW</B></CENTER>\n\n\n<P>If your program enters PM via DPMI using a memory manager with an integrated\nDPMI host, skip all this as 386SWAT hooks into the host's GDT and IDT through\nthe INTRUDE option.&nbsp; Note that DPMI hosts which install as a separate\ndevice driver appear to the memory manager (and thus to 386SWAT) as a VCPI\nclient, so the above advice to skip this document does not apply.&nbsp;\nI haven't tried to debug a DPMI client in this context, so I'm not sure\nhow to do it.\n\n<P>If your program enters PM via VCPI, use functions <TT><FONT SIZE=+1>DEF0</FONT></TT>,\n<TT><FONT SIZE=+1>DE01</FONT></TT>, <TT><FONT SIZE=+1>DEF2</FONT></TT>,\nand <TT><FONT SIZE=+1>DEF3</FONT></TT> in that order so that 386SWAT is\nproperly initialized in your program's GDT and IDT.\n\n<P>If your program enters PM from RM and uses paging, use functions <TT><FONT SIZE=+1>DEF0</FONT></TT>,\n<TT><FONT SIZE=+1>DEF4</FONT></TT>, <TT><FONT SIZE=+1>DEF2</FONT></TT>,\n<TT><FONT SIZE=+1>DEF3</FONT></TT>, and <TT><FONT SIZE=+1>DEF9</FONT></TT>\nin that order although function <TT><FONT SIZE=+1>DEF9</FONT></TT> can\nbe executed anytime after function <TT><FONT SIZE=+1>DEF0</FONT></TT> executes\nsuccessfully.\n\n<P>If your program enters PM from RM and does not use paging, use functions\n<TT><FONT SIZE=+1>DEF0</FONT></TT>, <TT><FONT SIZE=+1>DEF2</FONT></TT>,\nand <TT><FONT SIZE=+1>DEF3</FONT></TT> in that order.\n\n<P>When debugging VCPI clients, be sure to enable the VMSINT flag either\nby putting the keyword <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#VMSINT\">VMSINT</A></FONT></TT>\ninto your 386SWAT profile, or by typing <TT><FONT SIZE=+1><A HREF=\"swatcmd.htm#VMSINT\">VMSINT\nON</A></FONT></TT> from the 386SWAT command line.\n<BR>&nbsp;\n<BR>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\">\n<BR><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF0h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nDetermine Debugger Presence\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nNone.\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>= 84h</FONT></TT> if VCPI not supported\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>= 8Fh</FONT></TT> if debugger support not present\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>BH =</FONT></TT> Debugger specification major version\n#\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>BL =</FONT></TT> ...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nminor ...\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<BR>This call determines whether or not a resident debugger is present\nin the system.&nbsp; The current specification version number is <TT><FONT SIZE=+1>5.00</FONT></TT>;\nthat is, <TT><FONT SIZE=+1>BH = 05h</FONT></TT>, <TT><FONT SIZE=+1>BL =\n00h</FONT></TT>.&nbsp; These values are in binary such that if the specification\nversion number were <TT><FONT SIZE=+1>10.12</FONT></TT>, this call would\nreturn <TT><FONT SIZE=+1>BH = 0Ah</FONT></TT>, <TT><FONT SIZE=+1>BL = 0Ch</FONT></TT>.\n\n<P>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF1h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nGet Debugger Information\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nNone.\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>EDX =</FONT></TT> Physical address of debugger information\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<BR>This call returns the physical address of a certain data structure\ninside 386SWAT for use in conjunction with the 386SWAT Virutal Device for\nWindows 3.&nbsp; The contents of the structure is as follows:\n\n<P><TT><FONT SIZE=+1>INFO_LEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\ndw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Byte count of structure</FONT></TT>\n<BR><TT><FONT SIZE=+1>INFO_BASE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Physical base address of SWAT code\nsegment</FONT></TT>\n<BR><TT><FONT SIZE=+1>SWTINF_VER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dw&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; Version # of structure</FONT></TT>\n<BR>More fields are defined which are used by <A HREF=\"swatvxd.htm\">SWATVXD</A>.\n\n<P>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF2h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nInitialize Debugger Interface\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>ES:DI ==></FONT></TT> GDT entries for debugger support\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nIf <TT><FONT SIZE=+1>ES = 0</FONT></TT>, <TT><FONT SIZE=+1>EDI ==></FONT></TT>\n...\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>BX =</FONT></TT> initial selector\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>= 84h</FONT></TT> if VCPI not supported\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>= 8Fh</FONT></TT> if debugger support not present\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>BX:EDX =</FONT></TT> Address of protected mode entry\npoint\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<BR>This call allows the debugger to setup its own GDT entries as it pleases.&nbsp;\nThe number of entries it may use is limited to thirty (30) so the client\ncan statically allocate space in its GDT.&nbsp; The starting selector number\nin <TT><FONT SIZE=+1>BX</FONT></TT> is needed so that the \"Initialize Debugger\nIDT Entry\" call knows what selectors to use when initializing an IDT entry.&nbsp;\nConsequently, this call must precede that call in order to know the proper\nselector value.\n\n<P>If you are writing a PM program which enters PM via VCPI, your call\nto the VCPI Get PM Interface (<TT><FONT SIZE=+1>DE01</FONT></TT>) must\nprecede this call as 386SWAT needs to hook into the latter call in order\nto ensure that its PTEs are visible when the VCPI client is active (and\nthus know what its new linear address is).\n\n<P>The selector and offset returned identify the address of the protected\nmode entry point in the debugger (see below).&nbsp; This entry point should\nbe called via a USE32 far call as it might be a task gate.\n\n<P>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF3h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nInitialize Debugger IDT Entry\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>BX =</FONT></TT> interrupt #\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>ES:DI ==></FONT></TT> IDT entry for interrupt <TT><FONT SIZE=+1>BX</FONT></TT>\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nIf <TT><FONT SIZE=+1>ES = 0</FONT></TT>, <TT><FONT SIZE=+1>EDI ==></FONT></TT>\n...\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>= 83h</FONT></TT> if interrupt # not supported by the\ndebugger\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>= 84h</FONT></TT> if VCPI not supported\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>= 8Fh</FONT></TT> if debugger support not present\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<BR>This call allows the client to selectively activate the debugger's\ninterrupt handlers.&nbsp; Because some debuggers may support more interrupt\nhandlers than others, it is recommended that the client call this function\nfor all interrupts between <TT><FONT SIZE=+1>00h</FONT></TT> and <TT><FONT SIZE=+1>1Fh</FONT></TT>.&nbsp;\nIf the debugger doesn't support a particular interrupt number, it will\nreturn an error code which the caller can ignore.\n\n<P>Some interrupt numbers may be handled wholly by the debugger (not passed\non to the previous handler).&nbsp; Some may be chained, with the debugger\nhandling only certain situations (as may be the case if the 8259A's interrupt\nnumbers overlay CPU fault interrupt numbers).&nbsp; For this reason, the\nclient should initialize the IDT entry with a valid handler in case the\ndebugger passes along the interrupt.\n\n<P>Because this call may be invoked multiple times on the same interrupt\nnumber, the debugger must check the existing entry to see if it is the\nsame as the value to which it would initialize the entry.&nbsp; If that's\nthe case, the debugger should ignore the call and return a successful result\ncode.\n\n<P>If you are writing a PM program which enters PM via VCPI, your call\nto the VCPI Get PM Interface (<TT><FONT SIZE=+1>DE01</FONT></TT>) must\nprecede this call as 386SWAT needs to hook into the latter call in order\nto ensure that its PTEs are visible when the VCPI client is active (and\nthus know what its new linear address is).\n\n<P>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF4h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nSet New Debugger CR3 and Linear Address\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>EBX\n=</FONT></TT> new CR3\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>EDX =</FONT></TT> new linear address or -1 if unchanged.\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<BR>This call is used in conjunction with functions <TT><FONT SIZE=+1>DEF2</FONT></TT>\nand <TT><FONT SIZE=+1>DEF3</FONT></TT> if your program enters PM without\nusing either VCPI or DPMI.&nbsp; In that case, this case must precede the\ncalls to functions <TT><FONT SIZE=+1>DEF2</FONT></TT> and <TT><FONT SIZE=+1>DEF3</FONT></TT>\nand you must also call function <TT><FONT SIZE=+1>DEF9</FONT></TT>.\n\n<P>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF5h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n(Reserved)\n<BR>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\">\n<TT><FONT SIZE=+1><a name=\"DEF6\"></a>INT 67h</FONT></TT> <BR>\n<TT><FONT SIZE=+1>AX = 0DEF6h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nSymbol Table Management Functions\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>BL\n= 00h</FONT></TT>&nbsp;&nbsp; Append <TT><FONT SIZE=+1>ECX</FONT></TT>\nnames from <TT><FONT SIZE=+1>DS:ESI</FONT></TT>\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>ECX =</FONT></TT> # names to append\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>DS:ESI ==></FONT></TT> table of names to append (see\nSYMC_STR)\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>AH = 88h</FONT></TT> if not\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>ECX =</FONT></TT> # symbols appended\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<BR><TT><FONT SIZE=+1>SYMC_STR struc</FONT></TT>\n\n<P><TT><FONT SIZE=+1>SYMC_FVEC df&nbsp;&nbsp;&nbsp;&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Seg:Off or Sel|Off</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMC_FLAG dw&nbsp;&nbsp;&nbsp;&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Flags:&nbsp; see SYMFL_REC below</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMC_GRP&nbsp; dw&nbsp;&nbsp;&nbsp;&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Group # (arbitray value may be used</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; with TS command from the command</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; line to group symbols)</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMC_NAMLEN db&nbsp;&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Length byte</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\ndb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ? dup (?)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; ASCII name (no terminating zero)</FONT></TT>\n\n<P><TT><FONT SIZE=+1>SYMC_STR ends</FONT></TT>\n\n<P><TT><FONT SIZE=+1>SYMFL_REC record $SYMFL_VM:1,$SYMFL_TYP:5,$SYMFL_RSV:10</FONT></TT>\n\n<P><TT><FONT SIZE=+1>@SYMFL_VM equ&nbsp;&nbsp;&nbsp; mask $SYMFL_VM ; 1\n= symbol is for VM</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; 0 = ...&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PM</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; The above flag is meaningful for _DAT and _LN</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; types only.</FONT></TT>\n<BR><TT><FONT SIZE=+1>@SYMFL_TYP equ&nbsp;&nbsp; mask $SYMFL_TYP ; Data\ntypes:&nbsp; see @SYMTYP_xxx below</FONT></TT>\n<BR><TT><FONT SIZE=+1>@SYMTYP_DAT equ&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Code or data</FONT></TT>\n<BR><TT><FONT SIZE=+1>@SYMTYP_LN&nbsp; equ&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Line number record constructed by MAPSSF</FONT></TT>\n<BR><TT><FONT SIZE=+1>@SYMTYP_ABS equ&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; ABS record</FONT></TT>\n<BR><TT><FONT SIZE=+1>@SYMTYP_SWT equ&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Symbol is for SWAT internal use</FONT></TT>\n\n<P>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>BL\n= 01h</FONT></TT>&nbsp;&nbsp; Search for name <TT><FONT SIZE=+1>DS:ESI</FONT></TT>\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>DS:ESI ==></FONT></TT> name to search for (see <TT><FONT SIZE=+1>SYMC_STR</FONT></TT>)\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>AH = A0h</FONT></TT> if not found\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>BL\n= 02h</FONT></TT>&nbsp;&nbsp; Translate old symbol to new\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>DS:ESI ==></FONT></TT> <TT><FONT SIZE=+1>SYMTRAN_STR</FONT></TT>\n(see below)\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<BR>Use this call to translate a symbol's segment/selector and group to\na new segment/selector and base.\n\n<P><TT><FONT SIZE=+1>SYMTRAN_STR struc</FONT></TT>\n\n<P><TT><FONT SIZE=+1>SYMTRAN_OSEL dw&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Old segment/selector</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMTRAN_OGRP dw&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Old group #</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMTRAN_NFLAG dw ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; New flags</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMTRAN_NSEL dw&nbsp; ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; New segment/selector</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMTRAN_NBASE dd ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; New base (to be added to all offsets)</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMTRAN_FLAGS dw ?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n; Flags for match significance</FONT></TT>\n\n<P><TT><FONT SIZE=+1>SYMTRAN_STR ends</FONT></TT>\n\n<P><TT><FONT SIZE=+1>; Flags used in SYMTRAN_FLAGS to indicate which elements\nin SYMTRAN_STR</FONT></TT>\n<BR><TT><FONT SIZE=+1>; are to be ignored.</FONT></TT>\n<BR><TT><FONT SIZE=+1>; $SYMFL_ADDVMSEG indicates that the new segment\nvalue is to be added</FONT></TT>\n<BR><TT><FONT SIZE=+1>; to all V86 mode segments.</FONT></TT>\n<BR><TT><FONT SIZE=+1>SYMTFL_REC record $SYMTFL_IGOSEL:1,$SYMTFL_IGOGRP:1,$SYMTFL_IGNFLAG:1,\\</FONT></TT>\n<BR><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $SYMTFL_IGNSEL:1,$SYMTFL_ADDVMSEG:1,$SYMTFL_RSVD:11</FONT></TT>\n\n<P>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>BL = 03h</FONT></TT>&nbsp;&nbsp; Flush the symbol table\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>BL = 04h</FONT></TT>&nbsp;&nbsp; Append without replacing\nexisting symbols\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n(allow duplicates of existing symbols)\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n(same as <TT><FONT SIZE=+1>BL=00h</FONT></TT>)\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>BL\n= 05h</FONT></TT>&nbsp;&nbsp; Execute ASCIIZ command in 386SWAT\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>DS:ESI ==></FONT></TT> ASCIIZ string containing a command\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>\n<HR NOSHADE WIDTH=\"100%\">Use this call to execute a command on the 386SWAT\ncommand line.&nbsp; This function is used by the <A HREF=\"swatsym.htm#SWATCMD\">SWATCMD.EXE</A>\ndevice driver.\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>BL\n= 06h</FONT></TT>&nbsp;&nbsp; Copy ASCIIZ string to error log\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>DS:ESI ==></FONT></TT> ASCIIZ string\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF7h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n(Reserved)\n<BR>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF8h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n(Reserved)\n<BR>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\"><TT><FONT SIZE=+1>INT 67h</FONT></TT>\n<BR><TT><FONT SIZE=+1>AX = 0DEF9h</FONT></TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nFill in 386SWAT's PTEs\n<BR>\n<HR NOSHADE WIDTH=\"100%\">INPUTS:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>ECX\n=</FONT></TT> maximum # PTEs <TT><FONT SIZE=+1>ES:DI</FONT></TT> can hold\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>ES:DI ==></FONT></TT> save area for PTEs\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\nIf <TT><FONT SIZE=+1>ES = 0</FONT></TT>, <TT><FONT SIZE=+1>EDI ==></FONT></TT>\n...\n<BR>\n<HR NOSHADE WIDTH=\"100%\">OUTPUTS:&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>AH\n= 00h</FONT></TT> if successful\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>AH = 8Bh</FONT></TT> if 386SWAT needs more PTEs than\nspecified\n<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n<TT><FONT SIZE=+1>ECX =</FONT></TT> # additional PTEs 386SWAT needs\n<BR>\n<HR NOSHADE WIDTH=\"100%\">\n<BR>Use this call in conjunction with function <TT><FONT SIZE=+1>DEF4</FONT></TT>\nif your program enters PM without using VCPI or DPMI so that 386SWAT's\nPTEs are visible in your program's address space.\n<BR>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\">\n<CENTER><B>Protected Mode Program Interface</B></CENTER>\n\n\n<P>For the moment, there are no defined functions.&nbsp; However, when\nthere are, we will require that <TT><FONT SIZE=+1>AH = 0DEh</FONT></TT>\nand that the subfunction code be in <TT><FONT SIZE=+1>AL</FONT></TT>.\n<BR>&nbsp;\n\n<P>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\">\n<CENTER><B>Tips On Debugging DPMI Programs</B></CENTER>\n\n\n<P>If you are using an integrated DPMI host such as 386MAX, no special\naction is needed on your part to debug a DPMI program.&nbsp; 386SWAT installs\nitself as a PL0 extension to the memory manager and thus also to the DPMI\nhost.&nbsp; Place breakpoints in your code as needed as well as step right\nover the far call to the DPMI host which switches from VM to PM.\n\n<P>If you using a non-integrated DPMI host such as QDPMI.SYS which is distributed\nwith QEMM, then essentially you are debugging a VCPI client which provides\nDPMI services to its clients.&nbsp; See the next section for details on\ndebugging VCPI programs.\n<BR>&nbsp;\n\n<P>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\">\n<CENTER><B>Tips On Debugging VCPI Programs</B></CENTER>\n\n\n<P>Assuming SWAT has successfully intruded into the MM's (memory manager's)\nPM context, it is on the same level as MM -- that is, you should think\nof it as a PL0 extension of the VCPI host.&nbsp; This means that you need\nto tell SWAT to intrude into the VCPI client's context.\n\n<P>Some VCPI clients are easy to break into, some are quite hostile (not\nmaliciously, it's just that they don't leave any wiggle room). There's\nno magic to this.&nbsp; Fundamentally, SWAT needs room in the GDT for its\nselectors.&nbsp; See the above description on how to get your program to\ncooperate with SWAT, but if you want to get up and running quickly, you\nmight first try these steps:\n<UL>\n<LI>\nAllocate about 30 selectors at the end of the GDT,</LI>\n\n<LI>\nInitialize the selectors to all zero,</LI>\n\n<LI>\nPlant an INT 01h/03h in the PM portion of your code or whatever you prefer,</LI>\n\n<LI>\nType VMSINT ON on the SWAT command line,</LI>\n\n<LI>\nStart your program.</LI>\n</UL>\nThe only tricky part is to ensure that any breakpoints you set to which\nSWAT would respond occur after the stack in the VCPI client has been setup\n(and preferably also <TT><FONT SIZE=+1>DS</FONT></TT>, <TT><FONT SIZE=+1>ES</FONT></TT>,\n<TT><FONT SIZE=+1>FS</FONT></TT>, and <TT><FONT SIZE=+1>GS</FONT></TT>).&nbsp;\nTypically, this means that you can debug through every single instruction\nexcept for the handful which occur during the handoff from the VCPI host's\nPM context to the VCPI client's PM context.&nbsp; The reason for this is\nthat the VCPI PM handoff depends upon descriptor caching.&nbsp; In particular,\nthe VCPI spec has the client specifying the state of all EGP registers,\nbut only the <TT><FONT SIZE=+1>CS</FONT></TT> segment registers.&nbsp;\nThus the VCPI client starts off execution with its own environment (GDT,\nLDT, IDT, TR, and CR3) in effect, but on the VCPI host's stack.&nbsp; The\nvalue of that stack\n<BR>selector quite likely is invalid in the client's GDT/LDT, so the VCPI\nclient must switch to its own stack ASAP.&nbsp; Of course, if an interrupt/exception\noccurs before then, when the CPU attempts to use the (presumably) invalid\nstack it would trigger a Double Fault, quickly followed by a Triple Fault\nand system shutdown.\n\n<P>One other sharp corner I've run into is with VCPI clients which assume\nthat their TSS won't be used by the CPU, so they \"save\" a few bytes by\nre-using that data area.&nbsp; SWAT uses TSS selectors for its IDT entries,\nso when SWAT gains control the CPU saves the preceding context into the\ncaller's TSS.&nbsp; Also, it's a nice touch to save your CR3 into the appropriate\nplace in the TSS, but SWAT will do that for you in case you forget.&nbsp;\nOther debuggers might not be so thoughtful.\n\n<P>Also, if you switch LDTs from the original one, be sure to save the\ncurrent one in the TSS as that field is read-only to the CPU.&nbsp; That\nis, the CPU doesn't save the current LDT there when it performs a task\nswitch, so SWAT can't \"see\" your LDT otherwise.\n\n<P>As far as symbols are concerned, use <A HREF=\"swatsym.htm#MAPSSF\">MAPSSF</A>\nwith a <A HREF=\"swatsym.htm#.WSG File\">.WSG</A> file.&nbsp; See the <A HREF=\"swatsym.htm\">SWATSYM.DOC</A>\nfor more details.&nbsp; After SWAT pops up in PM within your program, type\n<A HREF=\"swatcmd.htm#TS\">TS</A> on the SWAT command line to tell SWAT\nto recalculate the base address of all symbols and symbols should appear.&nbsp;\nThe <A HREF=\"swatsym.htm#.WSG File\">.WSG</A> file tells SWAT the value\nof various selectors, but of course it can't know at that time the base\naddress.&nbsp; That's why you need to tell SWAT to recalculate.\n<BR>\n<HR SIZE=4 NOSHADE WIDTH=\"100%\">\n<CENTER><B>Tips On Debugging RM Programs</B></CENTER>\n\n\n<P>Debugging Real Mode programs is quite similar to debugging VCPI programs,\nexcept that you must use the debugging interface to allow SWAT to gain\na foothold into your PM context.&nbsp; Because there is no interrupt (such\nas INT 67h for VCPI) when a RM programs enters PM, your program must cooperate\nwith SWAT in order for it to be of use.\n\n<P>Also note that you cannot trace through the instructions which setup\nthe resources the CPU needs to run in PM.&nbsp; In particular, this includes\nLGDT, LIDT, and <TT><FONT SIZE=+1>MOV CR0,</FONT></TT><I>r32</I> (or LMSW),\nas well as those instructions which setup the segment registers in PM,\nespecially <TT><FONT SIZE=+1>CS</FONT></TT> and <TT><FONT SIZE=+1>SS</FONT></TT>\n(note that <TT><FONT SIZE=+1>CS</FONT></TT> is setup by executing a far\njump).&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "swat/WHATSNEW",
    "content": "Version 6.04\n\n* Implement UNREAL as keyword in the 386SWAT.PRO file.\n\n\nVersion 6.03\n\n* Support for display of MMX & SSE instructions\n* Display MMX and SSE registers via Alt-F11.\n* Support for display of FCMOVcc, FCOMI, FUCOMI, FCOMIP, FUCOMIP\n  instructions\n* Implement FSONLY keyword to allow SWAT to install in Windows w/o\n  DVGA or MDA because you promise to bring up SWAT in a Full Screen\n  DOS window only.\n* Implement X15 keyword to tell SWAT to pass through INT 15h memory\n  size calls (thus not protecting its own allocated memory).  This is \n  a debugging keyword only, not for general use.\n* Fix bug where all Family 6 CPUs were thought to support the Last\n  Branch/Exception feature, whereas, in fact, only Intel CPUs do.  \n  This would cause SWAT to reboot during initialization on certain \n  Cyrix CPUs.\n* Display + or - sign after jcc instruction if a Branch Hint prefix\n  (2Eh or 3Eh) is present.\n\n\nVersion 6.02\n\n* Support MDA hidden by PCI VGA or PCI AGP controller, and secondary\n  PCI VGA adapter.\t See SWATIDSP.HTM for more details.\n* Support 4MB pages in PTE display as well as the PTE and SPTE\n  commands.\n* Fix bug when using BC on current instruction and G to another\n  instruction.\n* Fix bug in display of MOV r32,[EBP*n+disp32].\n* Display appropriate comments on PCI calls (INT 1Ah).\n* Emulate references to the debug registers (DRn) if the GD bit is set\n  in DR7.\n* Implement search for not a value, e.g., S addr addr ~val.\n* Implement DLG16 & DLG32 commands to display dialogs when in Windows.\n\n* Extend monitor expressions to BD and BC commands.\n* Implement BP command to break on page references.\n\n\nVersion 6.01\n\n* Implement UNREAL command to allow debugging of Unreal Mode.  This\n  mode is a variant of Real Mode in which any segment register can\n  access all of the 4GB address space.\tThat is, instead of the normal\n  64KB length of a segment, the length is 4GB.\tThis command can\n  enable all or just some of the segment registers for Unreal Mode.\n  See SWATCMD.HTM for more details.\n\n\nVersion 6.00.002\n\n* Implement s-F10 to save the current screen into the last screen\n  buffers.\n* Fix various bugs in 386SWAT's RM Windows support.\n* Implement QS command to display nearest symbol at or before a given\n  address.\n* Implement DTE command to display Descriptor Table Entry on the\n  command line.\n* Implement MDB command to display a Windows Module Database.\n* Implement TDB command to display a Windows Task Database.\n* Implement .MDB to return Sel|0 of current MDB.\n* Implement .TDB to return Sel|0 of current TDB.\n* Display PDE and PTE bits with PTE command.\n\n\nVersion 6.00.001\n\n* Code reorganization to accommodate logged in versions 5.10.071-9\n* Documentation moved over to HTML format.\n\n\nVersion 6.00.000\n\n* Implement support for Windows kernel debugging.  This major upgrade\n  is described (to some degree) in WINKDBG.DOC; also see 386SWAT.DOC\n  and SWATVXD.DOC.\n\n\nVersion 5.10.079\n\n* Add More Service Routine Text\n\n  Add service routine text displays for Win95 VMM routines.  This text\n  is displayed when decoding INT 20h calls.\n\n\nVersion 5.10.078\n\n* Fix .VMSTK and .VMRET Commands\n\n  For some reason, the implementations of the .VMSTK and .VMRET\n  commands didn't work, so now they do.  Moreover, .VMSTK is now\n  called .VMCRS (for Client Register Struc).\n\n\nVersion 5.10.077\n\n* Implement Time Stamp Counter Display\n\n  On CPUs which support it (TSC bit set in CR4), display the # clocks\n  executed since the last time 386SWAT was entered.  There is a\n  certain amount of overhead in each entry to 386SWAT, so the numbers\n  displayed will never be at the level of single instruction clock\n  counts, but it is a good measure of time over a longer set of\n  instructions.\n\n\nVersion 5.10.076\n\n* Handle New Windows Keyboard Keys\n\n  The Microsoft Natural keyboard contains three new keys:\n\n  * Left Windows key\n  * Right Windows key\n  * Application key\n\n  These keys have new scan codes which our keyboard handler now\n  recognizes, although we don't do much with them as yet.  The left\n  and right Windows keys are meant to be modifiers just as Shift,\n  Ctl-, and Alt-keys are modifiers.  The Application key is meant to\n  be an actual keystroke, so I've assigned arbitrary key codes to it\n  in its Unshifted, Shift-, Ctl-, and Alt-states.\n\n  For the moment, until someone can think of something better, the\n  Application key invokes the Help menu.\n\n\nVersion 5.10.075\n\n* Miscellaneous internal changes\n\n\nVersion 5.10.074\n\n* Use Ctrl-Shift-PrtSc To Print Instruction Window Only\n\n  When printing multiple instruction screens, repeating the register\n  display and other information on the second and subsequent screens\n  is unnecessary.  To this end, the key combination Ctrl-Shift-PrtSc\n  prints the instruction portion of the display only, assuming the\n  instruction window is displayed (if not, the entire screen is\n  printed as usual).\n\n\nVersion 5.10.073\n\n* Implement Saved Register Clear Command\n\n  In case you do not need to restore a saved register set, the saved\n  state can be cleared with the RC command.\n\n* In the operand analysis display for an IRETd with NT=1, the back\n  link TSS selector is omitted as there's no room for it and all of\n  the other information being displayed.\n\n\nVersion 5.10.072\n\n* Implement Command Recall\n\n  Commands entered on the command line are saved in a ring buffer\n  whose length can be changed from the default of 1024 via the profile\n  keyword CMDHIST=nnn.\n\n  Previous commands can be retrieved via the keystrokes Alt-<\n  (previous command) and Alt-> (next command).\tPressing either of\n  these keys repeatedly scrolls through the buffer in the chosen\n  direction.  The keystroke Alt-?  displays a history of (up to 25)\n  commands from which a command can be chosen by scrolling up or down\n  through the list, or by typing the letter next to the command.  A\n  command may be deleted from this list via the Del key.\n\n* A bug was fixed when running under Windows where a jump was taken\n  with the wrong sense (JZ vs.\tJNZ) if Win386 services are available.\n\n* A new help screen to describe the various searching options is\n  defined.\n\n\nVersion 5.10.071\n\n* Fix Bug When Searching For Bytes\n\n  In an earlier TWT, when handling Page Faults, the ZF flag was\n  cleared without realizing that subsequent code depended upon it\n  being set.  The effect was that searches for bytes were never found.\n  This change fixes that.\n\n\nVersion 5.10.070\n\n* Implement INSERT Command\n\n  To debug Windows at the lowest level, we need to be able to insert\n  ourselves into Windows startup shortly after it enters PM.  To this\n  end, the INSERT command is available.  It is used from the 386SWAT\n  command line at the point just before Windows enters PM.\n\n\nVersion 5.10.069\n\n* Allow Fill Command On Physical Memory\n\n  The Fill (F) command used to change data in memory now allows an\n  optional trailing P also optionally followed by a CR3, just as the\n  Unassemble and other commands allow.\n\n\nVersion 5.10.068\n\n* Fix Bug In Implicit Stack References\n\n  When displaying the data (if any) pointed to by the current\n  instruction, if the instruction used an implicit stack reference\n  (such as the PUSH instruction) we sometimes would use the wrong base\n  register (ESP vs. SP).  This TWT fixes that bug.\n\n\nVersion 5.10.067\n\n* AutoFault for GP Faults\n\n  The Autofault facility has been extended to GP Faults.  This means\n  that an attempt is made to interpret each GP Fault intercepted by\n  386SWAT in a short sentence.\tType Shift-F4 to see the last\n  Autofault error message.\tBecause GP Faults are many and varied,\n  some cases will be missed (marked as unknown) or mistaken.  Please\n  notify the author as you encounter such cases with the exact\n  circumstances of the GP Fault so they may be corrected.\n\n\nVersion 5.10.066\n\n* When Running Under Windows, Map In/Out VM's First Megabyte\n\n  Previously, when our local keyboard handler was active, we avoided\n  checking and setting the keyboard values in the BIOS data area if\n  Windows was active because we couldn't be sure that that memory\n  region was mapped in.  Now that I have discovered Win386 (INT 22h)\n  services, we can map in/out that region around references to it.\n\n\nVersion 5.10.065\n\n* Set the GD Bit In DR7\n\n  Because some programs get a kick out of resetting the debug\n  registers which we've carefully setup, this change has 386SWAT\n  automatically set the Global Debug (GD) bit in DR7 on startup so\n  that we can stop such programs before they can do any harm.  Perhaps\n  it doesn't surprise you that Windows is the chief reason for this\n  feature.\n\n\nVersion 5.10.064\n\n* Display Real Mode Interrupt Vector Table\n\n  As it's a very common data structure to view, the keystroke Shift-F5\n  now displays the RM IVT.\n\n\nVersion 5.10.063\n\n* Filter Leading Text From Symbols\n\n  Some symbols, especially from Windows programs written in C, are\n  prefaced with text such as \"__imp__\", \"_\", and the like which adds\n  the symbol's length but not understanding.  This feature allows you\n  to specify in the 386SWAT profile leading text which is to be\n  stripped from each symbol.\n\n\t SYMFILTER = text1 [text2 [...]]\n\n  The default settings are\n\n\t SYMFILTER=__imp__ _\n\n  Up to 128 characters can be specified in this way.\n\n\nVersion 5.10.062\n\n* Fix Bug When Displaying Long Symbol Names\n\n  When we display a symbol names of 50 chars or greater at the top of\n  a data screen, we're off by one in our calculations which can cause\n  the name to fold to the next line.\n\n\nVersion 5.10.061\n\n* Fix Bug In The Stack Width Change Calculation\n\n  Previously, the calculation of when to change stack width (words or\n  dwords) occurred only when the code selector changed.  In fact, it\n  should be checked when the stack selector changes (duh!).\n\n\nVersion 5.10.060\n\n* Fix Bug With Mis-aligned Stack In GP Fault Handler\n\n  If the user hooks GP Faults, the handler in LCL_INT0D uses a stack\n  structure which is missing one word in the middle.  It's amazing it\n  has worked at all so far.\n\n\nVersion 5.10.059\n\n* Implement Support For P6 Features\n\n  Two P6 features are supported by this TWT.\n\n  1.  The Branch Trace Facility (BTF) can be turned on and off via the\n\t  command line BTF ON/OFF.\n\n  2.  The Last Branch/Exeception From/To registers can be displayed at\n\t  all times in the lower right corner of the screen.  This feature\n\t  can be turned on and off via the command line LBR ON/OFF.\n\n* Skip Over Read/Write From/To Debug Registers If GD Bit Is Set\n\n  When the GD bit in DR7 is set, any read from or write to a debug\n  register triggers a Debug Fault (and the CPU clears the GD bit from\n  DR7 so the Debug Fault handler can use those registers).\n\n  Some environments (Microsoft Windows comes to mind) clear the debug\n  registers upon entry (and at other times) thus making it difficult\n  debug in that context.  With this change, setting the GD bit traps\n  reads and writes of those registers and handles them transparently.\n  A read from a debug register returns the actual value.  A write to a\n  debug register is ignored.  The GD bit can be set from the 386SWAT\n  command line via\n\n\tR DR7.GD=1\n\n  If you desire this behavior to be the default, use SWATCMD with the\n  above argument.\n\n\nVersion 5.10.058\n\n* Add .VM addresses for Windows debugging\n\n  Especially when debugging calls from a Windows app down to a VM\n  interrupt handler, it is sometimes useful to know where we'll come\n  back to in Windows on the other side of the ARPL wall.  .VMRET will\n  often work if the call was made via DPMI SIMVMI (function 0300h) or\n  an INT instruction emulated by the DPMI host (Windows).\n\n* Add Go Monitor command and .CSIP to 386SWAT\n\n  The GM (go monitor) command takes an expression which will be\n  evaluated as the CPU single-steps (equivalent to Pad-plus or F11).\n  No display will occur until 1) the monitor expression evaluates TRUE\n  or 2) 386SWAT is invoked by some other means (GP fault, NMI, Ctrl-\n  Alt-Pad5, etc.)\n\n  Boolean expressions may be constructed using the dyadic operators\n  &&, ||, <, <=, ==, >=, and >.  Operator precedence is the same as\n  the C language.\n\n  For example:\n\n  GM ah\n\t executes until AH is non-zero.\n\n  GM [.csip == 21cd && ah!=9\n\t executes until the current instruction is INT 21 and AH is any\n\t value other than 9 (DOS display string).\n\n  GM cx == 0\n\t executes until CX is 0.\n\n  GM\n\texecutes until the last expression specified with GM is TRUE.\n\n  There are some limitations:\n\n\t1. Currently, GM does not single-step across mode switches via INT\n\t   (but will handle any mode switch handled by Pad Plus).\n\t2. It is slow as molasses.\n\t3. With the addition of boolean operators like && and ||\n\t   precedence becomes more of something one would reasonably\n\t   expect.\n\t4. GM will not work in TSS mode currently (non-critical, failure\n\t   mode is the expression doesn't trigger).\n\n\nVersion 5.10.057\n\n* Fix Bug When Testing For Extended Memory\n\n  Due to an oversight, when I put in the code to determine the amount\n  of extended memory using the INT 15h/0E801h call, I put it in after\n  the INT 15h/0DA88h, instead of before.  Because of a bug in Phoenix\n  4.04 BIOSes, which crash on the 0DA88h call, the order is important.\n\n  Also, when setting up the IDT entry for VCPI debugging using TSSes,\n  we used to set the offset to -1 (because the IDT selector is a TSS\n  and the offset isn't used).  For convenience, I'm now setting the\n  low-order byte of the offset to the interrupt #.\tThat way, when\n  looking at the IDT in memory (not via F4) it's easy to tell which\n  interrupt it covers.\n\n\nVersion 5.10.056\n\n* Workaround Feature In Win95\n\n  Because of a quirk in Win95 (what, only one!), when we blast in the\n  PTEs for 386SWAT to address the monochrome and color video buffers\n  from local addresses, we need to preserve the AVL bits and set the\n  accessed bit so this PTE won't be thought of as one available for\n  allocation.\n\n\nVersion 5.10.055\n\n* Handle Large Size 386SWAT With VCPI Clients\n\n  If the resident portion of 386SWAT becomes too large (perhaps a\n  large SYMSIZE or SAVESCREEN), then we might not be able to debug\n  VCPI clients because our footprint exceeds the 4MB limit (one page\n  directory) for VCPI.\tIf this happens, we should at least warn the\n  user in case s/he intends to debug VCPI clients.\n\n* Fix Bug With Unused GDT Entry\n\n  When 386SWAT loads via the 386MAX profile, it is passed its linear\n  address when it is a VCPI client in the third of the three GDT\n  entries allocated for load modules.  This is done because 386SWAT's\n  PTEs are part of 386MAX's and get relocated by 386MAX when a VCPI\n  client loads.\n\n  When 386SWAT intrudes into a Memory Manager, we don't use the third\n  GDT entry in the same way, and in some cases we might not even\n  allocate a third GDT entry if we have found existing GDT entries for\n  an all memory selector and one which maps CR3.  In this case (I\n  encountered it when intruding into QEMM), we can mistakenly\n  reference the third GDT entry.  This TWT fixes that.\n\n* Check For Additional Autofault Errors For TSS Faults\n\n  If a TSS fault occurs, there are some additional reasons for it\n  which we now test for and report on, such as invalid selectors in\n  the back link TSS when a return from a nested TSS occurs.\n\n  At the same time, I included some additional fault error messages\n  which occur when we're using TSSs ourselves (typically when we're\n  debugging VCPI clients) which we we're checking for before.  This\n  also involves moving that error message text from the data to the\n  code segment to match where the Autofault code expects it.\n\n  Also, I changed references to $PTE_0 to $PTE_G as that's its new\n  definition, and checked for Page Fault problems related to that bit\n  if PTE Global Extensions are enabled in CR4.\n\n\nVersion 5.10.054\n\n* Handle Multiple GDTs When VCPI Debugging\n\n  While tracking down a bug in the CDROM game The 11th Hour, I found\n  that 386SWAT needed to handle intruding into multiple GDTs as this\n  game appear to use up to three different ones, alternating between\n  two quite frequently.  We now support up to eight alternating GDTs.\n\n  At the same time, I fixed a bug where 386SWAT was not correctly\n  recognizing whether or not it had already intruded into a GDT.  This\n  had the effect of filling up the GDT with 386SWAT's TSS selectors\n  which crashed the system in quick order.\n\n  Finally, while running VCPITEST to see if I had broken anything in\n  the process, I decided to remove the check for VMSINT=ON from the\n  VCPI call DE01 (Get PM Interface) in order to allow Intrude 386SWAT\n  to work with a cooperating VCPI client without having to set that\n  variable.  This means that Intrude 386SWAT will insert its PTEs into\n  every such call, but that should be harmless.  The VMSINT=ON setting\n  still controls whether or not 386SWAT intrudes into the VCPI call\n  DE0C (Switch From VM To PM).\n\n\nVersion 5.10.053\n\n* Enable Debugging Extensions (If Supported) At Virtual Init Time\n\n  The Pentium CPU's debugging extensions are supported in 386SWAT via\n  the BD command on an I/O port at which time the $DE bit is set in\n  CR4.\tThis change enables them at an earlier time so any other\n  program (such as 386MAX) can modify its behavior depending upon\n  whether or not the $DE bit is set.\n\n\nVersion 5.10.052\n\n* Make Device Driver 386SWAT Sensitive to Another Extended Memory\n  Function\n\n  The recent change to 386MAX to support the 0E801h Extended Memory\n  function call needs to be copied to device-loading 386SWAT not only\n  so it can detect how much extended memory is in the system, but also\n  so it can lie to any subsequent program requesting the extended\n  memory size through that interface.\n\n\nVersion 5.10.051\n\n* Implement Show PTE Command\n\n  Strolling through a large set of Page Tables such as under Windows\n  can be tiresome, hence there's a new command.  The SPTE command\n  works exactly likely the PTE command (displaying the Linear\n  address/PDE/PTE on the command line) as well as displaying the\n  corresponding PTE (as if you had pressed F5 and scrolled down to the\n  appropriate entry).\n\n  At the same time, I allowed Ctrl-Up and -Down to scroll through the\n  PDEs/PTEs one entry at a time (Up and Down scroll through one line\n  at a time).\n\n\nVersion 5.10.050\n\n* Fix Bug When Using TSS For Faults\n\n  A previous TWT changed a local routine to be more self-sufficient by\n  setting DS within the routine instead of relying upon the caller to\n  set this register.  Alas, that was a mistake as in some cases we\n  rely upon the Invisible Descriptor Cache, particularly when we're\n  accessing selector values in the caller's LDT.  This TWT fixes that\n  to use two routines, one which assumes the global DS has been set,\n  one which does not.\n\n  At the same time, I fixed a problem with device-loading 386SWAT\n  where software INTs 01h, 02h, 03h, and 68h are not being enabled if\n  VME is.\n\n\nVersion 5.10.049\n\n* Fix Bug With DEBUG=PMI And Device-Loading 386SWAT\n\n  If we're loading as Device 386SWAT at startup, INIT_PROT is called\n  at the point where 386SWAT is a temporary VCPI client of the MM.\n  Thus the active IDT is that of the VCPI client and INIT_PROT is\n  setting up the MM's IDT where the VCPI client has calculated the\n  IDT's linear address in the VCPI client's linear address space.\n\n  All this is background to say that we can't signal an INT 01h if\n  DEBUG=PMI is specified because the active IDT (that of the VCPI\n  client) does not have its IDT entries setup for debugging unless\n  there's a preceding 386SWAT in the picture.  This changes enforces\n  that condition.\n\n\nVersion 5.10.048\n\n* Call REST_PROT/INIT_PROT On Windows Entry/Exit With Device-Loading\n  386SWAT\n\n  When 386SWAT is loaded as a device driver (whether it was intruding\n  into an existing memory manager or loading as VCPI SWAT), previously\n  it wasn't handling the transitions into and out of Windows.\n\n  When Windows starts up, 386SWAT needs to disable itself (by calling\n  its REST_PROT entry point) so that it is in the proper state when\n  the 386SWAT VxD calls 386SWAT's INIT_PROT entry point after Windows\n  loads.  Correspondingly, when Windows terminates, the VxD calls\n  386SWAT at its REST_PROT and 386SWAT needs to call its INIT_PROT\n  entry point to re-enable it.\n\n  When 386SWAT is loaded from within 386MAX, MAX handles calling the\n  proper REST_PROT/INIT_PROT entry points.\tWhen 386SWAT is loaded as\n  a device driver, these calls were not made.\n\n  Now they are.\n\n\nVersion 5.10.047\n\n* Swap Out Local IDT Entries Around TOGINT Call\n\n  When 386SWAT is active, it hooks various interrupts for its own use\n  such as the timer, keyboard, cascade, and mouse (the latter two in\n  case there's a PS/2-style mouse which goes through the keyboard\n  controller).\n\n  When we toggle an interrupt via command line (TOGINT xx xx ...), or\n  keystroke (Alt-F1, etc.), we need to swap out our local entries\n  around the toggle so that we save the new entry in the proper\n  (global) location.  In particular, this affects TOGINT 0A which is\n  hooked locally.\n\n\nVersion 5.10.045 & 5.10.046\n\n* Allow Search Command Of PTEs\n\n  When tracking down a bug in Win95, I found it useful to extend the\n  search command to search through the PTEs for a specific value.  The\n  new syntax is\n\n\t S\taddr addr\t# PTE\n\t S\taddr L expr # PTE\n\n   where PTE can be any expression.\n\n   At the same time, I fixed a bug where a Page Fault during the\n   display of the searched for data caused a crash.\n\n* Miscellaneous Changes\n\n  1.  Display appropriate comment on DPMI interrupt lines.\tThis also\n\t  involves defining a new segment to hold the DPMI function values\n\t  (as words).\n\n  2.  For display of PTEs, note the PDE which contains the top line of\n\t  the display as well as the range of linear addresses covered by\n\t  the top line.\n\n  3.  For display of PDEs, note the range of linear addresses covered\n\t  by the top line.\n\n  4.  Display display of PTEs and PDEs, handle not present entries by\n\t  displaying \"????????\".\n\n  5.  Change the initial mask for memory display to allow 32-bit\n\t  values.\n\n  6.  Change the number of entries displayed in dword format to eight\n\t  by squeezing the entries together.  Note that the previous width\n\t  can be obtained via the dd/4 command.\n\n  7.  Save the previous d?/?? value for later use separately for each\n\t  width.\n\n  8.  If the selector passed to any routine which calls GETARWBASE is\n\t  not present, return with CF=1 to indicate an error.  This change\n\t  is needed by WINSWAT to avoid displaying an incorrect label for\n\t  not present selectors.  As it turns out, without this change and\n\t  with the new KRNL386, USER, GDI symbol display in WINSWAT the\n\t  label displayed for not present selectors is that of the Windows\n\t  routine BOZOSLIVEHERE.\n\n\nVersion 5.10.044\n\n* Prepare for Winswat\n\n  A feature needed by WINSWAT is the ability to set a temporary\n  breakpoint from a Windows program.  This requires that we fill in\n  the rest of the fields where else this feature is used.\n\n  A feature needed by WINSWAT is the ability to refresh debug hooks\n  when a selector's linear address changes.\n\n\nVersion 5.10.043\n\n* Make Device Driver 386SWAT Sensitive to PCI Extended Memory Function\n\n  The recent change to 386MAX to support the PCI Extended Memory\n  function call needs to be copied to device-loading 386SWAT not only\n  so it can detect how much extended memory is in the system, but also\n  so it can lie to any subsequent program requesting the extended\n  memory size through that interface.\n\n\nVersion 5.10.042\n\n* Implement Data Width Switch\n\n  When displaying data via the Dx command, a new switch allows you to\n  specify the number of elements to be displayed per line.\tFor\n  example, to display five (instead of the usual eight) words per\n  line, use DW/5.\n\n  This feature is a stopgap until I implement a more general data\n  record display as in the Periscope debugger.\n\n\nVersion 5.10.041\n\n* Use Monochrome Adapter If Present\n\n  Rather than switch to the mono adapter every time I startup the\n  system, I thought it easier to implement a keyword to do the same.\n  With this keyword (MONO) present, if a monochrome adapter is present\n  in the system, it becomes the initial display screen for 386SWAT.\n  The monochrome adapter has always been supported by 386SWAT -- this\n  just makes it the initial display screen as opposed to the color\n  monitor.\n\n\nVersion 5.10.040\n\n* Allow TSS Debugging In VM\n\n  If a program enters PM from RM and asks 386SWAT to enter its GDT and\n  IDT, as usual we setup TSS selectors for the interrupts we manage.\n  If this program subsequently enters VM, we need to handle the\n  interrupt via a TSS from VM differently as the stack and register\n  interpretation (segments vs. selectors) are different.  Previously,\n  our TSS interrupt code expected to be entered from PM only, so a\n  change is needed.\n\n  Also, when debugging such a RM program where the user sets a\n  breakpoint shortly after entering PM (via setting the PE bit in CR0)\n  but before setting TR, I found that 386SWAT failed miserably because\n  it was depending upon there being a valid back link in the local\n  TSS.\tThus, more changes were needed to handle an invalid back link.\n  In conjunction with this change, the register set command (R) is\n  enhanced to allow TR and LDTR (a.k.a.  LDT) to be read and set, so\n  the user can setup a valid back link should the need arise.\n\n  Also, when 386SWAT is installed as a RM debugger, avoid setting TR\n  to our local TSS as that changes it from an invalid value to a valid\n  value.  Unfortunately, this doesn't prevent another program from\n  doing the same, but at least we're not the culprit.  BTW, unlike the\n  LDTR, there seems to be no way to clear (and thus invalidate) the\n  Task Register once it's set.  Setting TR to zero (which is after all\n  its initial state), causes a GP Fault even though the current value\n  of TR may be already be invalid.\tThus, once TR is set to an invalid\n  (and possibly non-zero) value, it stays that way until set to a\n  valid value.\n\n* Clear NT bit in EPM.ASM\n\n  After switching into PM, the code in EPM.ASM should clear the NT bit\n  in case a subsequent IRET/D occurs (as it does) in order to avoid a\n  TSS Fault.  Thanks to John Fine for pointing this out.\n\n\nVersion 5.10.039\n\n* Support Spain 172 Keyboard Layout\n\n  Thanks to Roberto Deza Asensio, 386SWAT now supports this keyboard\n  layout.\n\n\nVersion 5.10.038\n\n* Include Function-Specific Text in INT 21h Comments\n\n  Because they occur so often in code, the display of INT 21h\n  instructions which are the current instruction now includes\n  function-specific text (e.g., \"Write File (handle)\").\n\n\nVersion 5.10.037\n\n* Calculate SYMSIZE based upon the size of the loaded symbol table\n\n  Previously, I had attempted to calculate SYMSIZE based upon the size\n  of the incoming .SSF file and it didn't work.  This time it does.\n  The effect is that you don't need to use SYMSIZE with a LOADSYM,\n  thus reducing wasted space in 386SWAT's symbol table as well as\n  perhaps avoiding a mistake when calculating SYMSIZE and finding it\n  is too small.\n\n* Fix Bug In MAPSSF\n\n  Due to a bug in my linker, certain far calls weren't fixed up\n  properly.\n\n\nVersion 5.10.036\n\n* Support International Keyboards\n\n  One of 386SWAT's design goals is to be as unassuming about the\n  system as possible, intruding into the system at an absolute\n  minimum.\tAs part of achieving this goal, 386SWAT has its own\n  keyboard handler so it can debug keyboard actions within the BIOS as\n  well as not depend upon the system's keyboard routines or data being\n  intact and functional.\n\n  One consequence of this is that 386SWAT needs to be changed in order\n  to support international keyboards which is what this TWT\n  accomplishes.\n\n  To this end, the keyword KEYB= is recognized in the 386SWAT profile.\n  At the start, the only keyboard supported is the German one -- its\n  keyboard layout is 129, so the KEYB= value is GR129.\tOthers can be\n  supported as the need arises.  See file 386SWAT.DOC under the KEYB=\n  entry for the list of supported keyboards.\n\n  Thanks to Armin Kunaschik, 386SWAT now supports this keyboard\n  layout.\n\n\nVersion 5.10.035\n\n* Include INT 03h and INTO in GPSKIP=INT Processing\n\n  When I put in GPSKIP=INT, I checked for the INT xxh opcode (0CDh),\n  but forgot about INT 03h (0CCh) and INTO (0CEh).\tThese cases are\n  now covered.\n\n\nVersion 5.10.034\n\n* Implement Return Address and Goto Return Address\n\n  A common address to jump to is the (near or far) return address of a\n  subroutine.  This is made easier by using shortened forms of the\n  commands one might use to extract these addresses.  For details, see\n  the \"Common Memory References\" section in 386SWAT.DOC.\n\n\nVersion 5.10.033\n\n* Make NORMLIDT The Default\n\n  I've encountered enough circumstances debugging RM where RM LIDT\n  redirection has gotten in the way, that I've decided that it's best\n  to make NORMLIDT the default and use the (new) keyword RMLIDT to\n  enable it when necessary.\n\n\nVersion 5.10.032\n\n* Parse I/O Command line Instructions as LVALs\n\n  For greater generality, the command line I/O instructions now allow\n  an LVAL instead of just an atom.\tAlso, the IMR command line action\n  displays the original values not the ones set by 386SWAT.\n\n\nVersion 5.10.031\n\n* Validate Back Link In Operand Analysis Display for IRET/D\n\n  On occasion, I've had the system go poof on an IRET/D when the NT\n  bit was set (and I didn't notice that) and the back link TSS was\n  invalid for some reason (either bad TSS selector, or something was\n  wrong with the TSS, such as the CR3 value was invalid).  This TWT\n  checks for that condition and reports it as part of the operand\n  analysis display for the IRET/D instructions.\n\n\nVersion 5.10.030\n\n* Ensure Default Options Set If No Profile\n\n  If the user omits a profile on the 386SWAT device line, we skip out\n  before setting default options.  Now we don't.\n\n\nVersion 5.10.029\n\n* Handle Invalid Symbol Selectors\n\n  If we upload symbols with an invalid selector (say, the *.WSG file\n  is for another context -- DPMI vs.  VCPI vs.\tRM), the call to\n  GETBASE returns an error along with EAX=-1.  If this value is used\n  for the linear address, the symbol is marked as invalid and the\n  address hash code gets confused.\tThis change checks for the above\n  eventuality and sets the pseudo-linear address to zero to avoid this\n  problem.\tBTW, the symptom is that (say) SWATRUN hangs when\n  uploading symbols if it has two or more symbols with the same\n  (invalid) linear address, e.g.  300|0.\n\n* At the same time, I upgraded the grammar for LS and PS to accept\n  lvals instead of just atoms, thus allowing a wider variety of ways\n  of specifying the arguments to these commands.  Others in this same\n  vein to follow.\n\n\nVersion 5.10.028\n\n* Make INTRUDE The Default Option\n\n  Now that INTRUDE is reasonably well debugged, I'm making it the\n  default option so users don't need to remember to use it (which has\n  happened several times).\tThis will reduce the number of tech\n  support questions I get from users of 386SWAT on the Internet.  In\n  case the user needs to use the VCPI client version of 386SWAT, the\n  disabling option VCPISWAT is defined.\n\n\nVersion 5.10.027\n\n* Fix Bug When Running in RM\n\n  An earlier TWT introduced a bug (for RM SWAT only) which set the\n  B-bit in the stack selector.\tThe problem is that I forgot to reset\n  that bit when returning to RM.  The solution is to define a new\n  selector which has the same characteristics as DTE_SS, except with\n  the B-bit is clear.  Before returning to RM, we switch to this new\n  selector so as to return to an environment which is compatible with\n  RM.\n\n\nVersion 5.10.026\n\n* Handle SIGINT 1/3\n\n  While debugging an incompatibilty with ViruSafe, I needed a minor\n  enhancement to SIGINT to overcome their attempts to fool a RM\n  debugger.  They used many tricks including self-modifying code, as\n  well as installing their own INT 01h/03h handlers.  At one point\n  their code signals INT 01h which 386SWAT intercepts, of course.  I\n  needed to signal this interrupt to them, but SIGINT 1 invoked it as\n  a PM interrupt, which proceeded to crash the system.\tThe solution\n  was to signal INT 01h/03h as a VM interrupt, as well as ensure that\n  TF is set in the return flags if it's INT 01h from a single-step (as\n  opposed to a software interrupt INT 01h).\n\n* At the same time, I needed to save the incoming value of DR6 which\n  triggered another change (and bug fix).  The bug fixed is an\n  incorrect data value width in a struc missed when I changed the code\n  segment from USE16 to USE32.\n\n* A related change cleaned up (and documented) the tests which handle\n  the case where 386SWAT is entered other than through a debug\n  exception, but with the GD bit set.\n\n\nVersion 5.10.025\n\n* Display MAC Entries\n\n  After many years of wading through MAC entries, I decided to\n  implement a separate display screen for them (actually, Win95 pushed\n  me over the edge -- this is a variant of \"The devil made me do it\").\n\n  The keyboard combination of Ctl-M brings up this screen.\n\n* There's also a separate command MACBASE which allows you to set the\n  base address of the MAC chain in case it's different from .DMAC.\n  This is handy when displaying the DOS subsegment chain.\n\n\nVersion 5.10.024\n\n* Fix Bug In PATH= Profile Routine\n\n  When converting over to USE32 data, I missed a place where I should\n  have cleared the high-order word of a 32-bit register.\n\n  Also, in the process of debugging this problem, I put in several\n  more Shift debugging messages.\n\n\nVersion 5.10.023\n\n* Fix Bug With VCPI Get Protected Mode Interface Calls\n\n  In order for us to provide debugging services to VCPI clients, we\n  need to insert our PTEs into the VCPI client's address space.  There\n  are several contexts in which this might occur:\n\n  1.  386SWAT is loaded via LOAD= with 386MAX:\tour PTEs are\n\t  automatically copied to the VCPI client's address space as part\n\t  of 386MAX's response to the Get Protected Mode Interface (GPMI\n\t  -- DE01h) call.\n\n  2.  386SWAT is loaded as a VCPI client to a memory manager:\n\t  previously we didn't handle this case.  Now we use the newly\n\t  defined RMDEV_GPMITAIL label in low DOS memory which this\n\t  TWT defines an return point in order to catch the tail of\n\t  the GPMI call.  At this point, we switch back to our code in\n\t  extended memory, and copy our PTEs to the end of the GPMI\n\t  caller's PTE buffer.\n\n  3.  386SWAT intruded into a MM (possibly 386MAX):  previously we\n\t  placed a PM return address on the stack and passed control\n\t  on to the MM.  This doesn't work with all MMs as some check\n\t  the VM bit in the flags when interpreting the segment\n\t  registers saved on the stack.  Now we use the newly defined\n\t  DEV_GPMITAIL label which this TWT defines as a return point\n\t  in order to catch the tail of the GPMI call.\tAt this point,\n\t  we switch back to our code in extended memory, and copy our\n\t  PTEs to the end of the GPMI caller's PTE buffer.\n\n\nVersion 5.10.022\n\n* Avoid Page Fault on LIN2PPTE Accesses\n\n  The LIN2PPTE subroutine translates a linear address to a pointer to\n  the corresponding PTE according to a specific CR3.  Sometimes we\n  need to read more than one PTE from the Page Directory which doesn't\n  always work (because the subroutine doesn't know how many PTEs to\n  map in the case we're not mapping relative to the current CR3).  A\n  solution to this is to tell the subroutine how many PTEs are to be\n  mapped in.\n\n\nVersion 5.10.021\n\n* Compatibility With PMODE\n\n  There is a popular shareware DOS extender available on the Internet\n  called PMODE which is used to create PM programs.  When it is run as\n  a VCPI client, it allocates selectors from the top down in the GDT\n  -- the same as 386SWAT does.\tPMODE uses the AVL bit in the DTE to\n  mark a selector as in use, so this change has us set that bit in the\n  selectors we allocate so PMODE doesn't write on top of our\n  selectors.\n\n\nVersion 5.10.020\n\n* Fix Bug When Swapping INTs\n\n  When we swap IDT entries (say when displaying the IDT via F4) so we\n  see or act upon the global IDT entries, we don't swap INTs 74h and\n  76h.\tNow we do.\n\n\nVersion 5.10.019\n\n* Use Same DPL When Hooking Interrupts\n\n  Some memory managers (pssst, it's EMM386) set the DPL of various\n  entries in the IDT to zero expecting the CPU to signal a GP Fault if\n  the corresponding software interrupt occurs.\tWhen we intrude into\n  their PL0 context, previously we were setting the DPL to three\n  because we didn't expect to encounter a MM which had a fetish with\n  GP Faults.  Now we retain the same DPL as the original IDT entry\n  except for INTs 01h and 03h.\tThey are handled differently so we can\n  issue the corresponding software interrupts and gain control\n  immediately instead of having to hook the GP Fault handler and pick\n  them off there.\n\n\nVersion 5.10.018\n\n* Fix Disappearing Cursor Bug\n\n  For years we've put up with this bug.  Now it's fixed.\n\n  The problem occurs in any of three contexts:\n\n  * when reviewing last screens (Alt-F10),\n  * when switching between color and mono adapters (Alt-F7), or\n  * when swapping screens (say, when exiting 386SWAT).\n\n  The problem occurs because not all programs maintain a consistent\n  set of data values in the BIOS data area on which we rely (e.g., the\n  dependence between the cursor type and the cursor emulation bit).\n\n  The fix is to read the cursor start and end line values upon entry\n  and restore those values in the above circumstances.\tA new routine,\n  GET6845 is defined for the read starting value part.\tI seem to\n  recall that the original definition of the 6845 registers was that\n  they were write-only, but apparently they are now readable as well.\n\n  At the same time, while testing the different contexts in which\n  386SWAT changes the cursor type, I noticed that the Enter command\n  handles the INS key, but not the XINS key, so I changed it.\n\n\nVersion 5.10.017\n\n* Implement Exit Command\n\n  A common command line sequence is to set AH to 4C, SIGINT 21, and G.\n  This is now done via a command called EXIT.\n\n\nVersion 5.10.016\n\n* Add Debugging Displays To 386SWAT During Initialization\n\n  To help me figure out why 386SWAT wasn't installing under Win95, I\n  made several changes:\n\n  * Add some debugging displays (press and hold either shift key when\n\t386SWAT is loading ala Shift-MAX).\n  * If there are no VCPI services (DEBUG=NOVCPI in 386MAX), fail\n\tgracefully.\n  * Ensure interrupts are re-enabled upon returning from VCPI/PM.\n  * Ensure that the B-bit is set in our stack selector.\n  * Avoid calling CHECK_I92 if we're in VM as it can reboot the system\n\t(learned the hard way).\n  * Put in a check to avoid calling OLDINT67_VEC if it's zero (who can\n\targue with that?).\n  * Avoid a bug in MASM 5.10b which generates a word fixup when it\n\tshould generate a dword fixup.\tAny questions on why I want to\n\twrite my own assembler?\n\n\n"
  },
  {
    "path": "swat/WINKDBG.DOC",
    "content": "\t\t  Notes on Windows Kernel Debugging\n\t\t  ---------------------------------\n\nWindows implements a low-level debugging interface called Kernel\nDebugging (WKD) which obtains control very early in the startup\nsequence of Windows.  The program WDEB386 shipped with the Windows SDK\nis an example of one such program; 386SWAT is another.\n\nWhen Windows sees that a kernel debugger is present, it informs the\ndebugger about a number of events as they occur, principally parameter\nerrors made by running Windows programs as they call Windows API\nfunctions.\tFor example, if a program calls EnableWindow with an\ninvalid window handle (say, zero), this error is passed on to the WKD\nfor processing before returning to the calling program.  In this way,\na great many errors can be caught before they can cause any harm.\n\nBy default, 386SWAT is a WKD.  If, for some reason, you wish to\ndisable this feature, place the keyword NOWINK into your 386SWAT\nprofile.\n\nAt the current time, you must have a monochrome adapter and monitor\nattached to your system in order for WKD services to be allowed by\n386SWAT.  386SWAT tests for a mono card and disables WKD if not found.\n\n\nNew Command Line Actions\n------------------------\n\n* To enable or disable WKD services entirely, use\n\n\tWKD [ON|OFF]\n\n  This option is available outside Windows only.  If you have\n  specified NOWINK in the 386SWAT profile, this option has no effect\n  -- you must remove that profile option and reboot the system to\n  enable WKD services.\n\n* To change the response to a parameter error, use\n\n\tWKD [NOISY|QUIET]\n\n  If NOISY is specified, then each parameter error is followed by the\n  prompt \"Break, Ignore, Quiet?\" to which you must respond B, I, or\n  Q.\n\n  A response of Q, is equivalent to setting WKD QUIET after which\n  parameter errors are logged to the screen, but execution does not\n  stop for any more parameter errors until you break into 386SWAT and\n  type WKD NOISY on 386SWAT's command line.  This is the default\n  state, so you'll see parameter errors fly past on the mono screen\n  without pause.  I recommend that when you are debugging your own\n  code, use WKD NOISY; otherwise, use WKD QUIET.  This is because many\n  commercial packages contain so many parameter errors that you'll\n  constantly be interrupted with a BIQ prompt.\n\n  A response of I, ignores this one error only and continues\n  execution.\n\n  A response of B, triggers a single step breakpoint at an IRETD\n  inside 386SWAT.  Tracing over this instruction returns to the\n  instruction inside Windows immediately following the call to\n  386SWAT (typically an INT 41h).  Tracing from this point on\n  eventually gets you back to a call to LogError which was called by\n  the Windows API function which encountered the invalid parameter,\n  and then back to the application which called the Windows API with\n  an invalid parameter.  If the application is Win32, then you'll have\n  to trace back through a thunking layer before you get to the\n  application.\tThis can be quite tricky.  At some point, I'll try to\n  put in some stack tracing to aid this process.\n\n* Sometimes Windows and/or applications make direct calls to LogError\n  as opposed to indirect calls as part of a parameter error.  These\n  calls are uncommon, so there is a separate switch to control\n  386SWAT's response to such an event.  Use\n\n\tWKD LOGERROR [ON|OFF]\n\n  to change the response of stopping at an IRETD inside 386SWAT or\n  not.\tThe default setting is OFF.\n\n* Sometimes an application is bad enough that it triggers an\n  unrecoverable fault (typically a GP or Page Fault) and it must be\n  terminated.  Windows gives the WKD a crack at it first to which\n  386SWAT responds by stopping in the application at the faulting\n  instruction, thus giving you the opportunity to debug the problem.\n  If you wish to tell Windows to handle the fault itself (typically\n  by terminating the application), use\n\n\tWKD FAULT SKIP\n\n  If you do not want to receive any more fault messages from Windows,\n  use\n\n\tWKD FAULT OFF\n\n  To restart receiving fault messages, use\n\n\tWKD FAULT ON\n\n* The keystroke Ctrl-K brings up a menu from which you can choose to\n  display various internal Windows structures.\tAt the moment, the\n  only one which has been fleshed out is the display of the Windows\n  Global Heap (WGH).  The WGH contains one entry for each globally\n  allocated region of memory.  For example, the various code and data\n  segments of KRNL386.EXE are global allocations and have entries in\n  this table.  To scroll through this table, use the usual up and down\n  arrow keys as well as Page Up and Page Down.\n\n  To search through the WGH for a specific entry, use the SGH command:\n\n  SGH [/b|/s|/h|/o] [/c] expr\n\n  The expression (expr) entered is interpreted as a base address if /b\n  is specified, size if /s, handle if /h, and owner if /o.  If /c is\n  specified, the search continues from the currently displayed entry;\n  otherwise, the search starts at the top of the heap.\tIf the value\n  is found in the WGH, the WGH is displayed with the matching entry at\n  the top of the screen.  If you wish to repeat the search (perhaps\n  becayse there are multiple entries with the same owner), either\n  retype the command (and specify /c so the search continues with the\n  next entry after the one at the top of the screen), or start the\n  command with a slash so it is not erased after successful execution.\n  If the value is not found in the WGH, an error message is displayed.\n\n* If Invalid Page Faults are being trapped by SWAT's VxD (see\n  SWATVXD.DOC for more details), use the IPF command to control how\n  these events are to be handled.\n\n  IPF [/d] [/s] [/r] expr\n\n  where /d tells SWAT not to display a message on the mono screen\n  describing this event, /s tells SWAT not to stop when this event\n  occurs, /r tells SWAT to remove this entry from its local tables,\n  and expr is an expression which evaulates to a linear address\n  corresponding to the Invalid Page Fault.\n\n* To display the memory pointed to by a selector as a Module Database,\n  use\n\n  MDB expr\n\n* To display the memory pointed to by a selector as a Task Database,\n  use\n\n  TDB expr\n\n* Certain commands usually preceded with a dot are automatically\n  passed to Windows for processing by WIN386, assuming Windows is\n  active and WIN386 services are available.  These commands include\n\n  ?\t\tDisplay a Help screen with the available commands\n  .?\t\tDisplay a list of registered dot commands (e.g., .M)\n  .R [#]\tDisplay the registers of the current thread (or thread #)\n  .VM [#]\tDisplay the complete VM status of the current VM (or #)\n  .VC [#]\tDisplay the current VM's (or #) control block\n  .VH [#]\tDisplay a VMM linked list, given list handle\n  .VR [#]\tDisplay the registers of the current VM (or #)\n  .VS [#]\tDisplay the current VM's (or #) virtual stack\n  .VL\t\tDisplay list of all valid VM handles\n  .DS\t\tDisplay protected mode stack with labels\n  .VMM\t\tDisplay menu of VMM state info\n  .<dev_name>\tDisplay device-specific info\n\n\n\nProfile Options\n---------------\n\nBecause 386SWAT is a WKD, it is given much more information to\nprocess.  Much of that data is stored in its internal log file\n(acessible via Ctl-F10) which means that you should increase the log\nfile's default size.  You might experiment with different values, but\nI suggest using something on the order of LOGSIZE=100000.\n\nDuring Windows startup while still in RM/VM, Windows loads the real\nmode portion of all of the VxDs to be used this Windows session.  At\nthis time, Windows tells the WKD about these VxDs and where they will\nbe loaded in memory when in PM, and 386SWAT logs this information in\ntwo ways.\n\nThe first way is to write a line to the mono display with the data\nabout each segment (code or data) of the form\n\nLoaded VxD <VxDname>, module <Modname> at <address> len <length>\n\nThe second way is to append a symbol to 386SWAT's symbol table of the\nform <VxDname>_Code<nnnn> or <VxDname>_Data<nnnn>, where <nnnn> is a\ndecimal sequence number starting at 1 and is used to distinguigh one\ncode/data segment from another.  By convention in Windows, code\nsegments are in selector 0028h and data segments are in selector\n0030h.\tThese symbols are useful when debugging VxDs.\n\nIn order to save this information, you need to tell 386SWAT how much\nspace to reserve.  The profile option WKDLS (Load Segments) is used\nfor this purpose.  The actual value depends upon how many VxD code and\ndata segments are loaded on your system.  I use WKDLS=700.\tIf you\nhave no interest in debugging VxDs, omit this profile option as the\ndefault value is zero which reserves no space.\tYou might also want to\nincrease the profile value for SYMSIZE.  I use SYMSIZE=700000 (you do\nhave 32MB of RAM, don't you?).\n\n\nDebugging DLLs\n--------------\n\nThe Windows SDK (3.1x or 95) contains separate copies of various\nsystem DLLs each of which which contain more messages and checks on\nWindows execution.  I haven't played with these much, so you're on\nyour own, but it may be very worthwhile.  They also contain symbol\nfiles which I haven't put in code to load as yet.\n\n\nSWAT VxD\n--------\n\nThis version of 386SWAT no longer requires that you load SWATVXD.EXE\nas a resident program (thus saving you a few bytes of DOS memory), but\nthe VxD must be in same directory as 386SWAT.LOD.  The VxD is now\nloaded by 386SWAT when Windows starts up.  See the file SWATVXD.DOC\nfor more information on how to configure the VxD.\n\n\nLoading 386SWAT\n---------------\n\nIf you are running 386MAX as your memory manager, you could load\n386SWAT from the 386MAX profile with the LOAD= keyword.  However,\nbecause this mechanism doesn't provide for 386SWAT to have a DOS\nfootprint and such a footprint is needed for WKDing, I do not\nrecommend loading SWAT this way anymore.  Instead, load 386SWAT as a\ndevice driver on the line which immediately follows the line which\nloads the memory manager.  386SWAT must load in low DOS memory, so\ndon't try to load it high.  The low DOS memory footprint of 386SWAT is\nabout 2KB.\n\n\u001a"
  },
  {
    "path": "swat/WINKDBG.HTM",
    "content": "<HTML>\n<HEAD>\n   <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n   <META NAME=\"Author\" CONTENT=\"Bob Smith\">\n   <META NAME=\"GENERATOR\" CONTENT=\"Mozilla/4.05 [en] (Win95; U) [Netscape]\">\n   <TITLE>Notes on Windows Kernel Debugging</TITLE>\n</HEAD>\n<BODY TEXT=\"#000000\" BGCOLOR=\"#FFFFC0\" LINK=\"#0000FF\" VLINK=\"#800080\" ALINK=\"#FF00FF\">\n\n<CENTER><B><FONT SIZE=+2>Notes on Windows Kernel Debugging</FONT></B></CENTER>\n\n\n<P>Windows implements a low-level debugging interface called Kernel Debugging\n(WKD) which obtains control very early in the startup sequence of Windows.&nbsp;\nThe program WDEB386 shipped with the Windows SDK is an example of one such\nprogram; 386SWAT is another.\n\n<P>When Windows sees that a kernel debugger is present, it informs the\ndebugger about a number of events as they occur, principally parameter\nerrors made by running Windows programs as they call Windows API functions.&nbsp;\nFor example, if a program calls EnableWindow with an invalid window handle\n(say, zero), this error is passed on to the WKD for processing before returning\nto the calling program.&nbsp; In this way, a great many errors can be caught\nbefore they can cause any harm.\n\n<P>By default, 386SWAT is a WKD.&nbsp; If, for some reason, you wish to\ndisable this feature, place the keyword <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#NOWINK\">NOWINK</A></FONT></TT>\ninto your 386SWAT profile.\n\n<P>At the current time, you must have a monochrome adapter and monitor\nattached to your system in order for WKD services to be allowed by 386SWAT.&nbsp;\n386SWAT tests for a mono card and disables WKD if not found.\n<BR>&nbsp;\n\n<P><B>New Command Line Actions</B>\n\n<P><A NAME=\"WKD Command\"></A>The WKD command takes several options:\n<UL>\n<LI>\nTo enable or disable WKD services entirely, use</LI>\n</UL>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>WKD </FONT></TT>[<TT><FONT SIZE=+1>ON</FONT></TT>|<TT><FONT SIZE=+1>OFF</FONT></TT>]\n<BR>&nbsp;\n<DD>\nThis option is available outside Windows only.&nbsp; If you have specified\n<TT><FONT SIZE=+1><A HREF=\"swatpro.htm#NOWINK\">NOWINK</A> </FONT></TT>in\nthe 386SWAT profile, this option has no effect -- you must remove that\nprofile option and reboot the system to enable WKD services.</DD>\n\n<UL>\n<LI>\nTo change the response to a parameter error, use</LI>\n</UL>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>WKD </FONT></TT>[<TT><FONT SIZE=+1>NOISY</FONT></TT>|<FONT SIZE=+1><TT>QUIET</TT>]</FONT>\n<BR>&nbsp;\n<DD>\nIf <TT><FONT SIZE=+1>NOISY</FONT></TT> is specified, then each parameter\nerror is followed by the prompt <TT><FONT SIZE=+1>Break, Ignore, Quiet?</FONT></TT>\nto which you must respond <TT><FONT SIZE=+1>B</FONT></TT>, <TT><FONT SIZE=+1>I</FONT></TT>,\nor <TT><FONT SIZE=+1>Q</FONT></TT>.</DD>\n\n<DD>\nA response of <TT><FONT SIZE=+1>Q</FONT></TT>, is equivalent to setting\n<TT><FONT SIZE=+1>WKD QUIET</FONT></TT> after which parameter errors are\nlogged to the screen, but execution does not stop for any more parameter\nerrors until you break into 386SWAT and&nbsp; type <TT><FONT SIZE=+1>WKD\nNOISY</FONT></TT> on 386SWAT's command line.&nbsp; This is the default\nstate, so you'll see parameter errors fly past on the mono screen&nbsp;&nbsp;\nwithout pause.&nbsp; I recommend that when you are debugging your own code,\nuse <TT><FONT SIZE=+1>WKD NOISY</FONT></TT>; otherwise, use <TT><FONT SIZE=+1>WKD\nQUIET</FONT></TT>.&nbsp; This is because many commercial packages contain\nso many parameter errors that you'll constantly be interrupted with a BIQ\nprompt.</DD>\n\n<DD>\nA response of <TT><FONT SIZE=+1>I</FONT></TT>, ignores this one error only\nand continues execution.</DD>\n\n<DD>\nA response of <TT><FONT SIZE=+1>B</FONT></TT>, triggers a single step breakpoint\nat an IRETD inside 386SWAT.&nbsp; Tracing over this instruction returns\nto the instruction inside Windows immediately following the call to 386SWAT\n(typically an INT 41h).&nbsp; Tracing from this point on eventually gets\nyou back to a call to LogError which was called by the Windows API function\nwhich encountered the invalid parameter, and then back to the application\nwhich called the Windows API with an invalid parameter.&nbsp; If the application\nis Win32, then you'll have to trace back through a thunking layer before\nyou get to the application.&nbsp; This can be quite tricky.&nbsp; At some\npoint, I'll try to put in some stack tracing to aid this process.</DD>\n\n<UL>\n<LI>\nSometimes Windows and/or applications make direct calls to LogError as\nopposed to indirect calls as part of a parameter error.&nbsp; These calls\nare uncommon, so there is a separate switch to control 386SWAT's response\nto such an event.&nbsp; Use</LI>\n</UL>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>WKD LOGERROR\n</FONT></TT>[<TT><FONT SIZE=+1>ON</FONT></TT>|<TT><FONT SIZE=+1>OFF</FONT></TT>]\n<BR>&nbsp;\n<DD>\nto change the response of stopping at an IRETD inside 386SWAT or not.&nbsp;\nThe default setting is <TT><FONT SIZE=+1>OFF</FONT></TT>.</DD>\n\n<UL>\n<LI>\nSometimes an application is bad enough that it triggers an unrecoverable\nfault (typically a GP or Page Fault) and it must be terminated.&nbsp; Windows\ngives the WKD a crack at it first to which 386SWAT responds by stopping\nin the application at the faulting instruction, thus giving you the opportunity\nto debug the problem.&nbsp; If you wish to tell Windows to handle the fault\nitself (typically by terminating the application), use</LI>\n</UL>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>WKD FAULT\nSKIP</FONT></TT>\n\n<P>If you do not want to receive any more fault messages from Windows,\nuse\n\n<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>WKD FAULT\nOFF</FONT></TT>\n\n<P>To restart receiving fault messages, use\n\n<P><TT><FONT SIZE=+1>&nbsp;&nbsp;&nbsp; WKD FAULT ON</FONT></TT>\n\n<P><A NAME=\"c-K\"></A>* The keystroke Ctrl-K brings up a menu of items to\ndisplay from which you can choose various internal Windows structures.&nbsp;\nAt the moment, the only one which has been fleshed out is the display of\nthe Windows Global Heap (WGH).&nbsp; The WGH contains one entry for each\nglobally allocated region of memory.&nbsp; For example, the various code\nand data segments of KRNL386.EXE are global allocations and have entries\nin this table.&nbsp; To scroll through this table, use the usual up and\ndown arrow keys as well as Page Up and Page Down.\n\n<P><A NAME=\"SGH Command\"></A>* To search through the WGH for a specific\nentry, use the SGH command:\n\n<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>SGH</FONT></TT>\n[<TT><FONT SIZE=+1>/b</FONT></TT>|<TT><FONT SIZE=+1>/s</FONT></TT>|<TT><FONT SIZE=+1>/h</FONT></TT>|<TT><FONT SIZE=+1>/o</FONT></TT>]&nbsp;\n[<TT><FONT SIZE=+1>/c</FONT></TT>] <I>expr</I>\n\n<P>The expression (<I>expr</I>) entered is interpreted as a base address\nif <TT><FONT SIZE=+1>/b</FONT></TT> is specified, size if <TT><FONT SIZE=+1>/s</FONT></TT>,\nhandle if <TT><FONT SIZE=+1>/h</FONT></TT>, and owner if <TT><FONT SIZE=+1>/o</FONT></TT>.&nbsp;\nIf <TT><FONT SIZE=+1>/c</FONT></TT> is specified, the search continues\nfrom the currently displayed entry; otherwise, the search starts at the\ntop of the heap.&nbsp; If the value is found in the WGH, the WGH is displayed\nwith the matching entry at the top of the screen.&nbsp; If you wish to\nrepeat the search (perhaps because there are multiple entries with the\nsame owner), either retype the command (and specify <TT><FONT SIZE=+1>/c</FONT></TT>\nso the search continues with the next entry after the one at the top of\nthe screen), or start the command with a slash so it is not erased after\nsuccessful execution. If the value is not found in the WGH, an error message\nis displayed.\n\n<P><A NAME=\"IPF Command\"></A>* If Invalid Page Faults are being trapped\nby SWAT's VxD (see <A HREF=\"swatvxd.htm\">SWATVXD.DOC</A> for more details),\nuse the IPF command to control how these events are to be handled.\n\n<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>IPF</FONT></TT>\n[<TT><FONT SIZE=+1>/d</FONT></TT>]&nbsp; [<TT><FONT SIZE=+1>/s</FONT></TT>]&nbsp;\n[<TT><FONT SIZE=+1>/r</FONT></TT>] <I>expr</I>\n\n<P>where <TT><FONT SIZE=+1>/d</FONT></TT> tells SWAT not to display a message\non the mono screen describing this event, <TT><FONT SIZE=+1>/s</FONT></TT>\ntells SWAT not to stop when this event occurs, <TT><FONT SIZE=+1>/r</FONT></TT>\ntells SWAT to remove this entry from its local tables, and <I>expr </I>is\nan expression which evaulates to a linear address corresponding to the\nInvalid Page Fault.\n\n<P>* To display the memory pointed to by a selector as a Module Database,\nuse\n\n<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>MDB</FONT></TT>\n<I>expr</I>\n\n<P>* To display the memory pointed to by a selector as a Task Database,\nuse\n\n<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <TT><FONT SIZE=+1>TDB</FONT></TT>\n<I>expr</I>\n\n<P>* Certain commands usually preceded with a dot are automatically passed\nto Windows for processing by WIN386, assuming Windows is active and WIN386\nservices are available.&nbsp; These commands include\n<TABLE BORDER=0 WIDTH=\"100%\" >\n<TR>\n<TD><TT><FONT SIZE=+1>?</FONT></TT></TD>\n\n<TD>Display a Help screen with the available commands</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.?</FONT></TT></TD>\n\n<TD>Display a list of registered dot commands (e.g., .M)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.R</FONT></TT> [#]</TD>\n\n<TD>Display the registers of the current thread (or thread #)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.VM</FONT></TT> [#]</TD>\n\n<TD>Display the complete VM status of the current VM (or #)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.VC</FONT></TT> [#]</TD>\n\n<TD>Display the current VM's (or #) control block</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.VH</FONT></TT> [#]</TD>\n\n<TD>Display a VMM linked list, given list handle</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.VR</FONT></TT> [#]</TD>\n\n<TD>Display the registers of the current VM (or #)</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.VS</FONT></TT> [#]</TD>\n\n<TD>Display the current VM's (or #) virtual stack</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.VL</FONT></TT></TD>\n\n<TD>Display list of all valid VM handles</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.DS</FONT></TT></TD>\n\n<TD>Display protected mode stack with labels</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.VMM</FONT></TT></TD>\n\n<TD>Display menu of VMM state info</TD>\n</TR>\n\n<TR>\n<TD><TT><FONT SIZE=+1>.</FONT></TT><I>dev_name</I></TD>\n\n<TD>Display device-specific info</TD>\n</TR>\n</TABLE>\n&nbsp;\n\n<P><B>Profile Options</B>\n\n<P>Because 386SWAT is a WKD, it is given much more information to process.&nbsp;\nMuch of that data is stored in its internal log file (acessible via Ctl-F10)\nwhich means that you should increase the log file's default size.&nbsp;\nYou might experiment with different values, but I suggest using something\non the order of <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#LOGSIZE\">LOGSIZE</A>=100000</FONT></TT>.\n\n<P>During Windows startup while still in RM/VM, Windows loads the real\nmode portion of all of the VxDs to be used this Windows session.&nbsp;\nAt this time, Windows tells the WKD about these VxDs and where they will\nbe loaded in memory when in PM, and 386SWAT logs this information in two\nways.\n\n<P>The first way is to write a line to the mono display with the data about\neach segment (code or data) of the form\n\n<P><TT><FONT SIZE=+1>Loaded VxD </FONT></TT><I>VxDname</I><TT><FONT SIZE=+1>,\nmodule </FONT></TT><I>Modname</I><TT><FONT SIZE=+1> at </FONT></TT><I>address</I><TT><FONT SIZE=+1>\nlen </FONT></TT><I>length</I>\n\n<P>The second way is to append a symbol to 386SWAT's symbol table of the\nform <I>VxDname</I><TT><FONT SIZE=+1>_Code</FONT></TT><I>nnnn</I> or <I>VxDname</I><TT><FONT SIZE=+1>_Data</FONT></TT><I>nnnn</I>,\nwhere <I>nnnn</I> is a decimal sequence number starting at <TT><FONT SIZE=+1>1</FONT></TT>\nand is used to distinguigh one code/data segment from another.&nbsp; By\nconvention in Windows, code segments are in selector <TT><FONT SIZE=+1>0028h</FONT></TT>\nand data segments are in selector <TT><FONT SIZE=+1>0030h</FONT></TT>.&nbsp;\nThese symbols are useful when debugging VxDs.\n\n<P><A NAME=\"WKDLS\"></A>In order to save this information, you need to tell\n386SWAT how much space to reserve.&nbsp; The profile option <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#WKDLS\">WKDLS</A>\n</FONT></TT>(Load Segments) is used for this purpose.&nbsp; The actual\nvalue depends upon how many VxD code and data segments are loaded on your\nsystem.&nbsp; I use <TT><FONT SIZE=+1>WKDLS=700</FONT></TT>.&nbsp; If you\nhave no interest in debugging VxDs, omit this profile option as the default\nvalue is zero which reserves no space.&nbsp; You might also want to increase\nthe profile value for <TT><FONT SIZE=+1><A HREF=\"swatpro.htm#SYMSIZE\">SYMSIZE</A></FONT></TT>.&nbsp;\nI use <TT><FONT SIZE=+1>SYMSIZE=700000</FONT></TT> (you do have 32MB of\nRAM, don't you?).\n<BR>&nbsp;\n\n<P><B>Debugging DLLs</B>\n\n<P>The Windows SDK (3.1x or 95) contains separate copies of various system\nDLLs each of which contain more messages and checks on Windows execution.&nbsp;\nI haven't played with these much, so you're on your own, but it may be\nvery worthwhile.&nbsp; They also contain symbol files for which I haven't\nas yet put in code to load.\n<BR>&nbsp;\n\n<P><B>SWAT VxD</B>\n\n<P>This version of 386SWAT no longer requires that you load SWATVXD.EXE\nas a resident program (thus saving you a few bytes of DOS memory), but\nthe VxD must be in same directory as 386SWAT.LOD.&nbsp; The VxD is now\nloaded by 386SWAT when Windows starts up.&nbsp; See the file <A HREF=\"swatvxd.htm\">SWATVXD.DOC</A>\nfor more information on how to configure the VxD.\n<BR>&nbsp;\n\n<P><B>Loading 386SWAT</B>\n\n<P>If you are running 386MAX as your memory manager, you could load 386SWAT\nfrom the 386MAX profile with the <TT><FONT SIZE=+1>LOAD=</FONT></TT> keyword.&nbsp;\nHowever, because this mechanism doesn't provide for 386SWAT to have a DOS\nfootprint and such a footprint is needed for WKDing, I do not recommend\nloading SWAT this way anymore.&nbsp; Instead, load 386SWAT as a device\ndriver on the line which immediately follows the line which loads the memory\nmanager.&nbsp; 386SWAT must load in low DOS memory, so don't try to load\nit high.&nbsp; The low DOS memory footprint of 386SWAT is about 2KB.&nbsp;<!--#include virtual=\"/footer.htm\" -->\n</BODY>\n</HTML>\n"
  },
  {
    "path": "switcher/main.cpp",
    "content": "#include <stdio.h>\n#include <stdlib.h>\n#include <dos.h>\n#include <string>\n#include <iostream>\nusing namespace std;\n\nextern char far *get_ptr_1(char far* x,int b);\n#pragma aux get_ptr_1 = \\\n    \"mov ax,1401h\"       \\\n    \"int 0f0h\"            \\\n    parm   [cx dx] [bx] \\\n    value     [ds si]    \\\n    modify    [ax];\n\n\nextern int HasDMMI();\n#pragma aux HasDMMI = \"mov ax,0\" \"int 0f0h\"  value [ax] modify [ax];\n\n\n\nint main(int,char**)\n{\n\texit(0);\n\tprintf(\"Switcher DMMI Client, (C) Chourdakis Michael.\\r\\n\");\n\tint i = HasDMMI();\n\tif (i != 0xFACE)\n\t{\n\t\tprintf(\"Switcher requires a DMMI Server.\\r\\n\");\n\t\texit(1);\n\t}\n\n\tchar cmd[100] = { 0 };\n\tfor (;;)\n\t{\n\t\tcout << \"* \";\n\t\tcin >> cmd;\n\t\tstring c = cmd;\n\t\tif (c == \"exit\" || c == \"quit\")\n\t\t{\n\t\t\tbreak;\n\t\t}\n\n\t\tif (c == \"help\" || c == \"?\")\n\t\t{\n\t\t\tcout << \"Commands available: help, exit\" << endl;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (c == \"run\")\n\t\t{\n\t\t\t// load path\n\t\t\tsize_t pos = 0;\n\t\t\tstd::string token;\n\t\t\tstring delimiter = \" \";\n\t\t\twhile ((pos = c.find(delimiter)) != std::string::npos) \n\t\t\t{\n\t\t\t\ttoken = c.substr(0, pos);\n\t\t\t\tc.erase(0, pos + delimiter.length());\n\t\t\t}\n\t\t}\n\t}\n\n\tprintf(\"Switcher End.\\r\\n\");\n\treturn 0;\n}\n"
  },
  {
    "path": "switcher/switcher.lk1",
    "content": "FIL main.obj\n\n"
  },
  {
    "path": "switcher/switcher.mk",
    "content": "project : F:\\TOOLS\\ASM\\full2\\switcher\\switcher.exe .SYMBOLIC\n\n!include F:\\TOOLS\\ASM\\full2\\switcher\\switcher.mk1\n"
  },
  {
    "path": "switcher/switcher.mk1",
    "content": "!define BLANK \"\"\nF:\\TOOLS\\ASM\\full2\\switcher\\main.obj : F:\\TOOLS\\ASM\\full2\\switcher\\main.cpp &\n.AUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\switcher\n *wpp main.cpp -i=\"G:\\WATCOM/h\" -w4 -e25 -zq -od -d2 -bt=dos -fo=.obj -ml -x&\ns -xr\n\nF:\\TOOLS\\ASM\\full2\\switcher\\switcher.exe : F:\\TOOLS\\ASM\\full2\\switcher\\main.&\nobj .AUTODEPEND\n @F:\n cd F:\\TOOLS\\ASM\\full2\\switcher\n @%write switcher.lk1 FIL main.obj\n @%append switcher.lk1 \n *wlink name switcher d all sys dos op m op maxe=25 op q op symf @switcher.l&\nk1\n\n"
  },
  {
    "path": "switcher/switcher.tgt",
    "content": "40\ntargetIdent\n0\nMProject\n1\nMComponent\n0\n2\nWString\n3\nEXE\n3\nWString\n5\nde6en\n1\n0\n1\n4\nMCommand\n0\n5\nMCommand\n0\n6\nMItem\n12\nswitcher.exe\n7\nWString\n3\nEXE\n8\nWVList\n0\n9\nWVList\n0\n-1\n1\n1\n0\n10\nWPickList\n2\n11\nMItem\n5\n*.cpp\n12\nWString\n6\nCPPOBJ\n13\nWVList\n0\n14\nWVList\n0\n-1\n1\n1\n0\n15\nMItem\n8\nmain.cpp\n16\nWString\n6\nCPPOBJ\n17\nWVList\n0\n18\nWVList\n0\n11\n1\n1\n0\n"
  },
  {
    "path": "switcher/switcher.wpj",
    "content": "40\nprojectIdent\n0\nVpeMain\n1\nWRect\n0\n0\n7680\n9178\n2\nMProject\n3\nMCommand\n0\n4\nMCommand\n0\n1\n5\nWFileName\n12\nswitcher.tgt\n6\nWVList\n1\n7\nVComponent\n8\nWRect\n0\n0\n5690\n4295\n0\n0\n9\nWFileName\n12\nswitcher.tgt\n0\n0\n7\n"
  },
  {
    "path": "thread16.asm",
    "content": "USE16\n\nmacro thread16header sts,sto\n{\n\tdb 4096 dup (144) ; // fill NOPs\n\t\n\t; Load IDT\n\tCLI\n\tmov di,DATA16\n\tmov ds,di\n\tlidt fword [ds:idt_RM_start]\n\n\t; Stack\n\tmov ax,sts\n\tmov ss,ax\n\tmov sp,sto\n\t\t\n\t; A20\n\tcall FAR CODE16:EnableA20f\n\n\t; Quick Enter Unreal\n\tcall FAR CODE16:EnterUnreal\n\n\n\t; Spurious, APIC\t\t\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x0F0\n\tMOV EDX,[FS:EDI]\n\tOR EDX,0x1FF\n\tpush dword 0\n\tpop fs\n\tMOV [FS:EDI],EDX\n\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x0B0\n\tMOV dword [FS:EDI],0\n}\n\nThread16_1:\n\n\tthread16header STACK16T1,stack16t1_end\n\n    ; Start\n\tmov [FromThread1],1\n\tqunlock16 mut_1\n\tcli\n\thlt\n\t\t\n\nThread16_2:\n\n\tthread16header STACK16T2,stack16t2_end\n\n\tmov [FromThread2],1\n    sti \n\tmov dx,thrm1\n\tmov ax,0900h\n\tint 21h\n\tcli\n\n\tqunlock16 mut_1\n\tcli\n\thlt\n\t\t\nThread16_3:\n\n\tthread16header STACK16T3,stack16t3_end\n\n\tmov [FromThread3],1\n    sti \n\tmov dx,thrm2\n\tmov ax,0900h\n\tint 21h\n\tcli\n\n\tqunlock16 mut_1\n\tcli\n\thlt\n\t\t\n\t\t\nThread16_4:\n\n\tthread16header STACK16T4,stack16t4_end\n\n\tmov [FromThread4],1\n\tsti \n\tmov dx,thrm3\n\tmov ax,0900h\n\tint 21h\n\tcli\n\n\tqunlock16 mut_1\n\tcli\n\thlt\n"
  },
  {
    "path": "thread32.asm",
    "content": "USE16 \n\nmacro thread32header ofs,seg\n{\n\tUSE16 \n\t; Remember CPU starts in real mode\n\tdb 4096 dup (144) ; // fill NOPs\n\n\t; Stack\n\tmov ax,STACK16T5\n\tmov ss,ax\n\tmov sp,stack16t5_end\n\n\t; A20\n\tcall FAR CODE16:EnableA20f\n\n\t; Unreal\n\tcall FAR CODE16:EnterUnreal\n\t\n\t; Spurious, APIC\t\t\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x0F0\n\tMOV EDX,[FS:EDI]\n\tOR EDX,0x1FF\n\tpush dword 0\n\tpop fs\n\tMOV [FS:EDI],EDX\n\n\tMOV EDI,[DS:LocalApic]\n\tADD EDI,0x0B0\n\tMOV dword [FS:EDI],0\n\n\t; Protected\n\tEnterProtected ofs,seg,0\n}\n\n\nThread32_1:\n\n\tthread32header Thread32_1a,code32_idx\n\tcli\n\thlt\n\thlt\n\n\n\tUSE32\nThread32_1a:\n\tmov ax,data16_idx\n\tmov ds,ax\n\tmov [FromThread5],1\n\tqunlock32 mut_1\n\tcli\n\thlt\n\n\nUSE32"
  },
  {
    "path": "thread64.asm",
    "content": "USE16 \ninclude 'directlong.asm'\n\nThread64_1:\n\n\tthread64header\n\tdb 066h\n\tdb 0eah\n\tThread64Ptr2 dd 0\n\tdw code64_idx\n\n\n\tUSE64\nThread64_1a:\n\n    linear r8,FromThread6\n\tmov byte [r8],1\n\tqunlock64 mut_1\n\tcli\n\thlt\n\n\nUSE64"
  },
  {
    "path": "unreal.asm",
    "content": "USE16\n\n; Leaves FS in unreal mode\nEnterUnreal:\n    cli\n\tPUSHAD\n\tMOV AX,DATA16\t\n\tMOV FS,AX\n\tlinear eax,0,CODE16\n\tmov     [fs:code16_descriptorUNR.b0_15],ax ; store it in the dscr\n\tshr     eax,8\n\tmov     [fs:code16_descriptorUNR.b16_23],ah\n\tXOR eax,eax\n\tmov     [fs:data32_descriptorUNR.b0_15],ax ; store it in the dscr\n\tmov     [fs:data32_descriptorUNR.b16_23],ah\n\t; Set gdt ptr\n\tlinear eax,dummy_descriptorUNR\n\tmov     [gdt_ptrUNR],eax\n\tmov bx,gdt_startUNR\n\tlgdt [fs:bx]\n\tmov eax,cr0\n\tor al,1\n\tmov cr0,eax \n\tJMP $+2\n\tmov ax,10h\n\tmov fs,ax\n\tmov     eax,cr0         \n\tand     al,not 1        \n\tmov     cr0,eax         \n\txor ax,ax\n\tmov fs,ax\n\tPOPAD\t\nRETF\n"
  },
  {
    "path": "vbox.vbox-prev",
    "content": "<?xml version=\"1.0\"?>\n<!--\n** DO NOT EDIT THIS FILE.\n** If you make changes to this file while any VirtualBox related application\n** is running, your changes will be overwritten later, without taking effect.\n** Use VBoxManage or the VirtualBox Manager GUI to make changes.\n-->\n<VirtualBox xmlns=\"http://www.virtualbox.org/\" version=\"1.15-windows\">\n  <Machine uuid=\"{a436033c-67f8-4e9f-b0fe-0a7efbadb84d}\" name=\"vbox\" OSType=\"Other_64\" snapshotFolder=\"Snapshots\" lastStateChange=\"2018-12-25T16:48:04Z\">\n    <MediaRegistry>\n      <DVDImages>\n        <Image uuid=\"{e6514449-af13-4958-9628-33af9ee8fa81}\" location=\"F:/TOOLS/ASM/full2/d.iso\"/>\n      </DVDImages>\n      <FloppyImages>\n        <Image uuid=\"{3633dce4-e06c-456b-9a07-c48367a1e1a2}\" location=\"F:/TOOLS/ASM/full2/a.img\"/>\n      </FloppyImages>\n    </MediaRegistry>\n    <ExtraData>\n      <ExtraDataItem name=\"GUI/LastCloseAction\" value=\"PowerOff\"/>\n      <ExtraDataItem name=\"GUI/LastNormalWindowPosition\" value=\"363,108,720,442\"/>\n    </ExtraData>\n    <Hardware>\n      <CPU>\n        <PAE enabled=\"true\"/>\n        <LongMode enabled=\"true\"/>\n        <HardwareVirtExLargePages enabled=\"true\"/>\n      </CPU>\n      <Memory RAMSize=\"64\"/>\n      <Paravirt provider=\"Default\"/>\n      <Display VRAMSize=\"6\"/>\n      <VideoCapture screens=\"1\" file=\".\" fps=\"25\"/>\n      <RemoteDisplay enabled=\"false\"/>\n      <BIOS>\n        <IOAPIC enabled=\"true\"/>\n      </BIOS>\n      <USB>\n        <Controllers>\n          <Controller name=\"OHCI\" type=\"OHCI\"/>\n        </Controllers>\n      </USB>\n      <Network>\n        <Adapter slot=\"0\" enabled=\"true\" MACAddress=\"080027A516CD\" cable=\"true\" type=\"Am79C973\">\n          <NAT/>\n        </Adapter>\n      </Network>\n      <AudioAdapter driver=\"DirectSound\" enabled=\"true\" enabledIn=\"false\"/>\n      <GuestProperties>\n        <GuestProperty name=\"/VirtualBox/HostInfo/GUI/LanguageID\" value=\"en_US\" timestamp=\"1545755934256737600\" flags=\"\"/>\n      </GuestProperties>\n    </Hardware>\n    <StorageControllers>\n      <StorageController name=\"IDE\" type=\"PIIX4\" PortCount=\"2\" useHostIOCache=\"true\" Bootable=\"true\">\n        <AttachedDevice passthrough=\"false\" tempeject=\"true\" type=\"DVD\" hotpluggable=\"false\" port=\"1\" device=\"0\">\n          <Image uuid=\"{e6514449-af13-4958-9628-33af9ee8fa81}\"/>\n        </AttachedDevice>\n      </StorageController>\n      <StorageController name=\"Floppy\" type=\"I82078\" PortCount=\"1\" useHostIOCache=\"true\" Bootable=\"true\">\n        <AttachedDevice type=\"Floppy\" hotpluggable=\"false\" port=\"0\" device=\"0\">\n          <Image uuid=\"{3633dce4-e06c-456b-9a07-c48367a1e1a2}\"/>\n        </AttachedDevice>\n      </StorageController>\n    </StorageControllers>\n  </Machine>\n</VirtualBox>\n"
  },
  {
    "path": "vdebug.asm",
    "content": "FORMAT MZ\nHEAP 0\n\ninclude 'config.asm'\ninclude 'struct.asm' \n   \n\n\n; stack\nsegment STACK16\nUSE16 \n\ndw 128 dup(0)\nstre:\n\n; data\nsegment DATA16\nUSE16\n\nrun db 0\npsp dw 0\nmypsp dw 0\n\nif VDEBUG = 0\nm1 db \"Virtualization Debugger, (C) Chourdakis Michael - Set VDEBUG=1 to config.asm.\",0x0D,0x0A,\"$\"\nelse\nm1 db \"Virtualization Debugger, (C) Chourdakis Michael.\",0x0D,0x0A,\"$\"\nend if\nprg db \"d:\\debuggee.exe\",0x0\n\n\ndismposcount dd 0\ndismpos dd 0\nbbb LoadX 0,0,0,0,0,0,0\n\ninclude 'vdebug64.asm'\ninclude \"reqdmmi.asm\"\n\n\n; main\nsegment CODE16\nUSE16\n\nback16:\n\n\t; End\n\tcli\n\tmov ax,STACK16\n\tmov ss,ax\n\tmov eax,stre\n\tmov esp,eax\n\tsti\n\tmov ax,DATA16\n\tmov ds,ax\n\tmov es,ax\n\n\t; Set the PSP\n\tmov ah,0x50\n\tmov bx,[mypsp]\n\tint 0x21 \n\n\tmov ax,0x4C00\n\tint 0x21\n\n\nstart16:\n\n\n\tmov ax,STACK16\n\tmov ss,ax\n\tmov eax,stre\n\tmov esp,eax\n\tmov ax,DATA16\n\tmov ds,ax\n\tmov es,ax\n\tmov ax,0x0900\n\tmov dx,m1\n\tint 0x21\n\nif VDEBUG = 0\n\tmov ax,0x4C00\n\tint 0x21\nend if \n\n\tmov ah,0x62\n\tint 0x21\n\tmov [mypsp],bx\n\n\tmov eax,1\n\tcpuid\n\tbt ecx,5\n\tjc VMX_Supported\n\tmov ax,0x4C00\n\tint 0x21\n\tVMX_Supported:\n\n\tRequireDMMI\n\n\t; dism pos\n\tmov ax,0x1401\n\txor ecx,ecx\n\txor edx,edx\n\tint 0xF0\n\t;break\n\tmov word [es:dismpos],si\n\tmov word [es:dismpos + 2],ds\n\tshr esi,16\n\tmov word [es:dismposcount],si\n\tmov word [es:dismposcount + 2],ds\n\tmov ax,DATA16\n\tmov ds,ax\n\n\t; Load executable\n\tmov bx,bbb\n\tmov dx,prg\n\tmov ax,0x4B01\n\tint 0x21\n\tjc endx\n\tBackExecutable:\n\tmov ax,DATA16\n\tmov ds,ax\n\tcmp [run],1\n\tje endx2\n\tmov [run],1\n\tmov ah,0x62\n\tint 0x21\n\tmov [psp],bx\n\n\t; Enter Long\n\txor ecx,ecx\n\tmov cx,CODE64\n\tshl ecx,4\n\tadd ecx,start64\n\tmov ax,0x0902\n\tint 0xF0\n\n\tendx2:\n\tvmcall\n\n\n\tendx:\n\n\t\n\t\n\t; End\n\tmov ax,0x4C00\n\tint 0x21\n\n\n\n\nSEGMENT ENDS \nentry CODE16:start16\n\n\n"
  },
  {
    "path": "vdebug64.asm",
    "content": "segment V\nUSE16\n\nfirstcall db 0\n\nve:\n\tmov ax,DATA16\n\tmov ds,ax\n\tmov ax,[bbb.sp]\n\tmov sp,ax\n\tmov ax,[bbb.ss]\n\tmov ss,ax\n\tmov ax,[bbb.ip]\n\tpush ax\n\tmov ax,[bbb.cs]\n\tpush ax\n\tvmcall ; first call\n\tretf\n\n\n\nsegment STACK64\nUSE64\nstx dq 1024 dup(0)\nste:\n\nnop\nrspsave dq 0\nexitreason db 0\nvregs dq 50 dup (0)\n\n\nsegment CODE64\nUSE64\n\ninclude 'vdisplay.asm'\n\nstart64:\n\n; interrupts\nlidt [eax]\nlinear rsp,ste,STACK64\n\nmov ax,0\nint 0xF0\n\n; Prepare the virtualization structures\n\nmov ax,0x801\nlinear r8,hr,CODE64\nmov r9,V\nmov r10,ve\nint 0xF0\n\nvmlaunch\n\nhr:\n\n; Save all volatile registers\npush r15\nlinear r15,vregs,STACK64\nmov [r15 + 0x00],rax\nmov [r15 + 0x08],rbx\nmov [r15 + 0x10],rcx\nmov [r15 + 0x18],rdx\nmov [r15 + 0x20],rsi\nmov [r15 + 0x28],rdi\nmov [r15 + 0x30],rbp\npop r15\n\n\n; check exit reason\nvmr rax,0x4402\ncmp al,18\njnz DebugInterface\n\nlinear rax,firstcall,V\ncmp byte [rax],1\nje VmFinalCall\nmov byte [rax],1\n; rip +3\nvmr rax,0x681E\nadd rax,3\nvmw64 0x681E,rax\nmov al,18\njmp DebugInterface\n\n\n\nVmFinalCall:\n; Disable VMX\nmov ax,0x800\nint 0xF0\n\n; Back to real mode\ncli\nxor rcx,rcx\nmov cx,CODE16\nshl rcx,16\nadd ecx,back16\nmov ax,0x0900\nint 0xF0\n\nDebugInterface:\n\n; al = reason\n\n; Just resume yet, not ready\nif VDEBUG = 0\n\tjmp DebugResume\nend if\n\nlinear rdx,exitreason,STACK64\nmov byte [rdx],al\ncall ShowDisplay\njmp DebugResume\n\n\nDebugResume:\npush r15\nlinear r15,vregs,STACK64\nmov rax,[r15 + 0x00]\nmov rbx,[r15 + 0x08]\nmov rcx,[r15 + 0x10]\nmov rdx,[r15 + 0x18]\nmov rsi,[r15 + 0x20]\nmov rdi,[r15 + 0x28]\nmov rbp,[r15 + 0x30]\npop r15\nvmresume"
  },
  {
    "path": "vdisplay.asm",
    "content": "\n\ndisp64:\n\tpush rax\n\tshr rax,32\n\tcall disp32\n\tpop rax\ndisp32:\n\tpush rax\n\tshr eax,16\n\tcall disp16\n\tpop rax\ndisp16:\n\tpush ax\n\tmov al,ah\n\tcall disp8\n\tpop ax\ndisp8:\n\tpush ax\n\tpush cx\n\tmov cl,4\n\tshr al,cl\n\tcall disp4\n\tpop cx\n\tpop ax\ndisp4:\n\tand al,0fh\n\tcmp al,0xA\n\tjae .hdisp4\n\n\tadd al,0x30\n\tstosb\n\tret\n\n\t.hdisp4:\n\tsub al,0xA  \n\tadd al,0x41\n\tstosb\nret\n\nmmhelp db 'Commands: ',0xd,0xa,' (? or h) - help',0xd,0xa,' (g) - go',0xd,0xa,' (r) - registers',0xd,0xa,' (t) - trace',0xd,0xa,  ' (q) - quit',0xd,0xa,         \"$\"\nmmj db 40,0\ndb 50 dup (0)\nshow dq 4096 dup (0)\n\nbbb2 LoadX 0,0,0,0,0,0,0\nrx db \"d:\\dism.exe\",0\n\nguestmode:\n\tvmr rax,0x6800 ; Guest CR0\n\tbt rax,1\n\tjz .noreal\n\t\tmov ax,0\n\t\tret\n\t.noreal:\n\t\tmov ax,0x0100\nret\n\n\nguestlinear:\n\n\tcall guestmode\n\n\tvmr rax,0x681E ; Guest RIP\n\tvmr rbx,0x802 ; Guest CS\n\tshl rbx,4\n\tadd rbx,rax\n\tmov rax,rbx\nret\n\nbytecount dd 0\n\nShowDism:\n\n\tpush rdi\n\n\t; rdi = where to store info\n\t;mov ax,dismdata2\n\t\n\tlinear rsi,dismpos,DATA16\n\txor ecx,ecx\n\txor edx,edx\n\tmov dx,[rsi]\n\tmov cx,[rsi + 2]\n\txor rdi,rdi\n\tmov di,cx\n\tshl edi,4\n\tadd edi,edx\n\n\t; EDI = output\n\n\tpush rdi\n\tcall guestlinear\n\n\t; mode, 16 bit for now\n\t; The following is bad, we must check CS selector\n\t; but test for now\n\tpush rax\n\tcall guestmode\n\tcmp al,01\n\tjnz .nmx1\n\tmov byte [rdi],32\n\tjmp .ax1\n\t.nmx1:\n\tmov byte [rdi],16\n\t.ax1:\n\tpop rax\n\t\n\t; Check Mode actually\n\t; VMCALL\n\tlinear rcx,exitreason,STACK64\n\tpush rax\n\tmov al,[rcx]\n\tcmp al,18\n\tpop rax\n\tjnz .novmcall\n\n\tpop rdi\n\tpop rdi\n\tmov rax,'vmcall';\n\tstosq\n\n\tret; nothing \n\n\t.novmcall:\n\n\tpush rax\n\tmov rcx,15\n\tmov byte [rdi + 1],15\n\tadd rdi,2\n\t.jlpp:\n\tmov bl,[rax]\n\tmov [rdi],bl\n\tinc rax\n\tinc rdi\n\tdec rcx\n\tjrcxz .jlppf\n\tjmp .jlpp\n\t.jlppf:\n\n\n\n\t; call dism.exe\n\tmov bx,bbb2\n\tmov dx,rx\n\tmov bp,0x4B00\n\tmov si,CODE64\n\tshl esi,16\n\tmov edi,esi\n\tmov ax,0x421\n\tint 0xF0\n\tpop rax\n\n\tpop rdi\n\tmov rsi,rdi ; RSI now points to dissm bytes\n\tpop rdi\t\t; RDI now to output buffer\n\n\n\n\n\tpush rax\n\t.jlp:\n\tmov al,[rsi]\n\tcmp al,0\n\tjz .end\n\tstosb\n\tinc rsi\n\tjmp .jlp\n\t.end:\n\tpop rax\n\n\t; also the # of bytes\n\tpush rdi\n\tlinear rsi,dismposcount,DATA16\n\txor ecx,ecx\n\txor edx,edx\n\tmov dx,[rsi]\n\tmov cx,[rsi + 2]\n\txor rdi,rdi\n\tmov di,cx\n\tshl edi,4\n\tadd edi,edx\n\tmov esi,[edi]\n\tpop rdi\n\n\t; ESI = Count of bytes to transfer\n\tmov byte [rdi],' '\n\tmov byte [rdi+1],'('\n\tadd rdi,2\n\n\t.jb1:\n\tcmp esi,0\n\tjz .jb2\n\tdec esi\n\tpush rax\n\tmov al,[rax]\n\tcall disp8\n\tpop rax\n\tinc rax\n\tjmp .jb1\n\t.jb2:\n\n\tmov byte [rdi],')'\n\tadd rdi,1\n\n\n\nret\n\nShowCRs:\n\n\t;rax - rdx\n\tmov eax,'CR0 ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\t\n\tmov eax,'CR3 ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'CR4 ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\tvmr rax,0x6800 \n\tcall disp32 \n\tmov al,' '\n\tstosb\n\n\tvmr rax,0x6802\n\tcall disp32 \n\tmov al,' '\n\tstosb\n\n\tvmr rax,0x6804 \n\tcall disp32 \n\tmov al,' '\n\tstosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\n\nret\n\n\nShowSegs:\n\n\t;DS \n\tmov eax,'DS ';\n\tstosd\n\tmov al,' '\n\tstosb\n\t\n\tmov eax,'ES ';\n\tstosd\n\tmov al,' '\n\tstosb\n\n\tmov eax,'FS ';\n\tstosd\n\tmov al,' '\n\tstosb\n\n\tmov eax,'GS ';\n\tstosd\n\tmov al,' '\n\tstosb\n\n\tmov eax,'SS ';\n\tstosd\n\tmov al,' '\n\tstosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\tvmr rax,0x806\n\tcall disp16 \n\tmov al,' '\n\tstosb\n\n\tvmr rax,0x800\n\tcall disp16 \n\tmov al,' '\n\tstosb\n\n\tvmr rax,0x808\n\tcall disp16 \n\tmov al,' '\n\tstosb\n\n\tvmr rax,0x80A\n\tcall disp16 \n\tmov al,' '\n\tstosb\n\n\tvmr rax,0x804\n\tcall disp16 \n\tmov al,' '\n\tstosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\n\nret\nDisplayGuestMode:\n\tcall guestmode\n\tcmp ah,0\n\tjnz .noreal\n\tmov eax,'RM ';\n\tstosd\n\tjmp .afterm\n\t.noreal:\n\n\tcmp ah,1\n\tjnz .noprot\n\tmov eax,'PM ';\n\tstosd\n\tjmp .afterm\n\t.noprot:\n\n\t.afterm:\nret\n\nShowRegs64:\n\n\tpush64\n\tlinear r15,vregs,STACK64\n\tlinear rdi,show,CODE64\n\tcld\n\n\tcall ShowCRs\n\tcall ShowSegs\n\n\t;rax - rdx\n\tmov eax,'RAX ';\n\tstosd\n\tmov rcx,13\n\tmov al,' '\n\trep stosb\n\t\n\tmov eax,'RBX ';\n\tstosd\n\tmov rcx,13\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'RCX ';\n\tstosd\n\tmov rcx,13\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'RDX ';\n\tstosd\n\tmov rcx,13\n\tmov al,' '\n\trep stosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\tmov rax,[r15 + 0x00]\n\tcall disp64\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x08]\n\tcall disp64\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x10]\n\tcall disp64\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x18]\n\tcall disp64\n\tmov al,' '\n\tstosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\t; RSI RDI RBP RSP\n\tmov eax,'RSI ';\n\tstosd\n\tmov rcx,13\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'RDI ';\n\tstosd\n\tmov rcx,13\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'RBP ';\n\tstosd\n\tmov rcx,13\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'RSP ';\n\tstosd\n\tmov rcx,13\n\tmov al,' '\n\trep stosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\tmov rax,[r15 + 0x20]\n\tcall disp64\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x28]\n\tcall disp64\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x30]\n\tcall disp64\n\tmov al,' '\n\tstosb\n\n\tvmr rax,0x681C ; Guest RSP\n\tcall disp64 \n\tmov al,' '\n\tstosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\t; Mode\n\tcall DisplayGuestMode\n\n\t; RIP\n\tmov rax,'CS:RIP  ';\n\tstosq\n\tvmr rax,0x802 ; Guest CS\n\tcall disp16 \n\tmov al,':'\n\tstosb\n\tvmr rax,0x681E ; Guest RIP\n\tcall disp64 \n\tmov al,' '\n\tstosb\n\n\tmov rax,'LINEAR  ';\n\tstosq\n\tcall guestlinear\n\tcall disp64 \n\tmov al,' '\n\tstosb\n\n\t\n\tmov al,' '\n\tstosb\n\n\n\tcall ShowDism\n\n\n\t\n\n\n\tmov ax,0x0D0A\n\tstosw\n\n\n\tmov al,'$'\n\tstosb\n\tmov dx,show\n\tmov si,CODE64\n\tshl esi,16\n\tmov ebp,0x900\n\tmov ax,0x421\n\tint 0xF0\n\n\tpop64\n\nret\n\n\n\n\nShowRegs:\n\n\tpush64\n\tlinear r15,vregs,STACK64\n\tlinear rdi,show,CODE64\n\tcld\n\n\tcall ShowCRs\n\tcall ShowSegs\n\n\t;rax - rdx\n\tmov eax,'EAX ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\t\n\tmov eax,'EBX ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'ECX ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'EDX ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'ESI ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'EDI ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'EBP ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov eax,'ESP ';\n\tstosd\n\tmov rcx,5\n\tmov al,' '\n\trep stosb\n\n\tmov ax,0x0D0A\n\tstosw\n\n\tmov rax,[r15 + 0x00]\n\tcall disp32\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x08]\n\tcall disp32\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x10]\n\tcall disp32\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x18]\n\tcall disp32\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x20]\n\tcall disp32\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x28]\n\tcall disp32\n\tmov al,' '\n\tstosb\n\n\tmov rax,[r15 + 0x30]\n\tcall disp32\n\tmov al,' '\n\tstosb\n\n\n\tvmr rax,0x681C ; Guest RSP\n\tcall disp32 \n\tmov al,' '\n\tstosb\n\n\n\n\t\n\tmov ax,0x0D0A\n\tstosw\n\n\n\t; Mode\n\tcall DisplayGuestMode\n\n\t; RIP\n\tmov rax,'CS:EIP  ';\n\tstosq\n\tvmr rax,0x802 ; Guest CS\n\tcall disp16 \n\tmov al,':'\n\tstosb\n\tvmr rax,0x681E ; Guest RIP\n\tcall disp32\n\tmov al,' '\n\tstosb\n\n\tmov rax,'LINEAR  ';\n\tstosq\n\tcall guestlinear\n\tcall disp32 \n\tmov al,' '\n\tstosb\n\n\tmov al,' '\n\tstosb\n\n\tcall ShowDism\n\n\tmov ax,0x0D0A\n\tstosw\n\n\tmov al,'$'\n\tstosb\n\tmov dx,show\n\tmov si,CODE64\n\tshl esi,16\n\tmov ebp,0x900\n\tmov ax,0x421\n\tint 0xF0\n\n\tpop64\n\nret\n\n\nShowPrompt:\n\tpush64\n\tlinear rdi,show,CODE64\n\tcld\n\tmov ax,0x0D0A\n\tstosw\n\tmov al,'*'\n\tstosb\n\tmov al,' '\n\tstosb\n\tmov al,'$'\n\tstosb\n\tmov dx,show\n\tmov si,CODE64\n\tshl esi,16\n\tmov ebp,0x900\n\tmov ax,0x421\n\tint 0xF0\n\tpop64\nret\n\nWaitForInput:\n\tcall ShowPrompt\n\n\tmov dx,mmj\n\tmov si,CODE64\n\tshl esi,16\n\tmov ebp,0xa00\n\tmov ax,0x421\n\tint 0xF0\n\tlinear rdx,mmj,CODE64\n\tmov al,[rdx + 1]\n\tcmp al,0 ; nothing entered?\n\tjz WaitForInput\n\n\t; Single Byte Commands\n\tcmp byte [rdx + 2],'?'\n\tjz .CmdHelp\n\n\tcmp byte [rdx + 2],'h'\n\tjz .CmdHelp\n\n\tcmp byte [rdx + 2],'r'\n\tjz .CmdRegs\n\n\tcmp byte [rdx + 2],'g'\n\tjz .CmdGo\n\n\tcmp byte [rdx + 2],'t'\n\tjz .CmdTrace\n\n\tcmp byte [rdx + 2],'q'\n\tjz .CmdQuit\n\n\n\tjmp WaitForInput\n\n\n\t.CmdRegs:\n\t\tcall ShowRegs\n\tjmp WaitForInput\n\n\t.CmdHelp:\n\t\tmov dx,mmhelp\n\t\tmov si,CODE64\n\t\tshl esi,16\n\t\tmov ebp,0x900\n\t\tmov ax,0x421\n\t\tint 0xF0\n\tjmp WaitForInput\n\n\t.CmdGo:\n\t\t; Clear Trap\n\t\tvmw32 0x4004,0x0 ; trap exception 0x06\n\t\tvmr rax,0x6820\n\t\tbtr rax,8\n\t\tvmw64 0x6820,rax\n\t\tjmp .InputEnd\n\n\t.CmdTrace:\n\t\t; Set Trap\n\t\tvmw32 0x4004,0x2 ; trap exception 0x06 and 0x01\n\t\tvmr rax,0x6820\n\t\tbts rax,8\n\t\tvmw64 0x6820,rax\n\t\tjmp .InputEnd\n\n\n\t.CmdQuit:\n\t\t; Abort all\n\t\tjmp VmFinalCall\n\n\t.InputEnd:\nret\n\n\nShowDisplay:\n\n\ncall ShowRegs\ncall WaitForInput\nret\n\n\n\n\n\n\n\n\n\n\n\n"
  },
  {
    "path": "vm.vmsd",
    "content": ""
  },
  {
    "path": "vm.vmx",
    "content": ".encoding = \"UTF-8\"\nconfig.version = \"8\"\nvirtualHW.version = \"12\"\nnumvcpus = \"8\"\ncpuid.coresPerSocket = \"1\"\nscsi0.present = \"TRUE\"\nscsi0.virtualDev = \"lsilogic\"\nmemsize = \"256\"\nide1:0.present = \"TRUE\"\nide1:0.fileName = \"d.iso\"\nide1:0.deviceType = \"cdrom-image\"\nethernet0.present = \"TRUE\"\nethernet0.virtualDev = \"e1000\"\nethernet0.wakeOnPcktRcv = \"FALSE\"\nethernet0.addressType = \"generated\"\nsound.present = \"TRUE\"\nsound.fileName = \"-1\"\nsound.autodetect = \"TRUE\"\npciBridge0.present = \"TRUE\"\npciBridge4.present = \"TRUE\"\npciBridge4.virtualDev = \"pcieRootPort\"\npciBridge4.functions = \"8\"\npciBridge5.present = \"TRUE\"\npciBridge5.virtualDev = \"pcieRootPort\"\npciBridge5.functions = \"8\"\npciBridge6.present = \"TRUE\"\npciBridge6.virtualDev = \"pcieRootPort\"\npciBridge6.functions = \"8\"\npciBridge7.present = \"TRUE\"\npciBridge7.virtualDev = \"pcieRootPort\"\npciBridge7.functions = \"8\"\nvmci0.present = \"TRUE\"\nhpet0.present = \"TRUE\"\ndisplayName = \"vm\"\nguestOS = \"other-64\"\nnvram = \"vm.nvram\"\nvirtualHW.productCompatibility = \"hosted\"\npowerType.powerOff = \"soft\"\npowerType.powerOn = \"soft\"\npowerType.suspend = \"soft\"\npowerType.reset = \"soft\"\nextendedConfigFile = \"vm.vmxf\"\nfloppy0.present = \"TRUE\"\nfloppy0.fileType = \"file\"\nfloppy0.fileName = \"a.img\"\nfloppy0.clientDevice = \"FALSE\"\nide1:1.present = \"FALSE\"\nnuma.autosize.vcpu.maxPerVirtualNode = \"8\"\nnuma.autosize.cookie = \"80001\"\nuuid.bios = \"56 4d 7d ca 1a f4 3a f5-56 4f dd da 39 38 a1 15\"\nuuid.location = \"56 4d 7d ca 1a f4 3a f5-56 4f dd da 39 38 a1 15\"\nmigrate.hostlog = \".\\vm-e7233550.hlog\"\npciBridge0.pciSlotNumber = \"17\"\npciBridge4.pciSlotNumber = \"21\"\npciBridge5.pciSlotNumber = \"22\"\npciBridge6.pciSlotNumber = \"23\"\npciBridge7.pciSlotNumber = \"24\"\nscsi0.pciSlotNumber = \"16\"\nethernet0.pciSlotNumber = \"32\"\nsound.pciSlotNumber = \"33\"\nvmci0.pciSlotNumber = \"34\"\nethernet0.generatedAddress = \"00:0c:29:38:a1:15\"\nethernet0.generatedAddressOffset = \"0\"\nvmci0.id = \"960012565\"\nmonitor.phys_bits_used = \"42\"\nvmotion.checkpointFBSize = \"134217728\"\nvmotion.checkpointSVGAPrimarySize = \"134217728\"\ncleanShutdown = \"TRUE\"\nsoftPowerOff = \"FALSE\"\ncheckpoint.vmState = \"\"\nsvga.vramSize = \"134217728\"\n"
  },
  {
    "path": "vm.vmxf",
    "content": "<?xml version=\"1.0\"?>\n<Foundry>\n<VM>\n<VMId type=\"string\">52 02 53 21 5d ef 94 b8-dc 4b 85 9c d9 6d f4 1b</VMId>\n<ClientMetaData>\n<clientMetaDataAttributes/>\n<HistoryEventList/></ClientMetaData>\n<vmxPathName type=\"string\">vm.vmx</vmxPathName></VM></Foundry>\n"
  },
  {
    "path": "vmxhost64.asm",
    "content": "USE64\n\n; https://www.intel.com/content/www/us/en/architecture-and-technology/64-ia-32-architectures-software-developer-vol-2b-manual.html\n; Full 2B manual\n\n\n; ---------------- Existance test ----------------\nVMX_ExistenceTest: ; RAX 1 if VMX is supported\n\tMOV RAX,1\n\tCPUID\n\tXOR EAX,EAX\n\tBTC ECX,5\n\tJNC .f\n\tMOV EAX,1\n\t.f:\nRET\n\n; ---------------- A20 routines in 64 bit ----------------\nVMX_EnableA20:\n\tpush ax\n\tin al,92h\n\tor al,02\n\tout 92h,al\n\tpop ax\nret\nVMX_DisableA20:\n\tpush ax\n\tin al,92h\n\tand al,0fdh\n\tout 92h,al\n\tpop ax\nret\n\n; ---------------- Init the structures ----------------\nVMX_Init_Structures:\n\n\t ; Read MSR\n\t xor eax,eax\n\t mov ecx,0480h\n\t rdmsr\n\n\t linear ecx,VMXRevision,VMXDATA64\n\t ; EAX holds the revision\n\t ; EDX lower 13 bits hold the max size\n\t mov [ecx],eax\n\t and edx,8191\n\t linear ecx,VMXStructureSize,VMXDATA64\n\t mov [ecx],edx\n\t ; Initialize 4096 structure datas for VMX\n\t xor eax,eax\n\t mov ax,VMXDATA64\n\t shl eax,4 ; physical\n\t Loop5X:\n\t test eax,01fffh\n\t jz Loop5End\n\t inc eax\n\t jmp Loop5X\n\t Loop5End:\n\t linear ecx,VMXStructureData1,VMXDATA64\n\t mov dword [ecx],eax\n\t add eax,4096\n\t linear ecx,VMXStructureData2,VMXDATA64\n\t mov dword [ecx],eax\n\nRET\n\nVMX_Initialize_VMX_Controls:\n    ; edx = 0x82 for unrestricted guestm, 0x2 if simple with EPT\n\n\tvmw32 0x4012,0x11FF ; Entry. Ideally, we must read 0x484 MSR to learn what to put here\n\t; bit 9 - Guest is in long mode\n\t; bit 10 - Guest is in SMM\n\t; bit 11 - Deactivate Dual monitor treatment\n\t\n\t; We can use also 0x4014 to control MSRs -> if different than the host (mighty)\n\n\tvmw32 0x4000,0x1F ; PIN, Intel 3B Chapter 20.6.1\n\t; vmw32 0x4002,0x8401e9f2; Proc, Intel 3B Chapter 20.6.2\n\tvmw32 0x4002,0x840069F2; Proc, Intel 3B Chapter 20.6.2, Leave CR3 access so we can enable long mode\n\n\n\n\tvmw32 0x401E,edx\n\tvmw32 0x400C,0x36FFF\nRET\n\n\n\nVMX_Initialize_Host:\n\t; We initialize\n\t; CR0, CR3 , CR4\n\t; CS:RIP for entry after VMExit\n\t; SS:RSP for entry after VMExit\n\t; DS,ES,TR\n\t; GDTR,IDTR\n\t; RCX = IP\n\n\t; CRX\n\n\tvmw64 0x6C00,cr0\n\tvmw64 0x6C02,cr3\n\tvmw64 0x6C04,cr4\n\n\t; CS:RIP\n\tvmw16 0xC02,cs\n\tvmw64 0x6C16,rcx\n\n\t; SS:RSP\n\tvmw16 0xC04,ss\n\tvmw64 0x6C14,rsp\n\n\t; DS,ES,FS,GS,TR\n\tvmw16 0xC06,ds\n\tvmw16 0xC00,es\n\tvmw16 0xC08,fs\n\tvmw16 0xC0A,gs\n\tvmw16 0xC0C,tssd32_idx\n\n\t; GDTR, IDTR\n\tlinear rdi,TempData,VMXDATA64\n\tsgdt [rdi] ; 10 bytes : 2 limit and 8 item\n\tmov rax,[rdi + 2]\n\tmov rbx,0x6C0C\n\tvmwrite rbx,rax\n\n\tlinear rdi,TempData,VMXDATA64\n\tsidt [rdi] ; 10 bytes : 2 limit and 8 item\n\tmov rax,[rdi + 2]\n\tmov rbx,0x6C0E\n\tvmwrite rbx,rax\n\n\t; EFER\n\tmov ecx, 0c0000080h ; EFER MSR number. \n\trdmsr ; Read EFER.\n\tmov rbx,0x2C02\n\tvmwrite rbx,rax\nRET\n\nVMX_InitializeEPT:\n\txor rdi,rdi\n\tlinear rax,PhysicalEptOffset64,DATA16\n\tmov rdi,[rax]\n \n\t; Clear everything\n\tpush rdi\n\txor rax,rax\n\tmov ecx,8192\n\trep stosq\n\tpop rdi\n\t; RSI to PDPT\n\tmov rsi,rdi\n\tadd rsi,8*512\n\n\t; first pml4t entry\n\txor rax,rax\n\tmov rax,rsi ; RAX now points to the RSI (First PDPT entry)\n\tshl rax,12 ; So we move it to bit 12\n\tshr rax,12 ; We remove the lower 4096 bits\n\tor rax,7 ; Add the RWE bits\n\tmov [rdi],rax ; Store the PML4T entry. We only need 1 entry\n\n\t\n\t; First PDPT entry (1st GB)\n\txor rax,rax\n\tor rax,7 ; Add the RWE bits\n\tbts rax,7 ; Add the 7th \"S\" bit to tell the CPU that this doesn't refer to a PDT\n\tmov [rsi],rax ; Store the PMPT entry for 1st GB\n\n\t; Second PDPT entry (2nd GB)\n\tadd rsi,8\n\txor rax,rax\n\tmov rax,1024*1024*1024*1\n\tshr rax,12\n\tshl rax,12\n\tor rax,7 ; Add the RWE bits\n\tbts rax,7 ; Add the 7th \"S\" bit to tell the CPU that this doesn't refer to a PDT\n\tmov [rsi],rax ; Store the PMPT entry for 2nd GB\n\n\t; Third PDPT entry (3rd GB)\n\tadd rsi,8\n\txor rax,rax\n\tmov rax,1024*1024*1024*2\n\tshr rax,12\n\tshl rax,12\n\tor rax,7 ; Add the RWE bits\n\tbts rax,7 ; Add the 7th \"S\" bit to tell the CPU that this doesn't refer to a PDT\n\tmov [rsi],rax ; Store the PMPT entry for 3rd GB\n\n\t; Fourh PDPT entry (4th GB)\n\tadd rsi,8\n\txor rax,rax\n\tmov rax,1024*1024*1024*3\n\tshr rax,12\n\tshl rax,12\n\tor rax,7 ; Add the RWE bits\n\tbts rax,7 ; Add the 7th \"S\" bit to tell the CPU that this doesn't refer to a PDT\n\tmov [rsi],rax ; Store the PMPT entry for 4th GB\n\n\nRET\n\n; A Protected mode guest\nVMX_Initialize_Guest2:\n\n\t; r8 -> selector\n\t; r9 -> base\n\t; r10 -> entry\n\n    xor rax,rax\n\t; cr0,cr3,cr4 paging protected mode\n\t; cs ss:rip\n\t; flags\n\n\t; CRx\n\n\tmov ebx,0x6800 ; CR0\n\tmov eax,0x80000031 ; And the NX bit must be set\n\tbts eax,31 ; And Paging bit enabled\n\tvmwrite rbx,rax\n\n\tmov ebx,0x6802 ; CR3\n\txor rax,rax\n\tlinear rax,PhysicalPagingOffset32,DATA16\n\tmov eax,[rax]\n\tvmwrite rbx,rax\n\n\tmov ebx,0x6804 ; CR4\n\tmov eax,0\n\tbts eax,13 ; the 13th bit of CR4 must be set in VMX mode\n\t;bts eax,4 ; Page Size 4MB \n\tvmwrite rbx,rax\n\n\t; Flags\n\tmov ebx,0x6820 ; RFLAGS\n\tmov rax,2\n\tvmwrite rbx,rax\n\n\t; Startup from r9 : r10\n\n\t; cs stuff\n\txor rax,rax\n\tmov rax,r8\n\tmov ebx,0x802 ; CS selector\n\tvmwrite rbx,rax\n\n\txor rax,rax\n\tmov rax,0xfffff\n\tmov ebx,0x4802 ; CS limit\n\tvmwrite rbx,rax\n\n\tmov rax,0c09fh\n\tmov ebx,0x4816 ; CS access\n\tvmwrite rbx,rax\n\n\txor rax,rax\n\tmov rax,r9\n\tshl rax,4\n\tmov ebx,0x6808 ; CS base\n\tvmwrite rbx,rax\n\n\t; xchg bx,bx\n\tmov ebx,0x681E ; IP\n\txor rax,rax\n\tadd rax,r10\n\tvmwrite rbx,rax\n\n\t; GDTR,IDTR\n\tmov ebx,0x6816 ; GDTR Base\n\t;mov rax,gdt_ptr\n\tlinear rax,gdt_ptr,DATA16\n\tadd rax,4\n\tvmwrite rbx,rax\n\tmov ebx,0x4810 ; Limit\n\tmov rax,gdt_size\n\tvmwrite rbx,rax\n\tmov ebx,0x6818 ; IDTR Base\n\tmov rax,idt_PM_ptr\n\tvmwrite rbx,rax\n\tmov ebx,0x4812 ; Limit\n\tmov rax,idt_size\n\tvmwrite rbx,rax\n\n\t; DR7\n\tmov ebx,0x681A ; DR7\n\tmov rax,0x400\n\tvmwrite rbx,rax\n\n\t; SEGMENT registers\n\n\t; es,ss,ds,fs,gs\n\tvmw16 0x800,page32_idx\n\tvmw16 0x804,page32_idx\n\tvmw16 0x806,page32_idx\n\tvmw16 0x808,page32_idx\n\tvmw16 0x80A,page32_idx\n\n\t; Limits\n\tvmw32 0x4800,0xFFFFF\n\tvmw32 0x4804,0xFFFFF\n\tvmw32 0x4806,0xFFFFF\n\tvmw32 0x4808,0xFFFFF\n\tvmw32 0x480A,0xFFFFF\n\n\t; Access\n\tvmw16 0x4814,0x0C093\n\tvmw16 0x4818,0x0C093\n\tvmw16 0x481A,0x0C093\n\tvmw16 0x481C,0x0C093\n\tvmw16 0x481E,0x0C093\n\n\t; base\n\tvmw32 0x6806,0\n\tvmw32 0x680A,0\n\tvmw32 0x680C,0\n\tvmw32 0x680E,0\n\tvmw32 0x6810,0\n\n\n\t; LDT (Dummy)\n\txor rax,rax\n\tmov ax,ldt_idx\n\tmov ebx,0x80C ; LDT selector\n\tvmwrite rbx,rax\n\tmov rax,0xffffffff\n\tmov ebx,0x480C ; LDT limit\n\tvmwrite rbx,rax\n\tmov rax,0x10000\n\tmov ebx,0x4820 ; LDT access\n\tvmwrite rbx,rax\n\tmov rax,0\n\tmov ebx,0x6812 ; LDT base\n\tvmwrite rbx,rax\n\n\t; TR (Dummy)\n\txor rax,rax\n\tmov ax,tssd32_idx\n\tmov ebx,0x80E ; TR selector\n\tvmwrite rbx,rax\n\tmov rax,0xff\n\tmov ebx,0x480E ; TR limit\n\tvmwrite rbx,rax\n\tmov rax,0x8b\n\tmov ebx,0x4822 ; TR access\n\tvmwrite rbx,rax\n\tmov rax,0\n\tmov ebx,0x6814 ; TR base\n\tvmwrite rbx,rax\n\nRET\n\n; A real mode guest\nVMX_Initialize_UnrestrictedGuest:\n\n\t; cr0,cr3,cr4 real mode\n\t; cs ss:rip\n\t; flags\n\n\txor rax,rax\n\n\t; CRx\n\tmov ebx,0x6800 ; CR0\n\tmov eax,0x60000030 ; And the NX bit must be set\n\tvmwrite rbx,rax\n\tmov ebx,0x6802 ; CR3\n\tmov eax,0\n\tvmwrite rbx,rax\n\tmov ebx,0x6804 ; CR4\n\tmov eax,0\n\tbts eax,13 ; the 13th bit of CR4 must be set in VMX mode\n\tvmwrite rbx,rax\n\n\t; Flags\n\tmov ebx,0x6820 ; RFLAGS\n\tmov rax,2\n\tvmwrite rbx,rax\n\n\t; Startup from VMX16 : StartVM\n\n\n\t; cs stuff\n\txor rax,rax\n\tmov ax,code32_idx\n\tmov ebx,0x802 ; CS selector\n\tvmwrite rbx,rax\n\n\txor rax,rax\n\tmov rax,0xffff\n\tmov ebx,0x4802 ; CS limit\n\tvmwrite rbx,rax\n\n\tmov rax,09fh\n\tmov ebx,0x4816 ; CS access\n\tvmwrite rbx,rax\n\n\txor rax,rax\n\tmov rax,r9\n\tshl rax,4\n\tmov ebx,0x6808 ; CS base\n\tvmwrite rbx,rax\n\n\n\tmov ebx,0x681E ; IP\n\txor rax,rax\n\tmov rax,r10\n\tvmwrite rbx,rax\n\n\t; GDTR,IDTR\n\tmov ebx,0x6816 ; GDTR Base\n\tmov rax,0\n\tvmwrite rbx,rax\n\tmov ebx,0x4810 ; Limit\n\tmov rax,0xFFFF\n\tvmwrite rbx,rax\n\tmov ebx,0x6818 ; IDTR Base\n\tmov rax,0\n\tvmwrite rbx,rax\n\tmov ebx,0x4812 ; Limit\n\tmov rax,0xFFFF\n\tvmwrite rbx,rax\n\n\t; DR7\n\tmov ebx,0x681A ; DR7\n\tmov rax,0x400\n\tvmwrite rbx,rax\n\n\t; SEGMENT registers\n\n\n\t; es,ss,ds,fs,gs\n\tvmw16 0x800,data32_idx\n\tvmw16 0x804,data32_idx\n\tvmw16 0x806,data32_idx\n\tvmw16 0x808,data32_idx\n\tvmw16 0x80A,data32_idx\n\n\t; Limits\n\tvmw32 0x4800,0xFFFF\n\tvmw32 0x4804,0xFFFF\n\tvmw32 0x4806,0xFFFF\n\tvmw32 0x4808,0xFFFF\n\tvmw32 0x480A,0xFFFF\n\n\t; Access\n\tvmw16 0x4814,0x93\n\tvmw16 0x4818,0x93\n\tvmw16 0x481A,0x93\n\tvmw16 0x481C,0x93\n\tvmw16 0x481E,0x93\n\n\t; base\n\tmov rax,r9\n\tshl rax,4\n\tvmw64 0x6806,rax\n\tvmw64 0x680A,rax\n\tvmw64 0x680C,rax\n\tvmw64 0x680E,rax\n\tvmw64 0x6810,rax\n\n\n\t; LDT (Dummy)\n\txor rax,rax\n\tmov ax,ldt_idx\n\tmov ebx,0x80C ; LDT selector\n\tvmwrite rbx,rax\n\tmov rax,0xffffffff\n\tmov ebx,0x480C ; LDT limit\n\tvmwrite rbx,rax\n\tmov rax,0x10000\n\tmov ebx,0x4820 ; LDT access\n\tvmwrite rbx,rax\n\tmov rax,0\n\tmov ebx,0x6812 ; LDT base\n\tvmwrite rbx,rax\n\n\t; TR (Dummy)\n\txor rax,rax\n\tmov ax,tssd32_idx\n\tmov ebx,0x80E ; TR selector\n\tvmwrite rbx,rax\n\tmov rax,0xff\n\tmov ebx,0x480E ; TR limit\n\tvmwrite rbx,rax\n\tmov rax,0x8b\n\tmov ebx,0x4822 ; TR access\n\tvmwrite rbx,rax\n\tmov rax,0\n\tmov ebx,0x6814 ; TR base\n\tvmwrite rbx,rax\n\nRET\n\n\n; ---------------- Enable VMX ----------------\nVMX_Enable:\n\n\n\t; A20\n\t; call VMX_DisableA20\n\n\t; cr4\n\tmov rax,cr4\n\tbts rax,13\n\tmov cr4,rax\n\n    ; Load the revision\n\tlinear rdi,VMXRevision,VMXDATA64\n\tmov ebx,[edi];\n\t\n\t; Initialize the VMXON region\n\tlinear rdi,VMXStructureData1,VMXDATA64\n\tmov rcx,[rdi];  Get address of data1\n\tmov rsi,rdi\n\tmov rdi,rcx\n\n\t; CR0 bit 5\n\tmov rax,cr0\n\tbts rax,5\n\tmov cr0,rax\n \n\t; MSR 0x3ah lock bit 0\n\tmov ecx,03ah\n\trdmsr\n\ttest eax,1\n\tjnz .VMX_LB_Enabled\n\tor eax,1\n\twrmsr\n\t.VMX_LB_Enabled:\n\n\t; Execute the VMXON\n\tmov [rdi],ebx ; // Put the revision\n\tmov rax,[rsi]\n\tVMXON [rsi]\n\nRET\n\n; ---------------- Disable VMX ----------------\nVMX_Disable:\n\tVMXOFF\n\n\t; A20\n\t;call VMX_EnableA20\n\n\tmov rax,cr4\n\tbtc rax,13\n\tmov cr4,rax\nRET\n\n; ---------------- VMX Host Exit ----------------\nVMX_VMExit:\n\tnop\n\t; Disable\n\tcall VMX_Disable\nRET\n\n\nVMXInit:\n\t\n\t; Load the revision\n\tatlinear rbx,VMXRevision,VMXDATA64\n\n\t; Initialize the region\n\tlinear rdi,VMXStructureData2,VMXDATA64\n\tmov rcx,[rdi];  Get address of data1\n\tmov rsi,rdi\n\tmov rdi,rcx\n\tmov [rdi],ebx ; // Put the revision\n\tVMCLEAR [rsi]\n\tmov [rdi],ebx ; // Put the revision\n\tVMPTRLD [rsi] \n\tmov [rdi],ebx ; // Put the revision\n\nRET\n\n\nVMXInit2:\n\n\t; The EPT initialization for the guest\n\tlinear rax,PhysicalEptOffset64,DATA16\n\tmov rax,[rax]\n\tor rax,0 ; Memory Type 0\n\tor rax,0x18 ; Page Walk Length 3\n\tmov rbx,0x201A ; EPTP\n\tvmwrite rbx,rax\n \n\t; The Link Pointer -1 initialization\n\tmov rax,0xFFFFFFFFFFFFFFFF\n\tmov rbx,0x2800 ; LP\n\tvmwrite rbx,rax\n \n\t; One more RSP initialization of the host\n\txor rax,rax\n\tmov rbx,0x6c14 ; RSP\n\tmov rax,rsp\n\tadd rax,8 ; because we are in a function call\n\tvmwrite rbx,rax\n\nRET\n\n; ---------------- Host Start ----------------\nVMX_Host:\n\tlinear rbx,vmt1,DATA16\n\tmov byte [rbx],0\n\tcall VMX_ExistenceTest\n\tcmp rax,1\n\tjz .yvmx\nRET\n.yvmx:\n\tlinear rbx,vmt1,DATA16\n\tmov byte [rbx],1\n\n\t; Init structures\n\tcall VMX_Init_Structures\n\n\t; Enable\n\tcall VMX_Enable\n\n\nif TEST_VMX = 1\n\n    ; Real mode guest (unrestricted)\n\n\tcall VMXInit\n  \n\tcall VMX_InitializeEPT\n\txor rdx,rdx\n\tbts rdx,1\n\tbts rdx,7\n\tcall VMX_Initialize_VMX_Controls\n\tlinear rcx,VMX_VMExit,CODE64\n\tcall VMX_Initialize_Host\n\tmov r9,VMX16\n\tmov r10,StartVM\n\tcall VMX_Initialize_UnrestrictedGuest\n \n \n\tcall VMXInit2\n\n\n\t; Launch it!!\n\tVMLAUNCH\n\nend if\n\nif TEST_VMX = 2\n\n    ; Protected mode guest \n\n\tcall VMXInit\n \n\t; Initializzation\n\tmov rdx,0x49\n\tcall VMX_Initialize_VMX_Controls\n\tlinear rcx,VMX_VMExit,CODE64\n\tcall VMX_Initialize_Host\n\tmov r8,vmx32_idx\n\tmov r9,VMX32\n\tmov r10,StartVM2\n\tcall VMX_Initialize_Guest2\n \n\tcall VMXInit2\n\n\t; Launch it!!\n\tVMLAUNCH\n\nend if \n\n\n\t; If we get here, VMLAUNCH failed\n\n\t; Disable\n\tcall VMX_Disable\n\nRET\n"
  }
]