Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ut-dillo.UUCP Path: utzoo!watmath!clyde!bonnie!akgua!gatech!ut-sally!ut-ngp!ut-dillo!darin From: darin@ut-dillo.UUCP (Darin Adler) Newsgroups: net.sources.mac Subject: Source code for TMON Extended User Area (part 6 of 7) Message-ID: <236@ut-dillo.UUCP> Date: Sun, 8-Dec-85 14:38:37 EST Article-I.D.: ut-dillo.236 Posted: Sun Dec 8 14:38:37 1985 Date-Received: Tue, 10-Dec-85 05:24:48 EST Distribution: net Organization: UTexas Computation Center, Austin, Texas Lines: 687 This is part 6 of the source code to the Extended User Area. # This is a shell archive. # Remove everything above and including the cut line. # Then run the rest of the file through sh. -----cut here-----cut here-----cut here-----cut here----- #!/bin/sh # shar: Shell Archiver # Run the following text with /bin/sh to create: # EUA.Asm.6 # This archive created: Sun Dec 8 13:28:36 1985 # By: Darin Adler () echo shar: extracting EUA.Asm.6 '(17328 characters)' cat << \SHAR_EOF > EUA.Asm.6 DC.W BeginUpdate-ToolTraps ; 122 BeginUpdate DC.W EndUpdate-ToolTraps ; 123 EndUpdate DC.W 0 ; 124 DC.W DragWindow-ToolTraps ; 125 DragWindow DC.W DragTheRgn-ToolTraps ; 126 DragTheRgn DC.W Rgn0-ToolTraps ; 127 InvalRgn DC.W Address0-ToolTraps ; 128 InvalRect DC.W Rgn0-ToolTraps ; 129 ValidRgn DC.W Address0-ToolTraps ; 12A ValidRect DC.W GrowWindow-ToolTraps ; 12B GrowWindow DC.W RAM0-ToolTraps ; 12C FindWindow DC.W Window0-ToolTraps ; 12D CloseWindow DC.W Window4-ToolTraps ; 12E SetWindowPic DC.W Window0-ToolTraps ; 12F GetWindowPic DC.W 0 ; 130 DC.W String0-ToolTraps ; 131 NewMenu DC.W Menu0-ToolTraps ; 132 DisposeMenu DC.W AppendMenu-ToolTraps ; 133 AppendMenu DC.W 0 ; 134 DC.W Menu2-ToolTraps ; 135 InsertMenu DCB.W $139-$136,0 ; 136-138 DC.W Menu2-ToolTraps ; 139 EnableItem DC.W Menu2-ToolTraps ; 13A DisableItem DC.W 0 ; 13B DC.W FullHandle0-ToolTraps ; 13C SetMenuBar DC.W 0 ; 13D DC.W 0 ; 13E DC.W GetItemIcon-ToolTraps ; 13F GetItemIcon DC.W Menu4-ToolTraps ; 140 SetItemIcon DC.W GetItemStyle-ToolTraps ; 141 GetItemStyle DC.W Menu4-ToolTraps ; 142 SetItemStyle DC.W GetItemMark-ToolTraps ; 143 GetItemMark DC.W Menu4-ToolTraps ; 144 SetItemMark DC.W Menu4-ToolTraps ; 145 CheckItem DC.W GetItem-ToolTraps ; 146 GetItem DC.W SetItem-ToolTraps ; 147 SetItem DC.W Menu0-ToolTraps ; 148 CalcMenuSize DC.W 0 ; 149 DC.W 0 ; 14A DC.W PlotIcon-ToolTraps ; 14B PlotIcon DC.W 0 ; 14C DC.W Menu4-ToolTraps ; 14D AddResMenu DC.W Rect4-ToolTraps ; 14E PinRect DC.W 0 ; 14F DC.W Menu0-ToolTraps ; 150 CountMItems DC.W Menu6-ToolTraps ; 151 InsertResMenu DC.W 0 ; 152 DC.W 0 ; 153 DC.W NewControl-ToolTraps ; 154 NewControl DC.W Control0-ToolTraps ; 155 DisposeControl DC.W Window0-ToolTraps ; 156 KillControls DC.W Control0-ToolTraps ; 157 ShowControl DC.W FullHandle0-ToolTraps ; 158 HideControl DC.W Control4-ToolTraps ; 159 MoveControl DC.W Control0-ToolTraps ; 15A GetCRefCon DC.W Control4-ToolTraps ; 15B SetCRefCon DC.W Control4-ToolTraps ; 15C SizeControl DC.W Control2-ToolTraps ; 15D HiliteControl DC.W GetCTitle-ToolTraps ; 15E GetCTitle DC.W SetCTitle-ToolTraps ; 15F SetCTitle DC.W Control0-ToolTraps ; 160 GetCtlValue DC.W Control0-ToolTraps ; 161 GetCtlMin DC.W Control0-ToolTraps ; 162 GetCtlMax DC.W Control2-ToolTraps ; 163 SetCtlValue DC.W Control2-ToolTraps ; 164 SetCtlMin DC.W Control2-ToolTraps ; 165 SetCtlMax DC.W Control4-ToolTraps ; 166 TestControl DC.W DragControl-ToolTraps ; 167 DragControl DC.W Control8-ToolTraps ; 168 TrackControl DC.W Window0-ToolTraps ; 169 DrawControls DC.W Control0-ToolTraps ; 16A GetCtlAction DC.W Control4-ToolTraps ; 16B SetCtlAction DC.W FindControl-ToolTraps ; 16C FindControl DC.W 0 ; 16D DC.W Dequeue-ToolTraps ; 16E Dequeue DC.W Enqueue-ToolTraps ; 16F Enqueue DC.W RAM0-ToolTraps ; 170 GetNextEvent DC.W RAM0-ToolTraps ; 171 EventAvail DC.W RAM0-ToolTraps ; 172 GetMouse DCB.W $176-$173,0 ; 173-175 DC.W RAM0-ToolTraps ; 176 GetKeys DCB.W $17B-$177,0 ; 177-17A DC.W Proc0-ToolTraps ; 17B InitDialogs DC.W GetNewDialog-ToolTraps ; 17C GetNewDialog DC.W NewDialog-ToolTraps ; 17D NewDialog DC.W Dialog6-ToolTraps ; 17E SelIText DC.W Address0-ToolTraps ; 17F IsDialogEvent DC.W DialogSelect-ToolTraps ; 180 DialogSelect DC.W Dialog0-ToolTraps ; 181 DrawDialog DC.W Dialog0-ToolTraps ; 182 CloseDialog DC.W DisposDialog-ToolTraps ; 183 DisposDialog DC.W 0 ; 184 DC.W Proc0-ToolTraps ; 185 Alert DC.W Proc0-ToolTraps ; 186 StopAlert DC.W Proc0-ToolTraps ; 187 NoteAlert DC.W Proc0-ToolTraps ; 188 CautionAlert DC.W 0 ; 189 DC.W 0 ; 18A DC.W ParamText-ToolTraps ; 18B ParamText DC.W Proc0-ToolTraps ; 18C ErrorSound DC.W GetDItem-ToolTraps ; 18D GetDItem DC.W SetDItem-ToolTraps ; 18E SetDItem DC.W SetIText-ToolTraps ; 18F SetIText DC.W GetIText-ToolTraps ; 190 GetIText DC.W ModalDialog-ToolTraps ; 191 ModalDialog DCB.W $19F-$192,0 ; 192-19E DC.W RAM2-ToolTraps ; 19F GetIndType DCB.W $1A8-$1A0,0 ; 1A0-1A7 DC.W GetResInfo-ToolTraps ; 1A8 GetResInfo DC.W String0-ToolTraps ; 1A9 SetResInfo DC.W 0 ; 1AA DC.W String0-ToolTraps ; 1AB AddResorce DCB.W $1B3-$1AC,0 ; 1AC-1B2 DC.W SystemClick-ToolTraps ; 1B3 SystemClick DCB.W $1BD-$1B4,0 ; 1B4-1BC DC.W GetNewWindow-ToolTraps ; 1BD GetNewWindow DC.W Window0-ToolTraps ; 1BE GetNewControl DCB.W $1C6-$1BF,0 ; 1BF-1C5 DC.W RAMA0-ToolTraps ; 1C6 Secs2Date DC.W RAMA0-ToolTraps ; 1C7 Date2Secs DCB.W $1CB-$1C8,0 ; 1C8-1CA DC.W TERec0-ToolTraps ; 1CB TEGetText DC.W 0 ; 1CC DC.W TERec0-ToolTraps ; 1CD TEDispose DC.W Rect2-ToolTraps ; 1CE TextBox DC.W TERec0-ToolTraps ; 1CF TESetText DC.W TERec0-ToolTraps ; 1D0 TECalText DC.W TERec0-ToolTraps ; 1D1 TESetSelect DC.W TENew-ToolTraps ; 1D2 TENew DC.W TEUpdate-ToolTraps ; 1D3 TEUpdate DC.W TERec0-ToolTraps ; 1D4 TEClick DC.W TERec0-ToolTraps ; 1D5 TECopy DC.W TERec0-ToolTraps ; 1D6 TECut DC.W TERec0-ToolTraps ; 1D7 TEDelete DC.W TERec0-ToolTraps ; 1D8 TEActivate DC.W TERec0-ToolTraps ; 1D9 TEDeactivate DC.W TERec0-ToolTraps ; 1DA TEIdle DC.W TERec0-ToolTraps ; 1DB TEPaste DC.W TERec0-ToolTraps ; 1DC TEKey DC.W TERec0-ToolTraps ; 1DD TEScroll DC.W TERec0-ToolTraps ; 1DE TEInsert DC.W TERec0-ToolTraps ; 1DF TESetJust DC.W Munger-ToolTraps ; 1E0 Munger DC.W FullHandleA0-ToolTraps ; 1E1 HandToHand DC.W PtrToXHand-ToolTraps ; 1E2 PtrToXHand DC.W PtrToHand-ToolTraps ; 1E3 PtrToHand DC.W HandAndHand-ToolTraps ; 1E4 HandAndHand DCB.W $1E9-$1E5,0 ; 1E5-1E8 DC.W DIPack-ToolTraps ; 1E9 Pack2 DC.W SFPack-ToolTraps ; 1EA Pack3 DC.W SANEPack-ToolTraps ; 1EB Pack4 DC.W ElemsPack-ToolTraps ; 1EC Pack5 DC.W IUPack-ToolTraps ; 1ED Pack6 DC.W BDPack-ToolTraps ; 1EE Pack7 DC.W PtrAndHand-ToolTraps ; 1EF PtrAndHand DC.W JTPC-ToolTraps ; 1F0 LoadSeg DC.W JT0-ToolTraps ; 1F1 UnloadSeg DC.W Launch-ToolTraps ; 1F2 Launch DC.W Chain-ToolTraps ; 1F3 Chain DC.W 0 ; 1F4 DC.W GetAppParms-ToolTraps ; 1F5 GetAppParms DCB.W $1FD-$1F6,0 ; 1F6-1FC DC.W GetScrap-ToolTraps ; 1FD GetScrap DC.W OddAddress0-ToolTraps ; 1FE PutScrap DC.W 0 ; 1FF ;############################# ;## ## ;## TMON patching section ## ;## ## ;############################# ;+------------------------------------------------+ ;| Find an area to patch in the main code of TMON | ;+------------------------------------------------+ ;| ;|ENTRY: FindInTMON ;| ;|IN: D0,D1 8 bytes to find in TMON's code ;| ;|OUT: Z set if found, clear if not found ;| A0' location of bytes in TMON code ;| ;|Destroys A0,A1. ;| FindInTMON MOVE.L TMONStart,A0 ;Start at the beginning of TMON. LEA A,A1 ;End at the beginning of the user area. @1 ADDQ #2,A0 ;(we can skip the WH at the beginning) CMP.L A0,A1 BLS.S NotFoundInTMON CMP.L (A0),D0 ;Found? BNE.S @1 CMP.L 4(A0),D1 ;Be sure that 8 bytes match. BNE.S @1 FoundInTMON RTS NotFoundInTMON MOVEQ #1,D0 ;To set the CC's to non-zero RTS SavedBytes EQU $C0 ;C0 bytes are saved after ScrnBase. SavedScreen LONG 0 ;This is the start of the saved screen. SaveMode DC 0 ;This is the screen saving mode. MenuTop DC 0 ;This is the row of the top of the TMON menu. MenuBottom DC 0 ;This is the row of the menu. SeeThroughPatch LEA A,A2 ;As usual, we like A2 pointing to the User Area. MOVEQ #3,D0 ;Three lines above TMON chars. MULU ScreenRow,D0 MOVE.W D0,MenuTop-A(A2) MOVE.W #19,D0 ;Twenty rows of the Menu Bar MULU ScreenRow,D0 ;Calculate the offset of the address of the start. MOVE.W D0,MenuBottom-A(A2) MOVE.L TMONStart,A4 ;($FC) is the start of TMON. MOVE.L 4(A4),A0 ;(4($FC)) is where a lot of info resides. MOVE.W (A0)+,D0 ;This is the actual user area size (not necessarily = AreaSize). LEA SavedBytes(A2),A3 ;The saved screen starts after the saved bytes. ADD.W D0,A3 MOVE.L A3,SavedScreen-A(A2) MOVE.W (A0)+,D1 ;This is the screen saving mode. MOVE.W D1,SaveMode-A(A2) TST.W D1 ;What is the screen mode? BNE.S NotFullScreen ;Now, we make the patch that allows the screen to be transparent, if screen saving is on full. ;This is the original routine we are patching: ;7607 MOVEQ #7,D3 ;20C1 @1 MOVE.L D1,(A0)+ ;20C1 MOVE.L D1,(A0)+ ;51CB FFF8 DBRA D3,@1 MOVE.L #$760720C1,D0 ;This is the first 4 bytes of the routine. MOVE.L #$20C151CB,D1 ;These are the next 4. BSR FindInTMON BNE.S @1 ;The patch routine is: ;4EB9 ???? ???? JSR ScreenPatch ;4E71 NOP ;4E71 NOP MOVE.W #$4EB9,(A0)+ LEA ScreenPatch,A1 ;Calculate the address for JSR MOVE.L A1,(A0)+ MOVE.L #$4E714E71,(A0)+ @1 NotFullScreen RTS ScreenPatch MOVE.L A0,A1 ;Let's calcuate an address. SUB.L ScrnBase,A1 ;Make an offset from the start of the screen. CMP.W MenuTop,A1 ;Check if it is above the menu. BLO.S NormalFill CMP.W MenuBottom,A1 ;Check if it is below the menu. BHS.S NormalFill BlackFill MOVEQ #$FFFFFFFF,D1 BRA.S FillLine WhiteFill MOVEQ #$00000000,D1 NormalFill CMP.L #$AFFFFFFF,D1 ;$AAAAAAAA>$AFFFFFFF<-$55555555 BMI.S ShowThrough ;Show through if it is A's or 5's FillLine MOVEQ #15,D3 ;This is the original fill routine @1 MOVE.L D1,(A0)+ DBRA D3,@1 RTS ShowThrough ADD.L SavedScreen,A1 ;Point to the saved screen. MOVEQ #15,D3 ;Allow the application to show through. @1 MOVE.L (A1)+,(A0)+ DBRA D3,@1 RTS DebuggerPatch ;This patch allows TMON to step through the _Debugger opcode. ;This is the original routine we are patching: ;0240 F9FF AND.W #$F9FF,D0 ;0C40 A9FF CMP.W #$A9FF,D0 MOVE.L #$0240F9FF,D0 ;This is the first 4 bytes of the routine. MOVE.L #$0C40A9FF,D1 ;These are the next 4. BSR FindInTMON BNE.S @1 ;The patch routine is: ;0240 F9FF AND.W #$F9FF,D0 ;0C40 FFFF CMP.W #$FFFF,D0 MOVE.B #$FF,6(A0) @1 RTS GetTrapAddressPatch ;This patch allows TMON to work with the original HyperDrive ;20 software (subsequently fixed by GCC) and some other software ;that patches _GetTrapAddress and does not preserve register A2. ;This is the recognition for the original routine: ;2F0A MOVE.L A2,-(A7) ;2602 MOVE.L D2,D3 ;7046 MOVEQ #GetTrapAddress,D0 ;A146 _GetTrapAddress MOVE.L #$2F0A2602,D0 ;This is the first 4 bytes of the recognizer routine. MOVE.L #$7046A146,D1 ;These are the next 4. BSR FindInTMON BNE.S @1 ;Changes go here: A2 to A3 ;0000: 2F0A MOVE.L A2,-(A7) ; 2F0B MOVE.L A3,-(A7) MOVE.W #$2F0B,$0000(A0) ;0008: 2448 MOVE.L A0,A2 ; 2648 MOVE.L A0,A3 MOVE.W #$2648,$0008(A0) ;0018: 4E92 JSR (A2) ;0018: 4E93 JSR (A3) MOVE.W #$4E93,$0018(A0) ;002A: 245F MOVE.L (A7)+,A2 ;002A: 265F MOVE.L (A7)+,A3 MOVE.W #$265F,$002A(A0) @1 RTS ;############################# ;## ## ;## Cursor fixing section ## ;## ## ;############################# FirstSaved EQU ScrnBase LastSaved EQU FirstSaved+SavedBytes SavedBase EQU ScrnBase-LastSaved(A3) SavedTemp EQU MTemp-LastSaved(A3) SavedRaw EQU RawMouse-LastSaved(A3) SavedMouse EQU Mouse-LastSaved(A3) SavedPin EQU CrsrPin-LastSaved(A3) CrsrPin. EQU CrsrPin+4 SavedPin. EQU CrsrPin.-LastSaved(A3) SavedRect EQU CrsrRect-LastSaved(A3) SavedCursor EQU TheCrsr-LastSaved(A3) SavedAddr EQU CrsrAddr-LastSaved(A3) SavedSave EQU CrsrSave-LastSaved(A3) SavedVis EQU CrsrVis-LastSaved(A3) SavedBusy EQU CrsrBusy-LastSaved(A3) SavedNew EQU CrsrNew-LastSaved(A3) SavedCouple EQU CrsrCouple-LastSaved(A3) SavedState EQU CrsrState-LastSaved(A3) SavedObscure EQU CrsrObscure-LastSaved(A3) SavedScale EQU CrsrScale-LastSaved(A3) SavedMask EQU MouseMask-LastSaved(A3) SavedOffset EQU MouseOffset-LastSaved(A3) ; ;This fixes up the way the cursor works in TMON. ; CursorEnter LEA A,A2 ;Point to A as usual. MOVE.L SavedScreen,A3 ;Point A3 to the saved cursor globals. TST.W SaveMode-A(A2) ;Check out save mode. BNE.S @1 TST.B SavedBusy ;If a cursor routine is executing, BNE.S @1 ;don't play with the cursor. TST.B SavedVis ;If the cursor was not visible, BEQ.S @1 ;don't play with it. TST.B SavedCouple ;If the cursor is not coupled, BEQ.S @1 ;don't play with it. MOVE.B #1,CrsrBusy ;Mark the cursor busy. LEA SavedRect,A0 ;Restore the old cursor rectangle. LEA CrsrRect,A1 MOVE.L (A0)+,(A1)+ MOVE.L (A0),(A1) MOVE.L SavedAddr,D1 ;Get the old cursor address. MOVE.L D1,D0 SUB.L ScrnBase,D0 ADD.L SavedScreen,D0 MOVE.L D0,CrsrAddr ;Modify it to point to the buffer. LEA SavedSave,A0 ;Get the saved bytes. LEA CrsrSave,A1 ;Into the real bytes. MOVE.L #4*16,D0 _BlockMove SUB.W #1,SavedState ;Subtract 1 to indicated Hiding. PEA @1 MOVE.L JShowCursor,-(SP) MOVE.L JHideCursor,-(SP) RTS @1 ST CrsrCouple ;Now, make sure the cursor can be used. MOVEQ #-1,D0 MOVE.L D0,MouseMask CLR.L MouseOffset RTS ;Continue with the Record routine. CursorExit LEA A,A2 ;Point to A as usual. MOVE.L SavedScreen,A3 ;Point A3 to the saved cursor globals. TST.W SaveMode-A(A2) ;Check out save mode. BNE @1 TST.B SavedBusy ;If a cursor routine is executing, BNE @1 ;don't play with the cursor. TST.B SavedCouple ;If the mouse is not coupled to the cursor, BEQ @1 ;don't move it. MOVE.B #1,CrsrBusy ;Mark the cursor busy. CLR.B CrsrVis ;Fix up some variables. MOVE.W SavedState,CrsrState MOVE.L SavedMask,MouseMask MOVE.L SavedOffset,MouseOffset LEA SavedPin,A0 ;Get the pin rectangle and the cursor. LEA CrsrPin,A1 MOVE.L #2*8+2*(2*16)+4,D0 _BlockMove MOVE.L RawMouse,D0 ;Get the current mouse address. BSR.S DoPinStuff MOVE.L D0,RawMouse ;Save it as Raw and Temp. MOVE.L D0,MTemp AND.L MouseMask,D0 ;Mask it. MOVE.L MouseOffset,D1 ;Offset it? BEQ.S @3 ADD.L D1,D0 ;yes. BSR.S DoPinStuff @3 MOVE.L D0,Mouse CLR.B CrsrNew CLR.B CrsrObscure TST.B SavedObscure ;If it was obscured, BEQ.S @4 SNE SavedVis ;pretend it was visible. @4 TST.B SavedVis ;Was it visible when we entered? BEQ.S @5 MOVE.L SavedScreen,ScrnBase ;Fake out the screen. CLR.W CrsrState ;(just to make sure) PEA @2 MOVE.L JShowCursor,-(SP) RTS @2 MOVE.B #1,CrsrBusy MOVE.L CrsrAddr,D0 ;Get the address of saved data. SUB.L ScrnBase,D0 ;Subtract the value of the screen. ADD.L SavedBase,D0 ;Add the value of the real screen. MOVE.L D0,CrsrAddr ;Set that address. @5 LEA MTemp,A0 ;Restore the variables. LEA SavedTemp,A1 ;Store over the saved variables. MOVE.L #SavedBytes-4,D0 ;Restore all but the ScrnBase. _BlockMove CLR.B SavedBusy CLR.B CrsrBusy @1 RTS DoPinStuff CMP.W left(A0),D0 ;This routine is copied out of the ROM BGE.S @1 MOVE.W left(A0),D0 @1 CMP.W right(A0),D0 BLE.S @2 MOVE.W right(A0),D0 SUBQ.W #1,D0 @2 SWAP D0 CMP.W top(A0),D0 BGE.S @3 MOVE.W top(A0),D0 @3 CMP.W bottom(A0),D0 BLE.S @4 MOVE.W bottom(A0),D0 SUBQ.W #1,D0 @4 SWAP D0 RTS ;##################### ;## ## ;## Odds and Ends ## ;## ## ;##################### ; ;The following makes the _Debugger trap work properly. ; Debugger EQU $1FF DebuggerInit MOVEQ #12,D0 _NewPtr,Sys MOVE.L A0,A1 MOVE.W #$4EF9,(A0)+ ;JMP ABS.L LEA DebuggerIntercept,A3 MOVE.L A3,(A0)+ MOVE.L A0,A2 MOVE.W #$4EF9,(A0)+ ;JMP ABS.L LEA UndefinedIntercept,A3 MOVE.L A3,(A0)+ MOVE.W #Debugger,D0 _GetTrapAddress MOVE.L A0,A3 MOVE.W #Debugger,D0 MOVE.L A1,A0 _SetTrapAddress MOVE.W #Debugger-1,D1 ;All traps except _Debugger FixUndefined MOVE.W D1,D0 _GetTrapAddress CMP.L A0,A3 ;Same as Debugger? BNE.S @1 MOVE.W D1,D0 MOVE.L A2,A0 _SetTrapAddress @1 DBRA D1,FixUndefined RTS DebuggerIntercept MOVE.W SR,-(SP) MOVEM.L A0/A1,-(SP) MOVE.L 10(SP),A0 CMP.L TMONStart,A0 BLO.S @1 LEA EndUserArea,A1 CMP.L A1,A0 BHS.S @1 MOVEM.L (SP)+,A0/A1 MOVE.W (SP)+,SR RTS @1 MOVEM.L (SP)+,A0/A1 TRAPMon '_Debugger' UndefinedIntercept MOVE.W SR,-(SP) MOVEM.L A0/A1,-(SP) MOVE.L 10(SP),A0 CMP.L TMONStart,A0 BLO.S @1 LEA EndUserArea,A1 CMP.L A1,A0 BHS.S @1 MOVEM.L (SP)+,A0/A1 MOVE.W (SP)+,SR RTS @1 MOVEM.L (SP)+,A0/A1 TRAPMon 'Undefined A-trap' ; ;The following makes Free Form sound work properly. ; VInstall EQU $33 FreeFormPatch MOVE.W #VInstall,D0 _GetTrapAddress CMP.W #$6D1A,$34(A0) ;If it is the correct BLT.S BNE.S DontPatchFreeForm MOVE.B #$60,$34(A0) ;Make it a BRA.S DontPatchFreeForm RTS ; ;The following allows the AppleTalk interface code to work properly. ; AppleTalkPatch MOVE.B #1,$E0 ;Don't ask. RTS ; ;The following saves MemTop so it is valid later. It seems Switcher likes ;to mess with it. ; SaveMemTop LEA RealMemTop,A0 MOVE.L MemTop,(A0) RTS RealMemTop LONG 0 ;################################## ;## ## ;## End of User Area (padding) ## ;## ## ;################################## DCB.B AreaSize+A-*,0 ;Fill out user area to a even multiple of 256 EndUserArea END SHAR_EOF if test 17328 -ne "`wc -c EUA.Asm.6`" then echo shar: error transmitting EUA.Asm.6 '(should have been 17328 characters)' fi # End of shell archive exit 0 -- Darin Adler {gatech,harvard,ihnp4,seismo}!ut-sally!ut-dillo!darin