mirror of
https://github.com/elliotnunn/supermario.git
synced 2024-11-28 13:52:37 +00:00
102 lines
2.5 KiB
Plaintext
102 lines
2.5 KiB
Plaintext
|
;
|
||
|
; File: DataAccessCompletion.a
|
||
|
;
|
||
|
; Contains: Internal Data Access Manager completion routine. Stored in a 'proc' resource
|
||
|
; so it is never unlocked or purged.
|
||
|
;
|
||
|
; Written by: Jeff Miller
|
||
|
;
|
||
|
; Copyright: © 1990, 1992 by Apple Computer, Inc., all rights reserved.
|
||
|
;
|
||
|
; Change History (most recent first):
|
||
|
;
|
||
|
; <4> 3/13/92 JSM Renamed this file DataAccessCompletion.a from SnarfCompletion.a,
|
||
|
; keeping all the old revisions.
|
||
|
; <3> 3/4/91 dba dty: get rid of extraneous forROM and SysVers stuff and turn off
|
||
|
; debugging symbols
|
||
|
; <2> 6/10/90 JSM Just touch this file so SnarfMan.a.rsrc is rebuilt correctly.
|
||
|
; <1> 3/12/90 JSM First checked in.
|
||
|
;
|
||
|
|
||
|
TITLE 'DataAccessCompletion.a'
|
||
|
STRING ASIS
|
||
|
CASE OBJ
|
||
|
|
||
|
;
|
||
|
; Define DataAccessDebug to get MacsBug labels
|
||
|
;
|
||
|
|
||
|
; IF &TYPE('DataAccessDebug')='UNDEFINED' THEN
|
||
|
DataAccessDebug EQU 0
|
||
|
; ENDIF
|
||
|
|
||
|
; Includes
|
||
|
|
||
|
PRINT OFF
|
||
|
|
||
|
LOAD 'StandardEqu.d'
|
||
|
INCLUDE 'DatabaseAccess.a'
|
||
|
|
||
|
PRINT ON
|
||
|
|
||
|
;
|
||
|
; Partial structure for variables during asynchronous calls.
|
||
|
; Make sure this matches definition in DatabaseAccessPriv.h!
|
||
|
; We only reference the executing field, so we don't need anything past that.
|
||
|
;
|
||
|
|
||
|
asyncVars RECORD 0
|
||
|
next DS.L 1 ; next pb in list
|
||
|
pb DS.L 1 ; async pb passed in to routine
|
||
|
params DS.L 1 ; pointer to ddev parameters
|
||
|
currAction DS.W 1 ; current action - selector or kAllDone
|
||
|
executing DS.B 1 ; true if executing
|
||
|
ENDR
|
||
|
|
||
|
;
|
||
|
;
|
||
|
; Macro to put in debug symbols for MacsBug
|
||
|
;
|
||
|
IF DataAccessDebug THEN
|
||
|
MACRO
|
||
|
DoDebugSymbols &name
|
||
|
DC.B $80 + &LEN(&name), '&name'
|
||
|
DC.W $0000
|
||
|
ENDM
|
||
|
ENDIF
|
||
|
|
||
|
;===============================================================================
|
||
|
;
|
||
|
; void DataAccessCR(); - Completion routine for asynchronous calls.
|
||
|
; On entry, A0 points to async parameter block
|
||
|
; in global list.
|
||
|
;
|
||
|
;===============================================================================
|
||
|
|
||
|
DataAccessCR PROC EXPORT
|
||
|
|
||
|
lEntry
|
||
|
MOVEM.L A0-A1, -(A7) ; save registers
|
||
|
|
||
|
WITH DBAsyncParamBlockRec
|
||
|
MOVE.L reserved(A0), A1 ; A1 = async variables
|
||
|
ENDWITH ; DBAsyncParamBlockRec
|
||
|
|
||
|
lDone ; tell DBIdle to process result
|
||
|
|
||
|
WITH asyncVars
|
||
|
MOVE.B #0, executing(A1) ; executing = false
|
||
|
ENDWITH ; asyncVars
|
||
|
|
||
|
MOVEM.L (A7)+, A0-A1 ; restore registers
|
||
|
MOVEQ #noErr, D0 ; just for completeness
|
||
|
RTS
|
||
|
|
||
|
IF DataAccessDebug THEN
|
||
|
DoDebugSymbols DataAccessCR ; label for MacsBug
|
||
|
ENDIF
|
||
|
|
||
|
ENDPROC ; end of DataAccessManCR
|
||
|
|
||
|
END
|