mu/baremetal
Kartik K. Agaram 168e3f9d39 7699
Gap buffer with a more testable interface for rendering to screen.
2021-02-08 22:20:21 -08:00
..
shell 7699 2021-02-08 22:20:21 -08:00
101screen.subx 7671 2021-01-27 21:16:36 -08:00
102keyboard.subx 7672 2021-01-27 21:52:44 -08:00
103grapheme.subx 7687 2021-02-05 20:35:23 -08:00
104test.subx 7519 - baremetal: run all tests on boot 2021-01-13 21:50:38 -08:00
105string-equal.subx 7547 - baremetal: rpn calculator 2021-01-22 23:29:04 -08:00
106stream.subx 7523 2021-01-15 21:22:33 -08:00
108write.subx 7523 2021-01-15 21:22:33 -08:00
109stream-equal.subx 7523 2021-01-15 21:22:33 -08:00
112read-byte.subx 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
115write-byte.subx 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
117write-int-hex.subx 7530 - baremetal: print ints to screen 2021-01-16 16:27:58 -08:00
120allocate.subx 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
123slice.subx 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
124next-token.subx 7547 - baremetal: rpn calculator 2021-01-22 23:29:04 -08:00
126write-int-decimal.subx 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
127next-word.subx 7547 - baremetal: rpn calculator 2021-01-22 23:29:04 -08:00
302stack_allocate.subx 7492 2021-01-09 18:55:24 -08:00
308allocate-array.subx 7529 - baremetal: fake screen 2021-01-16 15:32:26 -08:00
309stream.subx 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
311decimal-int.subx 7547 - baremetal: rpn calculator 2021-01-22 23:29:04 -08:00
313index-bounds-check.subx 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
400.mu 7548 - baremetal: better cursor management 2021-01-23 08:45:51 -08:00
403unicode.mu 7690 2021-02-07 00:20:29 -08:00
500text-screen.mu 7698 - starting to test-drive baremetal shell 2021-02-07 23:45:31 -08:00
501draw-text.mu 7698 - starting to test-drive baremetal shell 2021-02-07 23:45:31 -08:00
502test.mu 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
503manhattan-line.mu 7521 - new plan for tests 2021-01-15 20:30:07 -08:00
504test-screen.mu 7698 - starting to test-drive baremetal shell 2021-02-07 23:45:31 -08:00
README.md 7567 - baremetal: shift-key support 2021-01-27 19:54:05 -08:00
boot.bochsrc 7684 - baremetal will have no mouse 2021-02-03 09:49:40 -08:00
boot.hex 7686 2021-02-04 17:25:00 -08:00
boot0.hex 7682 2021-02-01 13:26:48 -08:00
ex1.hex 7673 2021-01-28 00:25:54 -08:00
ex1.subx 7518 2021-01-13 21:41:45 -08:00
ex2.hex 7673 2021-01-28 00:25:54 -08:00
ex2.mu 7690 2021-02-07 00:20:29 -08:00
ex2.subx 7671 2021-01-27 21:16:36 -08:00
ex3.hex 7671 2021-01-27 21:16:36 -08:00
ex3.mu 7690 2021-02-07 00:20:29 -08:00
ex4.mu 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
ex5.mu 7690 2021-02-07 00:20:29 -08:00
ex6.mu 7690 2021-02-07 00:20:29 -08:00
ex7.mu 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
mu-init.subx 7562 - bochs working again 2021-01-24 22:00:53 -08:00
rpn.mu 7693 - baremetal: pass background color everywhere 2021-02-07 15:50:16 -08:00
vga_palette 7505 2021-01-12 22:01:50 -08:00
vga_palette.c 7504 2021-01-12 21:51:46 -08:00
vga_palette.png 7503 - baremetal: noodling on default VGA palette 2021-01-12 19:50:22 -08:00
vimrc.vim 7466 2020-12-29 20:29:55 -08:00

README.md

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. We still need the top-level and apps to build them.

I'd like to eventually test these programs on real hardware, and to that end they are extremely parsimonious in the hardware they assume:

  1. Lots (more than 640KB/1MB[1]) of RAM
  2. Pure-graphics video mode (1024x768 pixels) in 256-color mode. At 8x8 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.
  3. 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.

That's it:

  • No wifi, no networking
  • No multitouch, no touchscreen, no mouse
  • No graphics acceleration
  • No virtual memory, no memory reclamation

Just your processor, gigabytes of RAM[1], a moderately-sized monitor and a keyboard. (The mouse should also be easy to provide.)

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.

Programs start executing at address 0x9400. See baremetal/boot.hex for 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.

So far the programs have only been tested in Qemu and Bochs emulators.

[1] Though we might need to start thinking of the PC memory map 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.