diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-03-15 20:39:23 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-03-15 20:41:13 -0700 |
commit | 460528e85be117ac9bbfcb79bceb6e54eceecbb7 (patch) | |
tree | 7770029c2151b1471712f412dd79d17afe86b606 | |
parent | 9d4ca5f59af7895631bbbed80789f6a1b8cf1a1e (diff) | |
download | mu-460528e85be117ac9bbfcb79bceb6e54eceecbb7.tar.gz |
reintroduce Entry label
-rw-r--r-- | boot.subx | 9 | ||||
-rw-r--r-- | ex1.subx | 4 | ||||
-rw-r--r-- | ex2.subx | 2 | ||||
-rw-r--r-- | mu-init.subx | 1 |
4 files changed, 6 insertions, 10 deletions
diff --git a/boot.subx b/boot.subx index d75de767..369ed975 100644 --- a/boot.subx +++ b/boot.subx @@ -19,12 +19,9 @@ # see 120allocate.subx # Consult https://wiki.osdev.org/Memory_Map_(x86) before modifying any of this. -# Magic addresses (TODO): -# 0x9400: entrypoint for applications - == code -## 16-bit entry point +## 16-bit entry point: 0x7c00 # Upon reset, the IBM PC: # - loads the first sector (512 bytes) @@ -236,9 +233,7 @@ initialize_32bit_mode: 0f ba/bit-test 5/subop/bit-test-and-set 3/mod/direct 0/rm32/eax 9/imm8 # cr4 <- eax 0f 22/->cr 3/mod/direct 0/rm32/eax 4/r32/cr4 -== data - e9 d0 16 00 00 # jump to 0x9400 [label] -== code + e9/jump Entry/disp32 == boot-sector-marker 0x7dfe # final 2 bytes of boot sector diff --git a/ex1.subx b/ex1.subx index 9ff2113f..e1f784bd 100644 --- a/ex1.subx +++ b/ex1.subx @@ -4,7 +4,7 @@ # graphics mode. # # To build a disk image: -# ./translate_subx boot.subx ex2.subx # emits disk.img +# ./translate_subx boot.subx ex1.subx # emits disk.img # To run: # qemu-system-i386 disk.img # Or: @@ -12,7 +12,7 @@ == code -main: +Entry: { eb/jump loop/disp8 } diff --git a/ex2.subx b/ex2.subx index 3d91b16f..91eca105 100644 --- a/ex2.subx +++ b/ex2.subx @@ -9,7 +9,7 @@ == code -main: +Entry: # ecx <- start of video memory 8b/-> *Video-memory-addr 1/r32/ecx diff --git a/mu-init.subx b/mu-init.subx index 8c68f280..20eefbde 100644 --- a/mu-init.subx +++ b/mu-init.subx @@ -7,6 +7,7 @@ == code +Entry: # initialize stack bd/copy-to-ebp 0/imm32 # always first run tests |