🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #831

Re: Topspeed

#831
From: Peter.M..Perchansky Peter M. Per...
Date: Wed, 13 Jun 1990 15:01
35 lines
2327 bytes
Hello Robert:

    The following is an example showing how you can specify what registers are used:

   (*# call(reg_param=>(es, si, bx)) *)
   PROCEDURE Func (c: CHAR; d: LONGCARD; p: ADDRESS);

   c will use bx, d uses the stack, and p uses DS:SI.

   You can also specify registers used for return values as well as what registers to save.

   The pragmas (compiler options) for calling conventions covers a lot of ground.  You can force near or far calls, set for same DS (load or do not load the data segment register (DS) on entry), use the C calling convention, do inline expansion of code, specify the segment name, specify DS on entry, supstitute an interrupt return instruction (IRET) instead of a normal return (RET), pass the size of open array parameterGs on the stack, specify that open array parameters are copied onto the stack as part of 






the procedure prolog, and specify that a given procedure can have a variable number of parameters (lets you create your own printf-like procedure).

   The above only covers the calling pragmas.  TopSpeed Modula-2 also has data pragmas, module pragmas, and so on.

   TopSpeed Modula-2 2.00 also features conditional compilation.  Very much like C's IFDEF.

   Although the documentation for 2.00 is poor (Neils Jensen stated they are getting the docs rewritten), and their are some minor bugs (Chris at JPI Tech Support stated they are currently working on the next release --- will be out shortly) --- 2.00 is a lot better than 1.17.

   The addition of CLASSes (objects), inheritance, and methods adds a lot to writing reusable code.

   JPI has also beefed up their library modules with 2.00.



--  
uucp: uunet!m2xenix!puddle!273!101!Peter.M..Perchansky
Internet: Peter.M..Perchansky@f101.n273.z1.fidonet.org
Technical Details
Message-ID: <5717.2677A5D3@puddle.fidonet.org>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!bellcore!rutgers!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!f101.n273.z1.fidonet.org!Peter.M..Perchansky

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!bellcore!rutgers!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!nosun!qiclab!m2xenix!puddle!f101.n273.z1.fidonet.org!Peter.M..Perchansky
From: Peter.M..Perchansky@f101.n273.z1.fidonet.org (Peter M. Perchansky)
Newsgroups: comp.lang.modula2
Subject: Re: Topspeed
Message-ID: <5717.2677A5D3@puddle.fidonet.org>
Date: 13 Jun 90 15:01:55 GMT
Sender: ufgate@puddle.fidonet.org (newsout1.26)
Organization: FidoNet node 1:273/101 - Schizophrenia, Fleetwood PA
Lines: 28