Link to home
Start Free TrialLog in
Avatar of laeuchli
laeuchli

asked on

BPB in nasm

Hey I am trying to  put a bpb in my bootsec program so I can get to the disk in dos. Some one sent me some code, but it does not work in nasm. Here it is:
JMP label           ; 3 BYTES
bsOEM db 8 DUP(20h) ; OEM String
bsSectSize  dw 512  ; Bytes per sector
bsClustSize db 1    ; Sectors per cluster
bsRessect   dw 1    ; # of reserved sectors
bsFatCnt    db 2    ; # of fat copies
bsRootSize  dw 224  ; size of root directory
bsTotalSect dw 2880 ; total # of sects. if<32 meg
bsMedia     db 0xF0 ; Media Descriptor
bsFatSize   dw 9    ; Size of each FAT
bsTrackSect dw 18   ; Sectors per track
bsHeadCnt   dw 2    ; number of read-write heads
bsHidenSect dd 0    ; number of hidden sectors
bsHugeSect  dd 0    ; if bsTotalSect is 0 this
                    ; value is the number of
                    ; sectors
bsBootDrv   db 0    ; holds drive that the bs
                    ; came from
bsReserv    db 0    ; not used for anything
bsBootSign  db 29h  ; boot signature 29h
bsVolID     dd 0    ; Disk volume ID
bsVoLabel   db 11 DUP(20h) ; Volume Label
bsFSType    db "FAT12   "  ; File System type
                           ; 8 BYTES
nasm complains about DUP(20h)
What should I do?
ASKER CERTIFIED SOLUTION
Avatar of _lychee_
_lychee_

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of _lychee_
_lychee_

argh sorry....

it should be
bsVoLabel times 11 db 20h

and the bsOEM 8 dup(20h) should be
bsOEM times 8 db 20h

just to confirm: 8 dup(20h) means
20h, 20h, ...20h (8 times) correct?