Hi!
I need to read chars on screen where is cursor.
e.g. cursor at position line 2, column 10 - which character is at this position?
Yes, I know that it can be done through reading address in screen memory, but I want to have it independent of any memory range.
I know st. about C128 Editor JUMP Table, there's routine:
$C009 LOOP5 - reads key to Accumultor from screenline
But I need to place cursor on any position and get character where cursor is.
Positioning is no problem (KERNAL routine PLOT - $FFF0).
Can anybody help me?
Thanks for every reply.
Miro
Kernal locations $0A29 for the VIC II hold the screen code under the cursor. With the VDC, you might have to set things up explicitly first.... I have no map in front of me right now, but I can look at my old libraries for this--I remember doing this years ago. Note that $0A29 is the screen code, not the PETSCII code.
C
Looks like the READCHR @ $CB58 will do what you want for both the VDC and the VIC II. Screen code is in the Accumulator. It's attribute is left @ address $F2. Let me know if this works for ya.
Cheers,
C
Hi!
Thanks.
Works correctly, really thanks. It's perfect for VIC-II and VDC.
Attribute works only with VIC-II. At VDC maybe it can be to find in other location than $F2.
Very, very thanks.
Cheers,
Miro
There is location $0A33 (CURCOL) that allows for VDC attribute info corresponding to the VDC cursor position. VDC attributes: lower nibble holds the colour, bit 4=flashing, bit 5=underline, bit 6=reversed, bit 7=character set (set=lowercase, cleared=uppercase)
C