about summary refs log tree commit diff stats
path: root/boot.subx
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-03-15 21:22:30 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-03-15 21:22:30 -0700
commitbc182ae559580d4d2cde6d5c5e8ed3bb5906bdb5 (patch)
tree3c193bf6d292ab34ffac46acf1cbc36a73371429 /boot.subx
parent341f0c59be23e5eabee50b43608a64ebf75fd053 (diff)
downloadmu-bc182ae559580d4d2cde6d5c5e8ed3bb5906bdb5.tar.gz
boot.subx is now clean SubX
Diffstat (limited to 'boot.subx')
-rw-r--r--boot.subx16
1 files changed, 3 insertions, 13 deletions
diff --git a/boot.subx b/boot.subx
index 369ed975..412940d6 100644
--- a/boot.subx
+++ b/boot.subx
@@ -134,11 +134,7 @@
   0f 01/lgdt 2/subop/lgdt 0/mod/indirect 6/rm32/use-disp16 0x7cf8/disp16/gdt_descriptor
   # enable paging
   0f 20/<-cr 3/mod/direct 0/rm32/eax 0/r32/cr0
-== data
-  # TODO: SubX doesn't understand 66 prefix
-#?   66 83/or 3/mod/direct 0/rm32/eax 1/r32/?? 1/imm8  # eax <- or 0x1
-  66 83 c8 01  # eax <- or 0x1
-== code
+  66 83/or 3/mod/direct 0/rm32/eax 1/r32/?? 1/imm8  # eax <- or 0x1
   0f 22/->cr 3/mod/direct 0/rm32/eax 0/r32/cr0
   # far jump to initialize_32bit_mode that sets cs to offset 8 in the gdt in the process
   # We can't refer to the label directly because SubX doesn't have syntax for
@@ -191,10 +187,7 @@ gdt_descriptor:
 
 == code 0x7d00
 initialize_32bit_mode:
-== data
-  # TODO: SubX doesn't understand 66 prefix
-  66 b8 10 00  # ax <- offset 16 from gdt_start
-== code
+  66 b8/copy-to-ax 0x10/imm16  # offset 16 from gdt_start
   8e/->seg 3/mod/direct 0/rm32/ax 3/r32/ds
   8e/->seg 3/mod/direct 0/rm32/ax 2/r32/ss
   8e/->seg 3/mod/direct 0/rm32/ax 0/r32/es
@@ -223,10 +216,7 @@ initialize_32bit_mode:
   e6/write-al-into-port 0x21/imm8
 
   fb/enable-interrupts
-== data
-  # TODO: SubX doesn't understand db prefix
-  db e3/initialize-floating-point-coprocessor
-== code
+  db/floating-point-coprocessor e3/initialize
   # eax <- cr4
   0f 20/<-cr 3/mod/direct 0/rm32/eax 4/r32/cr4
   # eax <- or bit 9