Question: Using what you have learned from this unit create and a some of your own ingenuity create fWriteChar and fReadChar procedures. fWriteChar should write a
Using what you have learned from this unit create and a some of your own ingenuity create fWriteChar and fReadChar procedures.
fWriteChar should write a single character to a file. You should pass the character to write to the file in the al register. You should also pass the file name in the edx register.
fReadChar should read a single character from a file and return the character back to main in the al register. You should pass the name of the file to be read from in the edx register.
Both procedures should handle opening and closing the file. For instance the logic for fReadChar would be as follows:
Open the file
Read the character from the file
Close the file
It should be noted that some of the calls to the Windows API will not allow registers. Because of this you will need to create local variables for the task. To help you out with this here is the stubs for the procedures:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
