int24h.asm

来自「汇编源代码大全2」· 汇编 代码 · 共 52 行

ASM
52
字号
Comment *
ZDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD?
3 Title   : int24hnd							     3
3 Purpose : This procedure is an interrupt handler which installed, bypasses 3
3	    the abort retry ignore messages and returns the error code to    3
3	    the program using the Inter program communications area at	     3
3	    0x40:0xF0. See the dos tech reference manual for details about   3
3	    how this works.						     3
3									     3
3	Written by Jack Zucker - 75766,1336    301-794-5950		     3
@DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDY
 *
	assume cs:_text
_text	segment public byte 'code'
	public _int24hnd

_int24hnd  proc near
				; at this point, the first 3 words on the
				; stack are:
				; IP,CS,Flags as a result of the Failed
				; dos call.

	add sp,06h;		; Discard dos stack info

	push ds 		; place error code in ICA area
	push bx
	mov bx,40h		; segment of ICA
	mov ds,bx
	mov bx,0f0h		; offset of ICA
	mov [bx],di		; put error code in ICA
	pop bx
	pop ds

	pop ax			; pop all registers
	pop bx
	pop cx
	pop dx
	pop si
	pop di
	pop bp
	pop ds
	pop es
				; Now whats left on the stack is:
				; IP,CS,Flags of the guy who called
				; the dos interrupt in the first place
				; so lets return to him !

	iret			; return to who called the int 21h
_int24hnd  endp
_text	ends
end

⌨️ 快捷键说明

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