Commit Graph

7881 Commits

Author SHA1 Message Date
Kartik K. Agaram 3240c761e8 . 2021-03-16 23:47:18 -07:00
Kartik K. Agaram eae5483bf6 . 2021-03-16 12:46:53 -07:00
Kartik K. Agaram 697f1e7516 . 2021-03-15 22:11:17 -07:00
Kartik K. Agaram 2998866b88 . 2021-03-15 21:59:08 -07:00
Kartik K. Agaram 2f251aec4d undo previous commit
It was just an experiment.
2021-03-15 21:54:58 -07:00
Kartik K. Agaram 7119d79b8a snapshot: write to disk using BIOS
Requires the following commands:
  dd if=/dev/zero of=data.img count=20160
  ./translate life.mu
  qemu-system-i386 -hda disk.img -hdb data.img

Before running Qemu, data.img will contain all 0s.
After quitting Qemu, data.img will contain the first 512 bytes of disk.img.
2021-03-15 21:46:53 -07:00
Kartik K. Agaram fd224d83f5 fix a failing test in pack.subx 2021-03-15 21:28:15 -07:00
Kartik K. Agaram bc182ae559 boot.subx is now clean SubX 2021-03-15 21:22:30 -07:00
Kartik K. Agaram 341f0c59be . 2021-03-15 20:41:13 -07:00
Kartik K. Agaram 460528e85b reintroduce Entry label 2021-03-15 20:41:13 -07:00
Kartik K. Agaram 9d4ca5f59a clean up padding 2021-03-15 20:36:00 -07:00
Kartik K. Agaram 3a0664e186 clean up magic constants 2021-03-15 20:32:26 -07:00
Kartik K. Agaram be42a9c3ec first pass translating all of boot.subx
There's still a few places to clean up surrounded in:
  == data
  ...
  == code
2021-03-15 15:09:38 -07:00
Kartik K. Agaram 93954f7ccd . 2021-03-15 15:04:31 -07:00
Kartik K. Agaram 2a8f664166 get shell/ working
This mutates the expected binary.
2021-03-15 15:03:33 -07:00
Kartik K. Agaram dae5705067 . 2021-03-15 10:04:16 -07:00
Kartik K. Agaram e352596792 . 2021-03-15 09:41:36 -07:00
Kartik K. Agaram 4f73f09f1a . 2021-03-15 09:22:27 -07:00
Kartik K. Agaram 5a824b6e9a manual labels remaining in boot.subx: keyboard + 1 2021-03-15 09:18:44 -07:00
Kartik K. Agaram e35d4f46fd . 2021-03-15 09:17:15 -07:00
Kartik K. Agaram 4374da4d86 clean up padding
I'm going to explicitly show all reserved data even if I don't use it.
Segment headers are only for padding.
2021-03-15 00:16:19 -07:00
Kartik K. Agaram dfd80bf74b first pass translating boot sector 2021-03-15 00:08:08 -07:00
Kartik K. Agaram e045516014 . 2021-03-15 00:05:14 -07:00
Kartik K. Agaram a718f6a2ef . 2021-03-15 00:04:21 -07:00
Kartik K. Agaram 3ca4728330 . 2021-03-14 23:50:16 -07:00
Kartik K. Agaram 174925e6f9 . 2021-03-14 23:34:41 -07:00
Kartik K. Agaram 4f7758fa15 first use of the padding segment selector 2021-03-14 23:30:58 -07:00
Kartik K. Agaram ee81002eb0 . 2021-03-14 23:24:02 -07:00
Kartik K. Agaram 5c1186a77b fix a few TODOs that mutate the expected binary 2021-03-14 23:04:00 -07:00
Kartik K. Agaram fba0a56add . 2021-03-14 22:56:51 -07:00
Kartik K. Agaram dda5fd08d8 . 2021-03-14 22:46:03 -07:00
Kartik K. Agaram 0e5d7e0624 . 2021-03-14 22:31:42 -07:00
Kartik K. Agaram 97c0176a18 . 2021-03-14 22:29:12 -07:00
Kartik K. Agaram 3192230045 . 2021-03-14 22:23:02 -07:00
Kartik K. Agaram 8c89b047f5 . 2021-03-14 22:20:46 -07:00
Kartik K. Agaram 4d0db2c94e fix a benign bug so far
I'd been assuming that the image would be identical if it worked, but I
need to actually validate this at each step:
  ./translate life.mu  &&  qemu-system-i386 disk.img  &&  diff disk.img 0

The plan is to keep the binary identical until I finish translating boot.subx.
Then I can remove obsolete padding.
2021-03-14 22:12:34 -07:00
Kartik K. Agaram cc7a44f9df . 2021-03-14 21:58:23 -07:00
Kartik K. Agaram fa2c1c040c start converting boot.subx to real SubX
Just one instruction translated so far. The rest is treated as data.

Currently programs only work because the toolchain treats boot.subx as
all data. As we turn it into code we'll move the '== data' segment boundary
further down.
2021-03-14 21:55:08 -07:00
Kartik K. Agaram 98feca922e rename boot.hex to boot.subx 2021-03-14 21:41:47 -07:00
Kartik K. Agaram da438fa9f5 treat boot.hex as a SubX file 2021-03-14 21:36:31 -07:00
Kartik K. Agaram 43e8194435 . 2021-03-14 21:14:10 -07:00
Kartik K. Agaram 6525ccc8ec survey_baremetal: padding between segments
Optional.
2021-03-14 19:35:03 -07:00
Kartik K. Agaram 1dc1a65ea0 survey_baremetal: support /imm8 2021-03-14 19:25:39 -07:00
Kartik K. Agaram 499aad0bc7 survey: document starting address of each segment 2021-03-14 19:19:56 -07:00
Kartik K. Agaram 2c64c52e1f fix some broken links 2021-03-14 13:30:01 -07:00
Kartik K. Agaram 9c4cd6db4a some cleanup in a translation phase 2021-03-13 23:26:06 -08:00
Kartik K. Agaram ffa80ee21b . 2021-03-13 09:02:36 -08:00
Kartik Agaram 738f8ec1e6 . 2021-03-12 10:41:03 -08:00
Kartik Agaram 7ce83f9bff some tweaks while updating mu-normie 2021-03-12 10:14:59 -08:00
Kartik K. Agaram 7e87c36c3a . 2021-03-09 00:43:59 -08:00