home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Otherware
/
Otherware_1_SB_Development.iso
/
mac
/
developm
/
scnote
/
scrnfkey.022
/
ScreenFKEY.a
< prev
next >
Wrap
Text File
|
1989-10-04
|
3KB
|
68 lines
;#############################################################################################
;
; Apple Macintosh Developer Technical Support
;
; FKEY6 : Saves the contents of the main Macintosh screen to a PICT file.
; Macintosh Developer Technical Support
;
; ScreenFKEY.a
;
; Copyright ⌐ 1989 Apple Computer, Inc.
; All rights reserved.
;
; Versions:
; 1.00 10/89
;
; Components:
; ScreenFKEY.p October 1, 1989
; ScreenFKEY.a October 1, 1989
; ScreenFKEY.make October 1, 1989
;
; ScreenFKEY is a basic example on how to spool a PICT file to disk by replacing the
; bottleneck PutPICProc, it saves the contents of the screen to a file. The FKEY creates
; ten files Screen 0 through Screen 9; it is necessary to erase or rename old files when
; the limit is reached.
;
; This FKEY works in any Macintosh computer and saves the screen regardless of the
; setting of the screen; to use, it has to be added to the System file using ResEdit.
;
;#############################################################################################
BLANKS ON
STRING ASIS
LocalSize EQU 0 ; no locals in this sample
; this is the header stuff for the FKEY
; its only function to call the main Pascal routine that does the work
; A FKEY resource is basically a 'CODE' resource with no parameters
; with ID the number equal to the numerical key it is supposed to responde to.
;
FKEY6 MAIN EXPORT
IMPORT PICTOut ; the real thing
Funkey6
BRA.S @0 ; skip around header
; For arcane reasons we keep using the following header
DC.W 0 ; flags word
DC.B 'FKEY' ; I am an FKEY resource
DC.W 6 ; whose ID is 6:
DC.W 0 ; Does someone care?
@0 LINK A6,#LocalSize ; stack locals
MOVEM.L D0-D7/A0-A5,-(SP) ; save all regs
JSR PICTOut ; Go do your stuff
MOVEM.L (SP)+,D0-D7/A0-A5
UNLK A6
RTS
END