t2.asm

来自「著名的开源链接器」· 汇编 代码 · 共 37 行

ASM
37
字号
; t2.asm
; assemble with:
; nasm -fobj t2.asm
;
; link with
; alink -oPE t2
;
; run with
; t2
;
; expected output is four message boxes. First two say "Hello" in title
; last two say "Bye" in title
	
import start tdll.dll
import title1 tdll.dll
	
extern start
extern title1

segment code public use32 class=CODE

..start:	
exestart:
 call [start]		;display two message boxes
			;need to call [start], since start gives address
			;of Import Address Table entry, a pointer to routine

 mov ebx,[title1]	;get address of title1 from IAT
 mov [ebx],byte 'B'
 mov [ebx+1],byte 'y'
 mov [ebx+2],byte 'e'
 mov [ebx+3],byte 0

 call [start]

ret

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?