Author |
Topic: Text viewport (Read 1071 times) |
|
JGHarston
Junior Member
member is offline


Gender: 
Posts: 52
|
 |
Re: Text viewport
« Reply #5 on: Apr 2nd, 2014, 02:05am » |
|
on Mar 28th, 2014, 12:36pm, Richard Russell wrote:| I believe Acorn implementations flag the 'pending' status differently, and don't position the cursor outside the viewport, thus avoiding this particular issue. |
| The Acorn implementation is substantially the same. In "NoScroll" mode (introduced in Master MOS 3) when the cursor advances off the positive side of the screen POS becomes equal to the screen width, eg in MODE 7 advancing from (39,2) goes to (40,2) until another character is output and the position becomes the "true" state of (0,3) unless a control code sequence is output. Visually, the cursor is displayed in the final column. That lets you print a character in the bottom right hand corner without scrolling the screen, then TAB(x,y) to somewhere else.
|
|
Logged
|
|
|
|
rtr
Guest
|
 |
Re: Text viewport
« Reply #6 on: Apr 6th, 2014, 9:11pm » |
|
on Apr 2nd, 2014, 02:05am, JGHarston wrote:| The Acorn implementation is substantially the same.... when the cursor advances off the positive side of the screen POS becomes equal to the screen width, eg in MODE 7 advancing from (39,2) goes to (40,2) |
|
That's interesting - I had naively assumed that POS and VPOS always reflect the visible position of the cursor (they do in BB4W). The behaviour you describe would imply that in Acorn versions you can't (necessarily) save the current cursor position, temporarily move it elsewhere, and then return it to where it was. In the example you gave, TAB(X,Y) cannot move the cursor back to 40,2 in MODE 7.
Of course Acorn versions of BBC BASIC don't support asynchronous interrupts (such as BB4W's ON TIME) but nevertheless I can imagine a situation in which a text-editing application might want to update the contents of a status bar, which could involve temporarily moving the cursor there and then restoring it to its original coordinates. It's rather unfortunate if the obvious approach won't work.
Richard.
|
|
Logged
|
|
|
|
|