🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #2696

Re: TopSpeed and assembler

#2696
From: Peter Moylan
Date: Thu, 10 Aug 1995 00:35
45 lines
2634 bytes
Marco van de Voort (Marco.van.de.Voort@p18.f402.n284.z2.fidonet.org) wrote:

[In reference to TopSpeed Assembler:]

>Question : how can I select on the CpuId pragma in the assembler part of a module?

>I need it, because testing of a bitset (IF 5 IN BITSET THEN..) is done with the instruction BT when compiling 386+. The 8086 equivalent is several(>6) instructions long.

>So I want to do something like this :

>(*%T CpuId 3 *)         (* suppose 3= 386 and higher *)
>bt [memory],6
>(*%E*)

I'd like to do this too, but I've never managed to find a way to
do it.  I've looked through quite a lot of the TopSpeed run-time
library sources, and so far I can't find any example of code that
depends on the processor model.  In fact, I conjecture that no
such examples exist, for the following reason: since the run-time
library sources are a separately-priced option, most TopSpeed
users don't have access to them.  What they have instead is a
number of different object library files, with a different library
needed for each combination of pragma settings.  In practice
TopSpeed delivers different libraries for the different memory
models, but they don't give you separate libraries for different
CPU types.  That is, the linker doesn't look at the CPU ID when
deciding which library files to use.  It would be possible to do
this in principle, but then TopSpeed would have to deliver a much
larger set of object libraries, and clearly they've chosen not
to do this.

The conclusion seems to be that the CpuId setting IS used by the
compiler, but not by the linker; and that opens up the likelihood
that that particular pragma setting is also never looked at by
the assembler.  Certainly there's nothing about it in the assembler
documentation - although admittedly that doesn't prove much,
because the TopSpeed Assembler documentation is so cryptic that
you'd think it had been written by IBM.

Still ... if anyone has any information on this, please post it.
It would be very welcome.

--
Peter Moylan                       peter@ee.newcastle.edu.au
                           file://ee.newcastle.edu.au/pub/www/Moylan.html
Technical Details
Message-ID: <40bk8l$qgs@seagoon.newcastle.edu.au>
Path: arc1-ca.pugleaf.net!fourier.newcastle.edu.au!peter
References: <807534257.AA00869@puddle.fidonet.org>

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: 10 Aug 1995 00:35:33 GMT
Organization: The University of Newcastle
Message-ID: <40bk8l$qgs@seagoon.newcastle.edu.au>
References: <807534257.AA00869@puddle.fidonet.org>
Reply-To: peter@tesla.newcastle.edu.au
NNTP-Posting-Host: fourier.newcastle.edu.au
X-Newsreader: TIN [version 1.2 PL2]