Dumb modern computing question: Let's say you wanted to write and run programs written in x86 or x86-64 assembly language or raw machine code under a modem OS (Windows, linux). You wouldn't necessarily need them to run as standalone applications. How would you do that without having the OS explode or light you on fire?
My last experience with assembly was on the RC2014 running CP/M on a real Z80. You boot into the OS, Load your code into memory, jump to the top of your code, and your code either crashes, hangs, or exits cleanly hitting the end of memory and jumping back to the start where the operating system lives.
There's basically no protection or interference by the OS - the whole system is a marvel of simplicity that gives the illusion of a lot more complexity and smartness than is actually present.
For very good reasons, multiuser operating systems don't let you do this. I'm woefully ignorant of modern low-level programming and how to work within the OS's security framework without having to add a ton of baggage to a few dozen instructions.
I'm wondering if I should just punt on writing assembly for the machine's actual CPU and instead just learn how to use simh and do everything in emulation. The big picture goal is to simulate the process of writing and running scientific code as if it were 1955 and high-level languages don't yet exist. x86 or x86-64 have the benefit of being accessible and allowing both fixed and floating-point operations - I dont know that Z80, 8080, or 6502 allow that (floating point was often software only). Regardless, most people only have those systems available via emulation so if emulation is necessary, maybe emulating an IBM 704 or UNIVAC might be a better example than trying make code run on real x86-64 hardware.