I'm a green hand to assembly language. These days I used bochs to simulate the boot procedure from virtual floppy. But one thing I don't know is what the CS register value is when the system initializes.
;; init registers
org 0x7c00
BaseOfStack equ 0x7c00
Label_Start:
mov ax, cs
mov ds, ax
mov es, ax
mov ss, ax
mov sp, BaseOfStack
;; clear screen
mov ax, 0600h
mov bx, 0700h
mov cx, 0
mov dx, 0184h
int 10h
The above code is only part of it. When the ORG command was executed, what was the CS register value at the instruction mov ax, cs. Is it the same as 0x7c00? Thanks.
Below is bochsrc configuration:
romimage: file="$BXSHARE/BIOS-bochs-latest"
vgaromimage: file="$BXSHARE/VGABIOS-lgpl-latest"
boot: floppy
floppy_bootsig_check: disabled=0
floppya: type=1_44, 1_44="myboot.img", status=inserted
pci: enabled=1, chipset=i440fx
vga: extension=vbe, update_freq=15
cpu: ips=15000000
log: bochsout.txt
mouse: enabled=0
megs: 32