Question: Assembly language programming I need help with this one. I need to upload c source file. Thank you in advance. (one day ill buy you

Assembly language programming

I need help with this one.

I need to upload c source file. Thank you in advance. (one day ill buy you a Ferrari :D)

Assembly language programming I need help with this one. I need to

Simple Assembly Interpreter Develop a simple assembly code interpreter for a theoretical processor with the following properties. This processor only has seven instructions: lod imm32 Load a 32-bit immediate value lod mean 32 Load a 32-bit value from memory add imm32 Add a 32-bit inmediate add mem32 Add a 32-bit value from memory sub imm32 Subtract a 32-bit immediate sub med 32 Subtract a 32-bit value from memory sto mem32 Stores the result into a single memory location You can assume this simple processor has only one register and 256 32-blt memory locations. Your simple assembler will given an array containing lnstructlans and will convert the Instructions Into x86 code on the fly. You should be able to do this through a comblnation of C and Inline assembly. The only parts that have to be in assembly are the code elements for the above Instructions. For instance, a lod Instruction could become a moveax Instruction. The mem32 addresses are In terms of bytes. For Instance, an address of Dx10 would refer to the 17th byte, or the 5th Integer based Index. Immedlate values are hex numbers without a In front, Memory address are hex numbers with the Ox In front. char inesofCodeC lod 0x10 mem32 hex value add 1010 imm 32, hex value sub 11 imam 32, hex value sto 0x14" mem 32, hex value As noted, your project can use a combination of Cand assembly. You can useCstrinE processing functions from the C standard library. Your function should kook like the following: int simple Assembler(char LinesofCode, int lineCount, int memory) lines ORCode is an array of strings containing the code lines you are to execute. memory is a 256 element 32-bit integer array that is given to you. ineCount is the count of the number of lines in the linesofCode array. simpleAssembler should return a -1 if an error has occurred and 0 otherwise The following Visual Studio project wil help you get started

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!