[Main | NexGen]

NexGen Nx586 Hypercode Source

I disassembled the hypercode of all NexGen BIOS versions that I could get hold on.

View and comment single files

I wrote a CGI script that pretty prints the assembler source and lets everybody add comments to each line that everybody can see. Pretty cool, eh?
There is only a single comment field for each source line, so you can edit and even delete what you or someone else wrote. Please behave!

NOTE:
As this is my first CGI script, I am currently logging each activity to see if it works as intended and that there are no security holes. By clicking on the links below you agree to this logging. I promise: I will only use the logfile to improve the script, and will delete the information each time I have had a look into it. If you don't agree with this, you may download the complete package instead, see below.

COMMON.INC - macros, defines

HYPRES.ASM - copy/uncompress hypercode into cache; reset processor
RETF.ASM - emulation of RET (far return) instruction
IRET.ASM - emulation of IRET (interrupt return) instruction
INT.ASM - emulation of INT (interrupt) instruction
CALL.ASM - emulation of CALL instruction
EXCPH.ASM - exception handling code
TASK.ASM - task switching code
IOBM.ASM - check IO bitmap
INTO.ASM - emulation of INTO (interrupt 4, overflow) instruction
XESC.ASM -
INVOP.ASM - Invalid opcode, NexGen NXOP
CACHE.ASM - handling of first and second level cache
DECODE.ASM - emulation of instructions
SOFRES.ASM - soft reset
HDEB.ASM - hypermode debugger
IO_EM.ASM - emulation of  IN/OUT instructions for ports 0x40, 0xF0 and 0xF1
UNDOC.ASM - undocumented 386/486 instructions
EMUL.ASM -
EMSUBS.ASM - subroutines for emulation
MOVCR.ASM - emulation of MOV from/to CR instruction
NPHCODE.ASM - for numeric coprocessor
FIXUPNP.ASM - for numeric coprocessor
FST.ASM - emulation of FST (store real) instruction
FSINCOS.ASM - emulation of FSINCOS (sine and cosine) instruction
FPATAN.ASM - emulation of FPATAN (partial arctangent) instruction
F2XM1.ASM -
FYL2X.ASM -
FPTAN.ASM - emulation of FPTAN (partial tangent) instruction
FBLD.ASM - emulation of FBLD (load binary coded decimal) instruction
FBSTP.ASM - emulation of FBSTP (store BCD integer and pop) instruction
FSCALE.ASM - emulation of FSCALE (scale) instruction
FXTRACT.ASM - emulation of FXTRACT (extract exponent and significand) instruction
NP_SUB.ASM - subroutines for numeric coprocessor
NP_XCP.ASM -
NP_EM.ASM -
CPUSTUB.ASM -

Download the complete package

For re-building the hyper code yourself: HyperCodeSrc.zip, 225 KiB
It contains:
Borland Turbo Assembler (TASM) is needed for translation (available here). TASM won't directly install or run on a modern operating system - I explain here what to do.
The batch file ALL.BAT is used this way: all generates the hypercode for all known versions and compares the result against the original binary files. all clean removes all generated files.
The comparison will show a difference of 4 bytes starting at offset 0x10. This is expected. These bytes contain a checksum which has to be calculated and inserted separately. My tool for compressing the hypercode (HYPACK.PL, 13 KiB) will take care of that.

Author: Herbert Oppmann (email adress) updated: 2022-11-13