Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I wrote exactly what is required below! fprint should not be used because thats not what the assignment is. write a program in C that
I wrote exactly what is required below! fprint should not be used because thats not what the assignment is.
write a program in C that has:
- A main or _start function that calls all of your other functions to demonstrate them.
- A function puts that prints a NULL-terminated string to the terminal.
- Calling puts sequentially will print strings one after another. In other words, puts should not overwrite text that was previously written to the screen.
- Printing a ' ' character should advance to the next line on the screen.
- When the cursor gets to the bottom of the screen, advancing to a new line should scroll the existing text on the screen up one line.
- You can not use printf!!!
(attached you'll see a picture of the code I have so far)
int x,y: void puts (int c){ void writes( int color, const char *string) volatile char *video = (volatile char*) 0xB8000; while( *string != 0 ) *video++ = *string++; *video++ = color; int main() { char str[] = "Enter your favorite color: Blue"; writes(4, str); writes (4, str); return 0; int x,y: void puts (int c){ void writes( int color, const char *string) volatile char *video = (volatile char*) 0xB8000; while( *string != 0 ) *video++ = *string++; *video++ = color; int main() { char str[] = "Enter your favorite color: Blue"; writes(4, str); writes (4, str); return 0Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started