Article View: rec.games.programmer
Article #193Re: TP or C ?
From: Chris Gray
Date: Sat, 25 Jul 1992 08:17
Date: Sat, 25 Jul 1992 08:17
30 lines
1178 bytes
1178 bytes
In article <!1hmlwg@lynx.unm.edu> iuzzolin@carina.unm.edu (Harold Iuzzolino)
writes:
>>Also, in C, I wanted to check a couple of bits at memory location 0400:0017.
>>All I did was:
>>
>>if(*((char *)0x04000017)&3) ...
>>
>>How would you do that in pascal?
>
>this is one way (there are others, as I can think of two more)
>
>var blah:longint absolute $0400:$0017;
>
>begin
> if blah=3 then InsertSpiffyProcedureNameHere; {Or whatever...}
>end.
And, if anyone in the universe cares, in Draco it would be:
if pretend(0x04000017, *char) & 3 ~= 0 then ...
or, since I prefer to use symbolic names:
byte DeviceRegister @ 0x04000017;
...
if DeviceRegister & 0x03 ~= 0 then ...
--
Chris Gray alberta!ami-cg!cg or cg%ami-cg@CS.UAlberta.CA
Technical Details
Message-ID:
<cg.0aol@ami-cg.UUCP>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!ami-cg!cgReferences:
<!1hmlwg@lynx.unm.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!gumby!destroyer!ubc-cs!unixg.ubc.ca!kakwa.ucs.ualberta.ca!ami-cg!cg From: cg@ami-cg.UUCP (Chris Gray) Newsgroups: rec.games.programmer Subject: Re: TP or C ? Distribution: world Message-ID: <cg.0aol@ami-cg.UUCP> References: <!1hmlwg@lynx.unm.edu> Date: 25 Jul 92 01:17:47 MST Organization: Not an Organization Lines: 30