Go to Triangle Digital Support Home Page TDS9092 TECHNICAL MANUAL
Development software
Screen editor
Live website search
Enter key words
 

SCREEN EDITOR

If you are using TDS-PC for Windows you may not ever need the TDS9092 full screen editor. Work with a word-processor in the PC instead. If you are using a dumb terminal then the full screen editor will be your main way of writing Forth source code.

Forth can be compiled interactively line by line or an editor can be used to format source code, which is then compiled. The latter has the advantage of keeping the source code for later modification and documentation. The TDS9092 has an editor designed to work with simple terminals or through the serial input-output port of a PC.

Interactive use is possible even with hand-held terminals. For the full screen editor the terminal should have an 80 x 24 screen and 2-character sequences which will send the cursor up, right and home. A code sequence is also needed to home and clear the screen. ASCII codes hex 08 and 0A are used for left and down.

There are 13 screens available. Screen 0 does not give an error but is not physically available. Do not use it. The screens act in the same way as disk on larger Forth systems. The operating software uses virtual memory to access them but this is not apparent to the user.

The screens are at addresses 8000 to B3FF, each one having 0400 bytes (1024 in decimal). The area B400 to BC07 comprises two virtual memory buffers. The applications program has all the RAM 8000 to BC07 (15K bytes) available since the editor is only used for program generation.

On power-up all the screens are disabled. To enable them you need to type $B400 06 +ORIGIN ! (see COLD START PARAMETER TABLE). The screens will be filled with random data, but a ctrl+B will blank the screen once you are in the editor. The reset button and RESET* signal in at the connector both give warm starts preserving source code and dictionary.

To enter the editor type 1 EDIT to enter screen 1, then type ctrl+B. After a moment a blank page is presented on which source code can be written and edited.

The cursor is in a box of size 64 characters 16 lines. These are the 1024 bytes of the Forth screen in memory. The bell marks any of the four limits.

If the full screen editor does not appear to work this is because the control codes in the Forth computer do not correspond with those needed by the computer or terminal. If using a PC type IBM return, otherwise see SETTING THE TERMINAL for details of how to change the codes.

FULL SCREEN EDITOR COMMANDS

The full screen editor control commands in the following table are available.

 

(UP ARROW)

Moves cursor up on screen. (ctrl+W sometimes)

(RIGHT ARROW)

Moves cursor right on screen. (ctrl+S sometimes)

(DOWN ARROW)

Moves cursor down on screen. (ctrl+Z sometimes)

(LEFT ARROW)

Moves cursor left on screen. (ctrl+A sometimes)

ctrl+B

BLANKS current screen to all spaces.

ctrl+E

ERASES current line to all spaces.

ctrl+I

INSERTS text held in PAD to the current line, moving down lower text.

ctrl+N

NEW SCREEN is selected according to number of current cursor line.

ctrl+O

OPENS up a gap. Lower text is moved down.

ctrl+P

PAD holds the current cursor line

ctrl+Q

QUITS editor and returns to interactive system.

ctrl+R

REPLACES the current line with that held in PAD.

ctrl+S

SCREEN re-listing. Current screen is displayed. (ctrl+L LIST used with some terminal code settings)

ctrl+T

TOP of the screen is selected. Cursor homes.

ctrl+W

WIPES out this line and moves up lower text. deleted is not lost, it is held in PAD. (ctrl+K KILL used with some terminal code settings).

ctrl+[

Moves rest of line one character left. The current character is deleted.

ctrl+]

Moves rest of line one character right. A space appears at the cursor position.

ctrl+-

Blank display and decrement screen no. Re-list with ctrl+S.

ctrl+\

Blank display and increment screen no. Re-list with ctrl+S.

 

3 5 COPY moves screen 3 to screen 5. This is used outside the editor, i.e. interactively. The up, down, left and right commands allow modification of text anywhere on the displayed screen. The return key moves the cursor to the start of the next line. When the source code is complete the editor should be left using ctrl+Q and compilation accomplished in the usual Forth manner, e.g.

 

4 LOAD compiles screen 4 (and successive ones as long as --> appears in the screen).

 

On error the abort point of the compiler can be easily found. WHERE re-enters the editor at the bad screen, and the cursor is placed where the compiler stopped. Note that the actual error may be at this point or a little way before it.

SETTING THE TERMINAL

When power is applied to the TDS9092 the system transfers 28 bytes of terminal information to RAM at locations BE10-BE2B. You can alter all the terminal parameters. The table under DUMB TERMINAL SUPPORT shows their addresses, values allocated at power-up and functions. Alternatively use any of the standard code sets built-in using the words shown later.

DEFAULT VDU CODES

 

ADDRESS

CONTENT

FUNCTION

BE10

0A

Key to send the cursor down

BE11

08

Key to send the cursor left

BE12

0B

Key to send the cursor up

BE13

0C

Key to send the cursor right

BE14

02

Key to blank current Forth screen

BE15

05

Key to erase current line

BE16

09

Key to insert line and move down

BE17

0E

Key to select new Forth screen

BE18

0F

Key to open up a gap and move down

BE19

10

Key to hold current line in pad

BE1A

11

Key to quit editor

BE1B

12

Key to replace line from pad

BE1C

13

Key to relist current editor screen

BE1D

14

Key to put cursor to top of screen

BE1E

17

Key to wipe out line and hold in pad

BE1F

1D

Key to move rest of line right

BE20

1B

Key to move rest of line left

BE21

1C

Key to blank terminal and increment screen no.

BE22

1F

Key to blank terminal and decrement screen no.

BE23

FF

Future use

BE24

001E

Pair of bytes to home cursor

BE26

001A

Pair of bytes to clear terminal screen

BE28

000B

Pair of bytes to send cursor up

BE2A

000C

Pair of bytes to send cursor right

 

For example if ESC R homes the cursor on your terminal then re-set location BE24 to these ASCII codes 1B and 52 as follows:

 

HEX 1B52 BE24 !

 

On changing command keys do not allocate the same code twice.

DUMB TERMINAL SUPPORT

The codes in the table above fit many terminals including ADM3A, Televideo, VC4604, etc., and they can be re-set at any time by typing STD . The next most popular code set is for Digital Equipment Corporation terminals. Just type VT52 if you have a VT52 or VT100 terminal and appropriate codes will be allocated.

This is a table of all the different terminal editor control sets built into the TDS9092. Remember that the only purpose is for use with the full screen editor and associated words UP DOWN RIGHT LEFT HOME PAGE . If you are not using the editor or any of these words you need not have the codes set correctly.

 

ADDR

STD

STDX

IBM

BBC

VT52

NY

V-C

ADDS

H1500

H1520

CIF

BE10

0A

1A

0A

0A

1A

0A

0A

0A

1A

1A

1A

BE11

08

01

08

08

01

08

08

08

01

01

01

BE12

0B

17

0B

0B

17

0E

1A

0B

17

17

17

BE13

0C

13

0C

0C

13

18

15

0C

13

13

13

BE14

02

02

02

02

02

02

02

02

02

02

02

BE15

05

05

05

05

05

05

05

05

05

05

05

BE16

09

09

09

09

09

09

09

09

09

09

09

BE17

0E

0E

0E

0E

0E

19

0E

0E

19

19

0E

BE18

0F

0F

0F

0F

0F

0F

0F

0F

0F

0F

0F

BE19

10

10

10

10

10

10

10

10

10

10

10

BE1A

11

11

11

11

11

11

11

11

11

11

11

BE1B

12

12

12

12

12

12

12

12

12

12

12

BE1C

13

0C

13

13

0C

13

13

13

0C

0C

0C

BE1D

14

14

14

14

14

14

14

14

14

14

14

BE1E

17

0B

17

17

0B

17

17

17

0B

0B

0B

BE1F

1D

1D

1D

1D

1D

1D

1D

1D

1D

1D

1D

BE20

1B

1B

1B

1B

1B

1B

1B

1B

1B

1B

1B

BE21

1C

1C

1C

1C

1C

1C

1C

1C

1C

1C

1C

BE22

1F

1F

1F

1F

1F

1F

1F

1F

1F

1F

1F

BE23

FF

FF

FF

FF

FF

FF

FF

FF

FF

FF

FF

BE24

00

00

00

00

1B

00

00

00

1B

1B

00

BE25

1E

1E

0B

1E

48

1D

19

01

12

12

19

BE26

00

00

00

00

1B

00

00

00

1B

1B

00

BE27

1A

1A

0C

0C

4A

1F

18

0C

17

1C

18

BE28

00

00

00

00

1B

00

00

00

1B

1B

00

BE29

0B

0B

1E

0B

41

0E

1A

1A

0C

0C

1A

BE2A

00

00

00

00

1B

00

00

00

1B

1B

00

BE2B

0C

0C

1C

09

43

18

15

06

10

10

15

 

The word BBC also sets cursor movement codes appropriate for Viewdata.

Go to Triangle Digital Support Home Page Go to top   Next page