home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
progbas
/
apb16.arj
/
APBTOFP.ASM
< prev
next >
Wrap
Assembly Source File
|
1990-12-20
|
2KB
|
72 lines
Title ApBasic to Fabs Plus interface sub-program
Page 60,130
Comment *
Created 10-20-1987 k. murray
FABS PLUS is a excellent BTREE package published by
Computer Control Systems, Inc. Tele: (904) 752-0912
They also publish sort/merge system called Autosort/86M.
For further information contact Comptech or Computer
Control Systems.
*
Cseg Segment byte public 'Code'
Assume Cs:Cseg,Ds:nothing,Es:nothing
;
Comment *
Define in program:
Sub FabsP Cmd$,Errf%,Recno%,Adrkey%,Fseg% External "ApbToFp.com"
Call in program:
FabsP Cmd$,Errf%,RecLo%,Adrkey%,Fseg%
FabsP "X",Dum%,RcHi%,Dum%,Fseg%
Recno#=CVL(MKI$(RcLo%)+MKI$(RcHi%))
Stack frame:
Bp+14 Cmd$ desc #
Bp+12 Adr. of Errf%
Bp+10 Adr. of Recno%
Bp+8 Adr. of Adrkey%
Bp+6 Adr. of Fseg%
Bp+4 Return Segment
Bp+2 Return Offset
Bp+0 Saved Bp
*
Start:
FabsP Proc Far
Push Bp
Mov Bp,Sp
Mov Bx,[Bp+14] ; Get desc # of Cmd$
Shl Bx,1
Shl Bx,1 ; Mult by 4
Mov Es,Ds:[6] ; Get desc segment
Mov Ax,Es:[Bx] ; get length of string in Ax
Mov Es,Es:[Bx+2] ; Put segment of string in Es
Push Es:[0] ; save reserved area before string
Push Ax ; One extra because FABS remove 14
Mov Es:[1],Al ; put length as byte before string
Push Es ; push segment of string data
Mov Ax,1
Push Ax ; offset of string (1)
Push Ds ; segment of ErCode%
Push [Bp+12] ; Offset of ErCode%
Push Ds ; segment of Adrkey%
Push [Bp+8] ; offset of Adrkey%
Mov Bx,[Bp+6] ; Adr. of Fseg%
Mov Ax,[Bx] ; Fseg% into Ax
Mov word ptr Cs:Fseg+2,Ax ; put segment into local variable
Call dword ptr Cs:Fseg ; do call to Fabs Plus
Mov Bx,[Bp+10] ; adr. to put Recno%
Mov [Bx],Ax ; save returned Recno%
Pop Es:[0] ; restore reserved area
Pop Bp
Ret 5*2 ; Five parm's at 2 bytes/parm
FabsP Endp
;
; Local data goes here
Fseg Dw 23,0
;
Cseg Ends
End Start