🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.modula2
Article #4873

IO ports on 80x86

#4873
From: Aubrey McIntosh
Date: Sat, 10 Jun 1989 00:06
41 lines
2010 bytes
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
Technical Details
Message-ID: <346@val.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!oakhill!val!aubrey

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!oakhill!val!aubrey
From: aubrey@val.UUCP (Aubrey McIntosh)
Newsgroups: comp.lang.modula2
Subject: IO ports on 80x86
Keywords: IO address space.
Message-ID: <346@val.UUCP>
Date: 10 Jun 89 00:06:37 GMT
Reply-To: aubrey@val.UUCP (Aubrey McIntosh)
Organization: Video Associates Labs - Austin, TX
Lines: 41