Hi,
It doesn't work because you've not set up DS segement register, as of what you have in the code, its ambigous and while your at it, its best to leave other regularly used segment registers defined rather keeping them ambigous. In x86 assembly, when you don't specify which segment register like the instruction
mov BYTE [0xB8000], 7 it assumes the offset is relative to DS segment, this means if DS=10h for an example the linear address pointed to is B8100h. Also however, for a boot sector you should keep in mind your in 16bit mode and that offset B8000h would need to contain more then 16bits. There are methods to go around this such as an operand size override prefix (opcode 66h). Or to simply write it in 16bit you would use a 0xB800h segment which would look something like:
; --------------------------------------------
; Boot program code begins here
; --------------------------------------------
; boot code begins at 0x003E
begin:
mov ax, 0xB800
mov ds, ax ; DS=B800h (notice a zero is missing from linear)
xor ax, ax ; AX=0
mov es, ax ; ES=0 might as well set ES too
mov ax, 80h
mov ss, ax ; SS=80h (bottom of the stack is 800h linear)
mov ax, 800h
mov sp, ax ; SP=800h ( top of the stack is SS:800h == 1000h linear)
mov BYTE [0x00], 0x41 ; sets 0x41 at linear B8000h
mov BYTE [0x01], 0x07 ; sets 0x71 at linear B8001h
mov BYTE [0x02], 0x41 ; ...and so on
mov BYTE [0x03], 0x07
.....