Question: The program has to be in C programming! In short I have to write a program where a terminal gets every input from keyboard. If

The program has to be in C programming! In short I have to write a program where a terminal gets every input from keyboard. If the user presses "01111110" the program should start to save the input and when the user presses "01111110" again, the "input data" inbetween these to flags should be displayed and program is done. Btw. it's not allowed to use the ENTER key! I used "getch();" from "conio.h" library for user input which works excellent! I tryed for a long time, but I keep getting small bugs and don't detect the flag all the time. Please provide me with your soloution, so I can get it to work 100% of the times! Much appreciated
HDLC (Layer 2 Protocol) HDLC (high-level data-link control) is a standard published by ISO that has achieved wide use throughout the world. HDLC is considered a superset to several other protocols. both half-duplex and full-duplex transmission, point-to-point and multipoint configurations, as wel as switched or non-switched channels. HDLC uses the term frame to indicate an Independent entity of data transmitted across the link from one station to another. The frame consists of five or six fields. All frames must start and with the flag fields. The stations attached to the data link are required to continuously monitor for the flag sequence. The flag sequence consists of 01111110. Flags can be continuously transmitted on the link between HDLC frames. It provides for a number of options in its implementation. HDLC supports Flas ControlInformation FCS Flas Address Figure 1: HDLC Frame Format Your assignment is to write a program that will receive the characters from the keyboard (0's , I's or any other character) until it detects an HDLC flag. Upon detection of the first flag, the program will continue to receive the characters from the keyboard and shows them on the screen until a flag is detected again. The program prints to the screen that the end flag has been detected and that the is the information keyed in between the two flags. No Carriage Return is allowed as part of your input at any time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
