Jan 89 Letters
Volume Number: 5
Issue Number: 1
Column Tag: Letters
Letters
By David E. Smith, Editor & Publisher, MacTutor
Overriding ROM Resources
Ronny Zulaikha
Sydney, Australia
When Apple upgraded to the 128K ROM, some of the extra space was filled with
ROM resources that were previously only held in the system file. This saves time in
that these resources aren’t loaded from the system file when needed, and saves space in
that RAM isn’t taken up by them.
If one is designing a resource that is to replace one in the ROM, merely placing
the new resource in the system file is not sufficient. As described in IM IV-20, one
needs an ‘ROvr’ resource ID 0, which my system file (4.3) already had. This resource
startup scans the system file for ‘ROv#’ resources of any ID, which indicates what
resources to override. The first word of a ‘ROv#’ resource is the version number of
ROM to override, and is $75 for the 128K ROM. For the SE and Mac II, it would be
reasonable to assume that the version numbers listed in IM V-xvii would apply, $76
and $78 respectively. In fact, the routine in the ‘ROvr’ resource checks against the
version word at location 8 higher than the start of the ROM. The high order byte is 0
for the 128K ROM, 1 for the Mac II and 2 for the SE, while the low order byte is the
ROM version number. Putting this together, we get $276 for SE and $178 for the Mac
II
Optimized String Comparisons
John S. Stokes III
San Diego, CA
My routine to compare two Pascal strings uses substantially less code than the
“optimized” routine published in Donald Koscheka’s HyperChat column in November,
1988 issue of MacTutor. In my routine, the Pascal string length fields are compared as
just another character in the comparison loop instead of separately.
;1
A0 --> Pascal string 1
A1 --> Pascal string 2
D0 <-- 0 if false, 1 if true
D1 <-- work
CompareString Moveq #0,D0 ; initialize flase return code
Move.B (A0),D1 ; length of the first string
Ext.W D1 ; dbra uses word
@10 Cmp.B (A0)+,(A1)+ ; match?
Bne.S @900 ; no
Dbra D1,@10 ; yes, continue
Moveq #1,D0 ; set return code to true
@900 Rts ; return
NOTE: See Mar 89 Letters for bug fix and comments about this code.
Power Supply Board
David B. Lamkins
Canton, MA
Thanks to MacTutor, my Mac is alive and well at minimal expense following a
sudden failure of the power supply board. Over a period of a couple weeks, under light
use, my screen went from an occasional “blink” (accompanied by a snapping sound) to
a thin vertical line. I recalled that there was a discussion of these symptoms in
Mactutor, and found a detailed description of the problem and its cure in the June and
July 1987 issues.
I’d like to shed some additional light on the subject, since I suspect that many
owners of older Macs will face the same problem eventually. The Macintosh power
supply board (which also provides the circuitry to operate the display) contains a
wide range of parts, from integrated circuits to high-power components. It is tricky
to solder the full range of these components on a wave solder machine --too little heat
and the leads of the large components don’t get properly soldered, too much heat and the
delicate components get fried.
I found a crack around J1 pin 4, just as indicated in the earlier articles, and
signs of developing cracks around the other pins of J1. I removed the old solder with a
solder bulb and carefully resoldered all four pins. What surprised me was that I found
that NO solder had flowed between the pins and the(I’m assuming --too late to check)
plated through holes in the PC board. Thus, the contact area was limited to a very thin