flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
jorido 30 Jan 2017, 16:18
What's the difference between
Code:
var1 rb 123
and Code:
var1 db 123 dup ?
? |
|||
![]() |
|
zhak 30 Jan 2017, 19:36
No difference for this very example. However, in general `dup` directive allows defining repeated sequences.
From the manual (https://flatassembler.net/docs.php?article=manual), 1.2.2 Data definitions: Quote: ...directive allows the usage of special dup operator to make multiple copies of given values. The count of duplicates should precede this operator and the value to duplicate should follow - it can even be the chain of values separated with commas, but such set of values needs to be enclosed with parenthesis, like db 5 dup (1,2), which defines five copies of the given two byte sequence. |
|||
![]() |
|
jorido 31 Jan 2017, 02:56
"dup" is just used in this specific example. Without "dup:
Code:
var1 rd 1
var1 dd ?
Any difference? |
|||
![]() |
|
revolution 31 Jan 2017, 03:04
No.
|
|||
![]() |
|
jorido 31 Jan 2017, 06:01
thanks!
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.