Question: I need help with some x86 assembly. Thanks! Write an assembly program that reads lines of text from a txt file and prints them diagonally.

I need help with some x86 assembly. Thanks!

Write an assembly program that reads lines of text from a txt file and prints them diagonally.

pseudo-code:

set the count of spaces to 0.

repeat over and over until the sys_read fails to read any sort of new input:

then, read a buffer of data

for each input byte in the buffer:

if there is not a newline byte:

print spaces

and that byte (as ascii character)

then, increase the count of spaces by 1

else:

print a newline byte

reset count of spaces to 0

Example:

word.txt:

something

printed:

I need help with some x86 assembly. Thanks! Write an assembly program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!