Skip to content

Commit

Permalink
vt52
Browse files Browse the repository at this point in the history
  • Loading branch information
statespacedev committed Jul 14, 2024
1 parent 6fbf96d commit 9c15d66
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 20 deletions.
20 changes: 0 additions & 20 deletions _drafts/tops-10.md

This file was deleted.

52 changes: 52 additions & 0 deletions _drafts/vt52.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
layout: post
title: "vt52 and tops-10"
---
using a vt52 emulator talking to tops-10 and working in sos editor and ddt debugger, some keyboard topics quickly become apparent. the vt52 had a line feed lf key, but modern keyboards don't. so, there's not an obvious way to send lf alone.

in sos, lf prints the next line. with esc printing the previous line, lf and esc 'scroll down and up' through the file. it has a similar role in ddt, where it 'examines the next instruction'.

tangentially, here's some interesting discussion from the gorin book. this belongs in the dictionary under 'unintended consequences'.

_as a user of the decsystem-10 you are aware that usually you end a line by typing the carriage return key. when tops-10 sees the return key, it adds a line feed after the return. thus, usually, a program will see both a carriage return and a line feed when it reads the terminal. however, please note that tops-10 considers the line feed to be end of the line, so a program that is searching for the end of a line should not be satisfied until it finds the line feed._

the tops-10 'rubout' delete key is also a topic. the modern backspace key seems to be a dead end. the delete key to the right of the enter key is correct. there's some qualifiers on that though, at least for tops-10.

for line feed, the answer is to use ctrl-j. discovered this while googling 'vt52 emulator with line feed', and it instantly made sos and ddt completely usable. this was a night to day change and seems to be essential knowledge for using tops-10 now.

as an additional note, ctrl-h plays an inverse role to ctrl-j, at least within ddt. there ctrl-h closes current location and moves upward, and ctrl-j does similar but moves downward. so nutshell summary -

sos
move upward - esc
move downward - ctrl-j

ddt
move upward - ctrl-h
move downward - ctrl-j

for the 'rubout' delete key, use the one to the right of the enter key, but note tops-10 echoes the characters as they're rubbed out, surrounded by \ delimiter character. this can be disorienting at first. so for example typing 'test', then delete twice, then ' hello' results in 'test\ts\ hello' on screen. the end result is 'test hello'.

the sos commands

ln = line, line number, etc
^ = first ln
. = curr ln
* = last ln

esc = print prev, exit insert mode if in it
ctrl-j = print next
pln1:ln2 = print lines in range

iln1 = insert mode at ln1
cln1,ln2:ln3 = copy range to ln1
tln1,ln2:ln4 = move range to ln1
rln1:ln2 = delete range and insert at ln1

fstring$ln1:ln2 = find string in range
sstring$ln1:ln2 = substitute string in range

nint = renumber lines using step int
w = save
e = save and exit
es = save without line numbers
eq = exit without save

0 comments on commit 9c15d66

Please sign in to comment.