mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2024-11-19 03:06:49 +00:00
4325cdcc78
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.
51 lines
1.3 KiB
Plaintext
51 lines
1.3 KiB
Plaintext
;EASE$$$ READ ONLY COPY of file ÒSetProcessorLevel.aÓ
|
|
; 1.1 CCH 11/10/1988 Fixed Header.
|
|
; 1.0 CCH 11/ 9/1988 Adding to EASE.
|
|
; OLD REVISIONS BELOW
|
|
; 1.0 EMT 3/22/88 First time adding Notification Manager sources
|
|
; END EASE MODIFICATION HISTORY
|
|
;_______________________________________________________________________
|
|
; SetProcessorLevel.a
|
|
;
|
|
; by Ed Tecot
|
|
; Copyright 1987 Apple Computer, Inc.
|
|
;
|
|
; This file contains two short routines which enable the processor state
|
|
; modified from C.
|
|
;
|
|
; Code by Erich Ringewald.
|
|
; Color Commentary by Ed Tecot
|
|
;_______________________________________________________________________
|
|
|
|
CASE OBJ
|
|
STRING ASIS
|
|
|
|
; disable()
|
|
; Disables all interrupts by setting the processor state to level 7.
|
|
; Returns the current level.
|
|
disable PROC EXPORT
|
|
|
|
MOVEQ #0, D0
|
|
MOVE SR, D0 ; Get status register
|
|
LSR #8, D0 ; Shift priority into low byte
|
|
AND #7, D0 ; Mask out trace/supervisor
|
|
ORI #$0700, SR ; Force processor to level 7
|
|
RTS
|
|
|
|
ENDPROC
|
|
|
|
; spl(level)
|
|
; Sets the processor level to its argument.
|
|
spl PROC EXPORT
|
|
|
|
MOVE SR, D0 ; Get status register
|
|
MOVE 6(SP), D1 ; Get desired level
|
|
LSL #8, D1 ; Put it into high byte
|
|
AND #$F8FF, D0 ; Mask out level bytes in SR copy
|
|
OR D1, D0 ; And put ours in
|
|
MOVE D0, SR ; And set the SR
|
|
RTS
|
|
|
|
ENDPROC
|
|
END
|