Every emulator layer has all the physical reserved Gigabytes less of RAM, so it's bad just for that when tiny things can be run in the real machine.
I have like 75 old books with floppy/CDs and other PDFs/ZIPs/ISOs that work under DOS or Win16 (VxDs, fonts, SVGA, 3D, file formats, WinAPI, MFC).
I have mirrors from programmersheaven, planetsourcecode and many FTP repositories that have Gigabytes of interesting tricks but in 16-bit mode.
I don't find material that teaches the basics from the mining principles for the components in 64-bit mode or in well-finished platforms like pure Linux or Windows, etc. I can learn in 16/32-bit environments and port to 64-bit or JavaScript. I can't run the code to see how the real hardware behaves with Win64.
I like to handle VGA/VESA graphics. With that, DPMI, my emulation, and Sound Blaster, Bochs, and some old Pentiums, I can implement my OS under Windows 7 without rebooting. What depends on the host OS can be replaced by ring 0 assembly components later, but an OS with GUI, manual VGA and SVGA for the current card, indirect network through special files, and native APIs can be done in Win32. I could add a 64-bit emulator for 32-bit CPUs, and a 16-bit one for 64-bit ones.
----------------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------
Skeleton of Page-Disabled FunctionsCode:
OPCODE__CPU_x86_32__page_disable_function_skeleton:
;Save flags and temporary registers,
;disable interrupts and paging,
;add the custom function code:
;;
pushfwide
push wideax
;;
cli
call OPCODE__CPU_Read_Default_Paging
push wideax
call OPCODE__CPU_Disable_Default_Paging
;;
;;
pop wideax
call OPCODE__CPU_Restore_Default_Paging
;;
pop wideax
popfwide
;Enable paging and restore temporary registers
;(restoring FLAGS will restore interrupts
;to their intended state):
;;
retwide
Skeleton of Page-Disabled Functions for cdecl/Local VariablesSkeleton of Page-Disabled Functions for stdcall/Local VariablesGet CR3 Value From CR3 Array IndexCode:
;Get the base address of the specified
;page directory in WIDEDX:
;;
mov widedx,.CR3_array_index
mov widedx,[CR3_array+(widedx*wideword_sz)]