[comp.sys.mac] Cache Hack DA

cosmos@druhi.UUCP (09/03/87)

Could some kind soul please send me (or post) the program that will disable
the I cache on the Mac II, thereby allowing more programs to work on it.  I
believe it was in the form of a DA and was public/shareware.
Thanks,
Ron
{ihnp4}!druhi!cosmos

dlt@csun.UUCP (Dave Thompson) (09/03/87)

I would also be interested in receiving a program/da that disables the ram
cache on the Mac II.

Thanks,
	Dave

-- 
Dave Thompson		     uucp:   {ihnp4|hplabs|psivax}!csun!dlt
CSUN Computer Center         phone:  (818) 885-2790
18111 Nordhoff Street, Northridge, CA 91330

cck@cunixc.columbia.edu (Charlie C. Kim) (09/04/87)

This was recently posted to the kermit mailing list in reponse to
problems with mac kermit.  

To: info-kermit@cu20b
Subject: Mac Kermit
--text follows this line--
MacKermit works on a Mac II; however, the Sumacc C compiler runtime
library does not.  Unfortunately, the current version of MacKermit is
built with the Sumacc C compiler.  The problem is the traps and calls
to various in-rom/ram packages on the Macintosh are built in-line, on
the stack as I remember, by the Sumacc C compiler runtime libraries.
This doesn't work too well on a 68020 based system like the Mac II
because the 68020 has an instruction cache.

If you are willing to live with a (moderate) performance degradation,
simply turn off the instruction cache with following MPW asm program:
		Machine MC68020
	nocache main
		clr.l d0
		movec d0,cacr
		rts
		ENDP
		end

Simply "restart" to turn the cache back on.

Charlie C. Kim
User Services
Columbia University

Here's the corresponding compiled program in binhex 4.0 format:
---------------- CUT HERE ----------------
(This file must be converted with BinHex 4.0)

:#@j[)'PMB@0SC3""8&"-2j!%!*!)!@qqk!#3"!%!N!-",!#3!b`!N!0$!4JQEJ!
@)'hkZL*Z!!J`%8'm(rrP3#K`!!!H&!*(!2m#H#i!!J#3!d&38%`rN!3!N!S*R`#
3"N&38%`rN!3!N"LG*p!U!*!'!@m"DN(ZrIBI%$mm!2p1V3&53qlqpR"!)YK63'l
k3QG"l[lf,`J[,J!12bi!$%KZrrj1Z[ib%"pR%MmZrri[,J!),bi!%NkY!(*J$%*
R,bi!##m,6Ud!FNcI')"1AL"Ih[`!%Nl3d&*23d968dm!N!3,SJ9J!!j19[cq)'i
!#%2Zr`#3""J!N!-S!!!#!*!%#!#3!b!!!$mm!!'Tm!#3!``!N!-"F!"1H`!#6R8
!!!%!N!-",!#3!b`!N!0$!!,Sk!AL!*!$(!!q!!"$6d4&!!%!#J!!rrmJ!*!)!3!
!&!!!(!!#k'`%6@&TE[M5!: