Program to calls to echo the typed characters, C/C++ Programming

Write a main program that uses these system calls to echo the typed characters. The pseudo code will look something like:

void traphandler ()  {

   if (R0 == 0) { // read system call

      R1 = getchar(); // poll the status register of the IO terminal until a char is available then load it into R1

   } else if (R0 == 1) { // write system call

      putchar(R1); // just store R1 to memory location 0xfff0




void main() {

   char c;

   while (1) {

      c = read();  // set R0 to 0 can issue the 'trap' instruction, result will be in R1

      write(c);  // set R0 to 1 and set R1 to 'c' and issue the 'trap' instruction



Posted Date: 3/8/2013 6:26:43 AM | Location : United States

Related Discussions:- Program to calls to echo the typed characters, Assignment Help, Ask Question on Program to calls to echo the typed characters, Get Answer, Expert's Help, Program to calls to echo the typed characters Discussions

Write discussion on Program to calls to echo the typed characters
Your posts are moderated
Related Questions
Describe Processing an array? The Single operations which involve complete arrays are not permitted in C language. therefore if a and b are similar arrays (for example same dim

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

Static Class Members As we already know all the objects of the class have dissimilar data members but invoke the similar member functions. Though, there is an exception to this

We can combine more than one variable on the same line i.e.   float number1,number2,number3; etc Sometimes we want to mix the variable types used on the same line, this could

how to see inbox details of a particular email adress on console

What does it mean to declare a 1.      member function as a virtual A: (a) C++ virtual function is member function of any class, whose functionality may be over- ridden in

6999066263304447777077766622337778 -----> message sent by the first smuggler. my name is robert---------> message decoded by the second smuggler. Where ‘0’ denotes the "space".

Make a list of functions that are standard in C++. You must include each of the following for each function: Name of function Its parameters Data type it returns

How I get C, C++, C# .net assignments ?