2020-12-26 21:22:28 +00:00
|
|
|
Some apps written in SubX and Mu. Where the rest of this repo relies on a few
|
|
|
|
Linux syscalls, the apps in this subdirectory interface directly with hardware.
|
2020-12-27 06:56:44 +00:00
|
|
|
We still need the top-level and apps to build them.
|
2020-12-26 22:21:04 +00:00
|
|
|
|
|
|
|
I'd like to eventually test these programs on real hardware, and to that end
|
|
|
|
they are extremely parsimonious in the hardware they assume:
|
2020-12-26 23:34:10 +00:00
|
|
|
|
2020-12-27 01:35:16 +00:00
|
|
|
0. Lots (more than 640KB/1MB[1]) of RAM
|
2020-12-27 16:33:22 +00:00
|
|
|
1. Pure-graphics video mode (1024x768 pixels) in 256-color mode. At 8x8
|
2020-12-27 16:03:48 +00:00
|
|
|
pixels per grapheme, this will give us 160x128 graphemes. But it's still
|
|
|
|
an open question if it's reasonably widely supported by modern hardware.
|
|
|
|
If it isn't, I'll downsize.
|
2021-01-28 03:34:50 +00:00
|
|
|
2. Keyboard. Just a partial US keyboard for now. Main qwerty zone only. No
|
|
|
|
number pad, no function keys, no ctrl/alt/meta/fn/super/capslck/numlck.
|
2020-12-26 22:21:04 +00:00
|
|
|
|
|
|
|
That's it:
|
|
|
|
* No wifi, no networking
|
|
|
|
* No multitouch, no touchscreen, no mouse
|
2020-12-27 16:03:48 +00:00
|
|
|
* No graphics acceleration
|
2020-12-26 22:21:04 +00:00
|
|
|
* No virtual memory, no memory reclamation
|
2020-12-26 23:34:10 +00:00
|
|
|
|
2020-12-27 00:37:10 +00:00
|
|
|
Just your processor, gigabytes of RAM[1], a moderately-sized monitor and a
|
2020-12-27 16:03:48 +00:00
|
|
|
keyboard. (The mouse should also be easy to provide.)
|
2020-12-26 22:21:04 +00:00
|
|
|
|
2020-12-27 16:03:48 +00:00
|
|
|
We can't yet read from or write to disk, except for the initial load of the
|
|
|
|
program. Enabling access to lots of RAM gives up access to BIOS helpers for
|
|
|
|
the disk.
|
|
|
|
|
|
|
|
These programs don't convert to formats like ELF that can load on other
|
|
|
|
operating systems. There's also currently no code/data segment separation,
|
|
|
|
just labels and bytes. I promise not to write self-modifying code. Security
|
|
|
|
and sandboxing is still an open question.
|
2020-12-26 22:21:04 +00:00
|
|
|
|
2021-01-25 03:38:10 +00:00
|
|
|
Programs start executing at address 0x9400. See baremetal/boot.hex for
|
2021-01-14 05:50:38 +00:00
|
|
|
details.
|
|
|
|
|
|
|
|
Mu programs always run all their automated tests first. `main` only runs if
|
|
|
|
there are no failing tests. See baremetal/mu-init.subx for details.
|
2020-12-26 22:21:04 +00:00
|
|
|
|
|
|
|
So far the programs have only been tested in Qemu and Bochs emulators.
|
2020-12-27 00:37:10 +00:00
|
|
|
|
2020-12-27 00:38:01 +00:00
|
|
|
[1] Though we might need to start thinking of [the PC memory map](https://wiki.osdev.org/Memory_Map_(x86))
|
2021-01-16 18:40:37 +00:00
|
|
|
as our programs grow past the first 32MB of memory. Mu doesn't yet make any
|
|
|
|
attempt to understand how much RAM the underlying computer has. Also, writing
|
|
|
|
to random locations can damage hardware or corrupt storage devices.
|