• C

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?
LVL 5
laeuchliAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

_lychee_Commented:
use
bsVoLabel times 20h db 11

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
_lychee_Commented:
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?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C

From novice to tech pro — start learning today.