| 
注册时间2010-4-1
阅读权限30
最后登录1970-1-1UID66114 龙战于野 
 
 TA的每日心情|  | 慵懒 2019-3-12 17:25
 | 
|---|
 签到天数: 3 天 [LV.2]偶尔看看I | 
 
| 本帖最后由 whypro 于 2010-12-12 15:04 编辑 
 .data ;16位下
 arrayH word 100h,200h,300h
 .code
 mov ax,arrayH        ;ax=100h
 mov ax,[arrayH+2]  ;ax=200h
 
 .data ;32位下
 arrayH dword 10000h,20000h
 .code
 mov ax,arrayH        ;ax=10000h
 mov ax,[arrayH+4]  ;ax=20000h
 
 废话就不说了直接上代码:
 .386
 .model flat,stdcall
 option casemap:none
 include windows.inc
 include user32.inc
 includelib user32.lib
 include kernel32.inc
 includelib kernel32.lib
 .data
 arrayK dword 10000h,20000h
 szCaption db '消息框!',0
 szText db 100 dup(0)
 szCharsFormat db 'ArrayK:%d,%d',0
 .code
 start:
 invoke        wsprintf,addr szText, addr szCharsFormat, arrayK, arrayK+4
 invoke MessageBox,NULL,offset szText,offset szCaption,MB_OK
 mov        arrayK,1
 mov        arrayK+4,2
 invoke        wsprintf,addr szText, addr szCharsFormat, arrayK, arrayK+4
 invoke MessageBox,NULL,offset szText,offset szCaption,MB_OK
 invoke ExitProcess,NULL
 end start
 | 
 |