<BUFF DB 3,?,3 DUP(?)> What does this line means? I want to create a buffer that accept 2 digits to be entered, I find this code to help me do it,but I don’t understand its meaning.
Asked
Active
Viewed 54 times
-3
-
Consult your assembler's manual. TL;DR: `db` is define byte, it allocates bytes. `?` is just uninitialized value and the `x dup(y)` construct means `x` copies of `y`, so `3 dup(?)` means 3 unininitalized values. – Jester May 11 '22 at 13:05
-
So this code allocates 5 consecutive bytes to BUFF? – Logine Magdi May 11 '22 at 13:09
-
1Yes, 5 bytes. Presumably used for int21/0a. First byte is length of buffer, second byte is count of bytes actually entered, next 3 bytes are the space for the input. – Jester May 11 '22 at 13:16