I'm in the middle of working on some personal coding projects in BASIC, and I'm curious as to how one might implement this:
I've written a simple drawing program that allows you to move around the screen and draw blocks on the screen in lo-res mode, with a portion of the text window reserved for displaying your X,Y position. The problem is that if you're not drawing anything, it's a little hard to know exactly where the cursor is, even with the coordinates displayed.
Essentially, what I want to do is to take the current X,Y position on the screen and numerically invert (so color 0 becomes color 15, color 1 becomes color 14, etc) whatever color is there (and ideally, "blink" it, flipping beween normal and inverted) so you can see where you're drawing.
I know that the screen memory layout is from 1024-2047, split into three 128-byte segments, with the last 8 bytes of each segment reserved for the "screen holes". However, because each screen memory byte represents two possible vertically-adjacent positions on the screen (low-order bytes being the top, high-order being the bottom) I'm a little lost as to how I would come up with something that's relatively straightforward to not only select the correct address to poke changes into, but also make sure that what's poked in modifies only the correct part of the memory location -- either the low-order or high-order bits.
I've seen the thread about help with PEEKing the text screen, and that gives me a good idea of where to start (especially with an assembly language program that allows it to do the math to figure out the correct memory address), but I'm not fully certain how I would translate that to essentially a bitwise NOT, but only on the correct 4 bits instead of 8.
Any help here would be appreciated -- something that could send me in the right direction would be awesome!