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

Assignment Help:

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

   }

}


Related Discussions:- Program to calls to echo the typed characters

Padovan string, padovan string for natural numbers program in java /...

padovan string for natural numbers program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : package test.padovanstring; public class Padov

Hwid spoofer for windows 7, Project Description: I want a simple program...

Project Description: I want a simple program that will spoof my hardware id. I should be able to prepare the id to spoof to in the program and press "random" button to spoof to

Integration, Write a program to find the area under the curve y = f(x) betw...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b

Source code for decoe to code, i am using mobile phone if i want to communi...

i am using mobile phone if i want to communicate via massage but that should be very secret

What are literals, Literals (Constants) Constants are data storage loca...

Literals (Constants) Constants are data storage locations whose address is not accessible for the user. Their value is not altered during the course of the program. Literal

Area under curve, Write a program to find the area under the curve y = f(x)...

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.

Explain the terms- substitutability and extensibility, Explain the terms- S...

Explain the terms- Substitutability and Extensibility Substitutability - The objects of a properly derived class can be safely and easily substituted for an object of its

Volume, how to find the volume of cone , cylinder and sphere ?

how to find the volume of cone , cylinder and sphere ?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd