🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #16766

Lightspeed C and A4

#16766
From: clubmac
Date: Mon, 08 Jun 1987 14:04
44 lines
1848 bytes
> From: betz@runx.ips.oz (Andrew Betzis)
>     
> Has anyone had experience with LSC's DAs and the SFGetFile filter proc.
> LSC, when compiling DAs, uses register A4 from global addressing, but when
> SFGetFile calls your filter function, then register A4 is corrupted and thus
> no global data is accessable.
> To get around this problem I have saved A4 ( using the asm{} directive) in
> a low memory global (saved contents of low memory global in DA's memory first)
> Then when the filter function is first entered, A4 is restored.
> 
> Is there at neater way to do this ?
>

ARGGH!!!

Use SetupA4() and RestoreA4() inside your filterproc....

myFilterProc(.....)
....
....
....
{
	SetUpA4();
	....
	....
	....
	RestoreA4();
	return(..);
}

I remember using this when writing my Teleport ][ DA, where I wanted to change
the "Open" button's title to "Run" whenever the user selected an application,
and reverted to "Open" when a folder was selected (this is a good idea, no?).

I'll send you a copy of my Lightspeed C source.

Jason Haines
Club President

Club Mac Macintosh Users Group, Sydney, Australia
Snail:     Box 213, Holme Building, Sydney University, NSW, 2006, Australia
ACSnet:    clubmac@runx.ips.oz	   ARPA:   clubmac%runx.ips.oz@seismo.css.gov
UUCP:{enea,hplabs,mcvax,prlb2,seismo,ubc-vision,ukc}!munnari!runx.ips.oz!clubmac
Technical Details
Message-ID: <948@runx.ips.oz>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!seismo!munnari!otc!metro!ipso!runx!clubmac

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!seismo!munnari!otc!metro!ipso!runx!clubmac
From: clubmac@runx.UUCP
Newsgroups: comp.sys.mac
Subject: Lightspeed C and A4
Message-ID: <948@runx.ips.oz>
Date: Mon, 8-Jun-87 10:04:52 EDT
Article-I.D.: runx.948
Posted: Mon Jun  8 10:04:52 1987
Date-Received: Mon, 15-Jun-87 06:03:06 EDT
Organization: RUNX Un*x Timeshare.  Sydney, Australia.
Lines: 43