home *** CD-ROM | disk | FTP | other *** search
- ;
- ; watchmem : Add user comments to the WATCHMEM buffer
- ;
- ; C interface : void far PASCAL watchmem(char far *comments)
- ;
-
- .MODEL LARGE, PASCAL
- .CODE
- .LALL
-
- IDName db 'SC3WATCH'
-
- add_user_info dw 5
- user_info_seg dw 0
- user_info_off dw 0
-
- watchmem PROC FAR USES AX BX CX SI DS ES, comments:PTR BYTE
-
- ; Do we have a valid int 2F vector?
- mov ah, 035h
- mov al, 02Fh
- int 21h
- ; int 2F vector now in ES:BX
- mov ax, es
- cmp ax, 00000h
- je watchdone
- cmp ax, 0F000h
- je watchdone
-
- ; Does the TSR exist?
- push ds
- mov ax, 5453h
- mov bx, 0000h
- mov cx, 0000h
- push cs
- pop ds
- mov si, OFFSET IDName
- int 2Fh
- pop ds
- cmp ax, 0FFFFh
- jne watchdone
-
- ; TSR exists! TSR ID value in CX, send the string!
- les di, comments
- mov user_info_seg, es
- mov user_info_off, di
- mov ax, 5453h
- mov bx, 0020h
- push cs
- pop es
- mov di, OFFSET add_user_info
- int 2Fh
-
- watchdone: ret
-
- watchmem ENDP
-
- END
-
-