Normally in VDU 4 mode, printing a character at the end of the line immediately moves the cursor to the negative edge of the text window and down one line in the positive X direction.
With scroll protection enabled this cursor movement is deferred - a "pending newline" is generated, which is only executed just before the next character is printed, providing that it has not been deleted by an intervening VDU command. For example, VDU 127 received during pending newline would cause the pending newline to be deleted, whereas VDU 9 would execute it.
The upshot of being unaware of the state of scroll protection is that the cursor isn't always on the line that you expect it to be on, which can play havoc with some cursor movement commands (eg. carriage return).
Scroll protection is enabled/disabled with VDU 23,16 - there is no way to read the current state.
Note: The power on state of scroll protection is stored in CMOS byte 16, set with *Configure Scroll and *Configure NoScroll). Typically this remains at the factory default of off, but the desktop turns it on as soon as it is run - hence some programs may behave differently if run before the desktop is started.
|
|
|