Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.apple2.programmer > #319
| From | Jerry <awanderin@yahoo.ca> |
|---|---|
| Newsgroups | comp.sys.apple2.programmer |
| Subject | Re: detect character at HTAB, VTAB ( a SCRN(x,y) function for text screen) ?? |
| Date | 2012-06-29 21:49 -0600 |
| Organization | bbs-scene usenet news |
| Message-ID | <m34nptjw72.fsf@yahoo.ca> (permalink) |
| References | <94a9d08e-dc6e-4269-8fb5-83437fb0f188@googlegroups.com> |
aiiadict@gmail.com writes: > I didn't know what search terms to type in. > > I'd like an all applesoft (I have 6502 code) program > that will output the ascii value of the character stored > in 40 column mode X,Y position. > > > 10 vtab 10:htab 20:print "X"; > 20 y=10:x=20:gosub 1000:rem get char value > 30 print asc(g) > > X > > > 1000 rem use X and Y to determine ascii value, and > 1010 rem return in variable G You kind of had the answer in your question title: G = SCRN( X-1, (Y-1)*2 ) + 16 * SCRN( X-1, (Y-1)*2 + 1) HTAB and VTAB start counting at 1 whereas the LoRES stuff starts counting at 0, hence the "- 1" terms above. -- -- Jerry awanderin at yahoo dot ca
Back to comp.sys.apple2.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
detect character at HTAB, VTAB ( a SCRN(x,y) function for text screen) ?? aiiadict@gmail.com - 2012-06-29 16:04 -0700
Re: detect character at HTAB, VTAB ( a SCRN(x,y) function for text screen) ?? Jerry <awanderin@yahoo.ca> - 2012-06-29 21:49 -0600
Re: detect character at HTAB, VTAB ( a SCRN(x,y) function for text screen) ?? aiiadict@gmail.com - 2012-06-30 12:06 -0700
csiph-web