Question: Write a C/C++ program, vt, that will enable a user to simultaneously execute two interactive sessions. The vt program should support the two sessions by

Write a C/C++ program, vt, that will enable a user to simultaneously execute two interactive sessions. The vt program should support the two sessions by “filtering” all keyboard input before passing it to the subject programs and keeping a virtual screen for each program to be written to the physical screen whenever the user is interacting with a particular program. You will have to implement a time multiplexed display of the virtual screens on the physical screen. Thus, the user will always have one or the other virtual screen visible at any given time, but never both. The visible screen represents the active program, and the invisible screen represents a dormant program. If the user types input, your keyboard routine should route the input to the active program. When the user types “ESCAPE” followed by “C,” your program should make the active program dormant and the dormant program active. This toggle should change the physical screen so that it shows the virtual screen for the newly activated program. You also will need the sequence “ESCAPE followed by Q” to terminate your program. You may assume that you do not have to pass “ESCAPE sequence” to any shell. When vt starts executing, run a shell on each virtual terminal. If you have solved Lab Exercise 2.1, the shell from that program will be easier to use than production-level shells such as sh.  

Step by Step Solution

3.55 Rating (165 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

This solution is provided by Sam Siewert Spring 1996 Makefile CFLAGS g DDEBUG CFLAGS g CC cc SRC OBJ SRCco HDR MAINSRC vtc SUFFIXES co vt OBJ MAINSRC HDR CC CFLAGS vtc OBJ o co CC c CFLAGS OBJ HDR cle... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

34-E-CE-OS (383).docx

120 KBs Word File

Students Have Also Explored These Related Computer Engineering Questions!