Dr Logo for the Tatung Einstein, showing a rosette drawn by the turtle
← Back to Courses
module
28

Appendix I - The screen editor's keys

The keys that move the cursor about in ed, and the two that get you out.

S10 uses a handful of these. The rest are here so that you are not stuck when the one you want is not the one S10 taught you.

Getting out

Press What happens
CTRL-C Keep the changes. The procedure is redefined and you go back to ?
ESC Throw the changes away. Prints Stopped! and goes back to ?

Both leave the editor. There is no way to save without leaving.

Moving about

The arrow keys do nothing in the editor. At the ? prompt they give you [ and ], but once ed is open they neither type brackets nor move the cursor. Everything below uses CONTROL instead.

Press Moves the cursor
CTRL-H One character left
CTRL-D One character right
CTRL-A To the start of the line
CTRL-E To the end of the line
CTRL-J Down one line
CTRL-K Up one line

When ed opens, the cursor is at the end of the first line - after the procedure's name, not at the start of it.

Changing the text

Press What happens
CTRL-Y Deletes the character before the cursor
typing Inserts at the cursor. Nothing is ever overwritten

The editor is always inserting. There is no overtype mode to get stuck in, and nothing you type will replace what is already there - to replace something you delete it first and then type.

A worked change

Say to star is on the screen and you want the body, on the second line, to turn by 72 rather than 144:

to star
repeat 5 [fd 60 rt 144]
end
  • CTRL-J to get down to the second line.
  • CTRL-E to get to the end of it.
  • CTRL-Y four times, which takes off 144] - the closing bracket counts.
  • Type 72].
  • CTRL-C to keep it.

Count the deletes carefully. Three would leave rt 1, and typing 72] after that gives you rt 172], which is a different shape and not an obvious mistake to spot afterwards.

Deleting from the end of the line and retyping is usually less fiddly than counting characters to get to the middle of one.

What is not here

The manual for Dr Logo lists around twenty more control codes, covering things like deleting to the end of a line, opening a blank line, paging up and down through a long definition, and recalling text you have just deleted.

They are not listed here because they have not been tried. Everything in this appendix has been run on the machine and does what it says.

Get the Newsletter

New guides, disk images and community finds, roughly once a quarter. No spam, we promise, this isn't Tatung's marketing department.
Your subscription could not be saved. Please try again.
Your subscription has been successful.

Newsletter

Subscribe to our newsletter and stay updated.