🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2803

Re: TopSpeed and assembler

#2803
From: Peter Moylan
Date: Mon, 11 Sep 1995 01:46
46 lines
1958 bytes
Mark Morgan Lloyd (mark_tbu@cix.compulink.co.uk) wrote:
>I've floated the problem past an ex-Clarion friend, and have some 
>hand-written notes as below:

>-----8<-----

>Put something like the following in your .PR file:

>#if optimise(cpu) = '86' #then
>  #pragma define(cpu86=>on, cpu286=>off, cpu386=>off, cpu486=>off)
>#elsif optimise(cpu) = '286' #then
>  #pragma define(cpu86=>off, cpu286=>on, cpu386=>off, cpu486=>off)
>#elsif optimise(cpu) = '386' #then

>        you get the idea?
>        
>You then test like:

>(*%T cpu386 *)
>        bt      [memory],6
>(*%F *)

>A good place to put this code if you want to use it a lot is just before 
>the Project Link section in TSPRJ.TXT. Then use TSCFG to build the CFG 
>file.   

From the same source (I think), here's a further improvement on
the above idea.  Put all the above "#if optimise" stuff into a
file called model.pi.  Then in your TSPRJ.TXT put the following
lines:

	#if #exists "model.pi" #then
	 #include "model.pi"
	#endif

The virtue of this approach is that you have to run TSCFG.EXE
only once, and you can subsequently fiddle around with the
MODEL.PI file to your heart's content.

This still doesn't give a solution that completely avoids
modifying project files.  However, it looks like the best we
can do.

--
Peter Moylan                       peter@ee.newcastle.edu.au
                           file://ee.newcastle.edu.au/pub/www/Moylan.html
Technical Details
Message-ID: <4304ec$m9h@seagoon.newcastle.edu.au>
Path: arc1-ca.pugleaf.net!fourier.newcastle.edu.au!peter
References: <809443163snz@nezumi.demon.co.uk> <DE6v4z.3FI@cix.compulink.co.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fourier.newcastle.edu.au!peter
From: peter@fourier.newcastle.edu.au (Peter Moylan)
Newsgroups: comp.lang.modula2
Subject: Re: TopSpeed and assembler
Date: 11 Sep 1995 01:46:52 GMT
Organization: The University of Newcastle
Message-ID: <4304ec$m9h@seagoon.newcastle.edu.au>
References: <809443163snz@nezumi.demon.co.uk> <DE6v4z.3FI@cix.compulink.co.uk>
Reply-To: peter@tesla.newcastle.edu.au
NNTP-Posting-Host: fourier.newcastle.edu.au
X-Newsreader: TIN [version 1.2 PL2]