I have started to learn assembly. I came across these lines.
;*************************************************;
; OEM Parameter block / BIOS Parameter Block
;*************************************************;
TIMES 0Bh-$+start DB 0
bpbBytesPerSector: DW 512
bpbSectorsPerCluster: DB 1
bpbReservedSectors: DW 1
I am confused on the first line of declaration
“bpbBytesPerSector: DW 512” . Here I think DW is define word. So DW 512 means defining 512 words means 1024 bytes. Now the label is “bpbBytesPerSector”. Bytes per sector should be 512(this is what I think). Similarly I can’t understand next two lines.
I am totally confused on this. Can anybody explain me.Thanks in advance.
No,
dwmeans define the single word 512. That means allocate space for one word here and set the value to 512.This is creating a BIOS parameter block (BPB) and breaking it down: