mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2024-12-28 16:31:01 +00:00
248 lines
5.6 KiB
Plaintext
248 lines
5.6 KiB
Plaintext
|
;__________________________________________________________________________________________________
|
|||
|
; File: BitEditPACK.a
|
|||
|
;
|
|||
|
; Contains: xxx put contents here xxx
|
|||
|
;
|
|||
|
; Written by: Craig Carper, Steve Horowitz, Rony Sebok
|
|||
|
;
|
|||
|
; Copyright: <09> 1989-1990 by Apple Computer, Inc., all rights reserved.
|
|||
|
;
|
|||
|
; Change History (most recent first):
|
|||
|
;
|
|||
|
; <1+> 1/22/90 JRM update to craig's latest version
|
|||
|
; <1.0> 8/3/89 CCH Adding to EASE for Big Bang build as PACK ID=1.
|
|||
|
;
|
|||
|
; To Do:
|
|||
|
;__________________________________________________________________________________________________
|
|||
|
|
|||
|
BLANKS ON
|
|||
|
STRING ASIS
|
|||
|
|
|||
|
PRINT OFF
|
|||
|
INCLUDE 'Traps.a'
|
|||
|
INCLUDE 'ToolEqu.a'
|
|||
|
INCLUDE 'QuickEqu.a'
|
|||
|
INCLUDE 'SysEqu.a'
|
|||
|
PRINT ON
|
|||
|
|
|||
|
PRINT OFF
|
|||
|
PRINT ON
|
|||
|
PRINT NOGEN
|
|||
|
|
|||
|
IMPORT BEActivate
|
|||
|
IMPORT BEBit
|
|||
|
IMPORT BEBitmap
|
|||
|
IMPORT BEPixmap
|
|||
|
IMPORT BEBounds
|
|||
|
IMPORT BEClear
|
|||
|
IMPORT BEErase
|
|||
|
IMPORT BEClick
|
|||
|
IMPORT BECopy
|
|||
|
IMPORT BECut
|
|||
|
IMPORT BEDispose
|
|||
|
IMPORT BEDraw
|
|||
|
IMPORT BEDrawBegin
|
|||
|
IMPORT BEDrawEnd
|
|||
|
IMPORT BEGetView
|
|||
|
IMPORT BEIdle
|
|||
|
IMPORT BEInvalRect
|
|||
|
IMPORT BELine
|
|||
|
IMPORT BELink
|
|||
|
IMPORT BENew
|
|||
|
IMPORT BEObject
|
|||
|
IMPORT BEOval
|
|||
|
IMPORT BEPaste
|
|||
|
IMPORT BEPtUnXForm
|
|||
|
IMPORT BEPtXForm
|
|||
|
IMPORT BERoundRect
|
|||
|
IMPORT BERect
|
|||
|
IMPORT BESelect
|
|||
|
IMPORT BESetSelect
|
|||
|
IMPORT BEUndoBegin
|
|||
|
IMPORT BEUndoEnd
|
|||
|
IMPORT BEKillSelection
|
|||
|
IMPORT BEPutSelection
|
|||
|
IMPORT BEUndo
|
|||
|
IMPORT BEUpdateRect
|
|||
|
IMPORT BEView
|
|||
|
IMPORT BEDoDraw
|
|||
|
IMPORT BEInSelection
|
|||
|
IMPORT BESelection
|
|||
|
IMPORT BENudge
|
|||
|
IMPORT BEFlip
|
|||
|
IMPORT BERotate
|
|||
|
IMPORT BEDuplicate
|
|||
|
IMPORT BEColor
|
|||
|
IMPORT BEPaintBucket
|
|||
|
|
|||
|
|
|||
|
BitEditPack MAIN EXPORT
|
|||
|
|
|||
|
args equ 0
|
|||
|
res equ 1
|
|||
|
|
|||
|
BRA.s @0
|
|||
|
|
|||
|
DC.W 0
|
|||
|
DC.B 'PACK'
|
|||
|
DC.W 1 ; id = 1
|
|||
|
DC.W 2 ; version 2
|
|||
|
|
|||
|
@0
|
|||
|
; string pascal
|
|||
|
; pea #'In BitEditPack'
|
|||
|
; _debugstr
|
|||
|
|
|||
|
lea BitEditPack,a0
|
|||
|
_RecoverHandle
|
|||
|
_HLock
|
|||
|
|
|||
|
lea 4(sp),a1 ; ptr to selector
|
|||
|
move.w d7,-(sp) ; save register
|
|||
|
move.w (a1)+,d7 ; get selector
|
|||
|
moveq #0,d0
|
|||
|
lea FrameSize,a0
|
|||
|
move.b res(a0,d7.w),d0 ; space for result
|
|||
|
sub.w d0,sp
|
|||
|
move.b args(a0,d7.w),d0 ; copy the args
|
|||
|
add.w d0,a1
|
|||
|
lsr #1,d0 ; number of words
|
|||
|
bra.s @2
|
|||
|
|
|||
|
@1 ; copy the arguments
|
|||
|
move.w -(a1),-(sp)
|
|||
|
@2
|
|||
|
dbra d0,@1
|
|||
|
|
|||
|
move.w BEStart(d7.w),d0
|
|||
|
|
|||
|
jsr BEStart(d0.w)
|
|||
|
|
|||
|
; string pascal
|
|||
|
; pea #'back from jsr'
|
|||
|
; _debugstr
|
|||
|
|
|||
|
|
|||
|
moveq #0,d0
|
|||
|
lea FrameSize,a0
|
|||
|
move.b res(a0,d7.w),d0 ; size of result
|
|||
|
move.w d0,d1
|
|||
|
add.b args(a0,d7.w),d1 ; size of args
|
|||
|
add.w #8,d1 ; 8 is size of saved d7.w, rtn addr and selector
|
|||
|
lea (sp,d1),a0
|
|||
|
sub.w #6,d1 ; sizeof saved d7.w and rtn addr
|
|||
|
sub.w d0,d1 ; sizeof result
|
|||
|
lsr #1,d0 ; number of words
|
|||
|
bra.s @4
|
|||
|
|
|||
|
@3 ; copy result
|
|||
|
move.w (sp)+,(a0)+
|
|||
|
@4
|
|||
|
dbra d0,@3
|
|||
|
move.w (sp)+,d7 ; restore register
|
|||
|
move.l (sp)+,a1 ; return addr
|
|||
|
add.w d1,sp
|
|||
|
|
|||
|
lea BitEditPack,a0
|
|||
|
_RecoverHandle
|
|||
|
_HUnlock
|
|||
|
|
|||
|
jmp (a1)
|
|||
|
|
|||
|
|
|||
|
BEStart
|
|||
|
DC.W BEActivate-BEStart
|
|||
|
DC.W BEBit-BEStart
|
|||
|
DC.W BEBitMap-BEStart
|
|||
|
DC.W BEPixMap-BEStart
|
|||
|
DC.W BEBounds-BEStart
|
|||
|
DC.W BEClear-BEStart
|
|||
|
DC.W BEClick-BEStart
|
|||
|
DC.W BEErase-BEStart
|
|||
|
DC.W BECopy-BEStart
|
|||
|
DC.W BECut-BEStart
|
|||
|
DC.W BEDispose-BEStart
|
|||
|
DC.W BEDraw-BEStart
|
|||
|
DC.W BEDrawBegin-BEStart
|
|||
|
DC.W BEDrawEnd-BEStart
|
|||
|
DC.W BEGetView-BEStart
|
|||
|
DC.W BEIdle-BEStart
|
|||
|
DC.W BEInvalRect-BEStart
|
|||
|
DC.W BELine-BEStart
|
|||
|
DC.W BELink-BEStart
|
|||
|
DC.W BENew-BEStart
|
|||
|
DC.W BEObject-BEStart
|
|||
|
DC.W BEOval-BEStart
|
|||
|
DC.W BEPaste-BEStart
|
|||
|
DC.W BEPtUnXForm-BEStart
|
|||
|
DC.W BEPtXForm-BEStart
|
|||
|
DC.W BERoundRect-BEStart
|
|||
|
DC.W BERect-BEStart
|
|||
|
DC.W BESelect-BEStart
|
|||
|
DC.W BESetSelect-BEStart
|
|||
|
DC.W BEUpdateRect-BEStart
|
|||
|
DC.W BEView-BEStart
|
|||
|
DC.W BEUndoBegin-BEStart
|
|||
|
DC.W BEUndoEnd-BEStart
|
|||
|
DC.W BEKillSelection-BEStart
|
|||
|
DC.W BEPutSelection-BEStart
|
|||
|
DC.W BEUndo-BEStart
|
|||
|
DC.W BEDoDraw-BEStart
|
|||
|
DC.W BEInSelection-BEStart
|
|||
|
DC.W BESelection-BEStart
|
|||
|
DC.W BENudge-BEStart
|
|||
|
DC.W BEFlip-BEStart
|
|||
|
DC.W BERotate-BEStart
|
|||
|
DC.W BEDuplicate-BEStart
|
|||
|
DC.W BEColor-BEStart
|
|||
|
DC.W BEPaintBucket-BEStart
|
|||
|
|
|||
|
FrameSize ; a table of the number of bytes of arguments and results
|
|||
|
dc.b 6, 0 ; BEActivate
|
|||
|
dc.b 8, 2 ; BEBit
|
|||
|
dc.b 8, 0 ; BEBitmap
|
|||
|
dc.b 8, 0 ; BEPixmap
|
|||
|
dc.b 8, 0 ; BEBounds
|
|||
|
dc.b 4, 0 ; BEClear
|
|||
|
dc.b 8, 0 ; BEClick
|
|||
|
dc.b 8, 0 ; BEErase
|
|||
|
dc.b 4, 0 ; BECopy
|
|||
|
dc.b 4, 0 ; BECut
|
|||
|
dc.b 4, 0 ; BEDispose
|
|||
|
dc.b 8, 0 ; BEDraw
|
|||
|
dc.b 4, 0 ; BEDrawBegin
|
|||
|
dc.b 4, 0 ; BEDrawEnd
|
|||
|
dc.b 8, 2 ; BEGetView
|
|||
|
dc.b 4, 0 ; BEIdle
|
|||
|
dc.b 8, 0 ; BEInvalRect
|
|||
|
dc.b 10, 0 ; BELine
|
|||
|
dc.b 8, 0 ; BELink
|
|||
|
dc.b 20,4 ; BENew
|
|||
|
dc.b 14,0 ; BEObject
|
|||
|
dc.b 10, 0 ; BEOval
|
|||
|
dc.b 4, 0 ; BEPaste
|
|||
|
dc.b 8, 0 ; BEPtUnXForm
|
|||
|
dc.b 8, 0 ; BEPtXForm
|
|||
|
dc.b 14,0 ; BERoundRect
|
|||
|
dc.b 10, 0 ; BERect
|
|||
|
dc.b 10, 0 ; BESelect
|
|||
|
dc.b 8, 0 ; BESetSelect
|
|||
|
dc.b 8, 0 ; BEUpdateRect
|
|||
|
dc.b 20,0 ; BEView
|
|||
|
dc.b 4, 0 ; BEUndoBegin
|
|||
|
dc.b 4, 0 ; BEUndoEnd
|
|||
|
dc.b 4, 0 ; BEKillSelection
|
|||
|
dc.b 4, 0 ; BEPutSelection
|
|||
|
dc.b 4, 0 ; BEUndo
|
|||
|
dc.b 6, 0 ; BEDoDraw
|
|||
|
dc.b 8, 2 ; BEInSelection
|
|||
|
dc.b 4, 2 ; BESelection
|
|||
|
dc.b 8, 2 ; BENudge
|
|||
|
dc.b 6, 0 ; BEFlip
|
|||
|
dc.b 4, 0 ; BERotate
|
|||
|
dc.b 8, 0 ; BEDuplicate
|
|||
|
dc.b 12, 0 ; BEColor
|
|||
|
dc.b 8, 0 ; BEPaintBucket
|
|||
|
|
|||
|
END
|