BPB in nasm

laeuchli used Ask the Experts™
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?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
bsVoLabel times 20h db 11

in nasm, times is the functional equivalent for dup, and can do much more...

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?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial