4 ms·
what about Ctrl-C to break out of stuff? Does that correspond to an ascii control character?
by sopooneo 13y ago
what about Ctrl-C to break out of stuff? Does that correspond to an ascii control character?
- elwin 13y agoCtrl-C stops the program because the TTY driver watches for it and sends an interrupt signal when it appears. It's a slightly different mechanism. There are more details in "man 3 termios", but be warned, the TTY layer is not a pleasant subject for reading.
- jloughry 13y agoCtrl-C was originally "End of Text".
- danielweber 13y agoI was disappointed that Ctrl-S and Ctrl-Q don't correspond (at least on the first ASCII chart I googled) to anything, because Ctrl-S stops text on my Unix terminals the exact same way it did on my brother's Apple ][e in 1984.
- jrochkind1 13y ago> I was disappointed that Ctrl-S and Ctrl-Q don't correspond (at least on the first ASCII chart I googled) to anything I'm pretty sure every possible combination of 7-bits is assigned SOME name in ascii, and Ctrl-any-case-insensitive-letter is a defined 7bit value. This chart says control-s is `DC3 (Device Control, X-OFF)` and control-q is `DC1 (Device Control, X-ON)`. Yup, that's what they do alright. http://www.unix-manuals.com/refs/misc/ascii-table.html http://www.unix-manuals.com/refs/misc/ascii-table.html Don't forget everyone's favorite control-G, BEL, useful sending beeps across the wire on old school IRC, BBSen, and chat services. Or, you know, telegraph machines or something.
- csixty4 13y agoFor anyone wondering, X-ON and X-OFF are flow control characters. A device sends X-OFF to say "my buffer is full, stop sending data" and X-ON when it's ready to resume. On most Unix terminals, these have the effect of pausing and resuming the display when a bunch of data is scrolling by.
- __del__ 13y ago...and they're helpfully disabled with stty -ixon
- danielweber 13y agoOh, thank you. The reference I found[1] only showed them as "device control." I thought I imagined them having that. Also, the classic control-G is still in C. "\a" is "alert (beep)." [1] http://www.asciitable.com/ http://www.asciitable.com/
- fineline 13y agoI think you mean your brother's Apple //e - they switched from the original ][ to // for later models. That's what I started programming on too - except in my case it was my Dad's.
- danielweber 13y agoAh, but the boot screen said "APPLE ]["