I have some numeric constants in my data definition and would like to be able to use them inside my strings without having to embed them at runtime. Is this possible in MASM?
.data
LOWER_BOUND = 50
UPPER_BOUND = 100
promptMessage BYTE "Please enter a number between ", LOWER_BOUND, " and ", UPPER_BOUND, ".",10,13,0
I am using the Irvine library.
db). I don't know if MASM can do the same, or if so how. You could do something likeBYTE (LOWER_BOUND/10)%10 + '0', LOWER_BOUND%10 + '0'to do it explicitly for a 2-digit number, or any other fixed width with leading zeros, but variable-width needs something conditional.