遥想当年,上学期间,汇编程序,从未成功。今又试之,终成功,遂记录。
Hello.asm文件如下:
1 .386 2 .model flat,stdcall 3 option casemap:none 4 5 include windows.inc 6 include user32.inc 7 includelib user32.lib 8 include kernel32.inc 9 includelib kernel32.lib 10 11 .data 12 szCaption db 'A MessageBox !',0 13 szText db 'Hello, World !',0 14 15 .code 16 start: 17 invoke MessageBox,NULL,offset szText,offset szCaption,MB_OK 18 invoke ExitProcess,NULL 19 20 end start