Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program in Assembly language using Irvine library (irvine32,inc) to read the data from the file and save it into 2D array. The content
Write a program in Assembly language using Irvine library (irvine32,inc) to read the data from the file and save it into 2D array. The content of the file should be like A,30,4.
the program should store 3 different data delimited by commas in 2D array.
//Reference for file read
ReadFile PROTO, hFile:HANDLE, ; input handle lpBuffer:PTR BYTE, ; ptr to buffer nNumberOfBytesToRead:DWORD, ; num bytes to read lpNumberOfBytesRead:PTR DWORD, ; bytes actually read lpOverlapped:PTR DWORD ; ptr to asynch info
//2D array
tableB BYTE 10h, 20h, 30h, 40h, 50h Rowsize = ($ - tableB) BYTE 60h, 70h, 80h, 90h, 0A0h BYTE 0B0h, 0C0h, 0D0h, 0E0h, 0F0h
row_index = 1 column_index = 2 mov ebx,OFFSET tableB ; table offset add ebx,RowSize * row_index ; row offset mov esi,column_index mov al,[ebx + esi] ; AL = 80h
Please post the output screen as proof that program will compile. Irvine library must be included.
Step 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