mac-rom/OS/HFS/Extensions/BTreeMgr/BTreeGlue.a
Elliot Nunn 0ba83392d4 Bring in CubeE sources
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included.

The Tools directory, containing mostly junk, is also excluded.
2017-09-20 18:04:16 +08:00

90 lines
2.0 KiB
Plaintext

;
; File: BTreecGlue.a
;
; Contains: This is the C glue file for BTree Manager using Pascal calling convention.
;
; Written by: Kenny SC. Tung
;
; Copyright: © 1989-1990 by Apple Computer, Inc., all rights reserved.
;
; Change History (most recent first):
;
; <2> 2/6/90 KST Adding a new call, BTUpdateKD.
; <1> 2/6/90 KST Checking into BBS for the first time.
;
; To Do:
;
INCLUDE 'traps.a'
INCLUDE 'BTreeEqu.a'
btmain PROC
EXPORT BTINIT, BTOPEN, BTClose, BTGETINFO, BTInsRec, BTSearch
EXPORT BTGetRec, BTDelete, BTSetRec, BTReplRec, BTFlush ; <7/6/89 KSCT>
EXPORT BTCleanUp, BTRsrvAccess, BTRelAccess, BTGetUid, BTUpdateKD
BTINIT MOVEQ #btInitN,D0 ; 0
BRA.S GCommon
BTOPEN MOVEQ #btOpenN,D0 ; 1
BRA.S GCommon
BTClose MOVEQ #btCloseN,D0 ; 2
BRA.S GCommon
BTInsRec MOVEQ #btInsertN,D0 ; 3
BRA.S GCommon
BTSetRec MOVEQ #btSetRecN,D0 ; 4
BRA.S GCommon
BTReplRec MOVEQ #btReplRecN,D0 ; 5
BRA.S GCommon
BTSearch MOVEQ #btSearchN,D0 ; 6
BRA.S GCommon ; set up A0 and D1
BTGetRec MOVEQ #btGetRecN,D0 ; 7
BRA.S GCommon
BTDelete MOVEQ #btDeleteN,D0 ; 8
BRA.S GCommon ; set up A0 and D1
BTGetInfo MOVEQ #btGetInfoN,D0 ; 9
BRA.S GCommon
BTFlush MOVEQ #btFlushN,D0 ; 10 <7/6/89 KSCT>
BRA.S GCommon
BTCleanUp MOVEQ #BTCleanUpN,D0 ; 11
BRA.S GCommon
BTRsrvAccess MOVEQ #BTRsrvAccessN,D0 ; 12
BRA.S GCommon
BTRelAccess MOVEQ #BTRelAccessN,D0 ; 13
BRA.S GCommon
BTGetUid MOVEQ #BTGetUidN,D0 ; 14
BRA.S GCommon
BTUpdateKD MOVEQ #BTUpdateKDN,D0 ; 15
GCommon ;; (A7) = return address of main
;; Input: 4(A7)=async, 6(SP).L= param, 10(SP)=status. D0 = index
MOVE.L 6(A7),A0 ; ioParam
; boolean and char are all 32 bits long in C
TST.W 4(A7) ; but only 16 bits long in Pascal
BEQ.S @sync ; sync call
_BtreeDispatch ,Async
BRA.S @ret
@sync
_BtreeDispatch ; Btree Manager trap
@ret MOVEA.L (SP)+,A0 ; return address
ADDA.L #6,SP ; pop parameters
MOVE D0,(SP) ; stuff error code
JMP (A0) ; and return
ENDP
END