******************************************************************************* * * DAInterface for Pascal * * (C) Copyright Apple Computer, Inc. 1988-93 * All rights reserved. * * by Jim Mensch * 5/31/89 * ******************************************************************************* * * Modification History: * * Version 1.0 Mensch (System 6.0) * * Version 1.1 Lyons (System 6.0.1) * * 19-Jan-93 DAL -- Added a label in the menu line. * * ******************************************************************************* INCLUDE 'All.macros' ;============================================================================== ; ; Imports from the PASCAL portion of the DA. This will be the addresses of the ; actual routines that you call. ; Import ReallyOpen ; PROCEDURE ReallyOpen; Import ReallyClose ; PROCEDURE ReallyInit; Import ReallyAction ; PROCEDURE ReallyAction; Import ReallyInit ; PROCEDURE ReallyClose; Import aGlobal Import IdleWind ; IdleWind : GrafPortPtr; Import QuitFlag ; quitflag : Integer; Import eventP ; eventP : EventRecordPtr; Import actionCode ; ActionCode:Integer; period equ $0010 Mask equ $0FFF ; use $0FF7 for debug $0FFF for real EJECT ******************************************************************************* * BEGINDA PROC Export * * Description: This is the standard DA header for use with Pascal type DA's * * * Inputs: None * * Outputs: None * * External Refs: * * Entry Points: * ******************************************************************************* Import DAOpen Import DAClose Import DAAction Import DAInit export ffMenuItemID dc.L DAOpen dc.L DAClose dc.L DAAction dc.L DAInit dc.W period dc.W Mask dc.B ' Find File \H' ffMenuItemID dc.b '**',0 ;removed 18 blanks (19-Jan-93 DAL) EndP EJECT ******************************************************************************* * DAOpen PROC * * Description: Called when an open is requested by the desk mgr. * * * Inputs: None * * Outputs: None * * External Refs: * * Entry Points: * ******************************************************************************* oldDataBank equ 1 theRTL equ oldDataBank+1 theResult equ theRTL+3 phb ; save the old data bank pea IdleWind>>8 ; push the address of our databank on the stack plb plb ; set as the current data bank! jsl ReallyOpen ; call the pascal open routine lda idleWind ; return the opened window ptr sta theResult,s lda idleWind+2 sta theResult+2,s plb ; restore the databank RTL EndP EJECT ******************************************************************************* * DAClose PROC * * Description: Called in response to a DA close from the desk mgr * * * Inputs: None * * Outputs: None * * External Refs: * * Entry Points: * ******************************************************************************* phb ; save the old data bank pea IdleWind>>8 ; push the address of our databank on the stack plb plb ; set as the current data bank! jsl ReallyClose ; call the pascal open routine plb ; restore the databank RTL EndP EJECT ******************************************************************************* * DAAction PROC * * Description: Called in response to an Action or RUN event * * * Inputs: None * * Outputs: None * * External Refs: * * Entry Points: * ******************************************************************************* phb ; save the old data bank pea IdleWind>>8 ; push the address of our databank on the stack plb plb ; set as the current data bank! sta actionCode ; save the actionCode stx eventP ; and event pointers sty eventP+2 jsl ReallyAction ; call the pascal open routine lda quitFlag ; test the quit flag beq @continue Pushlong IdleWind ; close the DA _CloseNDAByWinPtr @continue lda actionCode ; return in boolean flag plb ; restore the databank RTL EndP EJECT ******************************************************************************* * DAInit PROC * * Description: Called on Desk manager startup * * * Inputs: None * * Outputs: None * * External Refs: * * Entry Points: * ******************************************************************************* phb ; save the old data bank pea IdleWind>>8 ; push the address of our databank on the stack plb plb ; set as the current data bank! sta ActionCode ; save the flag jsl ReallyInit ; call the pascal open routine plb ; restore the databank RTL EndP END