ECE 103 Engineering Programming Chapter 57 Terminal Control Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.

Slides:



Advertisements
Similar presentations
Using our device-drivers How can an application display the data in a device special file?
Advertisements

ECE 103 Engineering Programming Chapter 54 Recursion Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material developed.
DOS and BIOS Interrupts DOS and BIOS interrupts are used to perform some very useful functions, such as displaying data to the monitor, reading data from.
1 CS 161 Introduction to Programming and Problem Solving Chapter 9 C++ Program Components Herbert G. Mayer, PSU Status 10/20/2014.
Important Irvine Library Procedures Randomize Randomize –Initializes the seed of the random-number formula by both the Random32 and the RandomRange procedures.
Chapter 7 Programming with DOS and BIOS Function Calls Objectives: The use of DOS and BIOS function call How to read the PC’s keyboard How to send text.
J. Michael Moore Input and Output (IO) CSCE 110 Drawn from James Tam's material.
Formatted Output What we know: write(*,*) x print *, x General Form: write (unit, format, options) list unit = * : write to the monitor format = *: no.
CURSES!!!!! FOILED AGAIN!! Liam O’Leary 12/3/07 Seminar: Ruby V. Python Pr. John Santore.
C - Input & Output When we are saying Input that means to feed some data into program. This can be given in the form of file or from command line. C programming.
CS 161 Introduction to Programming and Problem Solving Chapter 13 Console IO Herbert G. Mayer, PSU Status 9/8/2014 Initial content copied verbatim from.
1 CS 161 Introduction to Programming and Problem Solving Chapter 10 g++ Compiler Usage Herbert G. Mayer, PSU Status 10/21/2014.
1 Advanced Features of Keyboard Processing Suthida Chaichomchuen
ECE 103 Engineering Programming Chapter 10 Variables, AKA Objects Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103.
1 CS 106 Computing Fundamentals II Chapter 29 “Creating A User Form” Herbert G. Mayer, PSU CS Status 7/4/2013 Initial content copied verbatim from CS 106.
1 CS 106 Computing Fundamentals II Chapter 7 “Showing Developer Tab” Herbert G. Mayer, PSU CS status 6/17/2013 Initial content copied verbatim from CS.
Linux Terminal System ● Conceptual Linux terminal ● Terminal API ● Terminal emulators ● Graphical user interfaces.
Reading the data from the input devices and displaying the results on the screen are the two main tasks of any program. To perform these tasks user friendly.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
CSC 215 : Procedural Programming with C C Compilers.
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
ECE 103 Engineering Programming Chapter 61 Abstract Data Types Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
1 The EDIT Program The Edit program is a full screen text editor that allows you to: Create text files Create text files Edit an existing text files Edit.
ECE 103 Engineering Programming Chapter 40 C Graphing Libraries Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
ECE 103 Engineering Programming Chapter 1 Introduction Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.
ECE 103 Engineering Programming Chapter 48 Typedef and Enum Type Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103.
ECE 103 Engineering Programming Chapter 24 Sorting Herbert G. Mayer, PSU CS Status 6/2/2015 Initial content copied verbatim from ECE 103 material developed.
ECE 103 Engineering Programming Chapter 9 gcc Compiler Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.
ECE 103 Engineering Programming Chapter 18 Iteration Herbert G. Mayer, PSU CS Status 7/19/2015 Initial content copied verbatim from ECE 103 material developed.
ECE 103 Engineering Programming Chapter 44 File I/O Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material developed.
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
1 CS 106 Computing Fundamentals II Chapter 67 “Working With Files” Herbert G. Mayer, PSU CS status 6/24/2013 Initial content copied verbatim from CS 106.
ECE 103 Engineering Programming Chapter 36 C Storage Classes Herbert G. Mayer, PSU CS Status 8/4/2014 Initial content copied verbatim from ECE 103 material.
ECE 103 Engineering Programming Chapter 55 C Math Library Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
1 © 2012 John Urrutia. All rights reserved. Chapter 6 The vi Editor.
ECE 103 Engineering Programming Chapter 49 Structures Unions, Part 1 Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE.
ECE 103 Engineering Programming Chapter 52 Generic Algorithm Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
ECE 103 Engineering Programming Chapter 53 Generic Algorithms Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
CS 161 Introduction to Programming and Problem Solving Chapter 18 Control Flow Through C++ Program Herbert G. Mayer, PSU Status 10/8/2014 Initial content.
ECE 103 Engineering Programming Chapter 31 C Scopes Herbert G. Mayer, PSU CS Status 8/1/2015 Initial content copied verbatim from ECE 103 material developed.
NCurses Tutorial Filiz Şenyüzlüler Güzelbey. What is nCurses? Ncurses is a library, which is used for creating and using windows, screen painting and.
ECE 103 Engineering Programming Chapter 7 Compiling C Programs Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material.
1 CS 106 Computing Fundamentals II Chapter 6 “How To Zip & Unzip Files” Herbert G. Mayer, PSU CS status 6/17/2013 Initial content copied verbatim from.
Integers/Characters Input/Output Integers and Characters Input/Output System Calls. syscall Trap Handler Services for Integers and Characters Read Integer,
ECE 103 Engineering Programming Chapter 15 C Standard Library Herbert G. Mayer, PSU CS Status 7/19/2015 Initial content copied verbatim from ECE 103 material.
Chapter Eight Exploring the UNIX Utilities. 2 Lesson A Using the UNIX Utilities.
CS 161 Introduction to Programming and Problem Solving Chapter 17 Nested Loops Herbert G. Mayer, PSU Status 9/8/2014 Initial content copied verbatim from.
ECE 103 Engineering Programming Chapter 41 C Pointers, Part 3 Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material.
ECE 103 Engineering Programming Chapter 3 Numbers Herbert G. Mayer, PSU CS Status 6/19/2015 Initial content copied verbatim from ECE 103 material developed.
Chapter Six. Exercises Clear the screen Write a procedure to show a symbol at (dl, dh). AL stores the symbol. Write a procedure to control a character.
C Programming Lecture 3 : C Introduction 1 Lecture notes : courtesy of Woo Kyun and Chang Byung-Mo.
ECE 103 Engineering Programming Chapter 29 C Strings, Part 2 Herbert G. Mayer, PSU CS Status 7/30/2014 Initial content copied verbatim from ECE 103 material.
ECE 103 Engineering Programming Chapter 30 C Functions Herbert G. Mayer, PSU CS Status 8/9/2014 Initial content copied verbatim from ECE 103 material developed.
ECE 101 Exploring Electrical Engineering Chapter 7 Data Acquisition Herbert G. Mayer, PSU Status 11/30/2015 Derived with permission from PSU Prof. Phillip.
ECE 103 Engineering Programming Chapter 1 Introduction
Integers/Characters Input/Output
Compilers, Make and SubVersion
CS 161 Introduction to Programming
Herbert G. Mayer, PSU CS Status 8/2/2013
ECE 103 Engineering Programming Chapter 56 Runtime Errors
ECE 103 Engineering Programming Chapter 12 More C Statements
ECE 103 Engineering Programming Chapter 51 Random Numbers
ECE 103 Engineering Programming Chapter 25 C Strings, Part 1
ECE 103 Engineering Programming Chapter 46 argc, argv, envp
ECE 103 Engineering Programming Chapter 37 C Macro Parameters
ECE 103 Engineering Programming Chapter 8 Data Types and Constants
CS 106 Computing Fundamentals II Chapter 69 “Event Loop”
ECE 103 Engineering Programming Chapter 64 Tree Implementation
ECE 103 Engineering Programming Chapter 20 Change in Flow of Control
ECE 103 Engineering Programming Chapter 18 Iteration
Presentation transcript:

ECE 103 Engineering Programming Chapter 57 Terminal Control Herbert G. Mayer, PSU CS Status 6/4/2014 Initial content copied verbatim from ECE 103 material developed by Professor Phillip PSU ECE

Syllabus conio Library Extended Features curses Library

2 conio Library conio is a library that provides I/O functions for enhanced console access.  Unbuffered keyboard input  Direct screen output conio is not part of the C90 or C99 standard. conio availability depends on the compiler vendor.  Microsoft Visual C/C++ → YES  GNU GCC → NO (but can be added via extra code)

3 Basic conio function list (from Wikipedia):  kbhit Determines if a keyboard key was pressed.  getch Reads a character directly from the console without buffer and without echo.  getche Reads a character directly from the console without buffer but with echo.  ungetch Puts the character back into the keyboard buffer.

4  cgets Reads a string directly from the console.  cscanf Reads formatted values directly from the console.  putch Writes a character directly to the console.  cputs Writes a string directly to the console.  cprintf Formats values and writes them directly to the console.

5 Extended Features Some versions of conio also support:  Setting the text cursor position  Setting foreground and background text colors  Clearing the text screen Availability depends on the compiler vendor.  Microsoft Visual C/C++ → NO (but can be added)  GNU GCC → NO (but can be added)

6 curses Library curses is a terminal control library originally designed for Unix-like systems. It is very comprehensive and supports text windows and keyboard/mouse control. Free implementations are available for:  Microsoft Visual C (pdcurses)  Cygwin+GCC (ncurses and pdcurses)  Linux (ncurses)  OS X (ncurses)