Correct markdown
This commit is contained in:
parent
6e2f3fbd06
commit
868278ffec
54
Readme.md
54
Readme.md
@ -1,22 +1,25 @@
|
|||||||
== Instruction ==
|
# Instruction
|
||||||
|
|
||||||
Build with
|
Build with
|
||||||
nasm -f bin mbr.asm -o mbr
|
`nasm -f bin mbr.asm -o mbr`
|
||||||
|
|
||||||
Run with
|
Run with
|
||||||
qemu-system-x86_64 -boot a -fda mbr
|
`qemu-system-x86_64 -boot a -fda mbr`
|
||||||
|
|
||||||
Debug with
|
Debug with
|
||||||
qemu-system-x86_64 -boot a -fda mbr -s -S
|
`qemu-system-x86_64 -boot a -fda mbr -s -S`
|
||||||
gdb
|
then
|
||||||
|
`gdb`
|
||||||
|
```
|
||||||
target remote localhost:1234
|
target remote localhost:1234
|
||||||
layout asm
|
layout asm
|
||||||
b *0x7c00
|
b *0x7c00
|
||||||
c
|
c
|
||||||
|
```
|
||||||
|
|
||||||
== ASM reg ==
|
# ASM reg
|
||||||
|
|
||||||
=== In 16 bits ===
|
## In 16 bits
|
||||||
There is 4 main 16bits reg: AX, BX, CX, DX.
|
There is 4 main 16bits reg: AX, BX, CX, DX.
|
||||||
You can access the 8 MSB from AX with AH and the 8 LSB with AL.( BH,BL, CH, CL)
|
You can access the 8 MSB from AX with AH and the 8 LSB with AL.( BH,BL, CH, CL)
|
||||||
|
|
||||||
@ -26,32 +29,33 @@ SP is stack pointer, BP is base pointer
|
|||||||
|
|
||||||
AX(AH, AL), BX(BH, BL), CX(CH, CL), DX(DH, DL), SI, DI, SP, BP
|
AX(AH, AL), BX(BH, BL), CX(CH, CL), DX(DH, DL), SI, DI, SP, BP
|
||||||
|
|
||||||
=== In 32bits ===
|
## In 32bits
|
||||||
Main register are "Extended" to 32bits but 16bits of 8bits direct access is not possible anymore.
|
Main register are "Extended" to 32bits but 16bits of 8bits direct access is not possible anymore.
|
||||||
|
|
||||||
EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP
|
EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP
|
||||||
|
|
||||||
=== In 64bits ===
|
## In 64bits
|
||||||
Prefixed by R
|
Prefixed by R
|
||||||
RAX, RBX, RCX, RDX, RSI, RDI, RSP, RBP
|
RAX, RBX, RCX, RDX, RSI, RDI, RSP, RBP
|
||||||
|
|
||||||
|
|
||||||
== Bios Memory ==
|
# Bios Memory
|
||||||
|
Address range | Description
|
||||||
0x0 - 0x03FF ;IVT
|
----------------------- | -----------------------
|
||||||
0x400 - 0x4FF ;BIOS Data
|
0x0 - 0x03FF |IVT
|
||||||
0x500 - 0x7BFF ;Unused
|
0x400 - 0x4FF |BIOS Data
|
||||||
0x7C00 - 0x7D77 ;Bootloader
|
0x500 - 0x7BFF |Unused
|
||||||
0x7E00 - 0x9FFFF ;Unused
|
0x7C00 - 0x7D77 |Bootloader
|
||||||
0xA0000 - 0xBFFFF ;Video memory
|
0x7E00 - 0x9FFFF |Unused
|
||||||
0xB0000 - 0xB7777 ;Video memory monochrome
|
0xA0000 - 0xBFFFF |Video memory
|
||||||
0xB8000 - 0xBFFFF ;Video memory color
|
0xB0000 - 0xB7777 |Video memory monochrome
|
||||||
0xC0000 - 0xC7FFF ;BIOS ROM
|
0xB8000 - 0xBFFFF |Video memory color
|
||||||
0x80000 - 0xEFFFF ;BIOS shadow memory
|
0xC0000 - 0xC7FFF |BIOS ROM
|
||||||
0xF0000 - 0xFFFFF ;BIOS System
|
0x80000 - 0xEFFFF |BIOS shadow memory
|
||||||
|
0xF0000 - 0xFFFFF |BIOS System
|
||||||
|
|
||||||
|
|
||||||
== Interrupt Vector Table ==
|
# Interrupt Vector Table
|
||||||
INT_NUM | Short Description PM
|
INT_NUM | Short Description PM
|
||||||
----------- | ----------------------
|
----------- | ----------------------
|
||||||
0x00 | Division by zero
|
0x00 | Division by zero
|
||||||
@ -74,8 +78,8 @@ INT_NUM | Short Description PM
|
|||||||
0x11 | Alignment Check
|
0x11 | Alignment Check
|
||||||
0x12 | Machine Check
|
0x12 | Machine Check
|
||||||
0x13 | SIMD Floating-Point Exception
|
0x13 | SIMD Floating-Point Exception
|
||||||
0x14 | Virtualization Exception
|
0x14 | Virtualisation Exception
|
||||||
0x15 | Control Protection Exception
|
0x15 | Control Protection Exception
|
||||||
|
|
||||||
== BIOS IRQ ==
|
# BIOS IRQ
|
||||||
https://en.wikipedia.org/wiki/BIOS_interrupt_call
|
https://en.wikipedia.org/wiki/BIOS_interrupt_call
|
||||||
|
Loading…
Reference in New Issue
Block a user