mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-26 01:49:19 +00:00
64 lines
1.8 KiB
Plaintext
64 lines
1.8 KiB
Plaintext
;
|
|
; File: DataAccessPackEntry.a
|
|
;
|
|
; Contains: PACK 13 entry - Data Access Manager (stolen from MiscPatches.a)
|
|
;
|
|
; Written by: Tim Nichols
|
|
;
|
|
; Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
|
|
;
|
|
; This file is used in these builds: ROM
|
|
;
|
|
; Change History (most recent first):
|
|
;
|
|
; <1> 5/20/92 TN first checked in
|
|
;
|
|
; To Do:
|
|
;
|
|
|
|
LOAD 'StandardEqu.d'
|
|
INCLUDE 'DispatchHelperPriv.a'
|
|
INCLUDE 'DatabaseAccess.a'
|
|
|
|
;___________________________________________________________________________________
|
|
;
|
|
; PACK 13 entry - Data Access Manager
|
|
;
|
|
;___________________________________________________________________________________
|
|
|
|
Pack13 PROC EXPORT
|
|
|
|
Pack13Handle EQU App2Packs+20
|
|
Pack13Globals EQU ExpandMemRec.emPack13Globals
|
|
|
|
;
|
|
; If this is not InitDBPack, check to make sure globals are allocated
|
|
;
|
|
TST.B D0 ; is this InitDBPack (selector 0)?
|
|
BEQ.S @globalsOK ; yes, go for it
|
|
|
|
MOVE.L ExpandMem, A0 ; get expanded memory area
|
|
TST.L ExpandMemRec.emSnarfGlobals(A0) ; are globals allocated?
|
|
BEQ.S @noGlobals ; yes, so continue
|
|
|
|
;
|
|
; Set up for ProcHelper normally
|
|
;
|
|
@globalsOK MOVE.L Pack13Handle,A0 ; A0 = handle to PACK
|
|
MOVE.L ExpandMem, A1 ; A1 = expanded memory area
|
|
ADD.W #Pack13Globals,A1 ; A1 = pointer to PACK use count
|
|
_ProcHelper ; let ProcHelper take over
|
|
|
|
;
|
|
; Attempt to call Database Access Manager before InitDBPack
|
|
;
|
|
@noGlobals MOVE.L (SP)+,A0 ; get caller's return address
|
|
LSR.W #8,D0 ; D0.W = words of parameters
|
|
LSL.W #1,D0 ; D0.W = bytes of parameters
|
|
ADD.W D0,SP ; strip off parameters
|
|
MOVE.W #rcDBPackNotInited,(SP) ; return rcDBPackNotInited
|
|
JMP (A0) ; return to caller
|
|
|
|
ENDPROC ; Pack13Entry
|
|
|
|
END ; of file |