变量声明
变量声明之dw
关于 WORD_VAR DW 5DUP(0, 1, 2), 7, -5, 'BY', 'TE',256,'HOWBIN'
的内存分配情况
程序代码
; multi-segment executable file template.
data segment
; add your data here!
pkey db "press any key...$"
WORD_VAR DW 5DUP(0, 1, 2), 7, -5, 'BY', 'TE', 256H,'HOWBIN'
ends
stack segment
dw 128 dup(0)
ends
code segment
start:
; set segment registers:
mov ax, data
mov ds, ax
mov es, ax
lea bx,WORD_VAR
lea dx, pkey
mov ah, 9
int 21h ; output string at ds:dx
; wait for any key....
mov ah, 1
int 21h
mov ax, 4c00h ; exit to operating system.
int 21h
ends
end start ; set entry point and stop the assembler.
内存结果
![内存结果图 内存结果图](https://i-blog.csdnimg.cn/blog_migrate/9b2ca7b22dbc129bbaa2f7bcfbdbad47.png)
内存结果图
注意
![注意事项表 注意事项表](https://i-blog.csdnimg.cn/blog_migrate/5b71f3a4cca7d5b9f97a5abab6a11899.png)
注意事项表