MASM interprets the assembler directive
ADDRESS DD 5 DUP ($)
ADDRESS DD ADDRESS,ADDRESS,ADDRESS,ADDRESS,ADDRESS
Personally, I would prefer the interpretation
ADDRESS DD ADDRESS,ADDRESS+4,ADDRESS+8,ADDRESS+12,ADDRESS+16
which, under different syntax, is the interpretation of the mainframe assembler.
Since you are writing your own assembler, the choice is yours.
> A little background. I'm writing a subset of a full assembler, something
> akin to the inline assemblers which are available with most compilers. As
> long as it can assemble any existing opcode, aswell as handle "db, dw, etc"
> and EQUs, I'll be happy.
> I've come across a question which IMO has two valid answers. As I don't
> have to worry about breaking existing code and I don't have any particular
> reason to choose one or the other, so I figure you'd be the right people to
> ask. Assuming the current value of location counter ($) is 0, if an
> assembler encounters "dd 5 dup ($)" what do you think the assembler should
> a) dd 0, 0, 0, 0, 0
> b) dd 0, 4d, 8d, 12d 16d
> Tasm goes with the former, but then I don't much care what tasm thinks. So,
> if you have any thoughts one way or the other, I'd be interested to read
> doomsday AT optusnet DOT com DOT au
> PS: While I'm writing a post
> pH> Are there *any* programmers who *aren't* also involved with music? <g>
> That'd be me ;)