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

   }

   enableInterrupts();

}

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
what are objects or simply define objects

Within software languages we have the ability to store information in mail boxes i.e. memory slots which are given names to represent the box. The naming rules are governed by the

program for compiler design in c

The question description: You are required to make a C++ program to conduct timber component (beam and column) structural design according to EC5 (all the relevant design codes

Normal 0 false false false EN-US X-NONE X-NONE


C Program to check FACTORIAL   main() {             int i,j,m,fact,sum=0;           clrscr();           printf("ENTER THE NO.: ");           scanf("%d",&m);

Write a c++ program to find the sum of 0.123 ??103 and 0.456 ??102 and write the result in three significant digits


#padovan string   program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class PadovanString {