2. How can I turn off the OS? (or is it actually a bad idea?)
It is very bad idea write EXOS incompatible program!
Unfortunatelly no focus is placed about the right EXOS compatible programming at the start
The Enterprise have really good, expandable operating system. (At the release time it is better than the MS-DOS!) Then many different configuration can be exist. At the start years exist a 64 and 128K, English and German machines, later these combined with EXDOS card.
And under the many years, many-many-many... RAM, ROM and other expansion created, Hard Disk system, and in current days SD Card systems.
In the expandable EXOS system many things are at variable address! Fix programing like as C64 or ZX Spectrum are bad idea on Enterprise!
With the bad programmed, EXOS incompatible programs (using fix address), found many-many problems under the years. For example running only on just English or just German machine, only with 128K, not running with memory expansion. Not running from floppy. Running from hard disk destroy Hard Disk extension RAM area and generate data loss, etc...
Many bad programs fixed, and continously fixing these. And at about the last ten years we care about all new programs are EXOS compatible then no new problem created
From the practical side:
The most important things:
- don't use any memory what you not allocated from EXOS!
EXOS 24 call the allocation.- check errors (after memory allocation, or file operations) and if error use regular exit routine for step back to EXOS
- handle variable segment numbers, at general RAM only need store to paging table, with video segments also needed to calculate video address from the segment number
-specify warm start routine (restart program or exit)
All of these are included in the sample.asm! You need just write the main code!
If you can specify which memory paging, and which video mode needed for you then I can modify the sample for your requirements!
If you will write game or demo you will use
New Application Program type with header 05h.
It is loaded from 0100h...
Under the 0100h EXOS only use 0030h-005Bh area. Then 0000h-002Fh area can be used by the user programs, usualy for RST 00h-28h routines. 005Ch-00FFh also can be used, many programs use as stack under 0100h.
Generaly demos/games don't use EXOS during the running, use it only for file I/O, and memory allocation. EXOS IRQ routine can be replaced (placing jump to 38h) but it is needed to restored before EXOS calls used (for example load next level in the game), or exit program.
If you directly programing the HW then need to disable EXOS interrupts, or define your own IRQ routine and replace the EXOS IRQ.
So, generaly don't need switch of OS, just don't use it under the main program.