------------------------------------------------------ Lecture 20 - March 19, 2003 ------------------------------------------------------ AGENDA: 0 Admin 1 P5 questions? 2 Return exam #1 3 Ch 3.9: terminals 4 Ch 3.10: the system task ------------------------------------------------------ 0 - ADMIN ------------------------------------------------------ Startout Q: Due by start of class * RI #6 Due tonight * P5 Due Friday * Exam #2 ------------------------------------------------------ 1 - P5 QUESTIONS? ------------------------------------------------------ Any questions? ------------------------------------------------------ 2 - RETURN EXAM #1 ------------------------------------------------------ Return and discuss briefly ------------------------------------------------------ 3 - CH 3.9: TERMINALS ------------------------------------------------------ HARDWARE TYPES * memory-mapped terminals - video RAM, video controller, scan lines, text vs. video modes, IBM PC keyboard scan codes, detection of key combinations (ALT, CTRL, SHIFT, combo.) * RS-232 terminals - escape sequences, demo capturing codes, check /etc/termcap for VT100 entry * X terminals - X-stations vs. emulation software - bit-mapped, gray scale vs. color - X server & clients - communicate by sending messages between clients & server TERMINAL SOFTWARE - INPUT "How would you like you input processed: well, medium, or rare?" - raw (noncanonical), cooked (canonical), & inbetween What is the life of a keystroke from the time you press the keyboard until you see the echo back on your display? - gets to driver, may undergo keyboard mapping for different keyboard layouts, chars may get buffered up and processed for metachars (erase, etc. -- show stty -all), echoing back to screen - interesting problems: tab handling, vs. CR + LF special keys: fig 3-33 p. 244 control functions: tcgetattr, tcsetattr, or via IOCTL - fig 3-34 p. 246 - settings: CR->NL, 7- vs. 8-bit, echoing, line vs. character at a time I/O TERMINAL SOFTWARE - OUTPUT * RS-232: buffer output & feed as hardware does the baby bird thing (asking for more input). * memory-mapped: write to video RAM as become available - scrolling video memory: move address of buffer base in a special register instead of copying all data - controller wraps around to beginning of buffer - cursor register * ANSI sequence: fig 3-36 p. 249 ------------------------------------------------------ 4 - CH 3.10: THE SYSTEM TASK ------------------------------------------------------ Questions? COS 421 - Lecture Notes #20 SPRING 2003 COS421-lect-2003-03-19.doc Page 2 Printed 19.03.03