Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Translate psudo code to its appropriate C-code void-returning Writechar that's given a char as its argument: { declare: static unsigned short *cursor - (typecast)VIDEO START

image text in transcribed

Translate psudo code to its appropriate C-code

void-returning Writechar that's given a char as its argument: { declare: static unsigned short *cursor - (typecast)VIDEO START if 'cursor' is at the beginning of a row, erase that row (with spaces) if ch is neither CR nor LF { // it's a regular character apply pointer 'cursor' to display the character (arg passed) advance 'cursor' } else { advance cursor to 1st column of next row: current column position - (cursor - VIDEO_START) $ 80 remaining columns in this row - 80 - current column position add remaining columns to cursor if 'cursor' reaches bottom-right on screen, set it back to top-left void-returning Writechar that's given a char as its argument: { declare: static unsigned short *cursor - (typecast)VIDEO START if 'cursor' is at the beginning of a row, erase that row (with spaces) if ch is neither CR nor LF { // it's a regular character apply pointer 'cursor' to display the character (arg passed) advance 'cursor' } else { advance cursor to 1st column of next row: current column position - (cursor - VIDEO_START) $ 80 remaining columns in this row - 80 - current column position add remaining columns to cursor if 'cursor' reaches bottom-right on screen, set it back to top-left

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899