home *** CD-ROM | disk | FTP | other *** search
- Title ApBasic to As86M interface sub-program
- Page 60,130
-
- Comment *
- Created 10-20-1987 k. murray
-
- AutoSort/86M is a excellant sort/merge package published by
- Computer Control Systems, Inc. Tele: (904) 752-0912
- They also publish btree+ system called Fabs Plus. 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 As86m Cmd$,Reccnt%,ErCode%,Asseg% External "ApbToAs.com"
- Call in program:
- As86m Cmd$,RcLo%,ErCode%,Asseg%
- As86m "X",RcHi%,Dum%,Asseg%
- RecCnt#=CVL(MKI$(RcLo%)+MKI$(RcHi%))
-
- Stack frame:
- Bp+12 Cmd$ desc #
- Bp+10 Adr. of Reccnt%
- Bp+8 Adr. of ErCode%
- Bp+6 Adr. of Asseg%
- Bp+4 Return Segment
- Bp+2 Return Offset
- Bp+0 Saved Bp
- *
- Start:
- As86m Proc Far
- Push Bp
- Mov Bp,Sp
- Mov Bx,[Bp+12] ; 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 ; save extra because FABS remove 12
- 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+8] ; Offset of ErCode%
- Mov Bx,[Bp+6] ; Adr. of Asseg%
- Mov Ax,[Bx] ; Asseg% into Ax
- Mov word ptr Cs:Asseg+2,Ax ; put segment into local variable
- Call dword ptr Cs:Asseg ; do call to as86m
- Mov Bx,[Bp+10] ; adr. to put Reccnt%
- Mov [Bx],Ax ; save returned Reccnt%
- Pop Es:[0] ; restore reserved area
- Pop Bp
- Ret 4*2 ; four parm's at 2 bytes/parm
- As86m Endp
- ;
- ; Local data goes here
- Asseg Dw 12,0
- ;
- Cseg Ends
- End Start