
Utah State University DigitalCommons@USU All Graduate Plan B and other Reports Graduate Studies 5-1997 Terminal Emulation System Chun-Fu Lee Utah State University Follow this and additional works at: https://digitalcommons.usu.edu/gradreports Part of the Computer Sciences Commons Recommended Citation Lee, Chun-Fu, "Terminal Emulation System" (1997). All Graduate Plan B and other Reports. 1529. https://digitalcommons.usu.edu/gradreports/1529 This Report is brought to you for free and open access by the Graduate Studies at DigitalCommons@USU. It has been accepted for inclusion in All Graduate Plan B and other Reports by an authorized administrator of DigitalCommons@USU. For more information, please contact [email protected]. TERMINAL EMULATION SYSTEM by Chun-Fu Lee A report submitted in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE m COMPUTER SCIENCE (Plan B) Approved: Dr. Jianping Zhang Dr. Donald H . Cooley Major Professor Committee Member Dr. Daniel W. Watson Committee Member UTAH STATE UNIVERSITY Logan, Utah 1997 Copyright © 1998 Chun-Fu Lee All Rights Reserved iii ACKNOWLEDGMENTS Several people have helped me during the preparation of this report. I would like to particularly acknowledge and thank Dr. Jianping Zhang who assisted and provided me with the opportunity to pursue this fascinating topic. I would also like to thank Dr. Donald H. Cooley and Dr. Daniel W. Watson who carefully reviewed this report. Thanks to my parents for their continuous support and encouragement. I also thank my mother-in-law who came to take care of my son and let me have more time in writing this report. Finally and most importantly, I dedicate this report to my wife, Hsiu-Chun, and my son, Joseph. Without them, I can hardly complete this report. Chun-Fu J. Lee iv CONTENTS Page ACKNOWLEDGMENTS .................................................... iii LIST OF FIGURES . vi LIST OF TABLES .......................................................... viii ABSTRACT . X CHAPTER 1 INTRODUCTION . .. 1 1.1 Motivation . 1 1.2 The Problem . 2 1.3 The Solution . 3 2 VT220 TERMINAL EMULATION SYSTEM TECHNICAL DESCRIPTION . 5 2.1 Communication Channels . 5 2.1.1 Asynchronous Serial Communication . 6 2.1.2 Intemetworking Communication . 6 2.2 Terminal Presentation . 7 2.2.1 Printable Characters . 7 2.2.2 CO and C 1 Control Characters . 7 2.2.3 Control Sequences . 10 2.3 Keyboard Handling .............................................. 22 2.3.1 Control Characters ......................................... 22 2.3 .2 Printable Characters ........................................ 25 2.3.3 Function Keys ............................................ 25 2.3 .4 Editing Keys and Cursor Keys ................................ 29 2.3.5 Keypad .................................................. 30 2.3 .6 Other Key ................................................ 33 2.4 Local Printer.................................................... 33 3 PRELIMINARY ANALYSIS AND DESIGN .............................. 35 V 3.1 Memory Map ................................................... 35 3.2 System Block Diagram ........................................... 36 3 .2.1 Terminal Emulation ........................................ 36 3.2.2 RS-232-C Communication DLL .............................. 36 3.3 Data Flow ...................................................... 37 3.4 Control Flow ................................................... 38 3.5 Data Structures .................................................. 39 4 SOFTWARE IMPLEMENTATION ..................................... 42 4.1 Terminal Emulation System ....................................... 42 4.1.1 Emulator Module .......................................... 42 4.1.2 Initial Module ............................................. 43 4.1.3 System Configuration Module ................................ 49 4.1.4 Terminal Control Protocol (TCP) Module ....................... 53 4.1.5 Control Sequence Module ................................... 55 4.1.6 Display Module ........................................... 56 4.1.7 Status Bar Maintenance Module ............. ................ 56 4.1.8 Printer Control Protocol (PCP) Module ......................... 57 4.1.9 Keyboard Handling Module .................................. 57 4.1.10 UDK Module ............................................. 58 4.2 Communication Module .......................................... 59 5 CONCLUSION . ..................................................... 60 5.1 Comparisons ................................................... 60 5 .2 Future Scope . 61 APPENDIX A CHARACTER SETS ...................................... 63 A. 1 The ASCII Alphabet Set . .. 63 A.2 DEC Special Graphics Set ......................................... 64 REFERENCES ............................................................. 65 vi LIST OF FIGURES Figure Page 2.1 VT220 Terminal Emulation Communication Configuration . 5 2.2 VT220 Terminal Standard Keyboard Layout ................................. 23 2.3 VT220 Terminal Emulation Keyboard Layout ............................... 24 3.1 Memory Map for VT220 Terminal Emulation System ......................... 35 3.2 Terminal Emulation System Block Diagram ................................. 36 3.3 RS-232-C DLL System Block Diagram .................................... 36 3.4 VT220 Terminal Emulation System Data Flow Diagram ....................... 37 3.5 VT220 Terminal Emulation System Control Flow Diagram ..................... 38 3.6 Primary Structure for Emulation System .................................... 39 3.7 Structure for Window Miscellaneous Control ................................ 39 3.8 Structure for Terminal Related Parameters .................................. 40 3.9 Structure for Communication Setting ...................................... 40 3 .10 Structure for Keyboard Related Parameters .................................. 41 3 .11 Structure for Printer Related Parameters . 41 3 .12 Structure for Screen Character Font ........................................ 41 4.1 VT220 Terminal Emulation System Window ................................ 44 4.2 Designed Options of Session Menu Item .................................... 45 4.3 Designed Options of Edit Menu Item ...................................... 46 4 .4 Designed Options of Configuration Menu Item . 4 7 4.5 Designed Options of Option Menu Item .................................... 48 4.6 Designed Dialog Box for Terminal Preferences .............................. 49 Vll 4.7 Designed Dialog Box for Keyboard Preferences .............................. 50 4.8 Designed Dialog Box for Communication Port Setting . 50 4.9 Designed Dialog Box for PC Function Key and Editing Key Definitions ........... 51 4.10 Designed Dialog Box for UDK Definitions .................................. 51 4.11 Designed Dialog Box for Tabulation Setting ................................. 52 4.12 Designed Dialog Box for Answer Back Message ............................. 52 4.13 Designed Dialog Box for Printer Setup ..................................... 52 4.14 Designed Dialog Box for Font Preference ................................... 53 4.15 Bitwise Scheme of Character Attribute Buffer ............................... 54 4.16 An Example for Control Sequence Parsing State Machine ...................... 55 viii LIST OF TABLES Table Page 2.1 CO Control Characters .................................................. 8 2.2 C 1 Control Characters .................................................. 9 2.3 Select Operation Mode (Compatibility Level) Control Sequences ................ 10 2.4 Control Character Set Selection Control Sequences ........................... 11 2.5 Scrolling Region Definition Control Sequence . 11 2.6 Tabbing Control Sequences .............................................. 12 2. 7 Cursor Moving Control Sequences . 12 2.8 Graphic Rendition Selection Control Sequence . 13 2.9 Line Attribute Control Sequences ......................................... 14 2.10 Erasing Control Sequences . 14 2.11 Character Attribute Selection Control Sequences (VT200 only) .................. 15 2.12 Selective Erasing Control Sequences (VT200 only) ......................... 15 2.13 Insertion/Deletion Control Sequences . 16 2.14 ANSI Terminal Mode Control Sequences ................................... 16 2.15 DEC Terminal Mode Control Sequences ................................... 17 2.16 User Defined Function Key Control Sequences (VT200 only) . 18 2.17 Character Set Designation Control Sequences . 19 2.18 Character Set Selection Control Sequences .................................. 20 2.19 Device Status Report Control Sequences ................................... 20 2.20 DA Request Control Sequences ........................................... 21 2.21 Terminal Adjustment Control Sequences ................................... 22 ix 2.22 VT220 Terminal Function Keys Fl-F5 Processing ............................ 26 2.23 VT220 Terminal Function Keys F6-F20 Processing under VTl 00 Mode .......... 27 2.24 VT220 Terminal Function Keys F6-F20 Processing under VT200-related Modes .... 27 2.25 VT220 Terminal Emulation Function Keys Fl-F12 Processing .................. 28 2.26 Editing Keys Processing ................................................ 29 2.27 Normal Cursor Key Processing ........................................... 30 2.28 Application Cursor Key Processing ........................................ 30 2.29 Keypad PF Keys Processing . 31 2.30 Numeric Keypad Processing ............................................. 32 2.31
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages77 Page
-
File Size-