db and dw commands

Greg Frey (gregf@unixg.ubc.ca) Sun, 10 Dec 2000 17:48:10 -0800


From: "Greg Frey" <gregf@unixg.ubc.ca>
Subject: db and dw commands
Date: Sun, 10 Dec 2000 17:48:10 -0800


Could anyone please clear up for me the syntax for the "db" and "dw" commmands. At the end of the Interrupts lecture, the example ISR defines storage using: tempax dw ? tempds dw ? This seems very clear that we are setting aside 2 bytes with uninitialized contents for each label. But, in the Assembly Language lecture, there is an example of creating a buffer. buf db 128 dup (?) This isn't as clear for me. Does "dup" duplicate whatever is in the parenthesis 128 times? In this case, we'll just have 128 uninitialized bytes? Also, how do we properly access these referenced locations? mov ax,buf mov ax, [buf] Would these both do the same thing? Thanks. ------------------------------------------------------ Greg Frey gregf@unixg.ubc.ca