Purpose: Read/set cursor location
Call address: $FFF0 (hex) 65520 (decimal)
Preparation:
Registers: .X = cursor line .Y = cursor column Memory: system map Flags: .C = 0 -> set cursor position .C = 1 -> get cursor position Calls: noneResults:
Registers: .X = cursor line .Y = cursor column Memory: TBLX, PNTR updated Flags: .C = 1 -> error
Description: PLOT is an Editor routine that has been slightly changed from previous CBM systems. Instead of using absolute coordinates when referencing the cursor position, PLOT now uses relative coordinates, based upon the current screen window. The following local Editor variables are useful:
SCBOT | $E4 | -> | window bottom |
SCTOP | $E5 | -> | Window top |
SCLF | $E6 | -> | window left side |
SCRT | $E7 | -> | window right side |
TBLX | $EB | -> | cursor line |
PNTR | $EC | -> | Cursor column |
LINES | $ED | -> | maximum screen height |
COLUMNS | $EE | -> | maximum screen width |
EXAMPLE:
SEC JSR $FFF0 ;read current position INX ;move down one line INY ;move right one space CLC JSR $FFF0 ;set cursor position BCS error ;new position outside window