reintroduce Entry label
This commit is contained in:
parent
9d4ca5f59a
commit
460528e85b
|
@ -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
|
||||
|
|
4
ex1.subx
4
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
|
||||
}
|
||||
|
|
2
ex2.subx
2
ex2.subx
|
@ -9,7 +9,7 @@
|
|||
|
||||
== code
|
||||
|
||||
main:
|
||||
Entry:
|
||||
# ecx <- start of video memory
|
||||
8b/-> *Video-memory-addr 1/r32/ecx
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
== code
|
||||
|
||||
Entry:
|
||||
# initialize stack
|
||||
bd/copy-to-ebp 0/imm32
|
||||
# always first run tests
|
||||
|
|
Loading…
Reference in New Issue