aubrey@val.UUCP (Aubrey McIntosh) (06/10/89)
As I understand things, the construct VAR <name> [<address>] : <type>; is generally put into the language to support (memory mapped) IO. I was pulling together a presentation for our group meeting about how nifty M2 is, when it struck me that to directly access some physical device on, say, an IBM-AT, I don't have a clean way of defining something like: clockstuff [ IO300 ] : RECORD (* ^^ --- some implementation detail. *) status: CARDINAL; count : CARDINAL; otherstuff : <other types>; END; Usually, I don't want to muck about with language definitions, but rather to find some way in the definition to do what I want. I generally think of the Logitech `extension' suggested by: VAR uirq [ 0:180H ]: PROC; as not being an extension so much as an implementation detail. So I would want references to clockstuff.count to generate the instructions of the form : in ax, 302 out ax, 302 1) Do you implementor-aspirants have preferred ways to recommend? 2) Do we (gasp! shudder!) believe the definition should be mucked with? 3) Do people object to the v1 [ Segment: Offset ] : <type> form in use in several compilers not (no motorola-intel flames, please, I Get Paid to do Intel no matter my preference.) 4) Does anyone defend the SYSTEM.PORTIN( count, 302H ); type of approach? -- 1-(512)-346-5781 (v) Using Modula-2. Austin, TX 78759 ...!cs.utexas.edu![dell|oakhill|kvue]!val!aubrey