Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!orion.oac.uci.edu!ucivax!ucla-cs!ucla-seas!island!gerardo From: gerardo@island.seas.ucla.edu (Gerardo Chaves) Newsgroups: comp.sys.apple2 Subject: Re: One Byte Memory Reads Message-ID: <983@lee.SEAS.UCLA.EDU> Date: 23 Aug 90 02:07:29 GMT References: <900808130731.2020095d@CCC.NERSC.GOV> Sender: news@SEAS.UCLA.EDU Organization: SEASnet, University of California, Los Angeles Lines: 46 In article <900808130731.2020095d@CCC.NERSC.GOV> MORAGUES%CCV.MFENET@CCC.NERSC.GOV writes: <.... stuff deleted> > >I was wondering if there is a way to make the GS only do an 8-bit reference >while in native mode. I would appreciate sample code in TML pascal if >possible, ORCA Assembler or Pascal would also be appreciated. I don't have >the exact memory locations with me now, but if you want them, I can post it. > >Thanks in advance for your help > >Bob Moragues >MORAGUES@CCC.NERSC.GOV I'm not sure if this is what you need, but here is some source code in TML Pascal II, (should work with v 1.5 as well) that does just an 8 bit read in order to find out if the a button on the paddles has been pressed (the locations belong to the game port I believe)..: function butn(n:integer):boolean; {PROCEDURE TO CHECK FOR BUTTONS/APPLE KEYS} var p:ptr; i:integer; begin butn:=false; if (n>-1) and (n<4) then begin case n of 0:p:=pointer($C061); 1:p:=pointer($C062); 2:p:=pointer($C063); 3:p:=pointer($C060); end; i:=p^[1]; {this assignment alone does the access to only 8 bits} if (i<0) then butn:=true; end; end; Hopefully this will work for you. Vince Cooper helped me with that p^[1] deal. Gerardo Chaves Programmer, U.C.L.A. Intervention Program gerardo@island.seas.ucla.edu