Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!samsung!uakari.primate.wisc.edu!uwm.edu!uwvax!umn-d-ub!umn-cs!bungia!orbit!marilyn!shawn From: shawn@marilyn.UUCP (Shawn P. Stanley) Newsgroups: comp.sys.apple Subject: Re: Reading the 80 column screen Message-ID: <11@marilyn.UUCP> Date: 8 Nov 89 13:25:04 GMT References: <1989Nov3.044252.8555@polyslo.CalPoly.EDU> Reply-To: shawn@marilyn.UUCP (Shawn P. Stanley) Organization: Litfal Lines: 25 In article <1989Nov3.044252.8555@polyslo.CalPoly.EDU> jearls@polyslo.CalPoly.EDU writes: >Does anyone have any (8-bit) source for reading a specific character off >of the 80-column screen? Assembly or C or Pascal will do, just so I get >an idea of what is needed... Use a routine called BASCALC at $FBC1 to get the line address into $28-$29. Do this by loading the line number into the A-register before calling $FBC1. If the horizontal position is odd (I believe; maybe it's even), add 4 to location $29. Then, divide the horizontal position by two and load with Y-register indirectly through $28-$29: SPEEK phy ldy CV jsr BASCALC lda CH lsr A tay bcc S1 clc lda #4 adc $29 sta $29 S1 lda ($28),y ply rts