home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
OS2HIST.ZIP
/
HISTASM.ASM
next >
Wrap
Assembly Source File
|
1988-02-18
|
2KB
|
122 lines
page ,132
.286p
title DOSEDIT assembly language portion
include os2defs.ash
.model large
.code
; include debugit.h
; ***********************************************************************
; * *
; * EDITDISPATCH - DOSEDIT keyboard dispatcher *
; * this will be hooked into the keyboard subsystem via a *
; * KBDREGISTER call. *
; * *
; * The stack will have additional args pushed: *
; * PUSH (args for original call) *
; * CALL FunctionToIntercept *
; * PUSH Index *
; * CALL (kbd router return addr here) *
; * PUSH DS (caller's DS) *
; * CALL FAR (this routine) *
; * *
; ***********************************************************************
ed_retaddr equ 2
ed_callds equ 6
ed_nearptr equ 8
ed_index equ 10
ed_farret equ 12
ed_kbdhandle equ 16
ed_iowait equ 18
ed_length1 equ 20
ed_length2 equ 22
ed_buffer1 equ 24
ed_buffer2 equ 26
extrn editstringin:far
public EDITDISPATCH
EDITDISPATCH proc far
push bp
mov bp,sp
; only 1 function will be registered, so....
push bx
push cx
push dx
push si
push di ; save general registers
push [bp].ed_buffer2
push [bp].ed_buffer1
push [bp].ed_length2
push [bp].ed_length1
push [bp].ed_iowait
push [bp].ed_kbdhandle
call editstringin
pop di ; restore general regs
pop si
pop dx
pop cx
pop bx
pop bp
ret
EDITDISPATCH endp
extrn addmacro:far
public EDITADDMAC
EDITADDMAC proc far
push bp
mov bp,sp
; only 1 function will be registered, so....
push bx
push cx
push dx
push si
push di ; save general registers
push [bp+12]
push [bp+10]
push [bp+8]
push [bp+6]
call addmacro
pop di ; restore general regs
pop si
pop dx
pop cx
pop bx
pop bp
ret 8
EDITADDMAC endp
.data
public __acrtused
__acrtused dw 0
end