home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
OS2BAS.ZIP
/
REGBAS12.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-06-23
|
2KB
|
78 lines
; Program Name: RegBas12.ASM
;
; Functions :
; BasClientWndProc12
; RegBas12
;
; Description : This supplies the interface routines for BASIC programs.
; used to register window classes from BASIC.
;
DOSSEG
.286 ; OS/2 only runs on 286 machines
.model medium, PASCAL ; Medium memory model when interfacing with BASIC
; PASCAL and BASIC use same calling conventions
.data
hwndb1 DW ? ; set up local data for BasClientWndProc
hwndb2 DW ?
msgb DW ?
mp1b1 DW ?
mp1b2 DW ?
mp2b1 DW ?
mp2b2 DW ?
.code
EXTRN ClientWndProc12:PROC ; BASIC function to call
PUBLIC BasClientWndProc12, RegBas12
BasClientWndProc12 PROC hwnd1:word, hwnd2:word, msg:word, mp11:word, mp12:word, mp21:word, mp22:word
push ds
mov ax, @data ; get our data segment
mov ds, ax
mov ax, hwnd2 ; transfer the values passed
mov hwndb1, ax ; from PM to local variables
mov ax, hwnd1 ; for the call to BASIC
mov hwndb2, ax
mov ax, msg
mov msgb, ax
mov ax, mp12
mov mp1b1, ax
mov ax, mp11
mov mp1b2, ax
mov ax, mp22
mov mp2b1, ax
mov ax, mp21
mov mp2b2, ax
mov ax, OFFSET hwndb1 ; set up for call to BASIC
push ax ; BASIC expects values to
mov ax, OFFSET msgb ; be passed by reference.
push ax
mov ax, OFFSET mp1b1
push ax
mov ax, OFFSET mp2b1
push ax
call ClientWndProc12 ; call BASIC routine - note
; return values are already
pop ds ; in dx, ax so we don't have
ret ; to do anything.
BasClientWndProc12 ENDP
RegBas12 PROC
mov dx, SEG BasClientWndProc12 ; return address of
mov ax, OFFSET BasClientWndProc12 ; BASIC routine.
ret
RegBas12 ENDP
end