shawn@marilyn.UUCP (Shawn P. Stanley) (11/08/89)
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
shawn@marilyn.UUCP (Shawn P. Stanley) (11/08/89)
Oops, I'm sorry. That should be 'lda CV', not 'ldy CV'.
dlyons@Apple.COM (David Lyons) (11/15/89)
In article <11@marilyn.UUCP> shawn@marilyn.UUCP (Shawn P. Stanley) writes: >[...] >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: [code sample omitted] Adding $400 to the pointer will move you from main text page 1 ($0400-$07FF) to main text page 2 ($0800-$0BFF). This won't help a whole lot, since half the columns of the 80-column text screen are storedin *auxiliary* page 1, at $0400-$07FF in auxiliary memory ("bank 1"). If you're writing code for use on a GS only, you can address $01xxxx any way you want--for 8-bit Apple II machines in general, you need to mess with some $C0xx softswitches (80STORE, PAGE1, and PAGE2), as shown in the Technical Note excerpt I posted last week. -- --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | P.O. Box 875 America Online: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.