🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #16073

Patch for Lightspeed Pascal

#16073
From: Richard Siegel
Date: Mon, 11 May 1987 17:12
77 lines
3125 bytes
In Lightspeed Pascal, there are two resources that tell which
areas of low memory are not shared between Lightspeed Pascal and
the current project; these locations are swapped back and forth
between LSP and your project whenever LSP does a context switch.
Resource QPRF 2 gives these locations if you
'are using the old 64K ROMs, and QPRF 3 gives the locations
if you're using the newer ROMs.

You can modify these resources, in order to save additional
low-memory globals. In my case, I had a program that
called SetResLoad(FALSE) before entering a loop, and
called SetResLoad(TRUE) after exiting. Problem was, I had
a minor bug inside the loop, and when my program failed,
LSP reported the error and promptly crashed; ResLoad was
false, so LSP couldn't get the resources it needed to properly
report the error and put the thumb at the bad line.

I fixed this problem by creating a ResEdit template to edit the
QPRF resources, and adding the address of ResLoad ($A5E) to the list.
Now things work nicely.

Anyway, since the patch is so small, here's the BinHex of it:

(This file must be converted with BinHex 4.0)



:%e&38NBRFb"KEQ3J9'9YF'aKG'8!2j!)!*!)!JNBC`#3"!%!N!-"XJ#3!l)!N!0

A!!#H!0S!X!%J"!C$B@jMC@`!N!@)!!i!Q!$&L!K6	v&38NBRFb"KEQ3J9'9YF'a

KG'8#!*!$2j!)!!!rN!J!N"LFbhNM!*!'!JN!!"d!$J"r!-@!!*!%@J!"!*!&3J"

`!&)!ZJ3#6dX!N!81!"!!2J#kL$TCEh8JC'mJEQpd)'KKGQ8JG'KP)'&MBf9cFb"

`FQPfD@aPCf9c)(4[)'p`C@iJG'KKG#"QEfaNCA)Z!*!$(3$#!3N!dJ&&!!!"!!!

"!*!$#J#3"M`"%!!)!6!!"!)J!!)#UJ!%!c`!"!3!"!!)!!!S#$3",!R@!!3*fJ#

+#Pi!!JTX!!`+K!"i$!!)!*!)1!%3!!J"-!!%!L!!!J+U!!3$2!!%"!!%!!J!!#J

)0!%X#GB!"!RD!)S+AJ!##Q`!$!U%!(J!N!Fb"5U3"8a69%)(3@4NFQ9cFdKA8N3

03RPdCA-JG'mJFf&fC84A8N3&+T!&6&0843!!!3#3!`'b!*!$XJ#3!eF!!6km!MB

!N!-F!&)!!9&38NB!!3!59%e36!#3!bS!!rrr"!#3"!%qc!!#rrm%!!"!!!%qb(8

D!*!&I!!"2M!%89"54Kr*!:


(You may have to take out the blank lines)

The TMPL resource should be pasted into ResEdit before you try
to edit the QPRF resources; the QPRF resources
are the ons I've patched to save ResLoad; they can be pasted intoh
Lightspeed Pascal.

If you want to modify the QPRF resources further, read chapter 14 of
the user's guide for LSP.

As always, mess around with a COPY of Lightspeed Pascal, and use LSP
for a bit to be sure that you didn't mess anything up.

	--Rich


Richard M. Siegel
R-Squared Development Systems
134 Horseshoe Drive
Williamsburg, Virginia 23185
(804) 229-2152 [After 6pm eastern time only]

Arpanet: rs4u@andrew.cmu.edu
Uucp: {your fave gateway}!seismo!andrew.cmu.edu!rs4u

Disclaimer? I don't even KNOW 'er!
Technical Details
Message-ID: <wUdUNfy00UhTzNs0FD@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!sri-spam!ames!ucbcad!ucbvax!ANDREW.CMU.EDU!rs4u#

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!columbia!rutgers!sri-spam!ames!ucbcad!ucbvax!ANDREW.CMU.EDU!rs4u#
From: rs4u#@ANDREW.CMU.EDU (Richard Siegel)
Newsgroups: comp.sys.mac
Subject: Patch for Lightspeed Pascal
Message-ID: <wUdUNfy00UhTzNs0FD@andrew.cmu.edu>
Date: Mon, 11-May-87 13:12:11 EDT
Article-I.D.: andrew.wUdUNfy00UhTzNs0FD
Posted: Mon May 11 13:12:11 1987
Date-Received: Wed, 13-May-87 07:21:31 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 77