UKNC Control characters ======================= +-----+----+-----------------------------+-----+----+-------------------------------------+ | dec | hex| Action | dec | hex| Action | +-----+----+-----------------------------+-----+----+-------------------------------------+ | 0 | 00 | | 16 | 10 | (Reset tab stop) | | 1 | 01 | | 17 | 11 | (Initial cursor setting) | | 2 | 02 | | 18 | 12 | Scroll display up with wrapping | | 3 | 03 | Interupt | 19 | 13 | Scroll line right | | 4 | 04 | | 20 | 14 | Scroll line left | | 5 | 05 | | 21 | 15 | Newline | | 6 | 06 | | 22 | 16 | Scroll display down with wrapping | | 7 | 07 | Bell | 23 | 17 | (Slide in line?) | | 8 | 08 | Cursor left or home | 24 | 18 | (Delete character to right) | | 9 | 09 | Cursor right to tab stop | 25 | 19 | Cursor right --+ | | 10 | 0A | Cursor down | 26 | 1A | Cursor left | | | 11 | 0B | | 27 | 1B | Escape | | | 12 | 0C | CLS | 28 | 1C | Cursor Up | Arrow keys | | 13 | 0D | Carriage return | 29 | 1D | Cursor Down | | | 14 | 0E | Cyrillic characters | 30 | 1E | | | | 15 | 0F | Latin characters | 31 | 1F | --+ | +-----+----+-----------------------------+-----+----+-------------------------------------+ On the BK0010 these are control codes, on the UKNC these are printable characters, mostly spaces. +-----+----+-----------------------------+-----+----+-------------------------------------+ | dec | hex| Action | dec | hex| Action | +-----+----+-----------------------------+-----+----+-------------------------------------+ | 128 | 80 | | 144 | 90 | Line-by-line program execution | | 129 | 81 | (Repeat?) | 145 | 91 | (red) --+ Entered from the | | 130 | 82 | Switch display mode of | 146 | 92 | (green) | keyboard by pressing | | | | control characters | | | | the "AP2", "lower case"| | 131 | 83 | | 147 | 93 | (blue) | and and "1", "2", "3" | | 132 | 84 | Switch blocking mode of | 148 | 94 | (black) --+ or "4" keys | | | | editing codes | 149 | 95 | Switch graphic mode (GRAPH mode) | | 133 | 85 | | 150 | 96 | Switch mode of recording points on | | 134 | 86 | | | | the screen in the "GRAPH" mode | | 135 | 87 | | 151 | 97 | Switch point erase mode | | | | | | | in "GRAPH" mode | | 136 | 88 | | 152 | 98 | Switch line edit mode | | 137 | 89 ¦ Horizontal tab | 153 | 99 | Delete right from cursor | | 138 | 8A | | 154 | 9A | Switch display mode cursor | | 139 | 8B | | 155 | 9B | Switch 32/64 character in the string| | 140 | 8C ¦ Switch extended memory mode | 156 | 9C | Switch inversion mode characters | | | | (press AP2 and SBR keys) | 157 | 9D | Switch inversion mode screen | | 141 | 8D | | 158 | 9E | Installation in the service line | | 142 | 8E | | | | current screen modes | | 143 | 8F | | 159 | 9F | Turn on underline mode | +-----+----+-----------------------------+-----+----+-------------------------------------+ UKNC CSI Escape Sequences ========================= +-------+--------------------------------+-------+----------------------------------------+ ¦ ESC | Action | ESC | Action | +-------+--------------------------------+-------+----------------------------------------+ | 27,%,n| Special control | 27,< | (VT100=Enter/Exit VT52 mode) | | | n='0' graphics enable | 27,= | Cyrillic keyboard (DKP displayed) | | | n>'0' text mode | 27,> | Latin keyboard (DKP removed) | | | | | | | 27,@ | | 27,P | | | 27,A | Cursor up | 27,Q | | | 27,B | Cursor down | 27,R | | | 27,C | Cursor right | 27,S | | | 27,D | Cursor left | 27,T | | | 27,E | Change to N2 command system | 27,U | | | 27,F | (VT52=special graphics) | 27,V | | | 27,G | (VT52=latin character set) | 27,W | | | 27,H | Cursor Home to (0,0) | 27,X | | | 27,I | Cursor up | 27,Y,Y+32,X+32 | Cursor to (X,Y) | | 27,J | Clear to end of screen | 27,Z | (VT52=Identify terminal) | | 27,K | (VT52=Clear to end of line) | 27,[ | VDU output disappears except CLS, NEWL | | 27,L | (VT52=Insert line) | 27,\ | | | 27,M | (VT52=Delete line) | 27,] | | | 27,N | (VT100=Single Shift 2) | 27,^ | | | 27,O | (VT100=Single Shift 3) | 27,_ | | +-------+--------------------------------+-------+----------------------------------------+ |27,128 | Cursor up |27,144 | Cursor up+right | |27,129 | Cursor down |27,145 | Cursor down+left | |27,130 | Cursor left |27,146 | Cursor up+left | |27,131 | Cursor right |27,147 | Cursor down+right | |27,132 | Cursor to row=0 |27,148 | Cursor home to (0,0) | |27,133 | Cursor to row=bottom |27,149 | Clear screen | |27,134 | Cursor to col=0 |27,150 | Clear to end of screen | |27,135 | Cursor to col=right |27,151 | Clear to end of line | |27,136 | |27,152 | Newline | |27,137 | |27,153,Y+32,X+32 | Cursor to (X,Y) | |27,138 | Shift to end of line to left |27,154 | | |27,139 | Shift to end of line to right |27,155 | | |27,140 | Scroll down, screen wraps |27,156 | | |27,141 | Scroll up, screen wraps |27,157 | | |27,142 | |27,158 | | |27,143 | |27,159 | | +-------+----+---------------------------+-------+-+--------------------------------------+ |27,160,n+48 | Text foreground colour n |27,176 | | |27,161,n+48 | Text background colour n |27,177 | | |27,162,n+48 | Screen background colour n|27,178 | | |27,163 | Inverted text |27,179 | | |27,164 | Underlined text |27,180 | | |27,165,n+48 | |27,181 | | |27,166,n+48 | Set text size: |27,182 | | | | 1=80x24, 2=40x24, 3=20x24, 4=10x24 | | | | Screen and colours not cleared | | |27,167,n+48 | Cursor colour n |27,183 | Turn network timer on | |27,168 | |27,184 | | |27,169 | |27,185 | | |27,170 | |27,186 | | |27,171 | |27,187 | | |27,172 | |27,188 | Reboot | |27,173 | |27,189 | Debugger | |27,174 | |27,190 | Crash | |27,175 | |27,191,n | Cancel action n | +------------+---------------------------+---------+--------------------------------------+ |27,191,160 | Set previous text foreground colour | |27,191,161 | Set previous text background colour | |27,191,162 | Set previous screen background colour | |27,191,163 | Turn inverse text off | |27,191,164 | Turn underlined text off | |27,191,165 | | |27,191,166 | | |27,191,167 | | |27,191,183 | Turn network timer off | +------------+---------------------------+---------+--------------------------------------+ UKNC Extended CSI Escape Sequences ================================== +------------------+---------------------+---------+--------------------------------------+ | 27,"%!0" | Start sequence | | 27,"%!3" | End sequence | | 27,"LI@@f@@b@@s" | Set colours | | 27,"ML... | Graphics colour | 27,"MM... | Sets a colour | 27,"MP... | Fill colour | 27,"MV... | unknown | 27,"RR... | Filled rectangle | 27,"RU... | no action | 27,"RD... | no action | 27,"TD... | Colour | 27,"UA" | Read pixel colour at current point | 27,"UB" | Colour fill | 27,"UC" | Colour fill | 27,"UD" | no action | 27,"UE" | no action | 27,"UF... | Move | 27,"UG... | Draw | 27,"UH... | Plot | 27,"UI" | Read current graphics coords +------------------+---------------------+---------+--------------------------------------+ Colour control -------------- 27,160,n+48 foreground 27,161,n+48 background 27,162,n+48 scroll 27,167,n+48 cursor 27,"%!0",27,"LI@@f@@b@@s",27,"%!3" | | | 'P'+foreground---+ | | 'P'+background------+ | 'P'+scroll-------------+ Uses BGR numbers: black,blue,green,cyan,red,magenta,yellow,white eg 27,"%!0",27,"LI@@P@@W@@T",27,"%!3" - black text, white background, red scroll/clear or 27,160,"0", 27,161,"7", 27,162,"4" - black text, white background, red scroll/clear Status line on row above row 0 ------------------------------ +------------------------------------------------+ | DKN NHB/NOAY PYC/NAT| +------------------------------------------------+ CSI= NHB=inverse on Cyrillic/Latin CSI> NOAY=underline on setting VDU 14/15 UKNC Keyboard Characters ======================== KEYS.SAV has to be run to enable function keys to return characters. Key | VT52 | UKNC | ----------------+----------------------------------------------------+----------------------------------------------------+ | norm shift ctrl graph | norm shift ctrl graph | BACKSPACE | 127 127 127 127 | 127 127 127 127 | TAB | 9 9 - - | 9 9 - - | RETURN | 13,10 10 13,10,10 13,10,10 | 13,10 10 21 (^U) 13,10,10 | ESCAPE | 27 27 - - | 27 27 - - | MENU | 14,15 14,15 - - | 14,15 14,15 - - | UP | 27,65 (A) 27,65 (A) 27,65 (A) 27,65 (A)| 28 (^\) 18 (^R) 28 (^\) 27,65 (A)| DOWN | 27,66 (B) 27,66 (B) 27,74 (J) 27,66 (B)| 29 (^]) 22 (^V) 31 (^]) 27,66 (B)| RIGHT | 27,67 (C) 27,67 (C) 27,75 (K) 27,67 (C)| 25 (^Y) halt? 11 (^J) 27,67 (C)| LEFT | 27,68 (D) 27,68 (D) 27,68 (D) 27,68 (D)| 26 (^Z) 20 (^T) 26 (^Z) 27,68 (D)| f1 | 27,80 (P) 27,80 (P) - - | 27,80 (P) 27,80 (P) - - | f2 | 27,81 (Q) 27,21 (^U) - - | 27,81 (Q) 27,21 (^U) - - | f3 | 27,82 (R) 1 (^A) - - | 27,82 (R) 1 (^A) - - | f4 | 27,19 (^S) 16 (^P) - - | 27,19 (^S) 16 (^P) - - | f5 | 27,20 (^T) [halt] 10 [print] - - | 27,20 (^T) [halt] 10 [print] - - | HELP f6/Del | 27,126 (~) 27,126 (~) * 10 | 27,126 (~) 27,126 (~) * 10 | SETUP f7/End | SETUP SETUP SETUP SETUP | SETUP SETUP SETUP SETUP | EXECUTE f8/PgDn | 27,127 27,127 crash - | 27,127 27,127 crash - | RESET f9/Ins | 27,72 (H) 27,74 (J) 12 (^L) 12 (^L) | 8 (^H) 12 (^L) 12 (^L) 12 (^L) | f10 | | | STOP f11/PgUp | DEBUG DEBUG DEBUG DEBUG | DEBUG DEBUG DEBUG DEBUG | f12/Home | 95 (_) 127 31 58 (:) | 95 (_) 127 31 (^_) 58 (:) | ----------------+----------------------------------------------------+----------------------------------------------------+ *toggle display of control characters When Cyrillic enabled with VDU 14, keyboard and character set swaps upper and lower case. Keymap requires :le15 to become VDU15 to return to Latin, or CTRL-O. DEBUG exited with EXECUTE.