reintroduce Entry label

This commit is contained in:
Kartik K. Agaram 2021-03-15 20:39:23 -07:00
parent 9d4ca5f59a
commit 460528e85b
4 changed files with 6 additions and 10 deletions

View File

@ -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

View File

@ -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
}

View File

@ -9,7 +9,7 @@
== code
main:
Entry:
# ecx <- start of video memory
8b/-> *Video-memory-addr 1/r32/ecx

View File

@ -7,6 +7,7 @@
== code
Entry:
# initialize stack
bd/copy-to-ebp 0/imm32
# always first run tests