buf db 10 dup(?) I can substitude with buf rb 10
But what I have to do to get:
buf db 10 dup(20h) or any other value?
Posted on 2003-05-11 13:37:24 by Dryobates
Please, read privalovs manual, fasm.txt in the fasm folder, it's easy to read and as you can see you have two options:
excerpt from \fasm\fasm.txt
2.2.1 Repeating blocks of instructions

"times" directive repeats one instruction specified number of times. It
should be followed by numerical expression specifying number of repeats and
the instruction to repeat (optionally colon can be used to separate number and
instruction). When special symbol "%" is used inside the instruction, it is
equal to the number of current repeat. For example "times 5 db %" will define
five bytes with values 1, 2, 3, 4, 5. Recursive use of "times" directive is
also allowed, so "times 3 times % db %" will define six bytes with values
1, 1, 2, 1, 2, 3.
"repeat" directive repeats the whole block of instructions. It should be
followed by numerical expression specifying number of repeats. Instructions
to repeat are expected in next lines, ended with the "end repeat" directive,
for example:

repeat 8
mov byte ,%
inc bx
end repeat

The generated code will store byte values from one to eight in the memory
addressed by BX register.
Number of repeats can be zero, in that case the instructions are not
assembled at all.
Posted on 2003-05-11 13:44:29 by scientica
Thx. I was looking into manual but I have to miss those directives.
My code looks now that:
buf: times 5 db 20h, '$
It's a little uncomfortable to write with ':'. TASM habit. But at least I don't have to write offset buf :)
Posted on 2003-05-11 15:10:25 by Dryobates
fasm.txt? hmm.. not in the win32 gui version of fasm.. all i got is this annoying to read pdf :|

*goes to check out other versions to see if hes missing out on anything else*
Posted on 2003-05-20 18:49:01 by xxNelix
Download the console version of fasm, there it is in txt format. (It never hurts to have both fasmw and fasm (console version) installed)
Posted on 2003-05-21 08:54:10 by scientica
yeah, differnt examples too.
Posted on 2003-05-21 15:41:36 by xxNelix