30 lines
347 B
NASM
30 lines
347 B
NASM
[BITS 32]
|
|
|
|
GLOBAL asm_hrb_api
|
|
GLOBAL api_putstr
|
|
|
|
EXTERN hrb_api
|
|
|
|
asm_hrb_api:
|
|
STI
|
|
PUSH DS
|
|
PUSH ES
|
|
PUSHAD
|
|
PUSHAD
|
|
MOV AX, SS
|
|
MOV DS, AX
|
|
MOV ES, AX
|
|
CALL hrb_api
|
|
CMP EAX, 0
|
|
JNE .end_app
|
|
ADD ESP, 32
|
|
POPAD
|
|
POP ES
|
|
POP DS
|
|
IRETD
|
|
|
|
.end_app:
|
|
MOV ESP, [EAX]
|
|
POPAD
|
|
RET
|