| 
注册时间2010-4-1
阅读权限30
最后登录1970-1-1UID66114 龙战于野 
 
 TA的每日心情|  | 慵懒 2019-3-12 17:25
 | 
|---|
 签到天数: 3 天 [LV.2]偶尔看看I | 
 
| 本帖最后由 whypro 于 2010-12-13 06:54 编辑 
 废话就不多说了
 .386
 .model flat,stdcall
 option casemap:none
 include windows.inc
 include user32.inc
 includelib user32.lib
 include kernel32.inc
 includelib kernel32.lib
 .data
 arrayP        dword        1,2,3
 szCaption db '消息框!',0
 szText db 100 dup(0)
 szCharsFormat db 'ArrayP Sum:%d',0
 .code
 start:
 mov        esi,offset arrayP                                         ;取数组的地址(&arrayP)
 mov                eax,[esi]                        ;第1个元素        eax=1
 add                esi,4                                         ;地址加一(&arrayp+1)
 add                eax,[esi]                        ;加上第2个元素        eax=3
 add                esi,4
 add                eax,[esi]                        ;加上第3个元素        eax=6
 invoke        wsprintf,addr szText, addr szCharsFormat, eax
 invoke MessageBox,NULL,offset szText,offset szCaption,MB_OK
 invoke ExitProcess,NULL
 end start
 | 
 |