| |
Adam
Registered: Jul 2009 Posts: 323 |
Controlling the screen cursor
Hello! :)
I am trying to code a screen editor using assembler but cannot recall how to limit the cursor to access specific areas of the screen. For example, let's just say I want to be able to edit the screen using the cursor and cursor keys but only be able to move from $400 to $428, how would I set this up?
Thanks..
..Adam/Onslaught/Sidwave |
|
| |
Stryyker
Registered: Dec 2001 Posts: 468 |
You could do all the code to move the curson and avoid the kernal for cursor movement. |
| |
Adam
Registered: Jul 2009 Posts: 323 |
Yeah, I don't want to use kernel routines unless I have to. I just need to know what mem locations the cursor uses and then from those addresses I can (hopefully) control the x/y positioning of the cursor location from there. :))
..Adam/Onslaught/Sidwave |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
Well, start the cursor at 0400, and use kernal (ffd2) to print chars. Count the chars! make an index, so you always know where your cursor is.
So if you press right 5 times your counter is 4, if you press down 1 time, you add 40 to the y counter.
Use an X and an Y counter! |
| |
enthusi
Registered: May 2004 Posts: 677 |
I used quite some kernal routines here:
Georam-Mon 0.10
In case you want to check out... |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quote: Yeah, I don't want to use kernel routines unless I have to. I just need to know what mem locations the cursor uses and then from those addresses I can (hopefully) control the x/y positioning of the cursor location from there. :))
..Adam/Onslaught/Sidwave
But you are aware that the cursor is implemented by software and made by just manipulating the character at cursor position? |
| |
Soren
Registered: Dec 2001 Posts: 547 |
I myself often use a sprite cursor in my music editors.
Got a routine that calculate the correct sprite positions to match char positions.. I only throw X+Y char positions into it and it works nicely. For me this is very nice as I use a colour flashing cursor and the spritecursor is put behind chars, so I easily can see the char the cursor is placed on.
It's quite easy to do, if one wants something else than a char based cursor. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Yeah, I don't want to use kernel routines unless I have to. I just need to know what mem locations the cursor uses and then from those addresses I can (hopefully) control the x/y positioning of the cursor location from there. :))
..Adam/Onslaught/Sidwave
You never _have_ to use kernel functions fyi. I suggest you write your own cursor routines like Jeff suggested. |
| |
Skate
Registered: Jul 2003 Posts: 494 |
I usually code my own cursor routine for my text editors. But for my very first noter, I remember stealing all the necessery parts from kernel and making some changes like prohibiting page scrolling. I don't recommend this method but it's possible. |
| |
SIDWAVE Account closed
Registered: Apr 2002 Posts: 2238 |
Dont work hard, work smart! |
| |
Angel of Death
Registered: Apr 2008 Posts: 211 |
You should take a look at this program:
Characterize V0.03
Source is included.
it's Not made by me but it is chockful of useful (kernal utilising) routines including diskop- and textinput routines.
I made a micro text-editor using kernal routines but it's to simple to release and I have no place to upload it to (yet).
let me know if you're interested.
|
... 5 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |