[GreenKeys] ASCII <-> Baudot algorithm

John Nagle nagle at animats.com
Sun Aug 2 02:48:29 EDT 2015



On 08/01/2015 08:20 PM, greenkeys-request at mailman.qth.net wrote:
> On 08/01/2015 05:19 PM, drlegendre . wrote:
>> >Still slogging away at my C-64 TTY driver project. Only now beginning to
>> >look into the ASCII / Baudot conversion issues, and would certainly
>> >appreciate some input on the matter.

    Here's the file with the ASCII <-> Baudot tables I use in "baudotrss":

http://sourceforge.net/p/baudotrss/code/HEAD/tree/messager/baudot.py

    There are tables for USTTY, ITA2, and FRACTIONS fonts.

    As for shift, in my software I have states LTRS, FIGS, and UNKNOWN.
If a character has to be sent in Baudot and the state is UNKNOWN,
a LTRS or FIGS is always sent first.  Initially, the state
is UNKNOWN.  After LTRS, it's LTRS; after FIGS, it's FIGS.
After a space in FIGS state, it goes back to UNKNOWN. So the
code works for machines with or without unshift-on-space.

    There's also code in there for right margin checking,
word wrap, and CR/LF handing. You need those to get clean
output from converted ASCII text.

				John Nagle


More information about the GreenKeys mailing list