画出下列变量在存储器中的分配示意图,图中须标明起始单元地址。该数据段的段基址为4000H,偏移地址为7000H。 DATA SEGMENT COUNT EQU 2 VARI DB -5,10010110B,COUNT DUP(6) VAR2 DW 2346H,79H DATA ENDS
时间: 2024-03-24 21:42:06 浏览: 72
该数据段的段基址为 4000H,偏移地址为 7000H,因此变量在存储器中的分配示意图如下:
```
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
4000 7000
COUNT -5 10010110B 6 6 6 6 6 6 6 6 6 6 6
+-----+----------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| | | | | | | | | | | | |
| | | | | | | | | | | | |
| | | | | | | | | | | | |
+-----+----------+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
4000H + 0H 4000H + 1H 7000H + 0H 7000H + 6H
VAR2 2346H 79H
+-----+-----+
| | |
| | |
| | |
+-----+-----+
7008H 700AH
```
其中,COUNT 变量占用 13 个字节(-5 占用 1 个字节,10010110B 占用 1 个字节,COUNT DUP(6) 表示 6 个重复的 6 字节数组,占用 6*6=36 个字节),起始地址为 4000H,VAR2 变量占用 2 个字节,起始地址为 7008H。