News for hackers. Stuff that matters.
Re:Four Column ASCII (2017) by retzkek on Wednesday September 25, 2019 @05:15PM (#21075579)
The table is a nice way to view ASCII (maybe better transposed?), but the discussion on CTRL-[ for ESC can't be quite right, since then CTRL-; would work too, no?
Re:Four Column ASCII (2017) by soneil on Wednesday September 25, 2019 @09:41PM (#21077383)
The way I picture it; see the caps set (10) as the default. From there you can shift to the lower-case (11) set, figure (01) set, or control (00) set. But then there's no such thing as CTRL+; - you're switching to two different sets (figures and control) simultaneously. Your keyboard and OS may (should) be able express that, but ascii can't.
Re:Four Column ASCII (2017) by valbaca on Wednesday September 25, 2019 @05:35PM (#21075769)
It appears that it would depend on the keyboard.

Some did a subtraction of the code and others did a bitwise AND.

Source: https://en.wikipedia.org/wiki/Control_character#How_control_...

Re:Four Column ASCII (2017) by Twisol on Wednesday September 25, 2019 @05:26PM (#21075670)
Why's that? In my terminal emulator, CTRL-; just outputs a semicolon. Are there any cases where CTRL plus a character in the first or fourth columns has the same kind of behavior?

It seems to me that it's only the elements in the third column that can be used to generate elements of the first column. This is consistent with the description in the article, and still explains why ESC is represented by ^[.

Re:Four Column ASCII (2017) by retzkek on Wednesday September 25, 2019 @05:37PM (#21075797)
Specifically I'm questioning this bit:

> Pressing CTRL simply sets all bits but the last 5 to zero in the character that you typed. You can imagine it as a bitwise AND.

If that were the case then CTRL-(any column) would result in the first column.

Edit: I suppose at this point terminal emulators are just hardcoding in CTRL modifiers rather than the truly emulating what a hardware terminal would have done.

Re:Four Column ASCII (2017) by _kst_ on Wednesday September 25, 2019 @06:47PM (#21076438)
I vaguely remember using CTRL-7 to get the ASCII BEL character (0x07). This was a long time ago, and I don't see it on any current systems.

Another special case: On most keyboards (I suppose it's the terminal emulator that implements it), CTRL-SPACE emits the NUL character. (I find that useful because I use C-@ as the prefix key in tmux.)

Re:Four Column ASCII (2017) by PhasmaFelis on Wednesday September 25, 2019 @05:41PM (#21075844)
The article says:

> Pressing CTRL simply sets all bits but the last 5 to zero in the character that you typed. You can imagine it as a bitwise AND.

But it can't be quite that simple, or Ctrl-[, Ctrl-;, and Ctrl-{ would all have the same effect. There must (as you said, and contrary to the article) be additional logic that only zeroes the leading bits if they are "10".

Re:Four Column ASCII (2017) by Twisol on Wednesday September 25, 2019 @05:58PM (#21076031)
Ahh, I understand. I must have scanned right over that part.

As the sibling says, it’s probably the case that terminal emulators have this historic behavior for specific combinations, and not for the more general mechanism of merely setting the high bits of whatever symbol was generated. It’s probably a bit fallacious to test things in an emulator... perhaps the article is correct for the original systems?

Re:Four Column ASCII (2017) by kps on Wednesday September 25, 2019 @09:46PM (#21077407)
CTRL would clear the 2⁶ bit. If any sufficiently primitive devices (electromechanical like the Teletype 33) had been made in the lower-case era, you'd probably have got CTRL-; → ; and CTRL-{ → ;