storage of data in memory -
i want know, how data stored in memory ; or affect of following code
data1 db 1,2,3
how data stored.. if using 80386 or above intel microprocessor.. new these stuff kindly help!
well, db
defines sequence of bytes you'll 3 bytes 1, 2 , 3 in increasing memory locations, starting @ data1
.
if data1
@ 0x00001234, 2 statements db 1,2,3
, db 3,2,1
(that's 1 or other, not 1 followed other) give:
db 1,2,3 db 3,2,1 +------+ +------+ 0x00001234 | 0x01 | | 0x03 | +------+ +------+ 0x00001235 | 0x02 | | 0x02 | +------+ +------+ 0x00001236 | 0x03 | | 0x01 | +------+ +------+
for example, check out debug
session:
c:\src> debug -a 100 1388:0100 db 1,2,3,4 1388:0104 db 9,8,7,6 1388:0108 -d 100 10f 1388:0100 01 02 03 04 09 08 07 06-00 00 00 00 00 00 00 00 ................ -q c:\src> _
you can see 1
, 2
, 3
, 4
(in order) go memory locations 0x0100
through 0x0103
, 9
, 8
, 7
, 6
(again, in specified order) go memory locations 0x0104
through 0x0107
.
Comments
Post a Comment