The DB directive (define byte) is used to allocate memory blocks of byte size. The section that comes after the database indicates the value that should be placed in the allocated memory. For example, if you want to define one byte of memory with a value of 65, you can use the following directive.
SingleByte DB 65 ; allocate a single byte and write 65 into the byte
DUP () . , , , DUP. DUP . , 10- , 65, .
TenBytes DB 10 DUP(65); allocate 10 bytes and write 65 into each byte
, , ? . , ? 0.
Buffer DB 80 DUP(?) ; set aside 80 bytes without assigning them any values
. , , , - .
Buffer DB 80 DUP(0) ; 80-byte buffer initialized to all zeros
BufferMaxLen DB 80 ; maximum length of Buffer
BufferLen DB 0 ; actual length of Buffer
source
share