Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Intel i386 assembly language programming Please note that we consider this the old-fashioned way to do this programming! The current way is to use assembler

Intel i386 assembly language programming

Please note that we consider this the old-fashioned way to do this programming! The current way is to use assembler only where it is required. Write an assembler function to read and echo characters. The C driver does the same initial logic determining whether or not the console is a COM port and if so which one, and if not, just return. In the new version, it then goes on to ask the user for the "escape character" that stops the echo loop. This can be CONTROL-A, but it doesn't have to be. The user types the actual character, not its ASCII code or whatever, to specify the escape character. Then the C driver calls the assembler echo function:

void echo(int comport, unsigned char esc_char)

The assembler code does the loop with in and out instructions to do the actual I/O, testing for the special esc_char and returning when it is seen coming from the user. Call your files echo.s and echoc.c. In file echo.script, show a run with "abc" followed by the esc_char, a second run with "abcdexy" followed by the esc_char, and a third run with "abcdexy", then esc_char. If your keyboard doesn't have a key marked line feed, use . Since we haven't asked for any special treatment for , the "xy" of the second test should overwrite the "ab", but the should prevent this in the third test.

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

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

10. How might Israeli HR managers improve their training planning?

Answered: 1 week ago

Question

=+j Identify the challenges of training an international workforce.

Answered: 1 week ago