├── Audio └── 20230308 │ └── sound card 65816 code │ ├── effects.asm │ └── utils.asm ├── 286-related ├── Code Snapshots │ ├── 80286 Assembly │ │ ├── 80286 Assembly │ │ │ ├── x64 │ │ │ │ └── Debug │ │ │ │ │ ├── 80286 Assembly.log │ │ │ │ │ ├── 80286 Assembly.tlog │ │ │ │ │ └── 80286 Assembly.lastbuildstate │ │ │ │ │ └── 80286 Assembly.exe.recipe │ │ │ ├── keyboard.bin │ │ │ ├── keyboard_LSB.bin │ │ │ ├── keyboard_MSB.bin │ │ │ ├── 80286 Assembly.vcxproj.user │ │ │ └── 80286 Assembly.vcxproj.filters │ │ └── 80286 Assembly.sln │ ├── Monitor_286_Win │ │ ├── Monitor_286_Win │ │ │ ├── obj │ │ │ │ └── Debug │ │ │ │ │ ├── Monitor_286_Win.csproj.SuggestedBindingRedirects.cache │ │ │ │ │ ├── Monitor_286_Win.csproj.CoreCompileInputs.cache │ │ │ │ │ ├── Monitor_286_Win.exe │ │ │ │ │ ├── Monitor_286_Win.pdb │ │ │ │ │ ├── Monitor_286_Win.mainForm.resources │ │ │ │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ │ │ │ ├── Monitor_286_Win.csproj.GenerateResource.cache │ │ │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ │ │ ├── Monitor_286_Win.Properties.Resources.resources │ │ │ │ │ ├── Monitor_286_Win.csproj.AssemblyReference.cache │ │ │ │ │ ├── .NETFramework,Version=v4.7.2.AssemblyAttributes.cs │ │ │ │ │ └── Monitor_286_Win.csproj.FileListAbsolute.txt │ │ │ ├── bin │ │ │ │ └── Debug │ │ │ │ │ ├── Monitor_286_Win.exe │ │ │ │ │ ├── Monitor_286_Win.pdb │ │ │ │ │ └── Monitor_286_Win.exe.config │ │ │ ├── App.config │ │ │ ├── Monitor_286_Win.csproj.user │ │ │ ├── Properties │ │ │ │ ├── Settings.settings │ │ │ │ ├── Settings.Designer.cs │ │ │ │ ├── AssemblyInfo.cs │ │ │ │ ├── Resources.Designer.cs │ │ │ │ └── Resources.resx │ │ │ ├── Program.cs │ │ │ └── Monitor_286_Win.csproj │ │ └── Monitor_286_Win.sln │ ├── Monitor_286_Arduino │ │ ├── Monitor_286 │ │ │ ├── Monitor_286.vcxproj.user │ │ │ ├── src │ │ │ │ └── arduino folders read me.txt │ │ │ ├── Monitor_286.vcxproj.filters │ │ │ └── __vm │ │ │ │ └── .Monitor_286.vsarduino.h │ │ └── Monitor_286.sln │ └── Arduino-Nano-SerialDebugger │ │ └── SPI_80286_Nano.ino ├── WorkingCode │ ├── 20230302 │ │ ├── Winform │ │ │ └── Monitor_286_Win.zip │ │ └── x86 asm │ │ │ └── macros.mac │ ├── 20230326 │ │ ├── macros.mac │ │ └── sound.asm │ ├── 20230402 │ │ ├── hello.c │ │ ├── macros.mac │ │ └── sound.asm │ ├── 20230512 │ │ ├── disk.asm │ │ ├── macros.asm │ │ ├── kernel.asm │ │ ├── bootsect_simple.asm │ │ ├── debug.asm │ │ ├── sound.asm │ │ ├── isrs_empty.asm │ │ ├── _bss.asm │ │ └── lcd.asm │ ├── 20230420_troubleshooting_flags │ │ ├── disk.asm │ │ ├── macros.mac │ │ ├── kernel.asm │ │ ├── bootsect_simple.asm │ │ ├── debug.asm │ │ ├── sound.asm │ │ ├── _bss.asm │ │ ├── isrs_empty.asm │ │ └── isrs_general.asm │ ├── 20230505_troubleshooting_execrh │ │ ├── disk.asm │ │ ├── macros.mac │ │ ├── kernel.asm │ │ ├── bootsect_simple.asm │ │ ├── debug.asm │ │ ├── sound.asm │ │ ├── _bss.asm │ │ └── isrs_empty.asm │ ├── 20230509_troubleshooting_execrh2 │ │ ├── disk.asm │ │ ├── macros.mac │ │ ├── kernel.asm │ │ ├── bootsect_simple.asm │ │ ├── debug.asm │ │ ├── sound.asm │ │ ├── _bss.asm │ │ ├── isrs_empty.asm │ │ └── isrs_general.asm │ ├── 20230528_alignmentissue_questionmark │ │ ├── disk.asm │ │ ├── macros.asm │ │ ├── kernel.asm │ │ ├── sound.asm │ │ ├── isrs_empty.asm │ │ └── lcd.asm │ ├── g2_20230131 │ │ └── macros.mac │ ├── g2_20230209 │ │ └── macros.mac │ ├── ide_start_20230414 │ │ ├── macros.mac │ │ ├── bootsect_simple.asm │ │ ├── sound.asm │ │ └── empty_isrs.asm │ ├── spi_nano_mouse_20230215 │ │ └── macros.mac │ └── shadow_rom_erase_write_20230221 │ │ └── macros.mac ├── EasyEDA Source - 80286 Computer v1.1.zip ├── EasyEDA Source - PLCC68 to DIP - 80286 v1.3 _20221031.zip ├── Gerber Files - PLCC68 to DIP - 80286 v1.3 _20221031.zip └── 386SX-Upgrade-Interposer │ ├── EasyEDA Source - 286 to 386SX Interposer_rev0.02.zip │ ├── EasyEDA Source - 286 to 386SX Interposer_rev0.04.zip │ ├── Gerber Files - 286 to 386SX Interposer_rev0.02.zip │ ├── Gerber Files - 286 to 386SX Interposer_rev0.04.zip │ ├── 386SX.PLD │ └── 386SX.JED ├── Arduino-ZIF ├── EasyEDA_ArduinoZIF_1_0.zip └── GERBER_ArduinoZIF_1_0.zip ├── 386-related └── Code Snapshots │ └── 386DX - Nov2023 │ ├── disk.asm │ ├── macros.asm │ ├── via.asm │ ├── testing_single_rom.asm │ ├── isrs_empty.asm │ └── testing_quad_rom.asm ├── breadboard-helpers ├── Gerber Files - Clock Reset v1.0.zip ├── EasyEDA Source - Clock Reset v1.0.zip ├── Gerber Files - Power Clock Reset v2.0.zip ├── EasyEDA Source - Bus Board 0.02 _20221111.zip ├── EasyEDA Source - Power Clock Reset v2.0.zip ├── Gerber Files - BreadboardRails _20221002.zip ├── Gerber Files - Bus Board v0.02 _20221111.zip ├── EasyEDA Source - BreadboardRails _20221002.zip ├── ISA extension 1.0 │ ├── EasyEDA - ISA Extension_Male_2023-05-05.zip │ ├── Gerber_PCB_ISA Extension_Male_2023-05-05.zip │ ├── EasyEDA - ISA Extension_Female_2023-05-05.zip │ └── Gerber_PCB_ISA Extension_Female_2023-05-05.zip └── UNTESTED - Combined Power Clock Reset Card │ ├── EasyEDA - Power Clock Reset DRAFT.zip │ └── Schematic - Power Clock Reset DRAFT.pdf ├── README.md ├── LICENSE └── PLD stuff ├── 386SX_cupl_jed ├── 386SX.PLD └── 386SX.jed ├── 386DX_abl_jed ├── BC386P1.JED └── BC386P2.JED └── 386DX_cupl_jed ├── PAL1_386DX_b.jed ├── PAL_386DX_2_b.jed ├── PAL1_386DX_b.PLD └── PAL_386DX_2_b.PLD /Audio/20230308/sound card 65816 code/effects.asm: -------------------------------------------------------------------------------- 1 | ;effects routines... -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly/x64/Debug/80286 Assembly.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.csproj.SuggestedBindingRedirects.cache: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Arduino-ZIF/EasyEDA_ArduinoZIF_1_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/Arduino-ZIF/EasyEDA_ArduinoZIF_1_0.zip -------------------------------------------------------------------------------- /Arduino-ZIF/GERBER_ArduinoZIF_1_0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/Arduino-ZIF/GERBER_ArduinoZIF_1_0.zip -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/disk.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/WorkingCode/20230512/disk.asm -------------------------------------------------------------------------------- /286-related/WorkingCode/20230402/hello.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | void main() 4 | { 5 | printf("Hello world (c) 3/23!"); 6 | } 7 | -------------------------------------------------------------------------------- /386-related/Code Snapshots/386DX - Nov2023/disk.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/386-related/Code Snapshots/386DX - Nov2023/disk.asm -------------------------------------------------------------------------------- /286-related/EasyEDA Source - 80286 Computer v1.1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/EasyEDA Source - 80286 Computer v1.1.zip -------------------------------------------------------------------------------- /breadboard-helpers/Gerber Files - Clock Reset v1.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/Gerber Files - Clock Reset v1.0.zip -------------------------------------------------------------------------------- /breadboard-helpers/EasyEDA Source - Clock Reset v1.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/EasyEDA Source - Clock Reset v1.0.zip -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | 6622963ca02a9df4b23828de08afa9103cd5352c 2 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230302/Winform/Monitor_286_Win.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/WorkingCode/20230302/Winform/Monitor_286_Win.zip -------------------------------------------------------------------------------- /breadboard-helpers/Gerber Files - Power Clock Reset v2.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/Gerber Files - Power Clock Reset v2.0.zip -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/disk.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/WorkingCode/20230420_troubleshooting_flags/disk.asm -------------------------------------------------------------------------------- /286-related/WorkingCode/20230505_troubleshooting_execrh/disk.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/WorkingCode/20230505_troubleshooting_execrh/disk.asm -------------------------------------------------------------------------------- /breadboard-helpers/EasyEDA Source - Bus Board 0.02 _20221111.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/EasyEDA Source - Bus Board 0.02 _20221111.zip -------------------------------------------------------------------------------- /breadboard-helpers/EasyEDA Source - Power Clock Reset v2.0.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/EasyEDA Source - Power Clock Reset v2.0.zip -------------------------------------------------------------------------------- /breadboard-helpers/Gerber Files - BreadboardRails _20221002.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/Gerber Files - BreadboardRails _20221002.zip -------------------------------------------------------------------------------- /breadboard-helpers/Gerber Files - Bus Board v0.02 _20221111.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/Gerber Files - Bus Board v0.02 _20221111.zip -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/disk.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/WorkingCode/20230509_troubleshooting_execrh2/disk.asm -------------------------------------------------------------------------------- /breadboard-helpers/EasyEDA Source - BreadboardRails _20221002.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/EasyEDA Source - BreadboardRails _20221002.zip -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly/keyboard.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/80286 Assembly/80286 Assembly/keyboard.bin -------------------------------------------------------------------------------- /286-related/EasyEDA Source - PLCC68 to DIP - 80286 v1.3 _20221031.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/EasyEDA Source - PLCC68 to DIP - 80286 v1.3 _20221031.zip -------------------------------------------------------------------------------- /286-related/Gerber Files - PLCC68 to DIP - 80286 v1.3 _20221031.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Gerber Files - PLCC68 to DIP - 80286 v1.3 _20221031.zip -------------------------------------------------------------------------------- /286-related/WorkingCode/20230528_alignmentissue_questionmark/disk.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/WorkingCode/20230528_alignmentissue_questionmark/disk.asm -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly/keyboard_LSB.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/80286 Assembly/80286 Assembly/keyboard_LSB.bin -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly/keyboard_MSB.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/80286 Assembly/80286 Assembly/keyboard_MSB.bin -------------------------------------------------------------------------------- /breadboard-helpers/ISA extension 1.0/EasyEDA - ISA Extension_Male_2023-05-05.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/ISA extension 1.0/EasyEDA - ISA Extension_Male_2023-05-05.zip -------------------------------------------------------------------------------- /breadboard-helpers/ISA extension 1.0/Gerber_PCB_ISA Extension_Male_2023-05-05.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/ISA extension 1.0/Gerber_PCB_ISA Extension_Male_2023-05-05.zip -------------------------------------------------------------------------------- /breadboard-helpers/ISA extension 1.0/EasyEDA - ISA Extension_Female_2023-05-05.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/ISA extension 1.0/EasyEDA - ISA Extension_Female_2023-05-05.zip -------------------------------------------------------------------------------- /breadboard-helpers/ISA extension 1.0/Gerber_PCB_ISA Extension_Female_2023-05-05.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/ISA extension 1.0/Gerber_PCB_ISA Extension_Female_2023-05-05.zip -------------------------------------------------------------------------------- /286-related/386SX-Upgrade-Interposer/EasyEDA Source - 286 to 386SX Interposer_rev0.02.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/386SX-Upgrade-Interposer/EasyEDA Source - 286 to 386SX Interposer_rev0.02.zip -------------------------------------------------------------------------------- /286-related/386SX-Upgrade-Interposer/EasyEDA Source - 286 to 386SX Interposer_rev0.04.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/386SX-Upgrade-Interposer/EasyEDA Source - 286 to 386SX Interposer_rev0.04.zip -------------------------------------------------------------------------------- /286-related/386SX-Upgrade-Interposer/Gerber Files - 286 to 386SX Interposer_rev0.02.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/386SX-Upgrade-Interposer/Gerber Files - 286 to 386SX Interposer_rev0.02.zip -------------------------------------------------------------------------------- /286-related/386SX-Upgrade-Interposer/Gerber Files - 286 to 386SX Interposer_rev0.04.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/386SX-Upgrade-Interposer/Gerber Files - 286 to 386SX Interposer_rev0.04.zip -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/bin/Debug/Monitor_286_Win.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/bin/Debug/Monitor_286_Win.exe -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/bin/Debug/Monitor_286_Win.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/bin/Debug/Monitor_286_Win.pdb -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.exe -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.pdb -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # x86 2 | Misc. content related to x86 home brew projects 3 | 4 | Sharing in case others find any of this helpful. I'm a hobbyist, and I provide no guarantees that what I share is the right way to do things. :) 5 | -------------------------------------------------------------------------------- /breadboard-helpers/UNTESTED - Combined Power Clock Reset Card/EasyEDA - Power Clock Reset DRAFT.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/UNTESTED - Combined Power Clock Reset Card/EasyEDA - Power Clock Reset DRAFT.zip -------------------------------------------------------------------------------- /breadboard-helpers/UNTESTED - Combined Power Clock Reset Card/Schematic - Power Clock Reset DRAFT.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/breadboard-helpers/UNTESTED - Combined Power Clock Reset Card/Schematic - Power Clock Reset DRAFT.pdf -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.mainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.mainForm.resources -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Arduino/Monitor_286/Monitor_286.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/App.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.Properties.Resources.resources -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.csproj.AssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rehsd/x86/HEAD/286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.csproj.AssemblyReference.cache -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly/x64/Debug/80286 Assembly.tlog/80286 Assembly.lastbuildstate: -------------------------------------------------------------------------------- 1 | PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.33.31629:TargetPlatformVersion=10.0.19041.0: 2 | Debug|x64|C:\Users\rich\source\repos\80286 Assembly\| 3 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/bin/Debug/Monitor_286_Win.exe.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly/80286 Assembly.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/Monitor_286_Win.csproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ShowAllFiles 5 | 6 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | // 2 | using System; 3 | using System.Reflection; 4 | [assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] 5 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly/x64/Debug/80286 Assembly.exe.recipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C:\Users\rich\source\repos\80286 Assembly\x64\Debug\80286 Assembly.exe 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230326/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230402/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/macros.asm: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/g2_20230131/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/g2_20230209/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230302/x86 asm/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/ide_start_20230414/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/spi_nano_mouse_20230215/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230505_troubleshooting_execrh/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/shadow_rom_erase_write_20230221/macros.mac: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230528_alignmentissue_questionmark/macros.asm: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push %5 16 | push %4 17 | push %3 18 | push %2 19 | push %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | 25 | %endif 26 | 27 | -------------------------------------------------------------------------------- /386-related/Code Snapshots/386DX - Nov2023/macros.asm: -------------------------------------------------------------------------------- 1 | %ifndef MACROS_MAC 2 | %define MACROS_MAC 3 | 4 | %macro abs 1 5 | 6 | cmp %1, 0 7 | jge %%skip 8 | neg %1 9 | %%skip: 10 | 11 | %endmacro 12 | 13 | %macro DrawRectangle 5 14 | 15 | push word %5 16 | push word %4 17 | push word %3 18 | push word %2 19 | push word %1 20 | call vga_draw_rect 21 | 22 | %endmacro 23 | 24 | %macro ds0000 0 25 | 26 | push ds 27 | push 0x0000 28 | pop ds 29 | 30 | %endmacro 31 | 32 | %macro ds0000out 0 33 | pop ds 34 | %endmacro 35 | 36 | %endif 37 | 38 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace Monitor_286_Win 8 | { 9 | internal static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new mainForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/kernel.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'k' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'e' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'r' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 'n' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 'e' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'l' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, '!' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | hlt 19 | 20 | times 0x01f1-$+$$ db 0 21 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 22 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/kernel.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'k' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'e' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'r' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 'n' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 'e' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'l' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, '!' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | hlt 19 | 20 | times 0x01f1-$+$$ db 0 21 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 22 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/WorkingCode/20230505_troubleshooting_execrh/kernel.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'k' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'e' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'r' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 'n' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 'e' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'l' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, '!' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | hlt 19 | 20 | times 0x01f1-$+$$ db 0 21 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 22 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/kernel.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'k' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'e' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'r' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 'n' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 'e' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'l' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, '!' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | hlt 19 | 20 | times 0x01f1-$+$$ db 0 21 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 22 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/WorkingCode/20230528_alignmentissue_questionmark/kernel.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'k' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'e' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'r' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 'n' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 'e' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'l' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, '!' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | hlt 19 | 20 | times 0x01f1-$+$$ db 0 21 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 22 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Arduino/Monitor_286/src/arduino folders read me.txt: -------------------------------------------------------------------------------- 1 | ##################################################### 2 | Arduino How To: Use sub folders for source code 3 | http://www.visualmicro.com/ 4 | ##################################################### 5 | 6 | * .INO code can exist in the project folder and '\src' folder. 7 | * .Cpp/.c/.S/.h etc. can exist in the project folder, the '\src' folder and in any folder(s) below the '\src' folder. 8 | * .Cpp/.c/.S/.h sources in shared code projects should follow the same folder rules (because they are merged with the project sources into a temporary build folder prior to compile). 9 | 10 | * Use the 'Show All Files' icon above the 'Solution Explorer' to switch between 'included project files' and 'physical files/folders'. 11 | * Source code in the project folder will always be compiled regardless of inclusion in the project. This functionality can be disabled in Global Options. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 rehsd 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /386-related/Code Snapshots/386DX - Nov2023/via.asm: -------------------------------------------------------------------------------- 1 | via_init: 2 | ; configure the port 3 | push ax 4 | push bx 5 | 6 | ds0000 ; set ds to 0x0 (pushes original to stack) 7 | 8 | mov al, 0b01111111 ; disable all interrupts on VIA 9 | out VIA1_IER, al 10 | 11 | mov al, 0b11111111 ; set port pins to output 12 | out VIA1_DDRB, al 13 | out VIA1_DDRA, al 14 | 15 | mov al, 0b00000000 ; set initial port values to 0 16 | out VIA1_PORTB, al 17 | out VIA1_PORTA, al 18 | 19 | ds0000out ; returns ds to original state 20 | pop bx 21 | pop ax 22 | ret 23 | 24 | via_test: 25 | push eax 26 | push ecx 27 | mov al, 0b00000001 28 | out VIA1_PORTB, al 29 | out VIA1_PORTA, al 30 | 31 | mov ecx, 7 32 | shift_loop: ; shift bit left & output -- repeat 7 times 33 | shl ax, 1 34 | out VIA1_PORTB, al 35 | out VIA1_PORTA, al 36 | loop shift_loop 37 | 38 | ;mov al, 0xff 39 | ;out VIA1_PORTB, al 40 | ;out VIA1_PORTA, al 41 | 42 | mov al, 0x00 43 | out VIA1_PORTB, al 44 | out VIA1_PORTA, al 45 | 46 | pop ecx 47 | pop eax 48 | 49 | jmp via_test ; infinite loop 50 | ret -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Arduino/Monitor_286.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.3.32929.385 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Monitor_286", "Monitor_286\Monitor_286.vcxproj", "{C5F80730-F44F-4478-BDAE-6634EFC2CA88}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x86 = Debug|x86 11 | Release|x86 = Release|x86 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.ActiveCfg = Debug|Win32 15 | {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Debug|x86.Build.0 = Debug|Win32 16 | {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.ActiveCfg = Release|Win32 17 | {C5F80730-F44F-4478-BDAE-6634EFC2CA88}.Release|x86.Build.0 = Release|Win32 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {28A7F66D-AE9D-402D-A1CC-0103E0001639} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /PLD stuff/386SX_cupl_jed/386SX.PLD: -------------------------------------------------------------------------------- 1 | Name 386SX ; 2 | PartNo 00 ; 3 | Date 7/3/2023 ; 4 | Revision 01 ; 5 | Designer rehsd (adapted from work of Al Weidner, VLSI) ; 6 | Company None ; 7 | Assembly None ; 8 | Location ; 9 | Device g16v8a ; 10 | 11 | /* *************** INPUT PINS *********************/ 12 | PIN 1 = CLK2 ; 13 | PIN 2 = MIO3 ; 14 | PIN 3 = WRT3 ; 15 | PIN 4 = CMD3 ; 16 | PIN 5 = !ADS ; 17 | PIN 6 = !RDY286 ; 18 | PIN 7 = !BHE3 ; 19 | PIN 8 = RST286 ; 20 | PIN 9 = NC ; 21 | /* PIN 10 = GND ; */ 22 | PIN 11 = !OE ; 23 | 24 | /* *************** OUTPUT PINS *********************/ 25 | 26 | PIN 12 = !BHE2 ; 27 | PIN 13 = !SFAZ1 ; 28 | PIN 14 = !S0 ; 29 | PIN 15 = !S1 ; 30 | PIN 16 = MIO ; 31 | PIN 17 = ADS2 ; 32 | PIN 18 = SYSCLK ; 33 | PIN 19 = RST386 ; 34 | /* PIN 20 = VCC ; */ 35 | 36 | !ADS2.D = !(ADS & !ADS2) ; 37 | BHE2 = (BHE3&ADS2) # (BHE2&!ADS2) ; 38 | SFAZ1.D = ADS2&RDY286 ; 39 | !SYSCLK.D = SYSCLK # SFAZ1 ; 40 | !RST386 = !(RST286 # (RST386&RST286) # (RST386&SYSCLK)) ; 41 | !MIO.D = !((ADS&MIO3)#(!ADS&MIO)) ; 42 | S1.D = (ADS2&RDY286&!WRT3) # (ADS2&RDY286&!CMD3&MIO3) # (SFAZ1&S1) ; 43 | S0.D = (ADS2&RDY286&WRT3&MIO3) # (ADS2&RDY286&CMD3&WRT3) # (ADS2&RDY286&!MIO3&!CMD3&!WRT3) # (SFAZ1&S0) ; -------------------------------------------------------------------------------- /286-related/386SX-Upgrade-Interposer/386SX.PLD: -------------------------------------------------------------------------------- 1 | Name 386SX ; 2 | PartNo 00 ; 3 | Date 7/3/2023 ; 4 | Revision 01 ; 5 | Designer rehsd (adapted from work of Al Weidner, VLSI) ; 6 | Company None ; 7 | Assembly None ; 8 | Location ; 9 | Device g16v8a ; 10 | 11 | /* *************** INPUT PINS *********************/ 12 | PIN 1 = CLK2 ; 13 | PIN 2 = MIO3 ; 14 | PIN 3 = WRT3 ; 15 | PIN 4 = CMD3 ; 16 | PIN 5 = !ADS ; 17 | PIN 6 = !RDY286 ; 18 | PIN 7 = !BHE3 ; 19 | PIN 8 = RST286 ; 20 | PIN 9 = NC ; 21 | /* PIN 10 = GND ; */ 22 | PIN 11 = !OE ; 23 | 24 | /* *************** OUTPUT PINS *********************/ 25 | 26 | PIN 12 = !BHE2 ; 27 | PIN 13 = !SFAZ1 ; 28 | PIN 14 = !S0 ; 29 | PIN 15 = !S1 ; 30 | PIN 16 = MIO ; 31 | PIN 17 = ADS2 ; 32 | PIN 18 = SYSCLK ; 33 | PIN 19 = RST386 ; 34 | /* PIN 20 = VCC ; */ 35 | 36 | !ADS2.D = !(ADS & !ADS2) ; 37 | BHE2 = (BHE3&ADS2) # (BHE2&!ADS2) ; 38 | SFAZ1.D = ADS2&RDY286 ; 39 | !SYSCLK.D = SYSCLK # SFAZ1 ; 40 | !RST386 = !(RST286 # (RST386&RST286) # (RST386&SYSCLK)) ; 41 | !MIO.D = !((ADS&MIO3)#(!ADS&MIO)) ; 42 | S1.D = (ADS2&RDY286&!WRT3) # (ADS2&RDY286&!CMD3&MIO3) # (SFAZ1&S1) ; 43 | S0.D = (ADS2&RDY286&WRT3&MIO3) # (ADS2&RDY286&CMD3&WRT3) # (ADS2&RDY286&!MIO3&!CMD3&!WRT3) # (SFAZ1&S0) ; -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33103.184 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monitor_286_Win", "Monitor_286_Win\Monitor_286_Win.csproj", "{6508E7D2-A41D-4B4F-8BBF-4647D257FC53}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {6508E7D2-A41D-4B4F-8BBF-4647D257FC53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {6508E7D2-A41D-4B4F-8BBF-4647D257FC53}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {6508E7D2-A41D-4B4F-8BBF-4647D257FC53}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {6508E7D2-A41D-4B4F-8BBF-4647D257FC53}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {5B76F3F9-2B5D-4AC7-B776-400B64F25D3A} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Monitor_286_Win.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/obj/Debug/Monitor_286_Win.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\obj\Debug\Monitor_286_Win.csproj.AssemblyReference.cache 2 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\obj\Debug\Monitor_286_Win.csproj.SuggestedBindingRedirects.cache 3 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\obj\Debug\Monitor_286_Win.mainForm.resources 4 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\obj\Debug\Monitor_286_Win.Properties.Resources.resources 5 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\obj\Debug\Monitor_286_Win.csproj.GenerateResource.cache 6 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\obj\Debug\Monitor_286_Win.csproj.CoreCompileInputs.cache 7 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\bin\Debug\Monitor_286_Win.exe.config 8 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\bin\Debug\Monitor_286_Win.exe 9 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\bin\Debug\Monitor_286_Win.pdb 10 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\obj\Debug\Monitor_286_Win.exe 11 | C:\Users\rich\source\repos\Monitor_286_Win\Monitor_286_Win\obj\Debug\Monitor_286_Win.pdb 12 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Arduino/Monitor_286/Monitor_286.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | xml;json;txt;rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | 20 | Misc Files 21 | 22 | 23 | 24 | 25 | Header Files 26 | 27 | 28 | Header Files 29 | 30 | 31 | -------------------------------------------------------------------------------- /PLD stuff/386SX_cupl_jed/386SX.jed: -------------------------------------------------------------------------------- 1 |  2 | CUPL(WM) 5.0a Serial# 60008009 3 | Device g16v8ms Library DLIB-h-40-11 4 | Created Sun Jul 16 18:35:10 2023 5 | Name 386SX 6 | Partno 00 7 | Revision 01 8 | Date 7/3/2023 9 | Designer rehsd (adapted from work of Al Weidner, VLSI) 10 | Company None 11 | Assembly None 12 | Location 13 | *QP20 14 | *QF2194 15 | *G0 16 | *F0 17 | *L00000 11111111111111111111111111111111 18 | *L00032 11111111111111111111111101111111 19 | *L00064 11011101111111111111111111111111 20 | *L00256 11111101111111111111111111111111 21 | *L00288 11111111111111111111111111101111 22 | *L00512 11111111111010111111111111111111 23 | *L00768 01111111111110111111111111111111 24 | *L00800 11111111111101011111111111111111 25 | *L01024 11111011110111111011111111111111 26 | *L01056 01111111100111111011111111111111 27 | *L01088 11111111111111111110111111101111 28 | *L01280 01110111110111111011111111111111 29 | *L01312 11110111010111111011111111111111 30 | *L01344 10111011100111111011111111111111 31 | *L01376 11111111111111111111111011101111 32 | *L01536 11111111110111111011111111111111 33 | *L01792 11111111111111111111111111111111 34 | *L01824 11111111110111111111101111111111 35 | *L01856 11111111111011111111111111111110 36 | *L02048 10110000001100000011000000100000 37 | *L02112 00000000100000011111111111111111 38 | *L02144 11111111111111111111111111111111 39 | *L02176 111111111111111101 40 | *C5161 41 | *0B25 -------------------------------------------------------------------------------- /286-related/386SX-Upgrade-Interposer/386SX.JED: -------------------------------------------------------------------------------- 1 |  2 | CUPL(WM) 5.0a Serial# 60008009 3 | Device g16v8ms Library DLIB-h-40-11 4 | Created Sun Jul 16 18:35:10 2023 5 | Name 386SX 6 | Partno 00 7 | Revision 01 8 | Date 7/3/2023 9 | Designer rehsd (adapted from work of Al Weidner, VLSI) 10 | Company None 11 | Assembly None 12 | Location 13 | *QP20 14 | *QF2194 15 | *G0 16 | *F0 17 | *L00000 11111111111111111111111111111111 18 | *L00032 11111111111111111111111101111111 19 | *L00064 11011101111111111111111111111111 20 | *L00256 11111101111111111111111111111111 21 | *L00288 11111111111111111111111111101111 22 | *L00512 11111111111010111111111111111111 23 | *L00768 01111111111110111111111111111111 24 | *L00800 11111111111101011111111111111111 25 | *L01024 11111011110111111011111111111111 26 | *L01056 01111111100111111011111111111111 27 | *L01088 11111111111111111110111111101111 28 | *L01280 01110111110111111011111111111111 29 | *L01312 11110111010111111011111111111111 30 | *L01344 10111011100111111011111111111111 31 | *L01376 11111111111111111111111011101111 32 | *L01536 11111111110111111011111111111111 33 | *L01792 11111111111111111111111111111111 34 | *L01824 11111111110111111111101111111111 35 | *L01856 11111111111011111111111111111110 36 | *L02048 10110000001100000011000000100000 37 | *L02112 00000000100000011111111111111111 38 | *L02144 11111111111111111111111111111111 39 | *L02176 111111111111111101 40 | *C5161 41 | *0B25 -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/bootsect_simple.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'b' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'o' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'o' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 't' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 's' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'e' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, 'c' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | mov al, 't' ; al=char to write 19 | int 0x10 ; call interrupt 0x10 20 | mov al, ' ' ; al=char to write 21 | int 0x10 ; call interrupt 0x10 22 | mov al, 'l' ; al=char to write 23 | int 0x10 ; call interrupt 0x10 24 | mov al, 'o' ; al=char to write 25 | int 0x10 ; call interrupt 0x10 26 | mov al, 'a' ; al=char to write 27 | int 0x10 ; call interrupt 0x10 28 | mov al, 'd' ; al=char to write 29 | int 0x10 ; call interrupt 0x10 30 | mov al, 'e' ; al=char to write 31 | int 0x10 ; call interrupt 0x10 32 | mov al, 'd' ; al=char to write 33 | int 0x10 ; call interrupt 0x10 34 | mov al, '!' ; al=char to write 35 | int 0x10 ; call interrupt 0x10 36 | hlt 37 | 38 | times 0x01f1-$+$$ db 0 39 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 40 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.3.32922.545 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "80286 Assembly", "80286 Assembly\80286 Assembly.vcxproj", "{AA4C48D1-C997-4E26-B303-A152F49F721C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|x64 = Debug|x64 11 | Debug|x86 = Debug|x86 12 | Release|x64 = Release|x64 13 | Release|x86 = Release|x86 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {AA4C48D1-C997-4E26-B303-A152F49F721C}.Debug|x64.ActiveCfg = Debug|x64 17 | {AA4C48D1-C997-4E26-B303-A152F49F721C}.Debug|x64.Build.0 = Debug|x64 18 | {AA4C48D1-C997-4E26-B303-A152F49F721C}.Debug|x86.ActiveCfg = Debug|Win32 19 | {AA4C48D1-C997-4E26-B303-A152F49F721C}.Debug|x86.Build.0 = Debug|Win32 20 | {AA4C48D1-C997-4E26-B303-A152F49F721C}.Release|x64.ActiveCfg = Release|x64 21 | {AA4C48D1-C997-4E26-B303-A152F49F721C}.Release|x64.Build.0 = Release|x64 22 | {AA4C48D1-C997-4E26-B303-A152F49F721C}.Release|x86.ActiveCfg = Release|Win32 23 | {AA4C48D1-C997-4E26-B303-A152F49F721C}.Release|x86.Build.0 = Release|Win32 24 | EndGlobalSection 25 | GlobalSection(SolutionProperties) = preSolution 26 | HideSolutionNode = FALSE 27 | EndGlobalSection 28 | GlobalSection(ExtensibilityGlobals) = postSolution 29 | SolutionGuid = {7AF10162-210E-49D1-B8EE-7C429BE4B70A} 30 | EndGlobalSection 31 | EndGlobal 32 | -------------------------------------------------------------------------------- /286-related/WorkingCode/ide_start_20230414/bootsect_simple.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'b' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'o' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'o' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 't' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 's' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'e' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, 'c' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | mov al, 't' ; al=char to write 19 | int 0x10 ; call interrupt 0x10 20 | mov al, ' ' ; al=char to write 21 | int 0x10 ; call interrupt 0x10 22 | mov al, 'l' ; al=char to write 23 | int 0x10 ; call interrupt 0x10 24 | mov al, 'o' ; al=char to write 25 | int 0x10 ; call interrupt 0x10 26 | mov al, 'a' ; al=char to write 27 | int 0x10 ; call interrupt 0x10 28 | mov al, 'd' ; al=char to write 29 | int 0x10 ; call interrupt 0x10 30 | mov al, 'e' ; al=char to write 31 | int 0x10 ; call interrupt 0x10 32 | mov al, 'd' ; al=char to write 33 | int 0x10 ; call interrupt 0x10 34 | mov al, '!' ; al=char to write 35 | int 0x10 ; call interrupt 0x10 36 | hlt 37 | 38 | times 0x01f1-$+$$ db 0 39 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 40 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Monitor_286_Win")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Monitor_286_Win")] 13 | [assembly: AssemblyCopyright("Copyright © 2022")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("6508e7d2-a41d-4b4f-8bbf-4647d257fc53")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/bootsect_simple.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'b' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'o' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'o' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 't' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 's' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'e' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, 'c' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | mov al, 't' ; al=char to write 19 | int 0x10 ; call interrupt 0x10 20 | mov al, ' ' ; al=char to write 21 | int 0x10 ; call interrupt 0x10 22 | mov al, 'l' ; al=char to write 23 | int 0x10 ; call interrupt 0x10 24 | mov al, 'o' ; al=char to write 25 | int 0x10 ; call interrupt 0x10 26 | mov al, 'a' ; al=char to write 27 | int 0x10 ; call interrupt 0x10 28 | mov al, 'd' ; al=char to write 29 | int 0x10 ; call interrupt 0x10 30 | mov al, 'e' ; al=char to write 31 | int 0x10 ; call interrupt 0x10 32 | mov al, 'd' ; al=char to write 33 | int 0x10 ; call interrupt 0x10 34 | mov al, '!' ; al=char to write 35 | int 0x10 ; call interrupt 0x10 36 | hlt 37 | 38 | times 0x01f1-$+$$ db 0 39 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 40 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/WorkingCode/20230505_troubleshooting_execrh/bootsect_simple.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'b' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'o' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'o' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 't' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 's' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'e' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, 'c' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | mov al, 't' ; al=char to write 19 | int 0x10 ; call interrupt 0x10 20 | mov al, ' ' ; al=char to write 21 | int 0x10 ; call interrupt 0x10 22 | mov al, 'l' ; al=char to write 23 | int 0x10 ; call interrupt 0x10 24 | mov al, 'o' ; al=char to write 25 | int 0x10 ; call interrupt 0x10 26 | mov al, 'a' ; al=char to write 27 | int 0x10 ; call interrupt 0x10 28 | mov al, 'd' ; al=char to write 29 | int 0x10 ; call interrupt 0x10 30 | mov al, 'e' ; al=char to write 31 | int 0x10 ; call interrupt 0x10 32 | mov al, 'd' ; al=char to write 33 | int 0x10 ; call interrupt 0x10 34 | mov al, '!' ; al=char to write 35 | int 0x10 ; call interrupt 0x10 36 | hlt 37 | 38 | times 0x01f1-$+$$ db 0 39 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 40 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/bootsect_simple.asm: -------------------------------------------------------------------------------- 1 | jmp start_ldr 2 | start_ldr: 3 | mov ah, 0x0a ; write character at current cursor position, no color specified 4 | mov al, 'b' ; al=char to write 5 | int 0x10 ; call interrupt 0x10 6 | mov al, 'o' ; al=char to write 7 | int 0x10 ; call interrupt 0x10 8 | mov al, 'o' ; al=char to write 9 | int 0x10 ; call interrupt 0x10 10 | mov al, 't' ; al=char to write 11 | int 0x10 ; call interrupt 0x10 12 | mov al, 's' ; al=char to write 13 | int 0x10 ; call interrupt 0x10 14 | mov al, 'e' ; al=char to write 15 | int 0x10 ; call interrupt 0x10 16 | mov al, 'c' ; al=char to write 17 | int 0x10 ; call interrupt 0x10 18 | mov al, 't' ; al=char to write 19 | int 0x10 ; call interrupt 0x10 20 | mov al, ' ' ; al=char to write 21 | int 0x10 ; call interrupt 0x10 22 | mov al, 'l' ; al=char to write 23 | int 0x10 ; call interrupt 0x10 24 | mov al, 'o' ; al=char to write 25 | int 0x10 ; call interrupt 0x10 26 | mov al, 'a' ; al=char to write 27 | int 0x10 ; call interrupt 0x10 28 | mov al, 'd' ; al=char to write 29 | int 0x10 ; call interrupt 0x10 30 | mov al, 'e' ; al=char to write 31 | int 0x10 ; call interrupt 0x10 32 | mov al, 'd' ; al=char to write 33 | int 0x10 ; call interrupt 0x10 34 | mov al, '!' ; al=char to write 35 | int 0x10 ; call interrupt 0x10 36 | hlt 37 | 38 | times 0x01f1-$+$$ db 0 39 | filename db "KERNEL SYS",0,0 ; for later... file that will be loaded next 40 | sign dw 0xAA55 -------------------------------------------------------------------------------- /286-related/Code Snapshots/80286 Assembly/80286 Assembly/80286 Assembly.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | Resource Files 24 | 25 | 26 | 27 | Resource Files 28 | 29 | 30 | Resource Files 31 | 32 | 33 | Source Files 34 | 35 | 36 | Source Files 37 | 38 | 39 | Resource Files 40 | 41 | 42 | 43 | Resource Files 44 | 45 | 46 | Resource Files 47 | 48 | 49 | Resource Files 50 | 51 | 52 | 53 | Resource Files 54 | 55 | 56 | Resource Files 57 | 58 | 59 | Source Files 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /PLD stuff/386DX_abl_jed/BC386P1.JED: -------------------------------------------------------------------------------- 1 | ABEL 4.00 Data I/O Corp. JEDEC file for: P16R8 V9.0 2 | Created on: Sat Jul 8 00:30:57 19<3 3 | 4 | 80386 Local Bus Controller - Pal1 Intel Corp 5 | * 6 | QP20* QF2048* QV0* F0* 7 | X0* 8 | NOTE Table of pin names and numbers* 9 | NOTE PINS CLK:2 ADS:3 READY:4 WR:5 CS0WS:6 CS1WS:7 CSIO:8 RESET:9* 10 | NOTE PINS CLK2:1 OE:11 NA:19 IDLE:18 PIPE:17 L2:16 L1:15 L0:14 Q1:13 Q0:12* 11 | L0000 01011111111111111111111011111111* 12 | L0032 11101111111111111111110111111101* 13 | L0064 11101111111111111111110111011111* 14 | L0096 10101111111111111111111111111111* 15 | L0128 11111111111111101111111111111111* 16 | L0160 11111111111111111101111111111111* 17 | L0256 01111011111011111111111111111011* 18 | L0288 11111101110111111111111111111011* 19 | L0320 11111101011111111111111111111011* 20 | L0352 10111101111111111111111111111011* 21 | L0512 11111111111111111111111111110111* 22 | L0544 11110111111011111111111111111111* 23 | L0576 11111111011011111111111111111111* 24 | L0608 10111111111011111111111111111111* 25 | L0640 01111111110111111111111111111111* 26 | L0672 11111110111111111111111111111111* 27 | L0768 10111110111111100110011001111011* 28 | L0800 11111111111111011110111011111001* 29 | L0832 11111111111111111101110111111011* 30 | L0864 11101111111111011111110111111011* 31 | L0896 11111111011111011101111111111011* 32 | L0928 10111111111111011101111111111011* 33 | L1024 11111111111111111111111111110111* 34 | L1056 11111111111111101101111011111111* 35 | L1088 10111110111111100111011001111111* 36 | L1120 11111111111111101111111011101110* 37 | L1152 11111111111111111101111011101110* 38 | L1184 11111111111111101101011111111111* 39 | L1216 11111111011111111101111011111111* 40 | L1248 10111111111111111101111011111111* 41 | L1280 11111111111111011111110111111011* 42 | L1312 01111011101111011101111111101010* 43 | L1344 01111110111111101101111001111011* 44 | L1376 01111110111111101101111011111010* 45 | L1408 01111011111111101101111001111011* 46 | L1440 01111011111111101101111011111010* 47 | L1472 11111111111111111101010110111011* 48 | L1504 11111111111111111110110111111001* 49 | L1536 11111111111111111111111111110111* 50 | L1568 11111111111111111111110111011111* 51 | L1600 11111111111111011110011111011111* 52 | L1632 01111111111111111111111111101101* 53 | L1664 11111111111111101101111111011111* 54 | L1696 11111111111111111111111111011110* 55 | L1792 11111111111111111111111111110111* 56 | L1824 11101111111111101101111011011101* 57 | L1856 11111111111110111110111111011101* 58 | L1888 11111111111111011110111111011101* 59 | L1920 11111111111111111110110111011101* 60 | L1952 10111111111111111111111111101101* 61 | L1984 01111111111111111111111111111110* 62 | CAC30* 63 | DE77 64 | -------------------------------------------------------------------------------- /PLD stuff/386DX_abl_jed/BC386P2.JED: -------------------------------------------------------------------------------- 1 | ABEL 4.00 Data I/O Corp. JEDEC file for: P16R8 V9.0 2 | Created on: Sat Jul 8 14:32:09 19<3 3 | 4 | 80386 Local Bus Controllre - pal 2 Intel Corp 5 | * 6 | QP20* QF2048* QV0* F0* 7 | X0* 8 | NOTE Table of pin names and numbers* 9 | NOTE PINS CLK:2 MIO:3 DC:4 WR:5 L0:6 L1:7 L2:8 CS0WS:9 CLK2:1 OE:11* 10 | NOTE PINS MRDC:19 MWTC:18 IORC:17 IOWC:16 INTA:15 ALE:14 DEN:13 RDY:12* 11 | L0000 11110111111110111011101101111011* 12 | L0032 11110111111110111011011111011111* 13 | L0064 11110111111110111111011110011111* 14 | L0096 11101111111111110111111110111101* 15 | L0128 10101111111111110111111110111111* 16 | L0160 11101111111111111011011111111111* 17 | L0192 11101111111111111111011110111111* 18 | L0256 11110111011101111011101101111011* 19 | L0288 11110111011101111111011110011111* 20 | L0320 11110111011101111011011111011111* 21 | L0352 11111110111111110111111110111101* 22 | L0384 11111110111111111011011111111101* 23 | L0416 11111110111111110111011110111111* 24 | L0512 11111011011110111011101101111011* 25 | L0544 11111011011110111011011111011111* 26 | L0576 11111011011110111111011110011111* 27 | L0608 11111111111011110111111110111101* 28 | L0640 10111111111011110111111110111111* 29 | L0672 11111111111011111011011111111111* 30 | L0704 11111111111011111111011110111111* 31 | L0768 11111011011101111011101101111011* 32 | L0800 11111011011101111111011110011111* 33 | L0832 11111011011101111011011111011111* 34 | L0864 11111111111111100111111110111101* 35 | L0896 11111111111111101011011111111101* 36 | L0928 11111111111111100111011110111111* 37 | L1024 11111011101110111011101101111011* 38 | L1056 11111011101110111011011111011111* 39 | L1088 11111011101110111111011110011111* 40 | L1120 11111111111111110110111110111101* 41 | L1152 10111111111111110110111110111111* 42 | L1184 11111111111111111010011111111111* 43 | L1216 11111111111111111110011110111111* 44 | L1280 01111111111111110111101111111110* 45 | L1312 11111111111111110111101111010111* 46 | L1344 11111111111111110111100111111111* 47 | L1376 11111111111111110111101101111111* 48 | L1536 11111111111111110111111010111001* 49 | L1568 10111111111111110111111010111011* 50 | L1600 11111111111111110111111110101101* 51 | L1632 10111111111111110111111110101111* 52 | L1664 11111111111111101111011111111111* 53 | L1696 11111110111111111111011111111111* 54 | L1728 11111111111111111011011111111111* 55 | L1760 11111111111111111111011110111111* 56 | L1792 11111111111111111011011101111111* 57 | L1824 01111111111111100111111110101101* 58 | L1856 01111110111111110111111110101101* 59 | L1888 01111111111111110110101110111101* 60 | L1920 01111111111011110111101110111101* 61 | L1952 01101111111111110111101110111101* 62 | L1984 01111111111111110111011110101101* 63 | L2016 10111111111111110111111110111110* 64 | CBFB0* 65 | EEEC 66 | -------------------------------------------------------------------------------- /Audio/20230308/sound card 65816 code/utils.asm: -------------------------------------------------------------------------------- 1 | ToneDelay: 2 | pha ;save current accumulator 3 | .setting "RegA16", true 4 | rep #$20 ;set acumulator to 16-bit 5 | 6 | // lda toneDelayDuration ;counter start - increase number to shorten delay 7 | lda #$F000 8 | ToneDelayLoop: 9 | clc 10 | adc #01 11 | bne ToneDelayLoop 12 | .setting "RegA16", false 13 | sep #$20 14 | pla 15 | rts 16 | ToneDelay3000: 17 | pha ;save current accumulator 18 | .setting "RegA16", true 19 | rep #$20 ;set acumulator to 16-bit 20 | 21 | // lda toneDelayDuration ;counter start - increase number to shorten delay 22 | //lda #$5000 ;Win login, Dream 23 | 24 | //lda #$AA00 ;Mario 25 | lda #$BA00 ;Mario 26 | 27 | //lda #$C700 ;Monkey Island 28 | //lda #$B000 ;Star Trek Into Darkess, Zelda 29 | ToneDelay3000Loop: 30 | clc 31 | adc #01 32 | bne ToneDelay3000Loop 33 | .setting "RegA16", false 34 | sep #$20 35 | pla 36 | rts 37 | ToneDelay0000: 38 | pha ;save current accumulator 39 | .setting "RegA16", true 40 | rep #$20 ;set acumulator to 16-bit 41 | 42 | // lda toneDelayDuration ;counter start - increase number to shorten delay 43 | lda #$0000 44 | ToneDelay0000Loop: 45 | clc 46 | adc #01 47 | bne ToneDelay0000Loop 48 | .setting "RegA16", false 49 | sep #$20 50 | pla 51 | rts 52 | ToneDelayLongFFF0: 53 | pha ;save current accumulator 54 | .setting "RegA16", true 55 | rep #$20 ;set acumulator to 16-bit 56 | 57 | // lda toneDelayDuration ;counter start - increase number to shorten delay 58 | lda #$FFF0 59 | sta $41 ; store high byte 60 | ToneDelayFFF0Loop: 61 | clc 62 | adc #1 63 | bne ToneDelayFFF0Loop 64 | clc 65 | inc $41 66 | bne ToneDelayFFF0Loop 67 | 68 | .setting "RegA16", false 69 | sep #$20 70 | pla 71 | rts 72 | Delay0: 73 | pha ;save current accumulator 74 | .setting "RegA16", true 75 | rep #$20 ;set acumulator to 16-bit 76 | ;lda delayDuration ;counter start - increase number to shorten delay 77 | lda #0 78 | Delayloop0: 79 | clc 80 | adc #01 81 | bne Delayloop0 82 | .setting "RegA16", false 83 | sep #$20 84 | pla 85 | rts 86 | Delay: 87 | .setting "RegA16", true 88 | rep #$20 ;set acumulator to 16-bit 89 | 90 | pha ;save current accumulator 91 | lda delayDuration ;counter start - increase number to shorten delay 92 | Delayloop: 93 | clc 94 | adc #01 95 | bne Delayloop 96 | .setting "RegA16", false 97 | sep #$20 98 | pla 99 | rts -------------------------------------------------------------------------------- /286-related/Code Snapshots/Arduino-Nano-SerialDebugger/SPI_80286_Nano.ino: -------------------------------------------------------------------------------- 1 | /* 2 | Name: SPI_80286_Nano.ino 3 | Created: 11/27/2022 4 | Author: rich 5 | */ 6 | 7 | #include 8 | 9 | volatile int packetNumber; 10 | volatile byte currentCommand; 11 | const byte CMD_RESET = 0; 12 | const byte CMD_PRINT_CHAR = 1; 13 | const byte CMD_PRINT_HEX16 = 2; 14 | const byte CMD_PRINT_BINARY16 = 3; 15 | volatile byte recvByte = '0'; 16 | volatile byte sendByte = '0'; 17 | volatile byte dataByte0 = 0; 18 | volatile byte dataByte1 = 0; 19 | byte buffer[50]; 20 | volatile byte i; 21 | 22 | void setup() { 23 | packetNumber = 0; 24 | currentCommand = CMD_RESET; 25 | ; Serial.begin(115200); 26 | Serial.begin(3*115200); 27 | SPCR |= 0b11000000; //enable SPI with interrupt 28 | SPSR |= 0x00; //SPI Status Register 29 | pinMode(MISO, OUTPUT); 30 | pinMode(SS, INPUT_PULLUP); 31 | pinMode(MOSI, INPUT); 32 | pinMode(SCK, INPUT); 33 | //SPI.attachInterrupt(); 34 | Serial.println("Initialization complete. Ready to receive data."); 35 | Serial.flush(); 36 | } 37 | 38 | ISR(SPI_STC_vect) //Interrupt routine function 39 | { 40 | recvByte = SPDR; 41 | 42 | if (packetNumber == 0) 43 | { 44 | currentCommand = recvByte; 45 | packetNumber++; 46 | } 47 | else if (packetNumber == 1) 48 | { 49 | dataByte0 = recvByte; 50 | processCommand(); //to do - add to queue & move to loop() 51 | packetNumber = 0; 52 | } 53 | 54 | Serial.flush(); 55 | } 56 | 57 | 58 | void processCommand() 59 | { 60 | switch (currentCommand) 61 | { 62 | case CMD_PRINT_CHAR: 63 | if (dataByte1 == 27) //escape 64 | { 65 | } 66 | else 67 | { 68 | Serial.print((char)dataByte0); 69 | } 70 | break; 71 | case CMD_PRINT_HEX16: 72 | printHex16(dataByte1 << 8 + dataByte0); 73 | break; 74 | case CMD_PRINT_BINARY16: 75 | printBits8(dataByte0); 76 | Serial.print(":"); 77 | printBits8(dataByte1); 78 | Serial.println(); 79 | break; 80 | } 81 | } 82 | 83 | void printHex16(int val) 84 | { 85 | Serial.print("0x"); 86 | val = val & 0xFFFF; //ignore higher bytes 87 | Serial.println(val, HEX); 88 | } 89 | 90 | String printBits8(int n) { 91 | byte numBits = 8; // 2^numBits must be big enough to include the number n 92 | char b; 93 | 94 | for (byte i = 0; i < numBits; i++) { 95 | // shift 1 and mask to identify each bit value 96 | b = (n & (1 << (numBits - 1 - i))) > 0 ? '1' : '0'; // slightly faster to print chars than ints (saves conversion) 97 | Serial.print(b); 98 | } 99 | } 100 | 101 | void loop() { 102 | } 103 | -------------------------------------------------------------------------------- /PLD stuff/386DX_cupl_jed/PAL1_386DX_b.jed: -------------------------------------------------------------------------------- 1 |  2 | CUPL(WM) 5.0a Serial# 60008009 3 | Device g16v8ms Library DLIB-h-40-11 4 | Created Sat Jul 08 21:12:25 2023 5 | Name PAL1_386DX_b 6 | Partno 00 7 | Revision 01 8 | Date 7/5/2023 9 | Designer rehsd 10 | Company None 11 | Assembly None 12 | Location 13 | *QP20 14 | *QF2194 15 | *G0 16 | *F0 17 | *L00000 11111111111111111110111111111111 18 | *L00032 11111111111111011111111111111111 19 | *L00064 10101111111111111111111111111111 20 | *L00096 01011111111111111111110111111111 21 | *L00128 11101111111111111111111011111101 22 | *L00160 11101111111111111111111011011111 23 | *L00256 10111110111111111111111111111011 24 | *L00288 11111110110111111111111111111011 25 | *L00320 11111110011111111111111111111011 26 | *L00352 01111011111011111111111111111011 27 | *L00512 11111111111111111111111111110111 28 | *L00544 10111111111011111111111111111111 29 | *L00576 01111111110111111111111111111111 30 | *L00608 11111111011011111111111111111111 31 | *L00640 11111101111111111111111111111111 32 | *L00672 11110111111011111111111111111111 33 | *L00768 10111111111111101110111111111011 34 | *L00800 11101111111111101111111011111011 35 | *L00832 11111111011111101110111111111011 36 | *L00864 11111111111111101101110111111001 37 | *L00896 11111111111111111110111011111011 38 | *L00928 10111110111111010101010101111011 39 | *L01024 11111111111111111111111111110111 40 | *L01056 10111111111111111110110111111111 41 | *L01088 11111111011111111110110111111111 42 | *L01120 11111111111111011110011111111111 43 | *L01152 11111111111111011110110111111111 44 | *L01184 11111111111111011111110111101110 45 | *L01216 11111111111111111110110111101110 46 | *L01248 10111110111111010111010101111111 47 | *L01280 11111111111111101111111011111011 48 | *L01312 11111111111111111101111011111001 49 | *L01344 11111111111111111110011010111011 50 | *L01376 01111011111111011110110101111011 51 | *L01408 01111011111111011110110111111010 52 | *L01440 01111110111111011110110101111011 53 | *L01472 01111110111111011110110111111010 54 | *L01504 01111011101111101110111111101010 55 | *L01536 11111111111111111111111111110111 56 | *L01568 11111111111111111111111111101101 57 | *L01600 01111111111111111111111111111101 58 | *L01632 11111111111111111111110111101111 59 | *L01664 11111111111111011110011111101111 60 | *L01696 11111111111111101101111111101111 61 | *L01792 11111111111111111111111111110111 62 | *L01824 10111111111111111111111111011110 63 | *L01856 01111111111111111111111111101101 64 | *L01888 11111111111111011101111011101110 65 | *L01920 11111111111111111110110111101110 66 | *L01952 11111111111111011110011111101110 67 | *L01984 11111111111101101110111111101110 68 | *L02016 11101111111111111101111011101110 69 | *L02048 00000000001100000011000000100000 70 | *L02112 00000000000000001111111111111111 71 | *L02144 11111111111111111111111111111111 72 | *L02176 111111111111111101 73 | *CB7EA 74 | *00BC -------------------------------------------------------------------------------- /PLD stuff/386DX_cupl_jed/PAL_386DX_2_b.jed: -------------------------------------------------------------------------------- 1 |  2 | CUPL(WM) 5.0a Serial# 60008009 3 | Device g16v8ms Library DLIB-h-40-11 4 | Created Sun Jul 23 08:25:13 2023 5 | Name PAL_386DX_2_b 6 | Partno 00 7 | Revision 01 8 | Date 7/5/2023 9 | Designer rehsd 10 | Company None 11 | Assembly None 12 | Location 13 | *QP20 14 | *QF2194 15 | *G0 16 | *F0 17 | *L00000 11101111111111111011011111111111 18 | *L00032 11101111111111111111011110111111 19 | *L00064 10101111111111110111111110111111 20 | *L00096 11101111111111110111111110111101 21 | *L00128 11110111111110111011101101111011 22 | *L00160 11110111111110111011011111011111 23 | *L00192 11110111111110111111011110011111 24 | *L00256 11111110111111110111011110111111 25 | *L00288 11111110111111111011011111111101 26 | *L00320 11111110111111110111111110111101 27 | *L00352 11110111011101111011101101111011 28 | *L00384 11110111011101111011011111011111 29 | *L00416 11110111011101111111011110011111 30 | *L00512 11111111111011111011011111111111 31 | *L00544 11111111111011111111011110111111 32 | *L00576 10111111111011110111111110111111 33 | *L00608 11111111111011110111111110111101 34 | *L00640 11111011011110111011101101111011 35 | *L00672 11111011011110111011011111011111 36 | *L00704 11111011011110111111011110011111 37 | *L00768 11111111111111100111011110111111 38 | *L00800 11111111111111101011011111111101 39 | *L00832 11111111111111100111111110111101 40 | *L00864 11111011011101111011101101111011 41 | *L00896 11111011011101111011011111011111 42 | *L00928 11111011011101111111011110011111 43 | *L01024 11111111111111111010011111111111 44 | *L01056 11111111111111111110011110111111 45 | *L01088 10111111111111110110111110111111 46 | *L01120 11111111111111110110111110111101 47 | *L01152 11111011101110111011101101111011 48 | *L01184 11111011101110111011011111011111 49 | *L01216 11111011101110111111011110011111 50 | *L01280 10111111111111111111111010111011 51 | *L01312 10111111111111111111111010101111 52 | *L01344 11111111111111111111111010111001 53 | *L01376 11111111111111111011111111111111 54 | *L01408 11111111111111111111011111111111 55 | *L01440 11111111111111111111111010101101 56 | *L01536 11111111111111111011011111111111 57 | *L01568 11111111111111111111011110111111 58 | *L01600 11111111111111101111011111111111 59 | *L01632 11111110111111111111011111111111 60 | *L01664 10111111111111110111111110101111 61 | *L01696 11111111111111110111111110101101 62 | *L01728 10111111111111110111111010111011 63 | *L01760 11111111111111110111111010111001 64 | *L01792 11111111111111111011011101111111 65 | *L01824 10111111111111110111111110111110 66 | *L01856 01111111111111110111011110101101 67 | *L01888 01111111111111110110101110111101 68 | *L01920 01111111111011110111101110111101 69 | *L01952 01101111111111110111101110111101 70 | *L01984 01111111111111100111111110101101 71 | *L02016 01111110111111110111111110101101 72 | *L02048 00000000001100000011000000100000 73 | *L02112 00000000000000001111111111111111 74 | *L02144 11111111111111111111111111111111 75 | *L02176 111111111111111101 76 | *CCE2A 77 | *184F -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace Monitor_286_Win.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Monitor_286_Win.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /386-related/Code Snapshots/386DX - Nov2023/testing_single_rom.asm: -------------------------------------------------------------------------------- 1 | ; Last updated 12 November 2023 2 | ; Latest update: VIA init/test 3 | ; Assembler: NASM 4 | ; Target clock: sloooooow 5 | ; 6 | ; *physical memory map* 7 | ; ------------------------------- 8 | ; - ROM shadow (128 KB) - 9 | ; - 0xE0000-0xFFFFF - 10 | ; ------------------------------- 11 | ; ------------future------------- 12 | ; ------------------------------- 13 | ; - VIDEO (64 KB) - 64 KB window to 2 MB physical VRAM 14 | ; - 0xA0000-0xAFFFF - 15 | ; ------------------------------- 16 | ; - RAM (640 KB) - 17 | ; - 0x00000-0x9FFFF - 18 | ; ------------------------------- 19 | ; 20 | ; ************************************** 21 | ; 22 | 23 | %include "macros.asm" 24 | 25 | CPU 386 26 | ;BITS 16 27 | ;sectalign off 28 | 29 | section .data ;align=GLOBAL_ALIGNMENT 30 | %include "_data.asm" 31 | section .bss ;align=GLOBAL_ALIGNMENT 32 | %include "_bss.asm" 33 | section .text ;align=GLOBAL_ALIGNMENT 34 | 35 | top: ; physically at 0xE0000 36 | 37 | ;*** SETUP REGISTERS ********************************** 38 | xor eax, eax ; zero out eax 39 | mov ds, ax ; data segment to 0000 40 | mov ebp, 0x0000fffc ; base pointer to fffc 41 | mov ss, ax ; stack segment to 0000 42 | mov esp, ebp ; set stack pointer to fffc and decrement from there 43 | mov eax, 0x0000f000 44 | mov es, ax ; ROM data (in RAM) at f0000 (see "times" at bottom of this file) 45 | ;*** /SETUP REGISTERS ********************************* 46 | 47 | cli 48 | 49 | call spi_init ; initialize SPI communications, including VIA1 50 | 51 | 52 | mov al, '$' 53 | call print_char_spi 54 | call print_char_newline_spi 55 | mov bx, msg_386atX 56 | call print_string_to_serial 57 | 58 | mov ax, CMD_PRINT_STATUS_OLED + OLED_STATUS_POST_COMPLETE 59 | call spi_send_NanoSerialCmd 60 | 61 | mov dx, 0x0000 ; init vga with black 62 | mov word [vga_param_color], 0xffff ; set text color 63 | call vga_init 64 | 65 | 66 | hlt 67 | 68 | ;%includes 69 | %include "via.asm" 70 | %include "vga.asm" 71 | %include "util.asm" 72 | %include "spi.asm" 73 | 74 | basic_test_loop: 75 | mov dword [mem_test_tmp_dd], 0x00000000 76 | .loop: 77 | mov eax, [mem_test_tmp_dd] 78 | call inc_test_mem 79 | jmp .loop 80 | 81 | inc_test_mem: 82 | inc dword [mem_test_tmp_dd] 83 | ret 84 | 85 | 86 | times 0x10000-($-$$) db 0xff ; Fill much of ROM with FFs to allow for faster writing of flash ROMs 87 | section .rodata ;align=GLOBAL_ALIGNMENT ; start=0x10000 88 | %include "romdata.asm" 89 | 90 | times 0x0FF00 - ($-$$) db 0xff ; fill remainder of section with FFs (faster flash ROM writes) 91 | ; very end overlaps .bootvector 92 | 93 | ; https://www.nasm.us/xdoc/2.15.05/html/nasmdoc7.html#section-7.3 94 | 95 | section .bootvector start=0x1fff0 96 | reset: ; at 0xFFFF0 *Processor starts reading here 97 | jmp 0xe000:0x0 ; Jump to TOP: label 98 | 99 | ; times 0x040000-($-$$) db 0xff ; Fill the rest of ROM with bytes of 0x01 (256 KB total) 100 | times 0x10 - ($-$$) db 0xff ; 16 - length of section so far (i.e., fill the rest of the section) -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/debug.asm: -------------------------------------------------------------------------------- 1 | ; Beep codes 2 | ; 2 beeps ==> Missing Interrupt Service Routine (see LCD output for interrupt #) 3 | ; 4 beeps ==> INT21 OS Services \ unimplemented 4 | ; 5 beeps ==> INT13 Disk Services \ unimplemented 5 | ; 6 beeps ==> INT10 Video Services \ unimplemented 6 | 7 | _isr_int_15h: 8 | ; take in test values on all registers, print, modify, return 9 | 10 | push ax 11 | mov al, '1' 12 | call print_char_spi 13 | mov al, '5' 14 | call print_char_spi 15 | mov al, ':' 16 | call print_char_spi 17 | pop ax 18 | call debug_print_interrupt_info_sm 19 | call print_char_newline_spi 20 | 21 | call debug_print_word_hex ; print ax 22 | mov ax, '-' 23 | call print_char_spi 24 | 25 | mov ax, bx 26 | call debug_print_word_hex ; print bx 27 | mov ax, '-' 28 | call print_char_spi 29 | 30 | mov ax, cx 31 | call debug_print_word_hex ; print cx 32 | mov ax, '-' 33 | call print_char_spi 34 | 35 | mov ax, dx 36 | call debug_print_word_hex ; print dx 37 | mov ax, ' ' 38 | call print_char_spi 39 | 40 | mov ax, cs 41 | call debug_print_word_hex ; print cs 42 | mov ax, '-' 43 | call print_char_spi 44 | 45 | mov ax, ds 46 | call debug_print_word_hex ; print ds 47 | mov ax, '-' 48 | call print_char_spi 49 | 50 | mov ax, es 51 | call debug_print_word_hex ; print es 52 | mov ax, ' ' 53 | call print_char_spi 54 | 55 | mov ax, di 56 | call debug_print_word_hex ; print di 57 | mov ax, '-' 58 | call print_char_spi 59 | 60 | mov ax, si 61 | call debug_print_word_hex ; print si 62 | mov ax, ' ' 63 | call print_char_spi 64 | 65 | lahf 66 | mov al, ah 67 | call print_char_hex_spi ; print flags 68 | 69 | call print_char_newline_spi 70 | 71 | 72 | ; *** test values to return *** 73 | mov ah, 0b01000001 ;SF, ZF, AF, PF, and CF flags (bits 7, 6, 4, 2, and 0, respectively) 74 | sahf 75 | pushf 76 | mov ax, 0x1234 77 | mov bx, 0x5678 78 | mov cx, 0x9abc 79 | mov dx, 0xdef0 80 | mov di, 0x2468 81 | mov si, 0x3579 82 | 83 | ;pushf ;0 ;push flags, just in case anything in .out modified flags 84 | push ax ;1 85 | push es ;2 86 | push 0x00 ;3 87 | pop es ;3 88 | lahf 89 | mov es:[flags_debug], ah 90 | pop es ;2 91 | pop ax ;1 92 | push ax ;1 93 | call print_char_newline_spi 94 | call debug_print_interrupt_info_sm 95 | call print_char_newline_spi 96 | pop ax ;1 97 | popf ;0 98 | nop 99 | nop 100 | nop 101 | nop 102 | nop 103 | nop 104 | ;iret 105 | retf 2 106 | 107 | _print_cursor_pos: 108 | push ax 109 | push ds 110 | mov ax, 0x0000 111 | mov ds, ax 112 | mov al, ' ' 113 | call print_char_spi 114 | mov ax, cursor_pos_h ; print the address 115 | xchg ah, al 116 | call print_char_hex_spi 117 | xchg ah, al 118 | call print_char_hex_spi 119 | mov al, '=' 120 | call print_char_spi 121 | mov ax, [cursor_pos_h] 122 | xchg al, ah 123 | call print_char_hex_spi 124 | xchg al, ah 125 | call print_char_hex_spi 126 | mov al, ',' 127 | call print_char_spi 128 | mov ax, [cursor_pos_v] 129 | xchg al, ah 130 | call print_char_hex_spi 131 | xchg al, ah 132 | call print_char_hex_spi 133 | mov al, '*' 134 | call print_char_spi 135 | pop ds 136 | pop ax 137 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/debug.asm: -------------------------------------------------------------------------------- 1 | ; Beep codes 2 | ; 2 beeps ==> Missing Interrupt Service Routine (see LCD output for interrupt #) 3 | ; 4 beeps ==> INT21 OS Services \ unimplemented 4 | ; 5 beeps ==> INT13 Disk Services \ unimplemented 5 | ; 6 beeps ==> INT10 Video Services \ unimplemented 6 | 7 | isr_int_15h: 8 | ; take in test values on all registers, print, modify, return 9 | 10 | push ax 11 | mov al, '1' 12 | call print_char_spi 13 | mov al, '5' 14 | call print_char_spi 15 | mov al, ':' 16 | call print_char_spi 17 | pop ax 18 | call debug_print_interrupt_info_sm 19 | call print_char_newline_spi 20 | 21 | call debug_print_word_hex ; print ax 22 | mov ax, '-' 23 | call print_char_spi 24 | 25 | mov ax, bx 26 | call debug_print_word_hex ; print bx 27 | mov ax, '-' 28 | call print_char_spi 29 | 30 | mov ax, cx 31 | call debug_print_word_hex ; print cx 32 | mov ax, '-' 33 | call print_char_spi 34 | 35 | mov ax, dx 36 | call debug_print_word_hex ; print dx 37 | mov ax, ' ' 38 | call print_char_spi 39 | 40 | mov ax, cs 41 | call debug_print_word_hex ; print cs 42 | mov ax, '-' 43 | call print_char_spi 44 | 45 | mov ax, ds 46 | call debug_print_word_hex ; print ds 47 | mov ax, '-' 48 | call print_char_spi 49 | 50 | mov ax, es 51 | call debug_print_word_hex ; print es 52 | mov ax, ' ' 53 | call print_char_spi 54 | 55 | mov ax, di 56 | call debug_print_word_hex ; print di 57 | mov ax, '-' 58 | call print_char_spi 59 | 60 | mov ax, si 61 | call debug_print_word_hex ; print si 62 | mov ax, ' ' 63 | call print_char_spi 64 | 65 | lahf 66 | mov al, ah 67 | call print_char_hex_spi ; print flags 68 | 69 | call print_char_newline_spi 70 | 71 | 72 | ; *** test values to return *** 73 | mov ah, 0b01000001 ;SF, ZF, AF, PF, and CF flags (bits 7, 6, 4, 2, and 0, respectively) 74 | sahf 75 | pushf 76 | mov ax, 0x1234 77 | mov bx, 0x5678 78 | mov cx, 0x9abc 79 | mov dx, 0xdef0 80 | mov di, 0x2468 81 | mov si, 0x3579 82 | 83 | ;pushf ;0 ;push flags, just in case anything in .out modified flags 84 | push ax ;1 85 | push es ;2 86 | push 0x00 ;3 87 | pop es ;3 88 | lahf 89 | mov es:[flags_debug], ah 90 | pop es ;2 91 | pop ax ;1 92 | push ax ;1 93 | call print_char_newline_spi 94 | call debug_print_interrupt_info_sm 95 | call print_char_newline_spi 96 | pop ax ;1 97 | popf ;0 98 | nop 99 | nop 100 | nop 101 | nop 102 | nop 103 | nop 104 | iret 105 | 106 | print_cursor_pos: 107 | push ax 108 | push ds 109 | mov ax, 0x0000 110 | mov ds, ax 111 | mov al, ' ' 112 | call print_char_spi 113 | mov ax, cursor_pos_h ; print the address 114 | xchg ah, al 115 | call print_char_hex_spi 116 | xchg ah, al 117 | call print_char_hex_spi 118 | mov al, '=' 119 | call print_char_spi 120 | mov ax, [cursor_pos_h] 121 | xchg al, ah 122 | call print_char_hex_spi 123 | xchg al, ah 124 | call print_char_hex_spi 125 | mov al, ',' 126 | call print_char_spi 127 | mov ax, [cursor_pos_v] 128 | xchg al, ah 129 | call print_char_hex_spi 130 | xchg al, ah 131 | call print_char_hex_spi 132 | mov al, '*' 133 | call print_char_spi 134 | pop ds 135 | pop ax 136 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230505_troubleshooting_execrh/debug.asm: -------------------------------------------------------------------------------- 1 | ; Beep codes 2 | ; 2 beeps ==> Missing Interrupt Service Routine (see LCD output for interrupt #) 3 | ; 4 beeps ==> INT21 OS Services \ unimplemented 4 | ; 5 beeps ==> INT13 Disk Services \ unimplemented 5 | ; 6 beeps ==> INT10 Video Services \ unimplemented 6 | 7 | isr_int_15h: 8 | ; take in test values on all registers, print, modify, return 9 | 10 | push ax 11 | mov al, '1' 12 | call print_char_spi 13 | mov al, '5' 14 | call print_char_spi 15 | mov al, ':' 16 | call print_char_spi 17 | pop ax 18 | call debug_print_interrupt_info_sm 19 | call print_char_newline_spi 20 | 21 | call debug_print_word_hex ; print ax 22 | mov ax, '-' 23 | call print_char_spi 24 | 25 | mov ax, bx 26 | call debug_print_word_hex ; print bx 27 | mov ax, '-' 28 | call print_char_spi 29 | 30 | mov ax, cx 31 | call debug_print_word_hex ; print cx 32 | mov ax, '-' 33 | call print_char_spi 34 | 35 | mov ax, dx 36 | call debug_print_word_hex ; print dx 37 | mov ax, ' ' 38 | call print_char_spi 39 | 40 | mov ax, cs 41 | call debug_print_word_hex ; print cs 42 | mov ax, '-' 43 | call print_char_spi 44 | 45 | mov ax, ds 46 | call debug_print_word_hex ; print ds 47 | mov ax, '-' 48 | call print_char_spi 49 | 50 | mov ax, es 51 | call debug_print_word_hex ; print es 52 | mov ax, ' ' 53 | call print_char_spi 54 | 55 | mov ax, di 56 | call debug_print_word_hex ; print di 57 | mov ax, '-' 58 | call print_char_spi 59 | 60 | mov ax, si 61 | call debug_print_word_hex ; print si 62 | mov ax, ' ' 63 | call print_char_spi 64 | 65 | lahf 66 | mov al, ah 67 | call print_char_hex_spi ; print flags 68 | 69 | call print_char_newline_spi 70 | 71 | 72 | ; *** test values to return *** 73 | mov ah, 0b01000001 ;SF, ZF, AF, PF, and CF flags (bits 7, 6, 4, 2, and 0, respectively) 74 | sahf 75 | pushf 76 | mov ax, 0x1234 77 | mov bx, 0x5678 78 | mov cx, 0x9abc 79 | mov dx, 0xdef0 80 | mov di, 0x2468 81 | mov si, 0x3579 82 | 83 | ;pushf ;0 ;push flags, just in case anything in .out modified flags 84 | push ax ;1 85 | push es ;2 86 | push 0x00 ;3 87 | pop es ;3 88 | lahf 89 | mov es:[flags_debug], ah 90 | pop es ;2 91 | pop ax ;1 92 | push ax ;1 93 | call print_char_newline_spi 94 | call debug_print_interrupt_info_sm 95 | call print_char_newline_spi 96 | pop ax ;1 97 | popf ;0 98 | nop 99 | nop 100 | nop 101 | nop 102 | nop 103 | nop 104 | ;iret 105 | retf 2 106 | 107 | print_cursor_pos: 108 | push ax 109 | push ds 110 | mov ax, 0x0000 111 | mov ds, ax 112 | mov al, ' ' 113 | call print_char_spi 114 | mov ax, cursor_pos_h ; print the address 115 | xchg ah, al 116 | call print_char_hex_spi 117 | xchg ah, al 118 | call print_char_hex_spi 119 | mov al, '=' 120 | call print_char_spi 121 | mov ax, [cursor_pos_h] 122 | xchg al, ah 123 | call print_char_hex_spi 124 | xchg al, ah 125 | call print_char_hex_spi 126 | mov al, ',' 127 | call print_char_spi 128 | mov ax, [cursor_pos_v] 129 | xchg al, ah 130 | call print_char_hex_spi 131 | xchg al, ah 132 | call print_char_hex_spi 133 | mov al, '*' 134 | call print_char_spi 135 | pop ds 136 | pop ax 137 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/debug.asm: -------------------------------------------------------------------------------- 1 | ; Beep codes 2 | ; 2 beeps ==> Missing Interrupt Service Routine (see LCD output for interrupt #) 3 | ; 4 beeps ==> INT21 OS Services \ unimplemented 4 | ; 5 beeps ==> INT13 Disk Services \ unimplemented 5 | ; 6 beeps ==> INT10 Video Services \ unimplemented 6 | 7 | isr_int_15h: 8 | ; take in test values on all registers, print, modify, return 9 | 10 | push ax 11 | mov al, '1' 12 | call print_char_spi 13 | mov al, '5' 14 | call print_char_spi 15 | mov al, ':' 16 | call print_char_spi 17 | pop ax 18 | call debug_print_interrupt_info_sm 19 | call print_char_newline_spi 20 | 21 | call debug_print_word_hex ; print ax 22 | mov ax, '-' 23 | call print_char_spi 24 | 25 | mov ax, bx 26 | call debug_print_word_hex ; print bx 27 | mov ax, '-' 28 | call print_char_spi 29 | 30 | mov ax, cx 31 | call debug_print_word_hex ; print cx 32 | mov ax, '-' 33 | call print_char_spi 34 | 35 | mov ax, dx 36 | call debug_print_word_hex ; print dx 37 | mov ax, ' ' 38 | call print_char_spi 39 | 40 | mov ax, cs 41 | call debug_print_word_hex ; print cs 42 | mov ax, '-' 43 | call print_char_spi 44 | 45 | mov ax, ds 46 | call debug_print_word_hex ; print ds 47 | mov ax, '-' 48 | call print_char_spi 49 | 50 | mov ax, es 51 | call debug_print_word_hex ; print es 52 | mov ax, ' ' 53 | call print_char_spi 54 | 55 | mov ax, di 56 | call debug_print_word_hex ; print di 57 | mov ax, '-' 58 | call print_char_spi 59 | 60 | mov ax, si 61 | call debug_print_word_hex ; print si 62 | mov ax, ' ' 63 | call print_char_spi 64 | 65 | lahf 66 | mov al, ah 67 | call print_char_hex_spi ; print flags 68 | 69 | call print_char_newline_spi 70 | 71 | 72 | ; *** test values to return *** 73 | mov ah, 0b01000001 ;SF, ZF, AF, PF, and CF flags (bits 7, 6, 4, 2, and 0, respectively) 74 | sahf 75 | pushf 76 | mov ax, 0x1234 77 | mov bx, 0x5678 78 | mov cx, 0x9abc 79 | mov dx, 0xdef0 80 | mov di, 0x2468 81 | mov si, 0x3579 82 | 83 | ;pushf ;0 ;push flags, just in case anything in .out modified flags 84 | push ax ;1 85 | push es ;2 86 | push 0x00 ;3 87 | pop es ;3 88 | lahf 89 | mov es:[flags_debug], ah 90 | pop es ;2 91 | pop ax ;1 92 | push ax ;1 93 | call print_char_newline_spi 94 | call debug_print_interrupt_info_sm 95 | call print_char_newline_spi 96 | pop ax ;1 97 | popf ;0 98 | nop 99 | nop 100 | nop 101 | nop 102 | nop 103 | nop 104 | ;iret 105 | retf 2 106 | 107 | print_cursor_pos: 108 | push ax 109 | push ds 110 | mov ax, 0x0000 111 | mov ds, ax 112 | mov al, ' ' 113 | call print_char_spi 114 | mov ax, cursor_pos_h ; print the address 115 | xchg ah, al 116 | call print_char_hex_spi 117 | xchg ah, al 118 | call print_char_hex_spi 119 | mov al, '=' 120 | call print_char_spi 121 | mov ax, [cursor_pos_h] 122 | xchg al, ah 123 | call print_char_hex_spi 124 | xchg al, ah 125 | call print_char_hex_spi 126 | mov al, ',' 127 | call print_char_spi 128 | mov ax, [cursor_pos_v] 129 | xchg al, ah 130 | call print_char_hex_spi 131 | xchg al, ah 132 | call print_char_hex_spi 133 | mov al, '*' 134 | call print_char_spi 135 | pop ds 136 | pop ax 137 | ret -------------------------------------------------------------------------------- /PLD stuff/386DX_cupl_jed/PAL1_386DX_b.PLD: -------------------------------------------------------------------------------- 1 | Name PAL1_386DX_b ; 2 | PartNo 00 ; 3 | Date 7/5/2023 ; 4 | Revision 01 ; 5 | Designer rehsd ; 6 | Company None ; 7 | Assembly None ; 8 | Location ; 9 | Device g16v8ms ; 10 | 11 | /* *************** INPUT PINS *********************/ 12 | PIN 1 = PIN_CLK2 ; 13 | PIN 2 = PIN_CLK ; 14 | PIN 3 = PIN_ADS ; 15 | PIN 4 = PIN_READY ; 16 | PIN 5 = PIN_WR ; 17 | PIN 6 = PIN_CS0WS ; 18 | PIN 7 = PIN_CS1WS ; 19 | PIN 8 = PIN_CSIO ; 20 | PIN 9 = PIN_RESET ; 21 | PIN 11 = PIN_OE ; 22 | 23 | /* *************** OUTPUT PINS *********************/ 24 | PIN 12 = PIN_Q0 ; 25 | PIN 13 = PIN_Q1 ; 26 | PIN 14 = PIN_L0 ; 27 | PIN 15 = PIN_L1 ; 28 | PIN 16 = PIN_L2 ; 29 | PIN 17 = PIN_PIPE ; 30 | PIN 18 = PIN_IDLE ; 31 | PIN 19 = PIN_NA ; 32 | 33 | !PIN_PIPE.D = (PIN_RESET) 34 | # (!PIN_CLK & !PIN_PIPE) 35 | # (PIN_CLK & PIN_PIPE) 36 | # (!PIN_PIPE & PIN_READY) 37 | # (PIN_IDLE) 38 | # (PIN_ADS & !PIN_PIPE) ; 39 | 40 | !PIN_IDLE.D = (!PIN_CLK & !PIN_IDLE & !PIN_RESET) 41 | # (!PIN_IDLE & PIN_PIPE & !PIN_RESET) 42 | # (!PIN_IDLE & PIN_READY & !PIN_RESET) 43 | # (!PIN_ADS & PIN_CLK & !PIN_PIPE & !PIN_RESET) ; 44 | 45 | !PIN_NA.D = 'b'0 ; /* keep high and not use address pipelining for now */ 46 | /* 47 | (!PIN_L1) 48 | # (PIN_L2) 49 | # (!PIN_CLK & !PIN_NA) 50 | # (PIN_CLK & PIN_L0 & PIN_NA) 51 | # (!PIN_L0 & !PIN_NA & PIN_Q0) 52 | # (!PIN_L0 & !PIN_NA & PIN_Q1) ; 53 | */ 54 | 55 | !PIN_L2.D = (!PIN_CLK & !PIN_L1 & !PIN_L2 & !PIN_RESET) 56 | # (!PIN_L0 & !PIN_L2 & !PIN_NA & !PIN_RESET) 57 | # (!PIN_L1 & !PIN_L2 & PIN_READY & !PIN_RESET) 58 | # (PIN_L0 & PIN_L1 & !PIN_L2 & PIN_Q0 & !PIN_RESET) 59 | # (!PIN_L0 & !PIN_L1 & !PIN_RESET) 60 | # (!PIN_CLK & PIN_CS0WS & PIN_CS1WS & PIN_CSIO & !PIN_IDLE & PIN_L0 & PIN_L1 & PIN_L2 & !PIN_RESET) ; 61 | 62 | 63 | !PIN_L1.D = (PIN_RESET) 64 | # (!PIN_CLK & PIN_L0 & !PIN_L1) 65 | # (PIN_L0 & !PIN_L1 & PIN_READY) 66 | # (PIN_CS1WS & !PIN_L1 & PIN_L2) 67 | # (PIN_L0 & !PIN_L1 & PIN_L2) 68 | # (PIN_L0 & PIN_L2 & !PIN_Q0 & !PIN_Q1) 69 | # (PIN_L0 & !PIN_L1 & !PIN_Q0 & !PIN_Q1) 70 | # (!PIN_CLK & PIN_CS0WS & PIN_CS1WS & PIN_CSIO & !PIN_IDLE & PIN_L0 & PIN_L2) ; 71 | 72 | !PIN_L0.D = (!PIN_L0 & !PIN_L2 & !PIN_RESET) 73 | # (!PIN_L0 & PIN_L1 & PIN_Q0 & !PIN_RESET) 74 | # (PIN_CS1WS & !PIN_CSIO & !PIN_L0 & !PIN_L1 & !PIN_RESET) 75 | # (!PIN_ADS & PIN_CLK & PIN_CSIO & PIN_L0 & !PIN_L1 & PIN_L2 & !PIN_RESET) 76 | # (!PIN_ADS & PIN_CLK & PIN_L0 & !PIN_L1 & PIN_L2 & !PIN_Q0 & !PIN_RESET) 77 | # (PIN_CLK & PIN_CSIO & !PIN_IDLE & PIN_L0 & !PIN_L1 & PIN_L2 & !PIN_RESET) 78 | # (PIN_CLK & !PIN_IDLE & PIN_L0 & !PIN_L1 & PIN_L2 & !PIN_Q0 & !PIN_RESET) 79 | # (!PIN_ADS & PIN_CLK & !PIN_L1 & !PIN_L2 & !PIN_Q0 & !PIN_Q1 & !PIN_READY & !PIN_RESET) ; 80 | 81 | !PIN_Q1.D = (PIN_RESET) 82 | # (PIN_Q0 & !PIN_Q1) 83 | # (PIN_CLK & PIN_Q0) 84 | # (PIN_L0 & !PIN_Q1) 85 | # (PIN_CS1WS & !PIN_L1 & PIN_L2 & !PIN_Q1) 86 | # (PIN_L1 & !PIN_L2 & !PIN_Q1) ; 87 | 88 | !PIN_Q0.D = (PIN_RESET) 89 | # (!PIN_CLK & !PIN_Q0 & PIN_Q1) 90 | # (PIN_CLK & PIN_Q0 & !PIN_Q1) 91 | # (!PIN_L0 & PIN_L1 & PIN_L2 & !PIN_Q0 & !PIN_Q1) 92 | # (PIN_L0 & !PIN_L1 & !PIN_Q0 & !PIN_Q1) 93 | # (PIN_CS1WS & !PIN_L1 & PIN_L2 & !PIN_Q0 & !PIN_Q1) 94 | # (!PIN_L1 & !PIN_L2 & !PIN_Q0 & !PIN_Q1 & PIN_WR) 95 | # (!PIN_L0 & PIN_L1 & !PIN_NA & !PIN_Q0 & !PIN_Q1) ; -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Arduino/Monitor_286/__vm/.Monitor_286.vsarduino.h: -------------------------------------------------------------------------------- 1 | /* 2 | Editor: https://www.visualmicro.com/ 3 | This file is for intellisense purpose only. 4 | Visual micro (and the arduino ide) ignore this code during compilation. This code is automatically maintained by visualmicro, manual changes to this file will be overwritten 5 | The contents of the _vm sub folder can be deleted prior to publishing a project 6 | All non-arduino files created by visual micro and all visual studio project or solution files can be freely deleted and are not required to compile a sketch (do not delete your own code!). 7 | Note: debugger breakpoints are stored in '.sln' or '.asln' files, knowledge of last uploaded breakpoints is stored in the upload.vmps.xml file. Both files are required to continue a previous debug session without needing to compile and upload again 8 | 9 | Hardware: ATmega2560 (Mega 2560) (Arduino Mega) (mega_atmega2560), Platform=avr, Package=arduino 10 | */ 11 | 12 | #if defined(_VMICRO_INTELLISENSE) 13 | 14 | #ifndef _VSARDUINO_H_ 15 | #define _VSARDUINO_H_ 16 | #define __AVR_atmega2560__ 1 17 | #define __AVR_ATmega2560__ 1 18 | #define _VMDEBUG 1 19 | #define F_CPU 16000000L 20 | #define ARDUINO 108018 21 | #define ARDUINO_AVR_MEGA2560 1 22 | #define ARDUINO_ARCH_AVR 1 23 | #define __cplusplus 201103L 24 | #define _Pragma(x) 25 | #define __AVR__ 26 | #define __inline__ 27 | #define __asm__(...) 28 | #define __extension__ 29 | #define __inline__ 30 | #define __volatile__ 31 | // Redefine __cplusplus to correct version: https://www.visualmicro.com/forums/YaBB.pl?num=1592217268 32 | #undef __cplusplus 33 | #define __cplusplus 201103L 34 | 35 | //#define GCC_VERSION 40902 36 | //https://www.visualmicro.com/forums/YaBB.pl?num=1569762585/5#5 37 | #define __GNUC__ 5 38 | #define __GNUC_MINOR__ 4 39 | #define __GNUC_PATCHLEVEL__ 0 40 | #define GCC_VERSION ((__GNUC__*10000)+(__GNUC_MINOR__*100)+__GNUC_PATCHLEVEL__)) 41 | 42 | 43 | #define volatile(va_arg) 44 | #define _CONST 45 | #define __builtin_va_start 46 | #define __builtin_va_end 47 | #define __attribute__(...) 48 | #define NOINLINE __attribute__((noinline)) 49 | #define prog_void 50 | #define PGM_VOID_P int 51 | 52 | 53 | #ifndef __builtin_constant_p 54 | #define __builtin_constant_p __attribute__((__const__)) 55 | #endif 56 | #ifndef __builtin_strlen 57 | #define __builtin_strlen __attribute__((__const__)) 58 | #endif 59 | 60 | 61 | #define NEW_H 62 | typedef void *__builtin_va_list; 63 | //extern "C" void __cxa_pure_virtual() {;} 64 | 65 | typedef int div_t; 66 | typedef int ldiv_t; 67 | 68 | 69 | typedef void *__builtin_va_list; 70 | //extern "C" void __cxa_pure_virtual() {;} 71 | 72 | 73 | 74 | #include 75 | #include 76 | //#undef F 77 | //#define F(string_literal) ((const PROGMEM char *)(string_literal)) 78 | #undef PSTR 79 | #define PSTR(string_literal) ((const PROGMEM char *)(string_literal)) 80 | 81 | //typedef unsigned char uint8_t; 82 | //typedef unsigned int uint8_t; 83 | 84 | #define pgm_read_byte_near(address_short) uint8_t() 85 | #define pgm_read_byte(address_short) uint8_t() 86 | #define pgm_read_word(address_short) uint16_t() 87 | #define pgm_read_dword(address_short) uint32_t() 88 | #define pgm_read_float(address_short) float() 89 | #define pgm_read_ptr(address_short) short() 90 | 91 | #include "Monitor_286.ino" 92 | #endif 93 | #endif 94 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230326/sound.asm: -------------------------------------------------------------------------------- 1 | test_sound_card: 2 | push es 3 | push ax 4 | 5 | push 0xb000 6 | pop es 7 | 8 | ;mov word es:[0], 0xabcd 9 | ;mov ax, word es:[0] 10 | ; verify read back from dual-port SRAM correctly 11 | ;call print_char_hex 12 | ;xchg ah, al 13 | ;call print_char_hex 14 | 15 | mov byte es:[2], 0x06 ; song number to play 16 | mov al, 1 17 | out SOUND_CARD_REG, al ; activate interrupt 18 | call delay 19 | mov al, 0 20 | out SOUND_CARD_REG, al ; release interrupt 21 | 22 | pop ax 23 | pop es 24 | 25 | ret 26 | 27 | play_sound: 28 | push ax 29 | push dx 30 | 31 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 32 | mov dx, PPI1_CTL ; Get control port address 33 | out dx, al ; Write control register on PPI 34 | ;mov [ppi1_ccfg], al ; Remember current config 35 | 36 | mov bp, 0x01FF ; Number of "sine" waves (-1) - duration of sound 37 | .wave: 38 | .up: 39 | mov al, 0x1 40 | mov dx, PPI1_PORTC ; Get C port address 41 | out dx, al ; Write data to port C 42 | mov si, 0x0060 ; Hold duration of "up" 43 | 44 | .uploop: 45 | nop 46 | dec si 47 | cmp si, 0 48 | jnz .uploop 49 | 50 | .down: 51 | mov al, 0x0 52 | mov dx, PPI1_PORTC ; Get C port address 53 | out dx, al ; Write data to port C 54 | mov si, 0x0060 ; Hold duration of "down" 55 | 56 | .downloop: 57 | nop 58 | dec si 59 | cmp si, 0 60 | jnz .downloop 61 | 62 | dec bp 63 | jnz .wave 64 | 65 | mov bp, 0x00FF ; Number of "sine" waves (-1) - duratin of sound 66 | .wave2: 67 | .up2: 68 | mov al, 0x1 69 | mov dx, PPI1_PORTC ; Get C port address 70 | out dx, al ; Write data to port C 71 | mov si, 0x0050 ; Hold duration of "up" 72 | 73 | .uploop2: 74 | nop 75 | dec si 76 | cmp si, 0 77 | jnz .uploop2 78 | 79 | .down2: 80 | mov al, 0x0 81 | mov dx, PPI1_PORTC ; Get C port address 82 | out dx, al ; Write data to port C 83 | mov si, 0x0050 ; Hold duration of "down" 84 | 85 | .downloop2: 86 | nop 87 | dec si 88 | cmp si, 0 89 | jnz .downloop2 90 | 91 | dec bp 92 | jnz .wave2 93 | 94 | .out: 95 | pop dx 96 | pop ax 97 | 98 | ret 99 | 100 | play_error_sound: 101 | push ax 102 | push dx 103 | 104 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 105 | mov dx, PPI1_CTL ; Get control port address 106 | out dx, al ; Write control register on PPI 107 | ;mov [ppi1_ccfg], al ; Remember current config 108 | 109 | mov bp, 0x06FF ; Number of "sine" waves (-1) - duration of sound 110 | .wave: 111 | .up: 112 | mov al, 0x1 113 | mov dx, PPI1_PORTC ; Get C port address 114 | out dx, al ; Write data to port C 115 | mov si, 0x0070 ; Hold duration of "up" 116 | 117 | .uploop: 118 | nop 119 | dec si 120 | cmp si, 0 121 | jnz .uploop 122 | 123 | .down: 124 | mov al, 0x0 125 | mov dx, PPI1_PORTC ; Get C port address 126 | out dx, al ; Write data to port C 127 | mov si, 0x0070 ; Hold duration of "down" 128 | 129 | .downloop: 130 | nop 131 | dec si 132 | cmp si, 0 133 | jnz .downloop 134 | 135 | dec bp 136 | jnz .wave 137 | 138 | .out: 139 | pop dx 140 | pop ax 141 | 142 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230402/sound.asm: -------------------------------------------------------------------------------- 1 | test_sound_card: 2 | push es 3 | push ax 4 | 5 | push 0xb000 6 | pop es 7 | 8 | ;mov word es:[0], 0xabcd 9 | ;mov ax, word es:[0] 10 | ; verify read back from dual-port SRAM correctly 11 | ;call print_char_hex 12 | ;xchg ah, al 13 | ;call print_char_hex 14 | 15 | mov byte es:[2], 0x06 ; song number to play 16 | mov al, 1 17 | out SOUND_CARD_REG, al ; activate interrupt 18 | call delay 19 | mov al, 0 20 | out SOUND_CARD_REG, al ; release interrupt 21 | 22 | pop ax 23 | pop es 24 | 25 | ret 26 | 27 | play_sound: 28 | push ax 29 | push dx 30 | 31 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 32 | mov dx, PPI1_CTL ; Get control port address 33 | out dx, al ; Write control register on PPI 34 | ;mov [ppi1_ccfg], al ; Remember current config 35 | 36 | mov bp, 0x01FF ; Number of "sine" waves (-1) - duration of sound 37 | .wave: 38 | .up: 39 | mov al, 0x1 40 | mov dx, PPI1_PORTC ; Get C port address 41 | out dx, al ; Write data to port C 42 | mov si, 0x0060 ; Hold duration of "up" 43 | 44 | .uploop: 45 | nop 46 | dec si 47 | cmp si, 0 48 | jnz .uploop 49 | 50 | .down: 51 | mov al, 0x0 52 | mov dx, PPI1_PORTC ; Get C port address 53 | out dx, al ; Write data to port C 54 | mov si, 0x0060 ; Hold duration of "down" 55 | 56 | .downloop: 57 | nop 58 | dec si 59 | cmp si, 0 60 | jnz .downloop 61 | 62 | dec bp 63 | jnz .wave 64 | 65 | mov bp, 0x00FF ; Number of "sine" waves (-1) - duratin of sound 66 | .wave2: 67 | .up2: 68 | mov al, 0x1 69 | mov dx, PPI1_PORTC ; Get C port address 70 | out dx, al ; Write data to port C 71 | mov si, 0x0050 ; Hold duration of "up" 72 | 73 | .uploop2: 74 | nop 75 | dec si 76 | cmp si, 0 77 | jnz .uploop2 78 | 79 | .down2: 80 | mov al, 0x0 81 | mov dx, PPI1_PORTC ; Get C port address 82 | out dx, al ; Write data to port C 83 | mov si, 0x0050 ; Hold duration of "down" 84 | 85 | .downloop2: 86 | nop 87 | dec si 88 | cmp si, 0 89 | jnz .downloop2 90 | 91 | dec bp 92 | jnz .wave2 93 | 94 | .out: 95 | pop dx 96 | pop ax 97 | 98 | ret 99 | 100 | play_error_sound: 101 | push ax 102 | push dx 103 | 104 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 105 | mov dx, PPI1_CTL ; Get control port address 106 | out dx, al ; Write control register on PPI 107 | ;mov [ppi1_ccfg], al ; Remember current config 108 | 109 | mov bp, 0x06FF ; Number of "sine" waves (-1) - duration of sound 110 | .wave: 111 | .up: 112 | mov al, 0x1 113 | mov dx, PPI1_PORTC ; Get C port address 114 | out dx, al ; Write data to port C 115 | mov si, 0x0070 ; Hold duration of "up" 116 | 117 | .uploop: 118 | nop 119 | dec si 120 | cmp si, 0 121 | jnz .uploop 122 | 123 | .down: 124 | mov al, 0x0 125 | mov dx, PPI1_PORTC ; Get C port address 126 | out dx, al ; Write data to port C 127 | mov si, 0x0070 ; Hold duration of "down" 128 | 129 | .downloop: 130 | nop 131 | dec si 132 | cmp si, 0 133 | jnz .downloop 134 | 135 | dec bp 136 | jnz .wave 137 | 138 | .out: 139 | pop dx 140 | pop ax 141 | 142 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/sound.asm: -------------------------------------------------------------------------------- 1 | test_sound_card: 2 | push es 3 | push ax 4 | 5 | push 0xb000 6 | pop es 7 | 8 | ;mov word es:[0], 0xabcd 9 | ;mov ax, word es:[0] 10 | ; verify read back from dual-port SRAM correctly 11 | ;call print_char_hex 12 | ;xchg ah, al 13 | ;call print_char_hex 14 | 15 | mov byte es:[2], 0x06 ; song number to play 16 | mov al, 1 17 | out SOUND_CARD_REG, al ; activate interrupt 18 | call delay 19 | mov al, 0 20 | out SOUND_CARD_REG, al ; release interrupt 21 | 22 | pop ax 23 | pop es 24 | 25 | ret 26 | 27 | play_sound: 28 | push ax 29 | push dx 30 | 31 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 32 | mov dx, PPI1_CTL ; Get control port address 33 | out dx, al ; Write control register on PPI 34 | ;mov [ppi1_ccfg], al ; Remember current config 35 | 36 | mov bp, 0x01FF ; Number of "sine" waves (-1) - duration of sound 37 | .wave: 38 | .up: 39 | mov al, 0x1 40 | mov dx, PPI1_PORTC ; Get C port address 41 | out dx, al ; Write data to port C 42 | mov si, 0x0060 ; Hold duration of "up" 43 | 44 | .uploop: 45 | nop 46 | dec si 47 | cmp si, 0 48 | jnz .uploop 49 | 50 | .down: 51 | mov al, 0x0 52 | mov dx, PPI1_PORTC ; Get C port address 53 | out dx, al ; Write data to port C 54 | mov si, 0x0060 ; Hold duration of "down" 55 | 56 | .downloop: 57 | nop 58 | dec si 59 | cmp si, 0 60 | jnz .downloop 61 | 62 | dec bp 63 | jnz .wave 64 | 65 | mov bp, 0x00FF ; Number of "sine" waves (-1) - duratin of sound 66 | .wave2: 67 | .up2: 68 | mov al, 0x1 69 | mov dx, PPI1_PORTC ; Get C port address 70 | out dx, al ; Write data to port C 71 | mov si, 0x0050 ; Hold duration of "up" 72 | 73 | .uploop2: 74 | nop 75 | dec si 76 | cmp si, 0 77 | jnz .uploop2 78 | 79 | .down2: 80 | mov al, 0x0 81 | mov dx, PPI1_PORTC ; Get C port address 82 | out dx, al ; Write data to port C 83 | mov si, 0x0050 ; Hold duration of "down" 84 | 85 | .downloop2: 86 | nop 87 | dec si 88 | cmp si, 0 89 | jnz .downloop2 90 | 91 | dec bp 92 | jnz .wave2 93 | 94 | .out: 95 | pop dx 96 | pop ax 97 | 98 | ret 99 | 100 | play_error_sound: 101 | push ax 102 | push dx 103 | 104 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 105 | mov dx, PPI1_CTL ; Get control port address 106 | out dx, al ; Write control register on PPI 107 | ;mov [ppi1_ccfg], al ; Remember current config 108 | 109 | mov bp, 0x06FF ; Number of "sine" waves (-1) - duration of sound 110 | .wave: 111 | .up: 112 | mov al, 0x1 113 | mov dx, PPI1_PORTC ; Get C port address 114 | out dx, al ; Write data to port C 115 | mov si, 0x0070 ; Hold duration of "up" 116 | 117 | .uploop: 118 | nop 119 | dec si 120 | cmp si, 0 121 | jnz .uploop 122 | 123 | .down: 124 | mov al, 0x0 125 | mov dx, PPI1_PORTC ; Get C port address 126 | out dx, al ; Write data to port C 127 | mov si, 0x0070 ; Hold duration of "down" 128 | 129 | .downloop: 130 | nop 131 | dec si 132 | cmp si, 0 133 | jnz .downloop 134 | 135 | dec bp 136 | jnz .wave 137 | 138 | .out: 139 | pop dx 140 | pop ax 141 | 142 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/ide_start_20230414/sound.asm: -------------------------------------------------------------------------------- 1 | test_sound_card: 2 | push es 3 | push ax 4 | 5 | push 0xb000 6 | pop es 7 | 8 | ;mov word es:[0], 0xabcd 9 | ;mov ax, word es:[0] 10 | ; verify read back from dual-port SRAM correctly 11 | ;call print_char_hex 12 | ;xchg ah, al 13 | ;call print_char_hex 14 | 15 | mov byte es:[2], 0x06 ; song number to play 16 | mov al, 1 17 | out SOUND_CARD_REG, al ; activate interrupt 18 | call delay 19 | mov al, 0 20 | out SOUND_CARD_REG, al ; release interrupt 21 | 22 | pop ax 23 | pop es 24 | 25 | ret 26 | 27 | play_sound: 28 | push ax 29 | push dx 30 | 31 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 32 | mov dx, PPI1_CTL ; Get control port address 33 | out dx, al ; Write control register on PPI 34 | ;mov [ppi1_ccfg], al ; Remember current config 35 | 36 | mov bp, 0x01FF ; Number of "sine" waves (-1) - duration of sound 37 | .wave: 38 | .up: 39 | mov al, 0x1 40 | mov dx, PPI1_PORTC ; Get C port address 41 | out dx, al ; Write data to port C 42 | mov si, 0x0060 ; Hold duration of "up" 43 | 44 | .uploop: 45 | nop 46 | dec si 47 | cmp si, 0 48 | jnz .uploop 49 | 50 | .down: 51 | mov al, 0x0 52 | mov dx, PPI1_PORTC ; Get C port address 53 | out dx, al ; Write data to port C 54 | mov si, 0x0060 ; Hold duration of "down" 55 | 56 | .downloop: 57 | nop 58 | dec si 59 | cmp si, 0 60 | jnz .downloop 61 | 62 | dec bp 63 | jnz .wave 64 | 65 | mov bp, 0x00FF ; Number of "sine" waves (-1) - duratin of sound 66 | .wave2: 67 | .up2: 68 | mov al, 0x1 69 | mov dx, PPI1_PORTC ; Get C port address 70 | out dx, al ; Write data to port C 71 | mov si, 0x0050 ; Hold duration of "up" 72 | 73 | .uploop2: 74 | nop 75 | dec si 76 | cmp si, 0 77 | jnz .uploop2 78 | 79 | .down2: 80 | mov al, 0x0 81 | mov dx, PPI1_PORTC ; Get C port address 82 | out dx, al ; Write data to port C 83 | mov si, 0x0050 ; Hold duration of "down" 84 | 85 | .downloop2: 86 | nop 87 | dec si 88 | cmp si, 0 89 | jnz .downloop2 90 | 91 | dec bp 92 | jnz .wave2 93 | 94 | .out: 95 | pop dx 96 | pop ax 97 | 98 | ret 99 | 100 | play_error_sound: 101 | push ax 102 | push dx 103 | 104 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 105 | mov dx, PPI1_CTL ; Get control port address 106 | out dx, al ; Write control register on PPI 107 | ;mov [ppi1_ccfg], al ; Remember current config 108 | 109 | mov bp, 0x06FF ; Number of "sine" waves (-1) - duration of sound 110 | .wave: 111 | .up: 112 | mov al, 0x1 113 | mov dx, PPI1_PORTC ; Get C port address 114 | out dx, al ; Write data to port C 115 | mov si, 0x0070 ; Hold duration of "up" 116 | 117 | .uploop: 118 | nop 119 | dec si 120 | cmp si, 0 121 | jnz .uploop 122 | 123 | .down: 124 | mov al, 0x0 125 | mov dx, PPI1_PORTC ; Get C port address 126 | out dx, al ; Write data to port C 127 | mov si, 0x0070 ; Hold duration of "down" 128 | 129 | .downloop: 130 | nop 131 | dec si 132 | cmp si, 0 133 | jnz .downloop 134 | 135 | dec bp 136 | jnz .wave 137 | 138 | .out: 139 | pop dx 140 | pop ax 141 | 142 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/sound.asm: -------------------------------------------------------------------------------- 1 | test_sound_card: 2 | push es 3 | push ax 4 | 5 | push 0xb000 6 | pop es 7 | 8 | ;mov word es:[0], 0xabcd 9 | ;mov ax, word es:[0] 10 | ; verify read back from dual-port SRAM correctly 11 | ;call print_char_hex 12 | ;xchg ah, al 13 | ;call print_char_hex 14 | 15 | mov byte es:[2], 0x06 ; song number to play 16 | mov al, 1 17 | out SOUND_CARD_REG, al ; activate interrupt 18 | call delay 19 | mov al, 0 20 | out SOUND_CARD_REG, al ; release interrupt 21 | 22 | pop ax 23 | pop es 24 | 25 | ret 26 | 27 | play_sound: 28 | push ax 29 | push dx 30 | 31 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 32 | mov dx, PPI1_CTL ; Get control port address 33 | out dx, al ; Write control register on PPI 34 | ;mov [ppi1_ccfg], al ; Remember current config 35 | 36 | mov bp, 0x01FF ; Number of "sine" waves (-1) - duration of sound 37 | .wave: 38 | .up: 39 | mov al, 0x1 40 | mov dx, PPI1_PORTC ; Get C port address 41 | out dx, al ; Write data to port C 42 | mov si, 0x0060 ; Hold duration of "up" 43 | 44 | .uploop: 45 | nop 46 | dec si 47 | cmp si, 0 48 | jnz .uploop 49 | 50 | .down: 51 | mov al, 0x0 52 | mov dx, PPI1_PORTC ; Get C port address 53 | out dx, al ; Write data to port C 54 | mov si, 0x0060 ; Hold duration of "down" 55 | 56 | .downloop: 57 | nop 58 | dec si 59 | cmp si, 0 60 | jnz .downloop 61 | 62 | dec bp 63 | jnz .wave 64 | 65 | mov bp, 0x00FF ; Number of "sine" waves (-1) - duratin of sound 66 | .wave2: 67 | .up2: 68 | mov al, 0x1 69 | mov dx, PPI1_PORTC ; Get C port address 70 | out dx, al ; Write data to port C 71 | mov si, 0x0050 ; Hold duration of "up" 72 | 73 | .uploop2: 74 | nop 75 | dec si 76 | cmp si, 0 77 | jnz .uploop2 78 | 79 | .down2: 80 | mov al, 0x0 81 | mov dx, PPI1_PORTC ; Get C port address 82 | out dx, al ; Write data to port C 83 | mov si, 0x0050 ; Hold duration of "down" 84 | 85 | .downloop2: 86 | nop 87 | dec si 88 | cmp si, 0 89 | jnz .downloop2 90 | 91 | dec bp 92 | jnz .wave2 93 | 94 | .out: 95 | pop dx 96 | pop ax 97 | 98 | ret 99 | 100 | play_error_sound: 101 | push ax 102 | push dx 103 | 104 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 105 | mov dx, PPI1_CTL ; Get control port address 106 | out dx, al ; Write control register on PPI 107 | ;mov [ppi1_ccfg], al ; Remember current config 108 | 109 | mov bp, 0x06FF ; Number of "sine" waves (-1) - duration of sound 110 | .wave: 111 | .up: 112 | mov al, 0x1 113 | mov dx, PPI1_PORTC ; Get C port address 114 | out dx, al ; Write data to port C 115 | mov si, 0x0070 ; Hold duration of "up" 116 | 117 | .uploop: 118 | nop 119 | dec si 120 | cmp si, 0 121 | jnz .uploop 122 | 123 | .down: 124 | mov al, 0x0 125 | mov dx, PPI1_PORTC ; Get C port address 126 | out dx, al ; Write data to port C 127 | mov si, 0x0070 ; Hold duration of "down" 128 | 129 | .downloop: 130 | nop 131 | dec si 132 | cmp si, 0 133 | jnz .downloop 134 | 135 | dec bp 136 | jnz .wave 137 | 138 | .out: 139 | pop dx 140 | pop ax 141 | 142 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230505_troubleshooting_execrh/sound.asm: -------------------------------------------------------------------------------- 1 | test_sound_card: 2 | push es 3 | push ax 4 | 5 | push 0xb000 6 | pop es 7 | 8 | ;mov word es:[0], 0xabcd 9 | ;mov ax, word es:[0] 10 | ; verify read back from dual-port SRAM correctly 11 | ;call print_char_hex 12 | ;xchg ah, al 13 | ;call print_char_hex 14 | 15 | mov byte es:[2], 0x06 ; song number to play 16 | mov al, 1 17 | out SOUND_CARD_REG, al ; activate interrupt 18 | call delay 19 | mov al, 0 20 | out SOUND_CARD_REG, al ; release interrupt 21 | 22 | pop ax 23 | pop es 24 | 25 | ret 26 | 27 | play_sound: 28 | push ax 29 | push dx 30 | 31 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 32 | mov dx, PPI1_CTL ; Get control port address 33 | out dx, al ; Write control register on PPI 34 | ;mov [ppi1_ccfg], al ; Remember current config 35 | 36 | mov bp, 0x01FF ; Number of "sine" waves (-1) - duration of sound 37 | .wave: 38 | .up: 39 | mov al, 0x1 40 | mov dx, PPI1_PORTC ; Get C port address 41 | out dx, al ; Write data to port C 42 | mov si, 0x0060 ; Hold duration of "up" 43 | 44 | .uploop: 45 | nop 46 | dec si 47 | cmp si, 0 48 | jnz .uploop 49 | 50 | .down: 51 | mov al, 0x0 52 | mov dx, PPI1_PORTC ; Get C port address 53 | out dx, al ; Write data to port C 54 | mov si, 0x0060 ; Hold duration of "down" 55 | 56 | .downloop: 57 | nop 58 | dec si 59 | cmp si, 0 60 | jnz .downloop 61 | 62 | dec bp 63 | jnz .wave 64 | 65 | mov bp, 0x00FF ; Number of "sine" waves (-1) - duratin of sound 66 | .wave2: 67 | .up2: 68 | mov al, 0x1 69 | mov dx, PPI1_PORTC ; Get C port address 70 | out dx, al ; Write data to port C 71 | mov si, 0x0050 ; Hold duration of "up" 72 | 73 | .uploop2: 74 | nop 75 | dec si 76 | cmp si, 0 77 | jnz .uploop2 78 | 79 | .down2: 80 | mov al, 0x0 81 | mov dx, PPI1_PORTC ; Get C port address 82 | out dx, al ; Write data to port C 83 | mov si, 0x0050 ; Hold duration of "down" 84 | 85 | .downloop2: 86 | nop 87 | dec si 88 | cmp si, 0 89 | jnz .downloop2 90 | 91 | dec bp 92 | jnz .wave2 93 | 94 | .out: 95 | pop dx 96 | pop ax 97 | 98 | ret 99 | 100 | play_error_sound: 101 | push ax 102 | push dx 103 | 104 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 105 | mov dx, PPI1_CTL ; Get control port address 106 | out dx, al ; Write control register on PPI 107 | ;mov [ppi1_ccfg], al ; Remember current config 108 | 109 | mov bp, 0x06FF ; Number of "sine" waves (-1) - duration of sound 110 | .wave: 111 | .up: 112 | mov al, 0x1 113 | mov dx, PPI1_PORTC ; Get C port address 114 | out dx, al ; Write data to port C 115 | mov si, 0x0070 ; Hold duration of "up" 116 | 117 | .uploop: 118 | nop 119 | dec si 120 | cmp si, 0 121 | jnz .uploop 122 | 123 | .down: 124 | mov al, 0x0 125 | mov dx, PPI1_PORTC ; Get C port address 126 | out dx, al ; Write data to port C 127 | mov si, 0x0070 ; Hold duration of "down" 128 | 129 | .downloop: 130 | nop 131 | dec si 132 | cmp si, 0 133 | jnz .downloop 134 | 135 | dec bp 136 | jnz .wave 137 | 138 | .out: 139 | pop dx 140 | pop ax 141 | 142 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/sound.asm: -------------------------------------------------------------------------------- 1 | test_sound_card: 2 | push es 3 | push ax 4 | 5 | push 0xb000 6 | pop es 7 | 8 | ;mov word es:[0], 0xabcd 9 | ;mov ax, word es:[0] 10 | ; verify read back from dual-port SRAM correctly 11 | ;call print_char_hex 12 | ;xchg ah, al 13 | ;call print_char_hex 14 | 15 | mov byte es:[2], 0x06 ; song number to play 16 | mov al, 1 17 | out SOUND_CARD_REG, al ; activate interrupt 18 | call delay 19 | mov al, 0 20 | out SOUND_CARD_REG, al ; release interrupt 21 | 22 | pop ax 23 | pop es 24 | 25 | ret 26 | 27 | play_sound: 28 | push ax 29 | push dx 30 | 31 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 32 | mov dx, PPI1_CTL ; Get control port address 33 | out dx, al ; Write control register on PPI 34 | ;mov [ppi1_ccfg], al ; Remember current config 35 | 36 | mov bp, 0x01FF ; Number of "sine" waves (-1) - duration of sound 37 | .wave: 38 | .up: 39 | mov al, 0x1 40 | mov dx, PPI1_PORTC ; Get C port address 41 | out dx, al ; Write data to port C 42 | mov si, 0x0060 ; Hold duration of "up" 43 | 44 | .uploop: 45 | nop 46 | dec si 47 | cmp si, 0 48 | jnz .uploop 49 | 50 | .down: 51 | mov al, 0x0 52 | mov dx, PPI1_PORTC ; Get C port address 53 | out dx, al ; Write data to port C 54 | mov si, 0x0060 ; Hold duration of "down" 55 | 56 | .downloop: 57 | nop 58 | dec si 59 | cmp si, 0 60 | jnz .downloop 61 | 62 | dec bp 63 | jnz .wave 64 | 65 | mov bp, 0x00FF ; Number of "sine" waves (-1) - duratin of sound 66 | .wave2: 67 | .up2: 68 | mov al, 0x1 69 | mov dx, PPI1_PORTC ; Get C port address 70 | out dx, al ; Write data to port C 71 | mov si, 0x0050 ; Hold duration of "up" 72 | 73 | .uploop2: 74 | nop 75 | dec si 76 | cmp si, 0 77 | jnz .uploop2 78 | 79 | .down2: 80 | mov al, 0x0 81 | mov dx, PPI1_PORTC ; Get C port address 82 | out dx, al ; Write data to port C 83 | mov si, 0x0050 ; Hold duration of "down" 84 | 85 | .downloop2: 86 | nop 87 | dec si 88 | cmp si, 0 89 | jnz .downloop2 90 | 91 | dec bp 92 | jnz .wave2 93 | 94 | .out: 95 | pop dx 96 | pop ax 97 | 98 | ret 99 | 100 | play_error_sound: 101 | push ax 102 | push dx 103 | 104 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 105 | mov dx, PPI1_CTL ; Get control port address 106 | out dx, al ; Write control register on PPI 107 | ;mov [ppi1_ccfg], al ; Remember current config 108 | 109 | mov bp, 0x06FF ; Number of "sine" waves (-1) - duration of sound 110 | .wave: 111 | .up: 112 | mov al, 0x1 113 | mov dx, PPI1_PORTC ; Get C port address 114 | out dx, al ; Write data to port C 115 | mov si, 0x0070 ; Hold duration of "up" 116 | 117 | .uploop: 118 | nop 119 | dec si 120 | cmp si, 0 121 | jnz .uploop 122 | 123 | .down: 124 | mov al, 0x0 125 | mov dx, PPI1_PORTC ; Get C port address 126 | out dx, al ; Write data to port C 127 | mov si, 0x0070 ; Hold duration of "down" 128 | 129 | .downloop: 130 | nop 131 | dec si 132 | cmp si, 0 133 | jnz .downloop 134 | 135 | dec bp 136 | jnz .wave 137 | 138 | .out: 139 | pop dx 140 | pop ax 141 | 142 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230528_alignmentissue_questionmark/sound.asm: -------------------------------------------------------------------------------- 1 | _test_sound_card: 2 | push es 3 | push ax 4 | 5 | push 0xb000 6 | pop es 7 | 8 | ;mov word es:[0], 0xabcd 9 | ;mov ax, word es:[0] 10 | ; verify read back from dual-port SRAM correctly 11 | ;call print_char_hex 12 | ;xchg ah, al 13 | ;call print_char_hex 14 | 15 | mov byte es:[2], 0x06 ; song number to play 16 | mov al, 1 17 | out SOUND_CARD_REG, al ; activate interrupt 18 | call delay 19 | mov al, 0 20 | out SOUND_CARD_REG, al ; release interrupt 21 | 22 | pop ax 23 | pop es 24 | 25 | ret 26 | 27 | play_sound: 28 | push ax 29 | push dx 30 | 31 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 32 | mov dx, PPI1_CTL ; Get control port address 33 | out dx, al ; Write control register on PPI 34 | ;mov [ppi1_ccfg], al ; Remember current config 35 | 36 | mov bp, 0x01FF ; Number of "sine" waves (-1) - duration of sound 37 | .wave: 38 | .up: 39 | mov al, 0x1 40 | mov dx, PPI1_PORTC ; Get C port address 41 | out dx, al ; Write data to port C 42 | mov si, 0x0060 ; Hold duration of "up" 43 | 44 | .uploop: 45 | nop 46 | dec si 47 | cmp si, 0 48 | jnz .uploop 49 | 50 | .down: 51 | mov al, 0x0 52 | mov dx, PPI1_PORTC ; Get C port address 53 | out dx, al ; Write data to port C 54 | mov si, 0x0060 ; Hold duration of "down" 55 | 56 | .downloop: 57 | nop 58 | dec si 59 | cmp si, 0 60 | jnz .downloop 61 | 62 | dec bp 63 | jnz .wave 64 | 65 | mov bp, 0x00FF ; Number of "sine" waves (-1) - duratin of sound 66 | .wave2: 67 | .up2: 68 | mov al, 0x1 69 | mov dx, PPI1_PORTC ; Get C port address 70 | out dx, al ; Write data to port C 71 | mov si, 0x0050 ; Hold duration of "up" 72 | 73 | .uploop2: 74 | nop 75 | dec si 76 | cmp si, 0 77 | jnz .uploop2 78 | 79 | .down2: 80 | mov al, 0x0 81 | mov dx, PPI1_PORTC ; Get C port address 82 | out dx, al ; Write data to port C 83 | mov si, 0x0050 ; Hold duration of "down" 84 | 85 | .downloop2: 86 | nop 87 | dec si 88 | cmp si, 0 89 | jnz .downloop2 90 | 91 | dec bp 92 | jnz .wave2 93 | 94 | .out: 95 | pop dx 96 | pop ax 97 | 98 | ret 99 | 100 | play_error_sound: 101 | push ax 102 | push dx 103 | 104 | mov al, CTL_CFG_PA_OUT ; Get config value - PA_OUT includes PB_OUT also 105 | mov dx, PPI1_CTL ; Get control port address 106 | out dx, al ; Write control register on PPI 107 | ;mov [ppi1_ccfg], al ; Remember current config 108 | 109 | mov bp, 0x06FF ; Number of "sine" waves (-1) - duration of sound 110 | .wave: 111 | .up: 112 | mov al, 0x1 113 | mov dx, PPI1_PORTC ; Get C port address 114 | out dx, al ; Write data to port C 115 | mov si, 0x0070 ; Hold duration of "up" 116 | 117 | .uploop: 118 | nop 119 | dec si 120 | cmp si, 0 121 | jnz .uploop 122 | 123 | .down: 124 | mov al, 0x0 125 | mov dx, PPI1_PORTC ; Get C port address 126 | out dx, al ; Write data to port C 127 | mov si, 0x0070 ; Hold duration of "down" 128 | 129 | .downloop: 130 | nop 131 | dec si 132 | cmp si, 0 133 | jnz .downloop 134 | 135 | dec bp 136 | jnz .wave 137 | 138 | .out: 139 | pop dx 140 | pop ax 141 | 142 | ret -------------------------------------------------------------------------------- /PLD stuff/386DX_cupl_jed/PAL_386DX_2_b.PLD: -------------------------------------------------------------------------------- 1 | Name PAL_386DX_2_b ; 2 | PartNo 00 ; 3 | Date 7/5/2023 ; 4 | Revision 01 ; 5 | Designer rehsd ; 6 | Company None ; 7 | Assembly None ; 8 | Location ; 9 | Device g16v8ms ; 10 | /* *************** INPUT PINS *********************/ 11 | PIN 1 = PIN_CLK2 ; 12 | PIN 2 = PIN_CLK ; 13 | PIN 3 = PIN_MIO ; 14 | PIN 4 = PIN_DC ; 15 | PIN 5 = PIN_WR ; 16 | PIN 6 = PIN_L0 ; 17 | PIN 7 = PIN_L1 ; 18 | PIN 8 = PIN_L2 ; 19 | PIN 9 = PIN_CS0WS ; 20 | PIN 11 = PIN_OE ; 21 | 22 | /* *************** OUTPUT PINS *********************/ 23 | PIN 12 = PIN_RDY ; 24 | PIN 13 = PIN_DEN ; 25 | PIN 14 = PIN_ALE ; 26 | PIN 15 = PIN_INTA ; 27 | PIN 16 = PIN_IOWC ; 28 | PIN 17 = PIN_IORC ; 29 | PIN 18 = PIN_MWTC ; 30 | PIN 19 = PIN_MRDC ; 31 | 32 | !PIN_MRDC.D = (!PIN_L0 & PIN_L1 & !PIN_MRDC) 33 | # (PIN_L1 & !PIN_L2 & !PIN_MRDC) 34 | # (!PIN_CLK & PIN_L0 & !PIN_L2 & !PIN_MRDC) 35 | # (PIN_L0 & !PIN_L2 & !PIN_MRDC & PIN_RDY) 36 | # (!PIN_CS0WS & !PIN_L0 & !PIN_L1 & PIN_L2 & PIN_MIO & !PIN_WR) 37 | # (PIN_DEN & !PIN_L0 & PIN_L1 & PIN_MIO & !PIN_WR) 38 | # (PIN_DEN & PIN_L1 & !PIN_L2 & PIN_MIO & !PIN_WR) ; 39 | 40 | !PIN_MWTC.D = (PIN_L0 & PIN_L1 & !PIN_L2 & !PIN_MWTC) 41 | # (!PIN_L0 & PIN_L1 & !PIN_MWTC & PIN_RDY) 42 | # (PIN_L0 & !PIN_L2 & !PIN_MWTC & PIN_RDY) 43 | # (!PIN_CS0WS & PIN_DC & !PIN_L0 & !PIN_L1 & PIN_L2 & PIN_MIO & PIN_WR) 44 | # (PIN_DC & PIN_DEN & !PIN_L0 & PIN_L1 & PIN_MIO & PIN_WR) 45 | # (PIN_DC & PIN_DEN & PIN_L1 & !PIN_L2 & PIN_MIO & PIN_WR) ; 46 | 47 | !PIN_IORC.D = (!PIN_IORC & !PIN_L0 & PIN_L1) 48 | # (!PIN_IORC & PIN_L1 & !PIN_L2) 49 | # (!PIN_CLK & !PIN_IORC & PIN_L0 & !PIN_L2) 50 | # (!PIN_IORC & PIN_L0 & !PIN_L2 & PIN_RDY) 51 | # (!PIN_CS0WS & PIN_DC & !PIN_L0 & !PIN_L1 & PIN_L2 & !PIN_MIO & !PIN_WR) 52 | # (PIN_DC & PIN_DEN & !PIN_L0 & PIN_L1 & !PIN_MIO & !PIN_WR) 53 | # (PIN_DC & PIN_DEN & PIN_L1 & !PIN_L2 & !PIN_MIO & !PIN_WR) ; 54 | 55 | !PIN_IOWC.D = (!PIN_IOWC & PIN_L0 & PIN_L1 & !PIN_L2) 56 | # (!PIN_IOWC & !PIN_L0 & PIN_L1 & PIN_RDY) 57 | # (!PIN_IOWC & PIN_L0 & !PIN_L2 & PIN_RDY) 58 | # (!PIN_CS0WS & PIN_DC & !PIN_L0 & !PIN_L1 & PIN_L2 & !PIN_MIO & PIN_WR) 59 | # (PIN_DC & PIN_DEN & !PIN_L0 & PIN_L1 & !PIN_MIO & PIN_WR) 60 | # (PIN_DC & PIN_DEN & PIN_L1 & !PIN_L2 & !PIN_MIO & PIN_WR) ; 61 | 62 | !PIN_INTA.D = (!PIN_INTA & !PIN_L0 & PIN_L1) 63 | # (!PIN_INTA & PIN_L1 & !PIN_L2) 64 | # (!PIN_CLK & !PIN_INTA & PIN_L0 & !PIN_L2) 65 | # (!PIN_INTA & PIN_L0 & !PIN_L2 & PIN_RDY) 66 | # (!PIN_CS0WS & !PIN_DC & !PIN_L0 & !PIN_L1 & PIN_L2 & !PIN_MIO & !PIN_WR) 67 | # (!PIN_DC & PIN_DEN & !PIN_L0 & PIN_L1 & !PIN_MIO & !PIN_WR) 68 | # (!PIN_DC & PIN_DEN & PIN_L1 & !PIN_L2 & !PIN_MIO & !PIN_WR) ; 69 | 70 | !PIN_ALE.D = (!PIN_ALE & !PIN_CLK & !PIN_CS0WS & !PIN_L2) 71 | # (!PIN_ALE & !PIN_CLK & !PIN_DEN & !PIN_L2) 72 | # (!PIN_ALE & !PIN_CS0WS & !PIN_L2 & PIN_RDY) 73 | # (!PIN_L0) 74 | # (PIN_L1) 75 | # (!PIN_ALE & !PIN_DEN & !PIN_L2 & PIN_RDY) ; 76 | 77 | !PIN_DEN.D = (!PIN_L0 & PIN_L1) 78 | # (PIN_L1 & !PIN_L2) 79 | # (!PIN_IOWC & PIN_L1) 80 | # (PIN_L1 & !PIN_MWTC) 81 | # (!PIN_CLK & !PIN_DEN & PIN_L0 & !PIN_L2) 82 | # (!PIN_DEN & PIN_L0 & PIN_L2 & PIN_RDY) 83 | # (!PIN_ALE & !PIN_CLK & !PIN_CS0WS & PIN_L0 & !PIN_L2) 84 | # (!PIN_ALE & !PIN_CS0WS & PIN_L0 & !PIN_L2 & PIN_RDY) ; 85 | 86 | !PIN_RDY.D = (!PIN_L0 & PIN_L1 & PIN_L2) 87 | # (!PIN_CLK & PIN_L0 & !PIN_L2 & !PIN_RDY) 88 | # (PIN_CLK & !PIN_DEN & PIN_L0 & PIN_L1 & !PIN_L2 & PIN_RDY) 89 | # (PIN_CLK & !PIN_INTA & PIN_L0 & !PIN_L1 & !PIN_L2 & PIN_RDY) 90 | # (PIN_CLK & !PIN_IORC & PIN_L0 & !PIN_L1 & !PIN_L2 & PIN_RDY) 91 | # (!PIN_CLK & PIN_L0 & !PIN_L1 & !PIN_L2 & !PIN_MRDC & PIN_RDY) 92 | # (PIN_CLK & !PIN_DEN & !PIN_IOWC & PIN_L0 & !PIN_L2 & PIN_RDY) 93 | # (PIN_CLK & !PIN_DEN & PIN_L0 & !PIN_L2 & !PIN_MWTC & PIN_RDY) ; 94 | -------------------------------------------------------------------------------- /286-related/WorkingCode/ide_start_20230414/empty_isrs.asm: -------------------------------------------------------------------------------- 1 | ; unimplemented isr's... 2 | 3 | isr_int_01h: 4 | mov al, 0x01 5 | call display_int 6 | iret 7 | 8 | isr_int_02h: 9 | mov al, 0x02 10 | call display_int 11 | iret 12 | 13 | isr_int_03h: 14 | mov al, 0x03 15 | call display_int 16 | iret 17 | 18 | isr_int_05h: 19 | mov al, 0x05 20 | call display_int 21 | iret 22 | 23 | isr_int_07h: 24 | mov al, 0x07 25 | call display_int 26 | iret 27 | 28 | isr_int_0Bh: 29 | mov al, 0x0b 30 | call display_int 31 | iret 32 | 33 | isr_int_0Ch: 34 | mov al, 0x0c 35 | call display_int 36 | iret 37 | 38 | isr_int_0Dh: 39 | mov al, 0x0d 40 | call display_int 41 | iret 42 | 43 | isr_int_0Eh: 44 | mov al, 0x0e 45 | call display_int 46 | iret 47 | 48 | isr_int_0Fh: 49 | mov al, 0x0f 50 | call display_int 51 | iret 52 | 53 | isr_int_11h: 54 | mov al, 0x11 55 | call display_int 56 | iret 57 | 58 | isr_int_12h: 59 | mov al, 0x12 60 | call display_int 61 | iret 62 | 63 | isr_int_14h: 64 | mov al, 0x14 65 | call display_int 66 | iret 67 | 68 | isr_int_15h: 69 | mov al, 0x15 70 | call display_int 71 | iret 72 | 73 | isr_int_16h: 74 | mov al, 0x16 75 | call display_int 76 | iret 77 | 78 | isr_int_17h: 79 | mov al, 0x17 80 | call display_int 81 | iret 82 | 83 | isr_int_18h: 84 | mov al, 0x18 85 | call display_int 86 | iret 87 | 88 | isr_int_19h: 89 | mov al, 0x19 90 | call display_int 91 | iret 92 | 93 | isr_int_1ah: 94 | mov al, 0x1a 95 | call display_int 96 | iret 97 | 98 | isr_int_1bh: 99 | mov al, 0x1b 100 | call display_int 101 | iret 102 | 103 | isr_int_1ch: 104 | mov al, 0x1c 105 | call display_int 106 | iret 107 | 108 | isr_int_1dh: 109 | mov al, 0x1d 110 | call display_int 111 | iret 112 | 113 | isr_int_1eh: 114 | mov al, 0x1e 115 | call display_int 116 | iret 117 | 118 | isr_int_1fh: 119 | mov al, 0x1f 120 | call display_int 121 | iret 122 | 123 | isr_int_20h: 124 | mov al, 0x20 125 | call display_int 126 | iret 127 | 128 | isr_int_22h: 129 | mov al, 0x22 130 | call display_int 131 | iret 132 | 133 | isr_int_23h: 134 | mov al, 0x23 135 | call display_int 136 | iret 137 | 138 | isr_int_24h: 139 | mov al, 0x24 140 | call display_int 141 | iret 142 | 143 | isr_int_25h: 144 | mov al, 0x25 145 | call display_int 146 | iret 147 | 148 | isr_int_26h: 149 | mov al, 0x26 150 | call display_int 151 | iret 152 | 153 | isr_int_27h: 154 | mov al, 0x27 155 | call display_int 156 | iret 157 | 158 | isr_int_28h: 159 | mov al, 0x28 160 | call display_int 161 | iret 162 | 163 | isr_int_29h: 164 | mov al, 0x29 165 | call display_int 166 | iret 167 | 168 | isr_int_2ah: 169 | mov al, 0x2a 170 | call display_int 171 | iret 172 | 173 | isr_int_2bh: 174 | mov al, 0x2b 175 | call display_int 176 | iret 177 | 178 | isr_int_2ch: 179 | mov al, 0x2c 180 | call display_int 181 | iret 182 | 183 | isr_int_2dh: 184 | mov al, 0x2d 185 | call display_int 186 | iret 187 | 188 | isr_int_2eh: 189 | mov al, 0x2e 190 | call display_int 191 | iret 192 | 193 | isr_int_2fh: 194 | mov al, 0x2f 195 | call display_int 196 | iret 197 | 198 | display_int: 199 | call lcd_clear 200 | push ax 201 | mov al, '!' 202 | call print_char 203 | mov al, 'i' 204 | call print_char 205 | mov al, 'r' 206 | call print_char 207 | mov al, 'q' 208 | call print_char 209 | mov al, ':' 210 | call print_char 211 | call lcd_line2 212 | pop ax 213 | call print_char_hex 214 | 215 | call play_error_sound 216 | call delay 217 | call play_error_sound 218 | call delay 219 | call play_error_sound 220 | hlt ; temporary -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/Monitor_286_Win.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {6508E7D2-A41D-4B4F-8BBF-4647D257FC53} 8 | WinExe 9 | Monitor_286_Win 10 | Monitor_286_Win 11 | v4.7.2 12 | 512 13 | true 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | Form 52 | 53 | 54 | MainForm.cs 55 | 56 | 57 | 58 | 59 | MainForm.cs 60 | 61 | 62 | ResXFileCodeGenerator 63 | Resources.Designer.cs 64 | Designer 65 | 66 | 67 | True 68 | Resources.resx 69 | 70 | 71 | SettingsSingleFileGenerator 72 | Settings.Designer.cs 73 | 74 | 75 | True 76 | Settings.settings 77 | True 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/isrs_empty.asm: -------------------------------------------------------------------------------- 1 | ; unimplemented isr's... 2 | 3 | isr_int_01h: 4 | push di 5 | mov di, 0x01 6 | jmp display_int 7 | 8 | isr_int_02h: 9 | push di 10 | mov di, 0x02 11 | jmp display_int 12 | 13 | isr_int_03h: ;breakpoint 14 | push di 15 | mov di, 0x03 16 | jmp display_int 17 | 18 | isr_int_05h: 19 | push di 20 | mov di, 0x05 21 | jmp display_int 22 | 23 | isr_int_07h: 24 | push di 25 | mov di, 0x07 26 | jmp display_int 27 | 28 | isr_int_0Bh: 29 | push di 30 | mov di, 0x0b 31 | jmp display_int 32 | 33 | isr_int_0Ch: 34 | push di 35 | mov di, 0x0c 36 | jmp display_int 37 | 38 | isr_int_0Dh: 39 | push di 40 | mov di, 0x0d 41 | jmp display_int 42 | 43 | isr_int_0Eh: 44 | push di 45 | mov di, 0x0e 46 | jmp display_int 47 | 48 | isr_int_0Fh: 49 | push di 50 | mov di, 0x0f 51 | jmp display_int 52 | 53 | ;isr_int_12h: ;Memory Size Determination, see isrs_general.asm 54 | 55 | ;isr_int_13h: ;disk services, see disk.asm 56 | 57 | isr_int_14h: 58 | push di 59 | mov di, 0x14 60 | jmp display_int 61 | 62 | isr_int_15h: ; previous: temporarily re-purposing in debug.asm 63 | push di 64 | mov di, 0x15 65 | jmp display_int 66 | 67 | isr_int_17h: 68 | push di 69 | mov di, 0x17 70 | jmp display_int 71 | 72 | isr_int_18h: 73 | push di 74 | mov di, 0x18 75 | jmp display_int 76 | 77 | isr_int_19h: 78 | push di 79 | mov di, 0x19 80 | jmp display_int 81 | 82 | 83 | 84 | isr_int_1bh: 85 | push di 86 | mov di, 0x1b 87 | jmp display_int 88 | 89 | isr_int_1ch: 90 | push di 91 | mov di, 0x1c 92 | jmp display_int 93 | 94 | isr_int_1dh: 95 | push di 96 | mov di, 0x1d 97 | jmp display_int 98 | 99 | isr_int_1eh: 100 | push di 101 | mov di, 0x1e 102 | jmp display_int 103 | 104 | isr_int_1fh: 105 | push di 106 | mov di, 0x1f 107 | jmp display_int 108 | 109 | isr_int_20h: 110 | push di 111 | mov di, 0x20 112 | jmp display_int 113 | 114 | dos_services_isr: ; interrupt 0x21 115 | push di 116 | mov di, 0x21 117 | jmp display_int 118 | 119 | isr_int_22h: 120 | push di 121 | mov di, 0x22 122 | jmp display_int 123 | 124 | isr_int_23h: 125 | push di 126 | mov di, 0x23 127 | jmp display_int 128 | 129 | isr_int_24h: 130 | push di 131 | mov di, 0x24 132 | jmp display_int 133 | 134 | isr_int_25h: 135 | push di 136 | mov di, 0x25 137 | jmp display_int 138 | 139 | isr_int_26h: 140 | push di 141 | mov di, 0x26 142 | jmp display_int 143 | 144 | isr_int_27h: 145 | push di 146 | mov di, 0x27 147 | jmp display_int 148 | 149 | isr_int_28h: 150 | push di 151 | mov di, 0x28 152 | jmp display_int 153 | 154 | isr_int_29h: 155 | push di 156 | mov di, 0x29 157 | jmp display_int 158 | 159 | isr_int_2ah: 160 | push di 161 | mov di, 0x2a 162 | jmp display_int 163 | 164 | isr_int_2bh: 165 | push di 166 | mov di, 0x2b 167 | jmp display_int 168 | 169 | isr_int_2ch: 170 | push di 171 | mov di, 0x2c 172 | jmp display_int 173 | 174 | isr_int_2dh: 175 | push di 176 | mov di, 0x2d 177 | jmp display_int 178 | 179 | isr_int_2eh: 180 | push di 181 | mov di, 0x2e 182 | jmp display_int 183 | 184 | isr_int_2fh: 185 | push di 186 | mov di, 0x2f 187 | jmp display_int 188 | 189 | display_int: 190 | push ax 191 | mov ax, 0 192 | mov ds, ax 193 | mov ax, 0xf000 194 | mov es, ax 195 | 196 | call lcd_clear 197 | mov al, '!' 198 | call print_char 199 | mov al, 'i' 200 | call print_char 201 | mov al, 'r' 202 | call print_char 203 | mov al, 'q' 204 | call print_char 205 | mov al, ':' 206 | call print_char 207 | call lcd_line2 208 | 209 | mov ax, di 210 | 211 | call print_char_hex 212 | call debug_print_intnum 213 | call play_error_sound 214 | call delay 215 | call play_error_sound 216 | call debug_print_interrupt_info 217 | 218 | pop ax 219 | pop di 220 | iret 221 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230528_alignmentissue_questionmark/isrs_empty.asm: -------------------------------------------------------------------------------- 1 | ; unimplemented isr's... 2 | 3 | isr_int_01h: 4 | push bx 5 | mov bx, 0x01 6 | jmp display_int 7 | 8 | isr_int_02h: 9 | push bx 10 | mov bx, 0x02 11 | jmp display_int 12 | 13 | isr_int_03h: ;breakpoint 14 | push bx 15 | mov bx, 0x03 16 | jmp display_int 17 | 18 | isr_int_05h: 19 | push bx 20 | mov bx, 0x05 21 | jmp display_int 22 | 23 | isr_int_07h: 24 | push bx 25 | mov bx, 0x07 26 | jmp display_int 27 | 28 | isr_int_0Bh: 29 | push bx 30 | mov bx, 0x0b 31 | jmp display_int 32 | 33 | isr_int_0Ch: 34 | push bx 35 | mov bx, 0x0c 36 | jmp display_int 37 | 38 | isr_int_0Dh: 39 | push bx 40 | mov bx, 0x0d 41 | jmp display_int 42 | 43 | isr_int_0Eh: 44 | push bx 45 | mov bx, 0x0e 46 | jmp display_int 47 | 48 | isr_int_0Fh: 49 | push bx 50 | mov bx, 0x0f 51 | jmp display_int 52 | 53 | ;isr_int_12h: ;Memory Size Determination, see isrs_general.asm 54 | 55 | ;isr_int_13h: ;disk services, see disk.asm 56 | 57 | isr_int_14h: 58 | push bx 59 | mov bx, 0x14 60 | jmp display_int 61 | 62 | isr_int_15h: ; previous: temporarily re-purposing in debug.asm 63 | push bx 64 | mov bx, 0x15 65 | jmp display_int 66 | 67 | isr_int_17h: 68 | push bx 69 | mov bx, 0x17 70 | jmp display_int 71 | 72 | isr_int_18h: 73 | push bx 74 | mov bx, 0x18 75 | jmp display_int 76 | 77 | ;isr_int_19h: 78 | ;see isrs_general.asm 79 | 80 | isr_int_1bh: 81 | push bx 82 | mov bx, 0x1b 83 | jmp display_int 84 | 85 | isr_int_1ch: 86 | push bx 87 | mov bx, 0x1c 88 | jmp display_int 89 | 90 | isr_int_1dh: 91 | push bx 92 | mov bx, 0x1d 93 | jmp display_int 94 | 95 | isr_int_1eh: 96 | push bx 97 | mov bx, 0x1e 98 | jmp display_int 99 | 100 | isr_int_1fh: 101 | push bx 102 | mov bx, 0x1f 103 | jmp display_int 104 | 105 | isr_int_20h: 106 | push bx 107 | mov bx, 0x20 108 | jmp display_int 109 | 110 | dos_services_isr: ; interrupt 0x21 111 | push bx 112 | mov bx, 0x21 113 | jmp display_int 114 | 115 | isr_int_22h: 116 | push bx 117 | mov bx, 0x22 118 | jmp display_int 119 | 120 | isr_int_23h: 121 | push bx 122 | mov bx, 0x23 123 | jmp display_int 124 | 125 | isr_int_24h: 126 | push bx 127 | mov bx, 0x24 128 | jmp display_int 129 | 130 | isr_int_25h: 131 | push bx 132 | mov bx, 0x25 133 | jmp display_int 134 | 135 | isr_int_26h: 136 | push bx 137 | mov bx, 0x26 138 | jmp display_int 139 | 140 | isr_int_27h: 141 | push bx 142 | mov bx, 0x27 143 | jmp display_int 144 | 145 | isr_int_28h: 146 | push bx 147 | mov bx, 0x28 148 | jmp display_int 149 | 150 | isr_int_29h: 151 | push bx 152 | mov bx, 0x29 153 | jmp display_int 154 | 155 | isr_int_2ah: 156 | push bx 157 | mov bx, 0x2a 158 | jmp display_int 159 | 160 | isr_int_2bh: 161 | push bx 162 | mov bx, 0x2b 163 | jmp display_int 164 | 165 | isr_int_2ch: 166 | push bx 167 | mov bx, 0x2c 168 | jmp display_int 169 | 170 | isr_int_2dh: 171 | push bx 172 | mov bx, 0x2d 173 | jmp display_int 174 | 175 | isr_int_2eh: 176 | push bx 177 | mov bx, 0x2e 178 | jmp display_int 179 | 180 | isr_int_2fh: 181 | push bx 182 | mov bx, 0x2f 183 | jmp display_int 184 | 185 | display_int: 186 | push ax 187 | mov ax, 0 188 | mov ds, ax 189 | mov ax, 0xf000 190 | mov es, ax 191 | 192 | call lcd_clear 193 | mov al, '!' 194 | call print_char 195 | mov al, 'i' 196 | call print_char 197 | mov al, 'r' 198 | call print_char 199 | mov al, 'q' 200 | call print_char 201 | mov al, ':' 202 | call print_char 203 | call lcd_line2 204 | 205 | mov ax, bx 206 | 207 | call print_char_hex 208 | call debug_print_intnum 209 | call play_error_sound 210 | call delay 211 | call play_error_sound 212 | 213 | mov al, bl 214 | call missing_interrupt_tospi 215 | 216 | pop ax 217 | pop bx 218 | iret 219 | -------------------------------------------------------------------------------- /386-related/Code Snapshots/386DX - Nov2023/isrs_empty.asm: -------------------------------------------------------------------------------- 1 | ; unimplemented isr's... 2 | 3 | isr_int_01h: 4 | push bx 5 | mov bx, 0x01 6 | jmp display_int 7 | 8 | isr_int_02h: 9 | push bx 10 | mov bx, 0x02 11 | jmp display_int 12 | 13 | isr_int_03h: ;breakpoint 14 | push bx 15 | mov bx, 0x03 16 | jmp display_int 17 | 18 | isr_int_05h: 19 | push bx 20 | mov bx, 0x05 21 | jmp display_int 22 | 23 | isr_int_07h: 24 | push bx 25 | mov bx, 0x07 26 | jmp display_int 27 | 28 | isr_int_0Bh: 29 | push bx 30 | mov bx, 0x0b 31 | jmp display_int 32 | 33 | isr_int_0Ch: 34 | push bx 35 | mov bx, 0x0c 36 | jmp display_int 37 | 38 | isr_int_0Dh: 39 | push bx 40 | mov bx, 0x0d 41 | jmp display_int 42 | 43 | isr_int_0Eh: 44 | push bx 45 | mov bx, 0x0e 46 | jmp display_int 47 | 48 | isr_int_0Fh: 49 | push bx 50 | mov bx, 0x0f 51 | jmp display_int 52 | 53 | ;isr_int_12h: ;Memory Size Determination, see isrs_general.asm 54 | 55 | ;isr_int_13h: ;disk services, see disk.asm 56 | 57 | isr_int_14h: 58 | push bx 59 | mov bx, 0x14 60 | jmp display_int 61 | 62 | isr_int_15h: ; previous: temporarily re-purposing in debug.asm 63 | push bx 64 | mov bx, 0x15 65 | jmp display_int 66 | 67 | isr_int_17h: 68 | push bx 69 | mov bx, 0x17 70 | jmp display_int 71 | 72 | isr_int_18h: 73 | push bx 74 | mov bx, 0x18 75 | jmp display_int 76 | 77 | ;isr_int_19h: 78 | ;see isrs_general.asm 79 | 80 | isr_int_1bh: 81 | push bx 82 | mov bx, 0x1b 83 | jmp display_int 84 | 85 | isr_int_1ch: 86 | push bx 87 | mov bx, 0x1c 88 | jmp display_int 89 | 90 | isr_int_1dh: 91 | push bx 92 | mov bx, 0x1d 93 | jmp display_int 94 | 95 | isr_int_1eh: 96 | push bx 97 | mov bx, 0x1e 98 | jmp display_int 99 | 100 | isr_int_1fh: 101 | push bx 102 | mov bx, 0x1f 103 | jmp display_int 104 | 105 | isr_int_20h: 106 | push bx 107 | mov bx, 0x20 108 | jmp display_int 109 | 110 | dos_services_isr: ; interrupt 0x21 111 | push bx 112 | mov bx, 0x21 113 | jmp display_int 114 | 115 | isr_int_22h: 116 | push bx 117 | mov bx, 0x22 118 | jmp display_int 119 | 120 | isr_int_23h: 121 | push bx 122 | mov bx, 0x23 123 | jmp display_int 124 | 125 | isr_int_24h: 126 | push bx 127 | mov bx, 0x24 128 | jmp display_int 129 | 130 | isr_int_25h: 131 | push bx 132 | mov bx, 0x25 133 | jmp display_int 134 | 135 | isr_int_26h: 136 | push bx 137 | mov bx, 0x26 138 | jmp display_int 139 | 140 | isr_int_27h: 141 | push bx 142 | mov bx, 0x27 143 | jmp display_int 144 | 145 | isr_int_28h: 146 | push bx 147 | mov bx, 0x28 148 | jmp display_int 149 | 150 | isr_int_29h: 151 | push bx 152 | mov bx, 0x29 153 | jmp display_int 154 | 155 | isr_int_2ah: 156 | push bx 157 | mov bx, 0x2a 158 | jmp display_int 159 | 160 | isr_int_2bh: 161 | push bx 162 | mov bx, 0x2b 163 | jmp display_int 164 | 165 | isr_int_2ch: 166 | push bx 167 | mov bx, 0x2c 168 | jmp display_int 169 | 170 | isr_int_2dh: 171 | push bx 172 | mov bx, 0x2d 173 | jmp display_int 174 | 175 | isr_int_2eh: 176 | push bx 177 | mov bx, 0x2e 178 | jmp display_int 179 | 180 | isr_int_2fh: 181 | push bx 182 | mov bx, 0x2f 183 | jmp display_int 184 | 185 | display_int: 186 | ds0000 187 | push ax 188 | push es 189 | 190 | mov ax, 0xf000 191 | mov es, ax 192 | 193 | ;call lcd_clear 194 | ;mov al, '!' 195 | ;call print_char 196 | ;mov al, 'i' 197 | ;call print_char 198 | ;mov al, 'r' 199 | ;call print_char 200 | ;mov al, 'q' 201 | ;call print_char 202 | ;mov al, ':' 203 | ;call print_char 204 | ;call lcd_line2 205 | 206 | mov ax, bx 207 | 208 | ;;call print_char_hex 209 | call debug_print_intnum 210 | ;;call play_error_sound 211 | call delay 212 | ;;call play_error_sound 213 | 214 | mov al, bl 215 | call missing_interrupt_tospi 216 | 217 | pop es 218 | pop ax 219 | ds0000out 220 | pop bx 221 | iret 222 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/_bss.asm: -------------------------------------------------------------------------------- 1 | ; VARs 2 | varstart: 3 | ;*** first 1024 bytes *** 4 | ivt times 1024 db ? ; prevent writing in the same space as the IVT (using nop 0x90 for visibility in binary) 5 | 6 | ;*** next 228 bytes *** 7 | kb_buffer times 64 dw ? ; 128-word keyboard buffer 8 | ;os_buffer times 64 dw ? ; 128-word buffer for operating system keyboard input (i.e., commands) 9 | tile5e_backup times 25 dw ? ; 5x5, word per pixel for color = 25 words (even frame) 10 | tile5o_backup times 25 dw ? ; 5x5, word per pixel for color = 25 words (odd frame) 11 | 12 | ;*** next 98 bytes *** 13 | mem_test_tmp dw ? ; used for RAM testing 14 | ppi1_ccfg db ? ; current config for PPI1 15 | ppi2_ccfg db ? ; current config for PPI2 16 | spi_state_b db ? ; track CS state for spi on via port b 17 | spi_state_a db ? ; track CS state for spi on via port a 18 | 19 | dec_num db ? 20 | dec_num100s db ? 21 | dec_num10s db ? 22 | dec_num1s db ? 23 | 24 | kb_flags dw ? ; track status of keyboard input 25 | kb_wptr dw ? ; keyboard buffer write pointer 26 | kb_rptr dw ? ; keyboard buffer read pointer 27 | 28 | ;os_buffer_wptr dw ? ; os keyboard input write pointer 29 | 30 | current_char dw ? ; current char for VGA output 31 | cursor_pos_h dw ? ; horizontal position (pixel #) of text cursor 32 | cursor_pos_v dw ? ; vertical position (pixel #) of text cursor 33 | pixel_offset_h dw ? 34 | pixel_offset_v dw ? 35 | 36 | charPixelRowLoopCounter dw ? ; row pos when processing a char 37 | charpix_line1 db ? 38 | charpix_line2 db ? 39 | charpix_line3 db ? 40 | charpix_line4 db ? 41 | charpix_line5 db ? 42 | charpix_line6 db ? 43 | charpix_line7 db ? 44 | sprite_inc db ? 45 | vga_param_color dw ? 46 | vga_rect_start_x dw ? 47 | vga_rect_start_y dw ? 48 | vga_rect_end_x dw ? 49 | vga_rect_end_y dw ? 50 | print_char_options dw ? ;bit0=1=single frame only 51 | ;50 52 | mouse_buttons dw ? 53 | mouse_buttons_prev dw ? 54 | mouse_pos_x dw ? ; horizontal position (pixel #) of mouse pointer 55 | mouse_pos_y dw ? ; vertical position (pixel #) of mouse pointer 56 | mouse_pos_x_prev_e dw ? 57 | mouse_pos_y_prev_e dw ? 58 | mouse_pos_x_prev_o dw ? 59 | mouse_pos_y_prev_o dw ? 60 | mouse_flags dw ? 61 | 62 | 63 | ; disk drive info ; [index in identy drive data, in words] 64 | di_d0_num_cyl dw ? ; [1] default number of cylinders for disk 0 65 | di_d0_num_heads dw ? ; [3] default number of heads 66 | di_d0_bytes_sect dw ? ; [5] default number of bytes per sector 67 | di_d0_sect_track dw ? ; [56] default sectors per track 68 | di_d0_curr_num_cyl dw ? ; [54] current number of cylinders 69 | di_d0_curr_num_heads dw ? ; [55] current number of heads 70 | di_d0_curr_sect_track dw ? ; [56] current sectors per track 71 | di_d0_curr_capacity_lo dw ? ; [57] current capacity in sectors (LBAs) lsw 72 | di_d0_curr_capacity_hi dw ? ; [58] current capacity in sectors (LBAs) msw 73 | di_d0_sectors_addressbl dd ? ; [60-61] total number of sectors addressable in LBA Mode 74 | di_d0_adj_num_cyl dw ? ; adjusted number of cylinders 75 | di_d0_adj_num_heads dw ? ; adjusted current number of heads 76 | di_d0_adj_sect_track dw ? ; adjusted current sectors per track 77 | 78 | chs_adj dw ? ; power of 2 adjustment if chs cyl > 1023 79 | 80 | flags_debug dw ? ; temporary storage of flags register for debug printing 81 | keyboard_data dw ? 82 | ; line drawing temps 83 | temp_w dw ? 84 | pointX dw ? 85 | pointY dw ? 86 | 87 | AREA dd ? ; store result of area calculation 88 | 89 | ;98 90 | ; ****************************************** 91 | ; Room for 58 more bytes in 'safe' space 92 | ; ****************************************** 93 | 94 | 95 | ; !!! anything beyond 1536 (addr 0x0600) bytes will be overwritten when kernel is loaded at 0x0600! 96 | 97 | ; disk drive 98 | drive_buffer times 256 dw ? ; buffer to hold the drive identification inf 99 | 100 | varend: 101 | 102 | 103 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/_bss.asm: -------------------------------------------------------------------------------- 1 | ; VARs 2 | varstart: 3 | ;*** first 1024 bytes *** 4 | ivt times 1024 db ? ; prevent writing in the same space as the IVT (using nop 0x90 for visibility in binary) 5 | 6 | ;*** next 356 bytes *** 7 | kb_buffer times 64 dw ? ; 128-word keyboard buffer 8 | os_buffer times 64 dw ? ; 128-word buffer for operating system keyboard input (i.e., commands) 9 | tile5e_backup times 25 dw ? ; 5x5, word per pixel for color = 25 words (even frame) 10 | tile5o_backup times 25 dw ? ; 5x5, word per pixel for color = 25 words (odd frame) 11 | 12 | ;*** next 98 bytes *** 13 | mem_test_tmp dw ? ; used for RAM testing 14 | ppi1_ccfg db ? ; current config for PPI1 15 | ppi2_ccfg db ? ; current config for PPI2 16 | spi_state_b db ? ; track CS state for spi on via port b 17 | spi_state_a db ? ; track CS state for spi on via port a 18 | 19 | dec_num db ? 20 | dec_num100s db ? 21 | dec_num10s db ? 22 | dec_num1s db ? 23 | 24 | kb_flags dw ? ; track status of keyboard input 25 | kb_wptr dw ? ; keyboard buffer write pointer 26 | kb_rptr dw ? ; keyboard buffer read pointer 27 | 28 | os_buffer_wptr dw ? ; os keyboard input write pointer 29 | 30 | current_char dw ? ; current char for VGA output 31 | cursor_pos_h dw ? ; horizontal position (pixel #) of text cursor 32 | cursor_pos_v dw ? ; vertical position (pixel #) of text cursor 33 | pixel_offset_h dw ? 34 | pixel_offset_v dw ? 35 | 36 | charPixelRowLoopCounter dw ? ; row pos when processing a char 37 | charpix_line1 db ? 38 | charpix_line2 db ? 39 | charpix_line3 db ? 40 | charpix_line4 db ? 41 | charpix_line5 db ? 42 | charpix_line6 db ? 43 | charpix_line7 db ? 44 | sprite_inc db ? 45 | vga_param_color dw ? 46 | vga_rect_start_x dw ? 47 | vga_rect_start_y dw ? 48 | vga_rect_end_x dw ? 49 | vga_rect_end_y dw ? 50 | print_char_options dw ? ;bit0=1=single frame only 51 | ;50 52 | mouse_buttons dw ? 53 | mouse_buttons_prev dw ? 54 | mouse_pos_x dw ? ; horizontal position (pixel #) of mouse pointer 55 | mouse_pos_y dw ? ; vertical position (pixel #) of mouse pointer 56 | mouse_pos_x_prev_e dw ? 57 | mouse_pos_y_prev_e dw ? 58 | mouse_pos_x_prev_o dw ? 59 | mouse_pos_y_prev_o dw ? 60 | mouse_flags dw ? 61 | 62 | 63 | ; disk drive info ; [index in identy drive data, in words] 64 | di_d0_num_cyl dw ? ; [1] default number of cylinders for disk 0 65 | di_d0_num_heads dw ? ; [3] default number of heads 66 | di_d0_bytes_sect dw ? ; [5] default number of bytes per sector 67 | di_d0_sect_track dw ? ; [56] default sectors per track 68 | di_d0_curr_num_cyl dw ? ; [54] current number of cylinders 69 | di_d0_curr_num_heads dw ? ; [55] current number of heads 70 | di_d0_curr_sect_track dw ? ; [56] current sectors per track 71 | di_d0_curr_capacity_lo dw ? ; [57] current capacity in sectors (LBAs) lsw 72 | di_d0_curr_capacity_hi dw ? ; [58] current capacity in sectors (LBAs) msw 73 | di_d0_sectors_addressbl dd ? ; [60-61] total number of sectors addressable in LBA Mode 74 | di_d0_adj_num_cyl dw ? ; adjusted number of cylinders 75 | di_d0_adj_num_heads dw ? ; adjusted current number of heads 76 | di_d0_adj_sect_track dw ? ; adjusted current sectors per track 77 | 78 | chs_adj dw ? ; power of 2 adjustment if chs cyl > 1023 79 | 80 | flags_debug dw ? ; temporary storage of flags register for debug printing 81 | keyboard_data dw ? 82 | ; line drawing temps 83 | temp_w dw ? 84 | pointX dw ? 85 | pointY dw ? 86 | 87 | AREA dd ? ; store result of area calculation 88 | 89 | ;98 90 | ; ****************************************** 91 | ; Room for 58 more bytes in 'safe' space 92 | ; ****************************************** 93 | 94 | 95 | ; !!! anything beyond 1536 (addr 0x0600) bytes will be overwritten when kernel is loaded at 0x0600! 96 | 97 | ; disk drive 98 | drive_buffer times 256 dw ? ; buffer to hold the drive identification inf 99 | 100 | varend: 101 | 102 | 103 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230505_troubleshooting_execrh/_bss.asm: -------------------------------------------------------------------------------- 1 | ; VARs 2 | varstart: 3 | ;*** first 1024 bytes *** 4 | ivt times 1024 db ? ; prevent writing in the same space as the IVT (using nop 0x90 for visibility in binary) 5 | 6 | ;*** next 356 bytes *** 7 | kb_buffer times 64 dw ? ; 128-word keyboard buffer 8 | os_buffer times 64 dw ? ; 128-word buffer for operating system keyboard input (i.e., commands) 9 | tile5e_backup times 25 dw ? ; 5x5, word per pixel for color = 25 words (even frame) 10 | tile5o_backup times 25 dw ? ; 5x5, word per pixel for color = 25 words (odd frame) 11 | 12 | ;*** next 98 bytes *** 13 | mem_test_tmp dw ? ; used for RAM testing 14 | ppi1_ccfg db ? ; current config for PPI1 15 | ppi2_ccfg db ? ; current config for PPI2 16 | spi_state_b db ? ; track CS state for spi on via port b 17 | spi_state_a db ? ; track CS state for spi on via port a 18 | 19 | dec_num db ? 20 | dec_num100s db ? 21 | dec_num10s db ? 22 | dec_num1s db ? 23 | 24 | kb_flags dw ? ; track status of keyboard input 25 | kb_wptr dw ? ; keyboard buffer write pointer 26 | kb_rptr dw ? ; keyboard buffer read pointer 27 | 28 | os_buffer_wptr dw ? ; os keyboard input write pointer 29 | 30 | current_char dw ? ; current char for VGA output 31 | cursor_pos_h dw ? ; horizontal position (pixel #) of text cursor 32 | cursor_pos_v dw ? ; vertical position (pixel #) of text cursor 33 | pixel_offset_h dw ? 34 | pixel_offset_v dw ? 35 | 36 | charPixelRowLoopCounter dw ? ; row pos when processing a char 37 | charpix_line1 db ? 38 | charpix_line2 db ? 39 | charpix_line3 db ? 40 | charpix_line4 db ? 41 | charpix_line5 db ? 42 | charpix_line6 db ? 43 | charpix_line7 db ? 44 | sprite_inc db ? 45 | vga_param_color dw ? 46 | vga_rect_start_x dw ? 47 | vga_rect_start_y dw ? 48 | vga_rect_end_x dw ? 49 | vga_rect_end_y dw ? 50 | print_char_options dw ? ;bit0=1=single frame only 51 | ;50 52 | mouse_buttons dw ? 53 | mouse_buttons_prev dw ? 54 | mouse_pos_x dw ? ; horizontal position (pixel #) of mouse pointer 55 | mouse_pos_y dw ? ; vertical position (pixel #) of mouse pointer 56 | mouse_pos_x_prev_e dw ? 57 | mouse_pos_y_prev_e dw ? 58 | mouse_pos_x_prev_o dw ? 59 | mouse_pos_y_prev_o dw ? 60 | mouse_flags dw ? 61 | 62 | 63 | ; disk drive info ; [index in identy drive data, in words] 64 | di_d0_num_cyl dw ? ; [1] default number of cylinders for disk 0 65 | di_d0_num_heads dw ? ; [3] default number of heads 66 | di_d0_bytes_sect dw ? ; [5] default number of bytes per sector 67 | di_d0_sect_track dw ? ; [56] default sectors per track 68 | di_d0_curr_num_cyl dw ? ; [54] current number of cylinders 69 | di_d0_curr_num_heads dw ? ; [55] current number of heads 70 | di_d0_curr_sect_track dw ? ; [56] current sectors per track 71 | di_d0_curr_capacity_lo dw ? ; [57] current capacity in sectors (LBAs) lsw 72 | di_d0_curr_capacity_hi dw ? ; [58] current capacity in sectors (LBAs) msw 73 | di_d0_sectors_addressbl dd ? ; [60-61] total number of sectors addressable in LBA Mode 74 | di_d0_adj_num_cyl dw ? ; adjusted number of cylinders 75 | di_d0_adj_num_heads dw ? ; adjusted current number of heads 76 | di_d0_adj_sect_track dw ? ; adjusted current sectors per track 77 | 78 | chs_adj dw ? ; power of 2 adjustment if chs cyl > 1023 79 | 80 | flags_debug dw ? ; temporary storage of flags register for debug printing 81 | keyboard_data dw ? 82 | ; line drawing temps 83 | temp_w dw ? 84 | pointX dw ? 85 | pointY dw ? 86 | 87 | AREA dd ? ; store result of area calculation 88 | 89 | ;98 90 | ; ****************************************** 91 | ; Room for 58 more bytes in 'safe' space 92 | ; ****************************************** 93 | 94 | 95 | ; !!! anything beyond 1536 (addr 0x0600) bytes will be overwritten when kernel is loaded at 0x0600! 96 | 97 | ; disk drive 98 | drive_buffer times 256 dw ? ; buffer to hold the drive identification inf 99 | 100 | varend: 101 | 102 | 103 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/_bss.asm: -------------------------------------------------------------------------------- 1 | ; VARs 2 | varstart: 3 | ;*** first 1024 bytes *** 4 | ivt times 1024 db ? ; prevent writing in the same space as the IVT (using nop 0x90 for visibility in binary) 5 | 6 | ;*** next 356 bytes *** 7 | kb_buffer times 64 dw ? ; 128-word keyboard buffer 8 | os_buffer times 64 dw ? ; 128-word buffer for operating system keyboard input (i.e., commands) 9 | tile5e_backup times 25 dw ? ; 5x5, word per pixel for color = 25 words (even frame) 10 | tile5o_backup times 25 dw ? ; 5x5, word per pixel for color = 25 words (odd frame) 11 | 12 | ;*** next 98 bytes *** 13 | mem_test_tmp dw ? ; used for RAM testing 14 | ppi1_ccfg db ? ; current config for PPI1 15 | ppi2_ccfg db ? ; current config for PPI2 16 | spi_state_b db ? ; track CS state for spi on via port b 17 | spi_state_a db ? ; track CS state for spi on via port a 18 | 19 | dec_num db ? 20 | dec_num100s db ? 21 | dec_num10s db ? 22 | dec_num1s db ? 23 | 24 | kb_flags dw ? ; track status of keyboard input 25 | kb_wptr dw ? ; keyboard buffer write pointer 26 | kb_rptr dw ? ; keyboard buffer read pointer 27 | 28 | os_buffer_wptr dw ? ; os keyboard input write pointer 29 | 30 | current_char dw ? ; current char for VGA output 31 | cursor_pos_h dw ? ; horizontal position (pixel #) of text cursor 32 | cursor_pos_v dw ? ; vertical position (pixel #) of text cursor 33 | pixel_offset_h dw ? 34 | pixel_offset_v dw ? 35 | 36 | charPixelRowLoopCounter dw ? ; row pos when processing a char 37 | charpix_line1 db ? 38 | charpix_line2 db ? 39 | charpix_line3 db ? 40 | charpix_line4 db ? 41 | charpix_line5 db ? 42 | charpix_line6 db ? 43 | charpix_line7 db ? 44 | sprite_inc db ? 45 | vga_param_color dw ? 46 | vga_rect_start_x dw ? 47 | vga_rect_start_y dw ? 48 | vga_rect_end_x dw ? 49 | vga_rect_end_y dw ? 50 | print_char_options dw ? ;bit0=1=single frame only 51 | ;50 52 | mouse_buttons dw ? 53 | mouse_buttons_prev dw ? 54 | mouse_pos_x dw ? ; horizontal position (pixel #) of mouse pointer 55 | mouse_pos_y dw ? ; vertical position (pixel #) of mouse pointer 56 | mouse_pos_x_prev_e dw ? 57 | mouse_pos_y_prev_e dw ? 58 | mouse_pos_x_prev_o dw ? 59 | mouse_pos_y_prev_o dw ? 60 | mouse_flags dw ? 61 | 62 | 63 | ; disk drive info ; [index in identy drive data, in words] 64 | di_d0_num_cyl dw ? ; [1] default number of cylinders for disk 0 65 | di_d0_num_heads dw ? ; [3] default number of heads 66 | di_d0_bytes_sect dw ? ; [5] default number of bytes per sector 67 | di_d0_sect_track dw ? ; [56] default sectors per track 68 | di_d0_curr_num_cyl dw ? ; [54] current number of cylinders 69 | di_d0_curr_num_heads dw ? ; [55] current number of heads 70 | di_d0_curr_sect_track dw ? ; [56] current sectors per track 71 | di_d0_curr_capacity_lo dw ? ; [57] current capacity in sectors (LBAs) lsw 72 | di_d0_curr_capacity_hi dw ? ; [58] current capacity in sectors (LBAs) msw 73 | di_d0_sectors_addressbl dd ? ; [60-61] total number of sectors addressable in LBA Mode 74 | di_d0_adj_num_cyl dw ? ; adjusted number of cylinders 75 | di_d0_adj_num_heads dw ? ; adjusted current number of heads 76 | di_d0_adj_sect_track dw ? ; adjusted current sectors per track 77 | 78 | chs_adj dw ? ; power of 2 adjustment if chs cyl > 1023 79 | 80 | flags_debug dw ? ; temporary storage of flags register for debug printing 81 | keyboard_data dw ? 82 | ; line drawing temps 83 | temp_w dw ? 84 | pointX dw ? 85 | pointY dw ? 86 | 87 | AREA dd ? ; store result of area calculation 88 | 89 | ;98 90 | ; ****************************************** 91 | ; Room for 58 more bytes in 'safe' space 92 | ; ****************************************** 93 | 94 | 95 | ; !!! anything beyond 1536 (addr 0x0600) bytes will be overwritten when kernel is loaded at 0x0600! 96 | 97 | ; disk drive 98 | drive_buffer times 256 dw ? ; buffer to hold the drive identification inf 99 | 100 | varend: 101 | 102 | 103 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/isrs_empty.asm: -------------------------------------------------------------------------------- 1 | ; unimplemented isr's... 2 | 3 | isr_int_01h: 4 | mov ax, 0 5 | mov ds, ax 6 | mov ax, 0xf000 7 | mov es, ax 8 | 9 | mov di, 0x01 10 | 11 | mov ax, 0x0d 12 | call print_char_hex 13 | 14 | mov ax, ' ' 15 | call print_char 16 | mov ax, ' ' 17 | call print_char 18 | mov ax, '0' 19 | call print_char 20 | mov ax, '1' 21 | call print_char 22 | 23 | mov ax, ' ' 24 | call print_char 25 | 26 | call display_int 27 | 28 | iret 29 | 30 | isr_int_02h: 31 | mov di, 0x02 32 | call display_int 33 | iret 34 | 35 | isr_int_03h: ;breakpoint 36 | mov di, 0x03 37 | call display_int 38 | iret 39 | 40 | isr_int_05h: 41 | mov di, 0x05 42 | call display_int 43 | iret 44 | 45 | isr_int_07h: 46 | mov di, 0x07 47 | call display_int 48 | iret 49 | 50 | isr_int_0Bh: 51 | mov di, 0x0b 52 | call display_int 53 | iret 54 | 55 | isr_int_0Ch: 56 | mov di, 0x0c 57 | call display_int 58 | iret 59 | 60 | isr_int_0Dh: 61 | mov ax, 0 62 | mov ds, ax 63 | mov ax, 0xf000 64 | mov es, ax 65 | 66 | mov di, 0x0d 67 | 68 | mov ax, 0x0d 69 | call print_char_hex 70 | 71 | mov ax, ' ' 72 | call print_char 73 | mov ax, 'g' 74 | call print_char 75 | mov ax, 'p' 76 | call print_char 77 | mov ax, 'f' 78 | call print_char 79 | 80 | mov ax, ' ' 81 | call print_char 82 | 83 | call display_int 84 | 85 | iret 86 | 87 | isr_int_0Eh: 88 | mov di, 0x0e 89 | call display_int 90 | iret 91 | 92 | isr_int_0Fh: 93 | mov di, 0x0f 94 | call display_int 95 | iret 96 | 97 | ;isr_int_12h: ;Memory Size Determination, see isrs_general.asm 98 | 99 | 100 | ;isr_int_13h: ;disk services, see disk.asm 101 | 102 | 103 | isr_int_14h: 104 | mov di, 0x14 105 | call display_int 106 | iret 107 | 108 | ;isr_int_15h: ; temporarily re-purposing in debug.asm 109 | ; mov di, 0x15 110 | ; call display_int 111 | ; iret 112 | 113 | 114 | 115 | isr_int_17h: 116 | mov di, 0x17 117 | call display_int 118 | iret 119 | 120 | isr_int_18h: 121 | mov di, 0x18 122 | call display_int 123 | iret 124 | 125 | isr_int_19h: 126 | mov di, 0x19 127 | call display_int 128 | iret 129 | 130 | 131 | isr_int_1bh: 132 | mov di, 0x1b 133 | call display_int 134 | iret 135 | 136 | isr_int_1ch: 137 | mov di, 0x1c 138 | call display_int 139 | iret 140 | 141 | isr_int_1dh: 142 | mov di, 0x1d 143 | call display_int 144 | iret 145 | 146 | isr_int_1eh: 147 | mov di, 0x1e 148 | call display_int 149 | iret 150 | 151 | isr_int_1fh: 152 | mov di, 0x1f 153 | call display_int 154 | iret 155 | 156 | isr_int_20h: 157 | mov di, 0x20 158 | call display_int 159 | iret 160 | 161 | isr_int_22h: 162 | mov di, 0x22 163 | call display_int 164 | iret 165 | 166 | isr_int_23h: 167 | mov di, 0x23 168 | call display_int 169 | iret 170 | 171 | isr_int_24h: 172 | mov di, 0x24 173 | call display_int 174 | iret 175 | 176 | isr_int_25h: 177 | mov di, 0x25 178 | call display_int 179 | iret 180 | 181 | isr_int_26h: 182 | mov di, 0x26 183 | call display_int 184 | iret 185 | 186 | isr_int_27h: 187 | mov di, 0x27 188 | call display_int 189 | iret 190 | 191 | isr_int_28h: 192 | mov di, 0x28 193 | call display_int 194 | iret 195 | 196 | isr_int_29h: 197 | mov di, 0x29 198 | call display_int 199 | iret 200 | 201 | isr_int_2ah: 202 | mov di, 0x2a 203 | call display_int 204 | iret 205 | 206 | isr_int_2bh: 207 | mov di, 0x2b 208 | call display_int 209 | iret 210 | 211 | isr_int_2ch: 212 | mov di, 0x2c 213 | call display_int 214 | iret 215 | 216 | isr_int_2dh: 217 | mov di, 0x2d 218 | call display_int 219 | iret 220 | 221 | isr_int_2eh: 222 | mov di, 0x2e 223 | call display_int 224 | iret 225 | 226 | isr_int_2fh: 227 | mov di, 0x2f 228 | call display_int 229 | iret 230 | 231 | display_int: 232 | push ax 233 | mov ax, 0 234 | mov ds, ax 235 | mov ax, 0xf000 236 | mov es, ax 237 | 238 | mov ax, di 239 | call lcd_clear 240 | push ax 241 | mov ax, '!' 242 | call print_char 243 | mov ax, 'i' 244 | call print_char 245 | mov ax, 'r' 246 | call print_char 247 | mov ax, 'q' 248 | call print_char 249 | mov ax, ':' 250 | call print_char 251 | call lcd_line2 252 | pop ax 253 | call print_char_hex 254 | 255 | call play_error_sound 256 | call delay 257 | call play_error_sound 258 | 259 | pop ax 260 | 261 | call debug_print_interrupt_info 262 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230505_troubleshooting_execrh/isrs_empty.asm: -------------------------------------------------------------------------------- 1 | ; unimplemented isr's... 2 | 3 | isr_int_01h: 4 | mov ax, 0 5 | mov ds, ax 6 | mov ax, 0xf000 7 | mov es, ax 8 | 9 | mov di, 0x01 10 | 11 | mov ax, 0x0d 12 | call print_char_hex 13 | 14 | mov ax, ' ' 15 | call print_char 16 | mov ax, ' ' 17 | call print_char 18 | mov ax, '0' 19 | call print_char 20 | mov ax, '1' 21 | call print_char 22 | 23 | mov ax, ' ' 24 | call print_char 25 | 26 | call display_int 27 | 28 | iret 29 | 30 | isr_int_02h: 31 | mov di, 0x02 32 | call display_int 33 | iret 34 | 35 | isr_int_03h: ;breakpoint 36 | mov di, 0x03 37 | call display_int 38 | iret 39 | 40 | isr_int_05h: 41 | mov di, 0x05 42 | call display_int 43 | iret 44 | 45 | isr_int_07h: 46 | mov di, 0x07 47 | call display_int 48 | iret 49 | 50 | isr_int_0Bh: 51 | mov di, 0x0b 52 | call display_int 53 | iret 54 | 55 | isr_int_0Ch: 56 | mov di, 0x0c 57 | call display_int 58 | iret 59 | 60 | isr_int_0Dh: 61 | mov ax, 0 62 | mov ds, ax 63 | mov ax, 0xf000 64 | mov es, ax 65 | 66 | mov di, 0x0d 67 | 68 | mov ax, 0x0d 69 | call print_char_hex 70 | 71 | mov ax, ' ' 72 | call print_char 73 | mov ax, 'g' 74 | call print_char 75 | mov ax, 'p' 76 | call print_char 77 | mov ax, 'f' 78 | call print_char 79 | 80 | mov ax, ' ' 81 | call print_char 82 | 83 | call display_int 84 | 85 | iret 86 | 87 | isr_int_0Eh: 88 | mov di, 0x0e 89 | call display_int 90 | iret 91 | 92 | isr_int_0Fh: 93 | mov di, 0x0f 94 | call display_int 95 | iret 96 | 97 | ;isr_int_12h: ;Memory Size Determination, see isrs_general.asm 98 | 99 | 100 | ;isr_int_13h: ;disk services, see disk.asm 101 | 102 | 103 | isr_int_14h: 104 | mov di, 0x14 105 | call display_int 106 | iret 107 | 108 | ;isr_int_15h: ; temporarily re-purposing in debug.asm 109 | ; mov di, 0x15 110 | ; call display_int 111 | ; iret 112 | 113 | 114 | 115 | isr_int_17h: 116 | mov di, 0x17 117 | call display_int 118 | iret 119 | 120 | isr_int_18h: 121 | mov di, 0x18 122 | call display_int 123 | iret 124 | 125 | isr_int_19h: 126 | mov di, 0x19 127 | call display_int 128 | iret 129 | 130 | dos_services_isr: ; interrupt 0x21 131 | mov di, 0x21 132 | call display_int 133 | iret 134 | 135 | isr_int_1bh: 136 | mov di, 0x1b 137 | call display_int 138 | iret 139 | 140 | isr_int_1ch: 141 | mov di, 0x1c 142 | call display_int 143 | iret 144 | 145 | isr_int_1dh: 146 | mov di, 0x1d 147 | call display_int 148 | iret 149 | 150 | isr_int_1eh: 151 | mov di, 0x1e 152 | call display_int 153 | iret 154 | 155 | isr_int_1fh: 156 | mov di, 0x1f 157 | call display_int 158 | iret 159 | 160 | isr_int_20h: 161 | mov di, 0x20 162 | call display_int 163 | iret 164 | 165 | isr_int_22h: 166 | mov di, 0x22 167 | call display_int 168 | iret 169 | 170 | isr_int_23h: 171 | mov di, 0x23 172 | call display_int 173 | iret 174 | 175 | isr_int_24h: 176 | mov di, 0x24 177 | call display_int 178 | iret 179 | 180 | isr_int_25h: 181 | mov di, 0x25 182 | call display_int 183 | iret 184 | 185 | isr_int_26h: 186 | mov di, 0x26 187 | call display_int 188 | iret 189 | 190 | isr_int_27h: 191 | mov di, 0x27 192 | call display_int 193 | iret 194 | 195 | isr_int_28h: 196 | mov di, 0x28 197 | call display_int 198 | iret 199 | 200 | isr_int_29h: 201 | mov di, 0x29 202 | call display_int 203 | iret 204 | 205 | isr_int_2ah: 206 | mov di, 0x2a 207 | call display_int 208 | iret 209 | 210 | isr_int_2bh: 211 | mov di, 0x2b 212 | call display_int 213 | iret 214 | 215 | isr_int_2ch: 216 | mov di, 0x2c 217 | call display_int 218 | iret 219 | 220 | isr_int_2dh: 221 | mov di, 0x2d 222 | call display_int 223 | iret 224 | 225 | isr_int_2eh: 226 | mov di, 0x2e 227 | call display_int 228 | iret 229 | 230 | isr_int_2fh: 231 | mov di, 0x2f 232 | call display_int 233 | iret 234 | 235 | display_int: 236 | push ax 237 | mov ax, 0 238 | mov ds, ax 239 | mov ax, 0xf000 240 | mov es, ax 241 | 242 | mov ax, di 243 | call lcd_clear 244 | push ax 245 | mov ax, '!' 246 | call print_char 247 | mov ax, 'i' 248 | call print_char 249 | mov ax, 'r' 250 | call print_char 251 | mov ax, 'q' 252 | call print_char 253 | mov ax, ':' 254 | call print_char 255 | call lcd_line2 256 | pop ax 257 | call print_char_hex 258 | 259 | call play_error_sound 260 | call delay 261 | call play_error_sound 262 | 263 | pop ax 264 | 265 | call debug_print_interrupt_info 266 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/isrs_empty.asm: -------------------------------------------------------------------------------- 1 | ; unimplemented isr's... 2 | 3 | isr_int_01h: 4 | mov ax, 0 5 | mov ds, ax 6 | mov ax, 0xf000 7 | mov es, ax 8 | 9 | mov di, 0x01 10 | 11 | mov ax, 0x0d 12 | call print_char_hex 13 | 14 | mov ax, ' ' 15 | call print_char 16 | mov ax, ' ' 17 | call print_char 18 | mov ax, '0' 19 | call print_char 20 | mov ax, '1' 21 | call print_char 22 | 23 | mov ax, ' ' 24 | call print_char 25 | 26 | call display_int 27 | 28 | iret 29 | 30 | isr_int_02h: 31 | mov di, 0x02 32 | call display_int 33 | iret 34 | 35 | isr_int_03h: ;breakpoint 36 | mov di, 0x03 37 | call display_int 38 | iret 39 | 40 | isr_int_05h: 41 | mov di, 0x05 42 | call display_int 43 | iret 44 | 45 | isr_int_07h: 46 | mov di, 0x07 47 | call display_int 48 | iret 49 | 50 | isr_int_0Bh: 51 | mov di, 0x0b 52 | call display_int 53 | iret 54 | 55 | isr_int_0Ch: 56 | mov di, 0x0c 57 | call display_int 58 | iret 59 | 60 | isr_int_0Dh: 61 | mov ax, 0 62 | mov ds, ax 63 | mov ax, 0xf000 64 | mov es, ax 65 | 66 | mov di, 0x0d 67 | 68 | mov ax, 0x0d 69 | call print_char_hex 70 | 71 | mov ax, ' ' 72 | call print_char 73 | mov ax, 'g' 74 | call print_char 75 | mov ax, 'p' 76 | call print_char 77 | mov ax, 'f' 78 | call print_char 79 | 80 | mov ax, ' ' 81 | call print_char 82 | 83 | call display_int 84 | 85 | iret 86 | 87 | isr_int_0Eh: 88 | mov di, 0x0e 89 | call display_int 90 | iret 91 | 92 | isr_int_0Fh: 93 | mov di, 0x0f 94 | call display_int 95 | iret 96 | 97 | ;isr_int_12h: ;Memory Size Determination, see isrs_general.asm 98 | 99 | 100 | ;isr_int_13h: ;disk services, see disk.asm 101 | 102 | 103 | isr_int_14h: 104 | mov di, 0x14 105 | call display_int 106 | iret 107 | 108 | ;isr_int_15h: ; temporarily re-purposing in debug.asm 109 | ; mov di, 0x15 110 | ; call display_int 111 | ; iret 112 | 113 | 114 | 115 | isr_int_17h: 116 | mov di, 0x17 117 | call display_int 118 | iret 119 | 120 | isr_int_18h: 121 | mov di, 0x18 122 | call display_int 123 | iret 124 | 125 | isr_int_19h: 126 | mov di, 0x19 127 | call display_int 128 | iret 129 | 130 | dos_services_isr: ; interrupt 0x21 131 | mov di, 0x21 132 | call display_int 133 | iret 134 | 135 | isr_int_1bh: 136 | mov di, 0x1b 137 | call display_int 138 | iret 139 | 140 | isr_int_1ch: 141 | mov di, 0x1c 142 | call display_int 143 | iret 144 | 145 | isr_int_1dh: 146 | mov di, 0x1d 147 | call display_int 148 | iret 149 | 150 | isr_int_1eh: 151 | mov di, 0x1e 152 | call display_int 153 | iret 154 | 155 | isr_int_1fh: 156 | mov di, 0x1f 157 | call display_int 158 | iret 159 | 160 | isr_int_20h: 161 | mov di, 0x20 162 | call display_int 163 | iret 164 | 165 | isr_int_22h: 166 | mov di, 0x22 167 | call display_int 168 | iret 169 | 170 | isr_int_23h: 171 | mov di, 0x23 172 | call display_int 173 | iret 174 | 175 | isr_int_24h: 176 | mov di, 0x24 177 | call display_int 178 | iret 179 | 180 | isr_int_25h: 181 | mov di, 0x25 182 | call display_int 183 | iret 184 | 185 | isr_int_26h: 186 | mov di, 0x26 187 | call display_int 188 | iret 189 | 190 | isr_int_27h: 191 | mov di, 0x27 192 | call display_int 193 | iret 194 | 195 | isr_int_28h: 196 | mov di, 0x28 197 | call display_int 198 | iret 199 | 200 | isr_int_29h: 201 | mov di, 0x29 202 | call display_int 203 | iret 204 | 205 | isr_int_2ah: 206 | mov di, 0x2a 207 | call display_int 208 | iret 209 | 210 | isr_int_2bh: 211 | mov di, 0x2b 212 | call display_int 213 | iret 214 | 215 | isr_int_2ch: 216 | mov di, 0x2c 217 | call display_int 218 | iret 219 | 220 | isr_int_2dh: 221 | mov di, 0x2d 222 | call display_int 223 | iret 224 | 225 | isr_int_2eh: 226 | mov di, 0x2e 227 | call display_int 228 | iret 229 | 230 | isr_int_2fh: 231 | mov di, 0x2f 232 | call display_int 233 | iret 234 | 235 | display_int: 236 | push ax 237 | mov ax, 0 238 | mov ds, ax 239 | mov ax, 0xf000 240 | mov es, ax 241 | 242 | mov ax, di 243 | call lcd_clear 244 | push ax 245 | mov ax, '!' 246 | call print_char 247 | mov ax, 'i' 248 | call print_char 249 | mov ax, 'r' 250 | call print_char 251 | mov ax, 'q' 252 | call print_char 253 | mov ax, ':' 254 | call print_char 255 | call lcd_line2 256 | pop ax 257 | call print_char_hex 258 | 259 | call play_error_sound 260 | call delay 261 | call play_error_sound 262 | 263 | pop ax 264 | 265 | call debug_print_interrupt_info 266 | ret -------------------------------------------------------------------------------- /286-related/WorkingCode/20230509_troubleshooting_execrh2/isrs_general.asm: -------------------------------------------------------------------------------- 1 | diverror_isr: 2 | push bx 3 | push es 4 | push 0xf000 5 | pop es 6 | call lcd_clear 7 | mov bx, msg_xcp_diverr 8 | call print_message_lcd ; print message pointed to by bx to LCD 9 | call play_error_sound 10 | pop es 11 | pop bx 12 | iret 13 | 14 | overflow_isr: 15 | push bx 16 | push es 17 | push 0xf000 18 | pop es 19 | call lcd_clear 20 | mov bx, msg_xcp_overflow 21 | call print_message_lcd ; print message pointed to by bx to LCD 22 | call play_error_sound 23 | pop es 24 | pop bx 25 | iret 26 | 27 | invalidop_isr: 28 | push bx 29 | push es 30 | push 0xf000 31 | pop es 32 | call lcd_clear 33 | mov bx, msg_xcp_invalidop 34 | call print_message_lcd ; print message pointed to by bx to LCD 35 | call play_error_sound 36 | pop es 37 | pop bx 38 | iret 39 | 40 | multiplexcp_isr: 41 | push bx 42 | push es 43 | push 0xf000 44 | pop es 45 | call lcd_clear 46 | mov bx, msg_xcp_multi 47 | call print_message_lcd ; print message pointed to by bx to LCD 48 | call play_error_sound 49 | pop es 50 | pop bx 51 | iret 52 | 53 | geneneralprot_isr: 54 | push bx 55 | push es 56 | push 0xf000 57 | pop es 58 | call lcd_clear 59 | mov bx, msg_xcp_diverr 60 | call msg_xcp_genprot ; print message pointed to by bx to LCD 61 | call play_error_sound 62 | pop es 63 | pop bx 64 | iret 65 | 66 | isr_int_11h: ;BIOS Equipment Determination 67 | ;on return: 68 | ;AX contains the following bit flags: 69 | ; 70 | ;|F|E|D|C|B|A|9|8|7|6|5|4|3|2|1|0| AX 71 | ; | | | | | | | | | | | | | | | `---- IPL diskette installed 72 | ; | | | | | | | | | | | | | | `----- math coprocessor 73 | ; | | | | | | | | | | | | `-------- old PC system board RAM < 256K 74 | ; | | | | | | | | | | | | | `----- pointing device installed (PS/2) 75 | ; | | | | | | | | | | | | `------ not used on PS/2 76 | ; | | | | | | | | | | `--------- initial video mode 77 | ; | | | | | | | | `------------ # of diskette drives, less 1 78 | ; | | | | | | | `------------- 0 if DMA installed 79 | ; | | | | `------------------ number of serial ports 80 | ; | | | `------------------- game adapter installed 81 | ; | | `-------------------- unused, internal modem (PS/2) 82 | ; `----------------------- number of printer ports 83 | 84 | mov al, 0x11 85 | call print_char_hex_spi 86 | mov al, ':' 87 | call print_char_spi 88 | call debug_print_interrupt_info_sm 89 | call print_char_newline_spi 90 | 91 | mov ax, 0b00000000_00101110 92 | 93 | call debug_print_interrupt_info_sm 94 | call print_char_newline_spi 95 | iret 96 | 97 | isr_int_12h: ;Memory Size Determination 98 | push ax 99 | mov al, 0x12 100 | call print_char_hex_spi 101 | mov al, ':' 102 | call print_char_spi 103 | pop ax 104 | call debug_print_interrupt_info_sm 105 | call print_char_newline_spi 106 | mov ax, 640 ; number of contiguous 1k memory blocks found at startup 107 | call debug_print_interrupt_info_sm 108 | call print_char_newline_spi 109 | iret 110 | 111 | isr_int_16h: ;Keyboard BIOS Services 112 | push bp 113 | mov bp, sp 114 | 115 | push ax 116 | call print_char_newline_spi 117 | mov al, 0x16 118 | call print_char_hex_spi 119 | mov al, ':' 120 | call print_char_spi 121 | pop ax 122 | call debug_print_interrupt_info_sm 123 | call print_char_newline_spi 124 | 125 | .wait_for_keystroke: ;0x00 126 | cmp ah, 0x00 127 | jne .get_keystroke_status 128 | 129 | ;on return: 130 | ;AH = keyboard scan code 131 | ;AL = ASCII character or zero if special function key 132 | 133 | ;testing 134 | mov ax, 0x256B 135 | jmp .out 136 | .get_keystroke_status: ;0x01 137 | cmp ah, 0x01 138 | jne .out 139 | 140 | ;on return: 141 | ;ZF = 0 if a key pressed (even Ctrl-Break) 142 | ;AX = 0 if no scan code is available 143 | ;AH = scan code 144 | ;AL = ASCII character or zero if special function key 145 | 146 | ;***add word es:[0x046c+2], 0x0fff ;**!! to do - cheating to get back missing timer functionality 147 | 148 | mov ax, 0 149 | cmp ax, ax ; set zero flag 150 | jmp .out 151 | .out: 152 | push ax ; update flags in stack frame for proper return 153 | lahf 154 | ; bp + 0 = saved bp 155 | ; bp + 2 = ip 156 | ; bp + 4 = cs 157 | ; bp + 6 = fl 158 | mov byte [bp + 6], ah 159 | pop ax 160 | pop bp 161 | iret 162 | ; ***************************** 163 | 164 | isr_int_1ah: ;Read Time From Real Time Clock 165 | ;on return: 166 | ;CF = 0 if successful 167 | ; = 1 if error, RTC not operating 168 | ;CH = hours in BCD 169 | ;CL = minutes in BCD 170 | ;DH = seconds in BCD 171 | ;DL = 1 if daylight savings time option 172 | 173 | push ax 174 | mov al, 0x16 175 | call print_char_hex_spi 176 | mov al, ':' 177 | call print_char_spi 178 | pop ax 179 | call debug_print_interrupt_info_sm 180 | call print_char_newline_spi 181 | 182 | ; ** HOURS ** 183 | mov al, 0x02 ; addr 0x02=hours 184 | call spi_read_RTC ; bit 4 = 10s, low nibble 1s 185 | and al, 0b00111111 186 | mov ch, al 187 | 188 | ; ** MINUTES ** 189 | mov al, 0x01 ; addr 0x01=minutes, high nibble 10s, low nibble 1s 190 | call spi_read_RTC 191 | mov cl, al 192 | 193 | ; ** SECONDS ** 194 | mov al, 0x00 ; addr 0x00=seconds, high nibble 10s, low nibble 1s 195 | call spi_read_RTC 196 | mov dh, al 197 | 198 | mov dl, 0x01 199 | 200 | clc ; clear carry flag 201 | 202 | pushf ;push flags, just in case anything in .out modified flags 203 | push ax 204 | push es 205 | push 0x00 206 | pop es 207 | lahf 208 | mov es:[flags_debug], ah 209 | pop es 210 | pop ax 211 | push ax 212 | call print_char_newline_spi 213 | call debug_print_interrupt_info_sm 214 | call print_char_newline_spi 215 | pop ax 216 | popf 217 | retf 2 218 | ;iret 219 | -------------------------------------------------------------------------------- /286-related/Code Snapshots/Monitor_286_Win/Monitor_286_Win/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 | 2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /386-related/Code Snapshots/386DX - Nov2023/testing_quad_rom.asm: -------------------------------------------------------------------------------- 1 | ; Last updated 19 July 2023 2 | ; Latest update : Creation 3 | ; Assembler: NASM 4 | ; Target clock : 5 | ; 6 | ; *physical memory map* 7 | ; ------------------------------ - 8 | ; -ROM(256 KB) - 9 | ; -0xC0000 - 0xFFFFF - To do: shrink to start at D0000, leaving room for sound card at 0xC0000 10 | ; ------------------------------ - 11 | ; -RAM Expansion(64 KB) - 64 KB window to 4 MB physical RAM 12 | ; -0xB0000 - 0xBFFFF - 13 | ; ------------------------------ - 14 | ; -VIDEO(64 KB) - 64 KB window to 2 MB physical VRAM 15 | ; -0xA0000 - 0xAFFFF - 16 | ; ------------------------------ - 17 | ; -RAM(640 KB) - 18 | ; -0x00000 - 0x9FFFF - 19 | ; ------------------------------ - 20 | ; 21 | ;************************************** 22 | ; 23 | ; from boot32.asm(can't use boot32lb.asm, as it requires a 386) 24 | ; +-------- + 25 | ; | | 26 | ; | | 27 | ; | -------- | 4000:0000 28 | ; | | 29 | ; | FAT | 30 | ; | | 31 | ; | -------- | 2000:0000 32 | ; | BOOT SEC | 33 | ; | RELOCATE | 34 | ; | -------- | 1FE0:0000 35 | ; | | 36 | ; | | 37 | ; | | 38 | ; | | 39 | ; | -------- | 40 | ; | BOOT SEC | 41 | ; | ORIGIN | 07C0:0000 42 | ; | -------- | 43 | ; | | 44 | ; | | 45 | ; | | 46 | ; | -------- | 47 | ; | KERNEL | 48 | ; | LOADED | @ 0070:0000 = I / O drivers 49 | ; | -------- | 0060:0000 50 | ; | BDA | BIOS Data Area(BDA) - https://stanislavs.org/helppc/bios_data_area.html 51 | ; | -------- | 0040:0000 52 | ; | | 0030:0000 - BIOS variables(VGA, SPI, Disk, ...) 53 | ; | | 0020:0000 - temporary buffer for reading info from CF card 54 | ; | IVT | 55 | ; +-------- + 56 | ; 57 | ; 58 | ; Additional Comments 59 | ; PPI / LCD code adapted from "The 80x86 IBM PC and Compatible Computers..., 4th Ed." --Mazidi & Mazidi 60 | ; Sample interrupt code adapted from https ://stackoverflow.com/questions/51693306/registering-interrupt-in-16-bit-x86-assembly 61 | ; Sample interrupt code adapted from "The 80x86 IBM PC and Compatible Computers..., 4th Ed." --Mazidi & Mazidi 62 | ; https://tiij.org/issues/issues/fall2006/32_Jenkins-PIC/Jenkins-PIC.pdf 63 | ; 80286 Hardware Reference Manual, pg. 5 - 20 64 | ; http://www.nj7p.org/Manuals/PDFs/Intel/121500-001.pdf 65 | ; 66 | ; SPI SD Card routines 67 | ; Using HiLetgo Micro SD TF Card Reader - https://www.amazon.com/gp/product/B07BJ2P6X6 68 | ; Core logic adapted from George Foot's awesome page at https://hackaday.io/project/174867-reading-sd-cards-on-a-65026522-computer 69 | ; https://developpaper.com/sd-card-command-details/ 70 | ; https://www.kingston.com/datasheets/SDCIT-specsheet-64gb_en.pdf 71 | ; RTC uses DS3234& supports SPI modes 1 or 2 (not 0 or 4).See https ://www.analog.com/en/analog-dialogue/articles/introduction-to-spi-interface.html for modes. 72 | ; RTC details : https://www.sparkfun.com/products/10160, https://www.sparkfun.com/datasheets/BreakoutBoards/DS3234.pdf 73 | 74 | ; VGA 640x480x2B(RGB565) 75 | ; Two frame buffers(0 & 1) 76 | ; Each frame buffer accessed through 64K address space of 0xA0000 - 0xAFFFF 77 | ; Register used to change frame buffers and select active segment of VRAM for address window 78 | ; Each frame buffer contains 1 MB of VRAM, with the bottom 0.5 MB of VRAM used by VGA output 79 | ; VGA control register at I / O 0x00A0 80 | ; 15 = Out Active Frame(read - only) 81 | ; 14 to 5 not used yet 82 | ; 4 = System(286) frame number * VGA Out is opposite frame number(automatically) 83 | ; 3 = System Segment_bit3 84 | ; 2 = System Segment_bit2 85 | ; 1 = System Segment_bit1 86 | ; 0 = System Segment_bit0 87 | 88 | ; !to do ! 89 | ; -timer to track milliseconds(on VIA) 90 | ; -add \n processing to print_char_vga 91 | ; -add auto line wrap to print_char_vga 92 | ; -vector tables for interrupt handing instead of current branching approach 93 | ; -print hex word to SPI Nano(PC) 94 | ; -routine to set specific SPI CS low 95 | ; -routine to bring all SPI CS high 96 | ; -consolidation of similar procedures 97 | ; -improved code commenting 98 | ; -improved timing - e.g., reduce delays and nops in SPI - related code -- plenty of room for improvement 99 | ; -ensure all routines save register state and restore register state properly 100 | ; -bounds checks for typing chars -- wrap at end of line & bottom of screen 101 | ; -... 102 | 103 | times 0x40000 - ($ - $$) db 0xff; not using first half of flash ROM 104 | 105 | % include "macros.asm" 106 | 107 | CPU 386 108 | ; BITS 16 109 | ; sectalign off 110 | 111 | ; section.data; align = GLOBAL_ALIGNMENT 112 | ; % include "_data.asm" 113 | section.bss; align = GLOBAL_ALIGNMENT 114 | % include "_bss.asm" 115 | section.text; align = GLOBAL_ALIGNMENT 116 | 117 | top : ; physically at 0xC0000 118 | 119 | ; ***SETUP REGISTERS********************************** 120 | ; xor eax, eax 121 | ; mov ds, ax 122 | ; mov eax, 0x0000fffe 123 | ; mov ebp, eax 124 | ; mov ss, ax 125 | ; mov esp, ebp 126 | ; mov eax, 0x0000f000; Read - only data in ROM 127 | ; mov es, ax 128 | ; ***/ SETUP REGISTERS * ******************************** 129 | 130 | cli 131 | 132 | basic_test_loop : 133 | mov dword[mem_test_tmp_dd], 0x00000000 134 | .loop : 135 | mov eax, [mem_test_tmp_dd] 136 | call inc_test_mem 137 | jmp.loop 138 | 139 | inc_test_mem : 140 | inc dword[mem_test_tmp_dd] 141 | ret 142 | 143 | ; times 0x30000 - ($ - $$) db 0xff; Fill much of ROM with FFs to allow for faster writing of flash ROMs 144 | section.rodata; align = GLOBAL_ALIGNMENT; start = 0x30000 145 | ; % include "romdata.asm" 146 | 147 | times 0x3ff00 - ($ - $$) db 0xff; fill remainder of section with FFs(faster flash ROM writes) 148 | ; very end overlaps.bootvector 149 | 150 | ; https://www.nasm.us/xdoc/2.15.05/html/nasmdoc7.html#section-7.3 151 | 152 | section.bootvector start = 0x7fff0 153 | reset : ; at 0xFFFF0 * Processor starts reading here 154 | jmp 0xc000:0x0; Jump to TOP : label 155 | 156 | ; times 0x040000 - ($ - $$) db 0xff; Fill the rest of ROM with bytes of 0x01 (256 KB total) 157 | times 0x10 - ($ - $$) db 0xff; 16 - length of section so far(i.e., fill the rest of the section) -------------------------------------------------------------------------------- /286-related/WorkingCode/20230512/lcd.asm: -------------------------------------------------------------------------------- 1 | ;print_message_old: 2 | ;mov al, 'R' 3 | ;call print_char 4 | ;mov al, 'e' 5 | ;call print_char 6 | ;mov al, 'a' 7 | ;call print_char 8 | ;mov al, 'd' 9 | ;call print_char 10 | ;mov al, 'y' 11 | ;call print_char 12 | ; mov al, '>' 13 | ; call print_char 14 | ; ret 15 | 16 | print_message_lcd: 17 | ; Send a NUL-terminated string to the LCD display; 18 | ; In: DS:BX -> string to print 19 | ; Return: AX = number of characters printed 20 | ; All other registers preserved or unaffected. 21 | ; **thank you, Damouze! 22 | 23 | push bx ; Save BX 24 | push cx ; and CX onto the sack 25 | mov cx, bx ; Save contents of BX for later use 26 | 27 | .loop: 28 | mov al, es:[bx] ; Read byte from [DS:BX] 29 | or al, al ; Did we encounter a NUL character? 30 | jz .return ; If so, return to the caller 31 | call print_char ; call our character print routine 32 | inc bx ; Increment the index 33 | jmp .loop ; And loop back 34 | 35 | .return: 36 | sub bx, cx ; Calculate our number of characters printed 37 | mov ax, bx ; And load the result into AX 38 | pop cx ; Restore CX 39 | pop bx ; and BX from the stack 40 | ret ; Return to our caller 41 | 42 | print_char: 43 | call lcd_wait 44 | push dx 45 | push ax 46 | 47 | mov dx, PPI1_PORTA ; Get A port address 48 | out dx, al ; Write data (e.g. char) to port A 49 | mov al, (RS | E) ; RS=1, RW=0, E=1 50 | mov dx, PPI1_PORTB ; Get B port address 51 | out dx, al ; Write to port B - enable high 52 | nop ; wait for high-to-low pulse to be wide enough 53 | nop 54 | mov al, RS ; RS=1, RW=0, E=0 55 | out dx, al ; Write to port B - enable low 56 | 57 | pop ax 58 | pop dx 59 | ret 60 | 61 | print_char_hex: 62 | push ax 63 | 64 | and al, 0xf0 ; upper nibble of lower byte 65 | shr al, 4 66 | cmp al, 0x0a 67 | sbb al, 0x69 68 | das 69 | call print_char 70 | 71 | pop ax 72 | push ax 73 | and al, 0x0f ; lower nibble of lower byte 74 | cmp al, 0x0a 75 | sbb al, 0x69 76 | das 77 | call print_char 78 | 79 | pop ax 80 | ret 81 | 82 | print_char_hex2: 83 | ; Print the byte in AL as hex digits to the screen 84 | ; In: AL = byte to print 85 | ; Return: Nothing 86 | ; thank you, @Damouze 87 | 88 | push ax 89 | rol al, 4 90 | call nibble_to_hex 91 | call print_char 92 | rol al, 4 93 | call print_char 94 | pop ax 95 | ret 96 | 97 | print_char_dec: 98 | ; al contains the binary value that will be converted to ascii and printed to the 2-line LCD 99 | push ds 100 | push ax 101 | push bx 102 | call to0000ds 103 | 104 | mov [dec_num], al 105 | mov byte [dec_num100s], 0 106 | mov byte [dec_num10s], 0 107 | mov byte [dec_num1s], 0 108 | 109 | .hundreds_loop: 110 | mov al, [dec_num] 111 | cmp al, 100 ; compare to 100 112 | jb .tens_loop 113 | mov al, [dec_num] 114 | stc ; set carry 115 | sbb al, 100 ; subtract 100 116 | mov [dec_num], al 117 | inc byte [dec_num100s] 118 | jmp .hundreds_loop 119 | 120 | .tens_loop: 121 | mov al, [dec_num] 122 | cmp al, 10 ; compare to 10 123 | jb .ones_loop 124 | mov al, [dec_num] 125 | stc ; set carry 126 | sub al, 10 ; subtract 10 127 | mov [dec_num], al 128 | inc byte [dec_num10s] 129 | jmp .tens_loop 130 | 131 | .ones_loop: 132 | mov al, [dec_num] 133 | mov [dec_num1s], al 134 | 135 | ;mov si, [dec_num100s] ; should this work?? 136 | ;mov al, byte ES:[hexOutLookup,si] ; 137 | ;call print_char_hex 138 | 139 | mov al, [dec_num100s] 140 | cmp al, 0 141 | je .print_10s 142 | call print_char_dec_digit 143 | .print_10s: 144 | mov al, [dec_num10s] 145 | call print_char_dec_digit 146 | mov al, [dec_num1s] 147 | call print_char_dec_digit 148 | 149 | pop bx 150 | pop ax 151 | pop ds 152 | ret 153 | 154 | print_char_dec_digit: 155 | push ds 156 | push ax 157 | call to0000ds 158 | cmp al, 0x0a 159 | sbb al, 0x69 160 | das 161 | call print_char 162 | pop ax 163 | pop ds 164 | ret 165 | 166 | lcd_wait: 167 | push ax 168 | push dx 169 | mov al, CTL_CFG_PA_IN ; Get config value 170 | mov dx, PPI1_CTL ; Get control port address 171 | out dx, al ; Write control register on PPI 172 | .again: 173 | mov al, (RW) ; RS=0, RW=1, E=0 174 | mov dx, PPI1_PORTB ; Get B port address 175 | out dx, al ; Write to port B 176 | mov al, (RW|E) ; RS=0, RW=1, E=1 177 | out dx, al ; Write to port B 178 | 179 | mov dx, PPI1_PORTA ; Get A port address 180 | 181 | in al, dx ; Read data from LCD (busy flag on D7) 182 | rol al, 1 ; Rotate busy flag to carry flag 183 | jc .again ; If CF=1, LCD is busy 184 | mov al, CTL_CFG_PA_OUT ; Get config value 185 | mov dx, PPI1_CTL ; Get control port address 186 | out dx, al ; Write control register on PPI 187 | 188 | pop dx 189 | pop ax 190 | ret 191 | 192 | lcd_clear: 193 | push ax 194 | mov al, 0b00000001 ; Clear display 195 | call lcd_command_write 196 | nop 197 | pop ax 198 | ret 199 | 200 | lcd_line2: 201 | push ax 202 | mov al, 0b10101000 ; Go to line 2 203 | call lcd_command_write 204 | pop ax 205 | ret 206 | 207 | lcd_init: 208 | push ax 209 | mov al, 0b00111000 ;0x38 ; Set to 8-bit mode, 2 lines, 5x7 font 210 | call lcd_command_write 211 | mov al, 0b00001110 ;0x0E ; LCD on, cursor on, blink off 212 | call lcd_command_write 213 | mov al, 0b00000001 ;0x01 ; clear LCD 214 | call lcd_command_write 215 | mov al, 0b00000110 ;0x06 ; increment and shift cursor, don't shift display 216 | call lcd_command_write 217 | pop ax 218 | ret 219 | 220 | lcd_command_write: 221 | call lcd_wait 222 | push dx 223 | push ax 224 | mov dx, PPI1_PORTA ; Get A port address 225 | out dx, al ; Send al to port A 226 | mov dx, PPI1_PORTB ; Get B port address 227 | mov al, E ; RS=0, RW=0, E=1 228 | out dx, al ; Write to port B 229 | nop ; wait for high-to-low pulse to be wide enough 230 | nop 231 | mov al, 0x0 ; RS=0, RW=0, E=0 232 | out dx, al ; Write to port B 233 | 234 | pop ax 235 | pop dx 236 | ret 237 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230528_alignmentissue_questionmark/lcd.asm: -------------------------------------------------------------------------------- 1 | ;print_message_old: 2 | ;mov al, 'R' 3 | ;call print_char 4 | ;mov al, 'e' 5 | ;call print_char 6 | ;mov al, 'a' 7 | ;call print_char 8 | ;mov al, 'd' 9 | ;call print_char 10 | ;mov al, 'y' 11 | ;call print_char 12 | ; mov al, '>' 13 | ; call print_char 14 | ; ret 15 | 16 | print_message_lcd: 17 | ; Send a NUL-terminated string to the LCD display; 18 | ; In: DS:BX -> string to print 19 | ; Return: AX = number of characters printed 20 | ; All other registers preserved or unaffected. 21 | ; **thank you, Damouze! 22 | 23 | push bx ; Save BX 24 | push cx ; and CX onto the sack 25 | mov cx, bx ; Save contents of BX for later use 26 | 27 | .loop: 28 | mov al, es:[bx] ; Read byte from [DS:BX] 29 | or al, al ; Did we encounter a NUL character? 30 | jz .return ; If so, return to the caller 31 | call print_char ; call our character print routine 32 | inc bx ; Increment the index 33 | jmp .loop ; And loop back 34 | 35 | .return: 36 | sub bx, cx ; Calculate our number of characters printed 37 | mov ax, bx ; And load the result into AX 38 | pop cx ; Restore CX 39 | pop bx ; and BX from the stack 40 | ret ; Return to our caller 41 | 42 | print_char: 43 | call lcd_wait 44 | push dx 45 | push ax 46 | 47 | mov dx, PPI1_PORTA ; Get A port address 48 | out dx, al ; Write data (e.g. char) to port A 49 | mov al, (RS | E) ; RS=1, RW=0, E=1 50 | mov dx, PPI1_PORTB ; Get B port address 51 | out dx, al ; Write to port B - enable high 52 | nop ; wait for high-to-low pulse to be wide enough 53 | nop 54 | mov al, RS ; RS=1, RW=0, E=0 55 | out dx, al ; Write to port B - enable low 56 | 57 | pop ax 58 | pop dx 59 | ret 60 | 61 | print_char_hex: 62 | push ax 63 | 64 | and al, 0xf0 ; upper nibble of lower byte 65 | shr al, 4 66 | cmp al, 0x0a 67 | sbb al, 0x69 68 | das 69 | call print_char 70 | 71 | pop ax 72 | push ax 73 | and al, 0x0f ; lower nibble of lower byte 74 | cmp al, 0x0a 75 | sbb al, 0x69 76 | das 77 | call print_char 78 | 79 | pop ax 80 | ret 81 | 82 | print_char_hex2: 83 | ; Print the byte in AL as hex digits to the screen 84 | ; In: AL = byte to print 85 | ; Return: Nothing 86 | ; thank you, @Damouze 87 | 88 | push ax 89 | rol al, 4 90 | call nibble_to_hex 91 | call print_char 92 | rol al, 4 93 | call print_char 94 | pop ax 95 | ret 96 | 97 | print_char_dec: 98 | ; al contains the binary value that will be converted to ascii and printed to the 2-line LCD 99 | push ds 100 | push ax 101 | push bx 102 | call to0000ds 103 | 104 | mov [dec_num], al 105 | mov byte [dec_num100s], 0 106 | mov byte [dec_num10s], 0 107 | mov byte [dec_num1s], 0 108 | 109 | .hundreds_loop: 110 | mov al, [dec_num] 111 | cmp al, 100 ; compare to 100 112 | jb .tens_loop 113 | mov al, [dec_num] 114 | stc ; set carry 115 | sbb al, 100 ; subtract 100 116 | mov [dec_num], al 117 | inc byte [dec_num100s] 118 | jmp .hundreds_loop 119 | 120 | .tens_loop: 121 | mov al, [dec_num] 122 | cmp al, 10 ; compare to 10 123 | jb .ones_loop 124 | mov al, [dec_num] 125 | stc ; set carry 126 | sub al, 10 ; subtract 10 127 | mov [dec_num], al 128 | inc byte [dec_num10s] 129 | jmp .tens_loop 130 | 131 | .ones_loop: 132 | mov al, [dec_num] 133 | mov [dec_num1s], al 134 | 135 | ;mov si, [dec_num100s] ; should this work?? 136 | ;mov al, byte ES:[hexOutLookup,si] ; 137 | ;call print_char_hex 138 | 139 | mov al, [dec_num100s] 140 | cmp al, 0 141 | je .print_10s 142 | call print_char_dec_digit 143 | .print_10s: 144 | mov al, [dec_num10s] 145 | call print_char_dec_digit 146 | mov al, [dec_num1s] 147 | call print_char_dec_digit 148 | 149 | pop bx 150 | pop ax 151 | pop ds 152 | ret 153 | 154 | print_char_dec_digit: 155 | push ds 156 | push ax 157 | call to0000ds 158 | cmp al, 0x0a 159 | sbb al, 0x69 160 | das 161 | call print_char 162 | pop ax 163 | pop ds 164 | ret 165 | 166 | lcd_wait: 167 | push ax 168 | push dx 169 | mov al, CTL_CFG_PA_IN ; Get config value 170 | mov dx, PPI1_CTL ; Get control port address 171 | out dx, al ; Write control register on PPI 172 | .again: 173 | mov al, (RW) ; RS=0, RW=1, E=0 174 | mov dx, PPI1_PORTB ; Get B port address 175 | out dx, al ; Write to port B 176 | mov al, (RW|E) ; RS=0, RW=1, E=1 177 | out dx, al ; Write to port B 178 | 179 | mov dx, PPI1_PORTA ; Get A port address 180 | 181 | in al, dx ; Read data from LCD (busy flag on D7) 182 | rol al, 1 ; Rotate busy flag to carry flag 183 | jc .again ; If CF=1, LCD is busy 184 | mov al, CTL_CFG_PA_OUT ; Get config value 185 | mov dx, PPI1_CTL ; Get control port address 186 | out dx, al ; Write control register on PPI 187 | 188 | pop dx 189 | pop ax 190 | ret 191 | 192 | lcd_clear: 193 | push ax 194 | mov al, 0b00000001 ; Clear display 195 | call lcd_command_write 196 | nop 197 | pop ax 198 | ret 199 | 200 | lcd_line2: 201 | push ax 202 | mov al, 0b10101000 ; Go to line 2 203 | call lcd_command_write 204 | pop ax 205 | ret 206 | 207 | lcd_init: 208 | push ax 209 | mov al, 0b00111000 ;0x38 ; Set to 8-bit mode, 2 lines, 5x7 font 210 | call lcd_command_write 211 | mov al, 0b00001110 ;0x0E ; LCD on, cursor on, blink off 212 | call lcd_command_write 213 | mov al, 0b00000001 ;0x01 ; clear LCD 214 | call lcd_command_write 215 | mov al, 0b00000110 ;0x06 ; increment and shift cursor, don't shift display 216 | call lcd_command_write 217 | pop ax 218 | ret 219 | 220 | lcd_command_write: 221 | call lcd_wait 222 | push dx 223 | push ax 224 | mov dx, PPI1_PORTA ; Get A port address 225 | out dx, al ; Send al to port A 226 | mov dx, PPI1_PORTB ; Get B port address 227 | mov al, E ; RS=0, RW=0, E=1 228 | out dx, al ; Write to port B 229 | nop ; wait for high-to-low pulse to be wide enough 230 | nop 231 | mov al, 0x0 ; RS=0, RW=0, E=0 232 | out dx, al ; Write to port B 233 | 234 | pop ax 235 | pop dx 236 | ret 237 | -------------------------------------------------------------------------------- /286-related/WorkingCode/20230420_troubleshooting_flags/isrs_general.asm: -------------------------------------------------------------------------------- 1 | diverror_isr: 2 | push bx 3 | push es 4 | push 0xf000 5 | pop es 6 | call lcd_clear 7 | mov bx, msg_xcp_diverr 8 | call print_message_lcd ; print message pointed to by bx to LCD 9 | call play_error_sound 10 | pop es 11 | pop bx 12 | iret 13 | 14 | overflow_isr: 15 | push bx 16 | push es 17 | push 0xf000 18 | pop es 19 | call lcd_clear 20 | mov bx, msg_xcp_overflow 21 | call print_message_lcd ; print message pointed to by bx to LCD 22 | call play_error_sound 23 | pop es 24 | pop bx 25 | iret 26 | 27 | invalidop_isr: 28 | push bx 29 | push es 30 | push 0xf000 31 | pop es 32 | call lcd_clear 33 | mov bx, msg_xcp_invalidop 34 | call print_message_lcd ; print message pointed to by bx to LCD 35 | call play_error_sound 36 | pop es 37 | pop bx 38 | iret 39 | 40 | multiplexcp_isr: 41 | push bx 42 | push es 43 | push 0xf000 44 | pop es 45 | call lcd_clear 46 | mov bx, msg_xcp_multi 47 | call print_message_lcd ; print message pointed to by bx to LCD 48 | call play_error_sound 49 | pop es 50 | pop bx 51 | iret 52 | 53 | geneneralprot_isr: 54 | push bx 55 | push es 56 | push 0xf000 57 | pop es 58 | call lcd_clear 59 | mov bx, msg_xcp_diverr 60 | call msg_xcp_genprot ; print message pointed to by bx to LCD 61 | call play_error_sound 62 | pop es 63 | pop bx 64 | iret 65 | 66 | isr_int_11h: ;BIOS Equipment Determination 67 | ;on return: 68 | ;AX contains the following bit flags: 69 | ; 70 | ;|F|E|D|C|B|A|9|8|7|6|5|4|3|2|1|0| AX 71 | ; | | | | | | | | | | | | | | | `---- IPL diskette installed 72 | ; | | | | | | | | | | | | | | `----- math coprocessor 73 | ; | | | | | | | | | | | | `-------- old PC system board RAM < 256K 74 | ; | | | | | | | | | | | | | `----- pointing device installed (PS/2) 75 | ; | | | | | | | | | | | | `------ not used on PS/2 76 | ; | | | | | | | | | | `--------- initial video mode 77 | ; | | | | | | | | `------------ # of diskette drives, less 1 78 | ; | | | | | | | `------------- 0 if DMA installed 79 | ; | | | | `------------------ number of serial ports 80 | ; | | | `------------------- game adapter installed 81 | ; | | `-------------------- unused, internal modem (PS/2) 82 | ; `----------------------- number of printer ports 83 | 84 | mov al, 0x11 85 | call print_char_hex_spi 86 | mov al, ':' 87 | call print_char_spi 88 | call debug_print_interrupt_info_sm 89 | call print_char_newline_spi 90 | 91 | mov ax, 0b00000000_00101110 92 | 93 | call debug_print_interrupt_info_sm 94 | call print_char_newline_spi 95 | iret 96 | 97 | isr_int_12h: ;Memory Size Determination 98 | push ax 99 | mov al, 0x12 100 | call print_char_hex_spi 101 | mov al, ':' 102 | call print_char_spi 103 | pop ax 104 | call debug_print_interrupt_info_sm 105 | call print_char_newline_spi 106 | mov ax, 640 ; number of contiguous 1k memory blocks found at startup 107 | call debug_print_interrupt_info_sm 108 | call print_char_newline_spi 109 | iret 110 | 111 | isr_int_16h: ;Keyboard BIOS Services 112 | push ax 113 | mov al, 0x16 114 | call print_char_hex_spi 115 | mov al, ':' 116 | call print_char_spi 117 | pop ax 118 | call debug_print_interrupt_info_sm 119 | call print_char_newline_spi 120 | 121 | .wait_for_keystroke: ;0x00 122 | cmp ah, 0x00 123 | jne .get_keystroke_status 124 | 125 | ;on return: 126 | ;AH = keyboard scan code 127 | ;AL = ASCII character or zero if special function key 128 | 129 | nop 130 | nop 131 | nop 132 | nop 133 | nop 134 | nop 135 | nop 136 | nop 137 | nop 138 | nop 139 | nop 140 | nop 141 | nop 142 | 143 | ;temporary test... 144 | mov ah, 0x2f 145 | mov al, 0x2f ;automatically send a character "/" 146 | 147 | jmp .out 148 | .get_keystroke_status: ;0x01 149 | cmp ah, 0x01 150 | jne .out 151 | 152 | ;on return: 153 | ;ZF = 0 if a key pressed (even Ctrl-Break) 154 | ;AX = 0 if no scan code is available 155 | ;AH = scan code 156 | ;AL = ASCII character or zero if special function key 157 | 158 | nop 159 | nop 160 | nop 161 | nop 162 | nop 163 | nop 164 | nop 165 | nop 166 | nop 167 | nop 168 | nop 169 | nop 170 | nop 171 | 172 | add word es:[0x046c+2], 0x0fff ;**!! to do - cheating to get back missing timer functionality 173 | 174 | ;temporary test... 175 | mov ax, 0x2f2f ; to do - fill this section in 176 | cmp ax, ax ; set zero flag 177 | jmp .out 178 | .out: 179 | pushf ;push flags, just in case anything in .out modified flags 180 | push ax 181 | push es 182 | push 0x00 183 | pop es 184 | lahf 185 | mov es:[flags_debug], ah 186 | pop es 187 | pop ax 188 | push ax 189 | call print_char_newline_spi 190 | call debug_print_interrupt_info_sm 191 | call print_char_newline_spi 192 | pop ax 193 | popf 194 | iret 195 | 196 | isr_int_1ah: ;Read Time From Real Time Clock 197 | ;on return: 198 | ;CF = 0 if successful 199 | ; = 1 if error, RTC not operating 200 | ;CH = hours in BCD 201 | ;CL = minutes in BCD 202 | ;DH = seconds in BCD 203 | ;DL = 1 if daylight savings time option 204 | 205 | push ax 206 | mov al, 0x16 207 | call print_char_hex_spi 208 | mov al, ':' 209 | call print_char_spi 210 | pop ax 211 | call debug_print_interrupt_info_sm 212 | call print_char_newline_spi 213 | 214 | ; ** HOURS ** 215 | mov al, 0x02 ; addr 0x02=hours 216 | call spi_read_RTC ; bit 4 = 10s, low nibble 1s 217 | and al, 0b00111111 218 | mov ch, al 219 | 220 | ; ** MINUTES ** 221 | mov al, 0x01 ; addr 0x01=minutes, high nibble 10s, low nibble 1s 222 | call spi_read_RTC 223 | mov cl, al 224 | 225 | ; ** SECONDS ** 226 | mov al, 0x00 ; addr 0x00=seconds, high nibble 10s, low nibble 1s 227 | call spi_read_RTC 228 | mov dh, al 229 | 230 | mov dl, 0x01 231 | 232 | clc ; clear carry flag 233 | 234 | pushf ;push flags, just in case anything in .out modified flags 235 | push ax 236 | push es 237 | push 0x00 238 | pop es 239 | lahf 240 | mov es:[flags_debug], ah 241 | pop es 242 | pop ax 243 | push ax 244 | call print_char_newline_spi 245 | call debug_print_interrupt_info_sm 246 | call print_char_newline_spi 247 | pop ax 248 | popf 249 | iret 250 | --------------------------------------------------------------------------------