Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Assembly Language Programming please As the required part of the assignment you are to create an assembler (more accurately a cross-assembler) using the C++

C++

Assembly Language Programming

please

As the required part of the assignment you are to create an assembler (more accurately a cross-assembler) using the C++ language, that runs on REPL.IT and translates any correct source code written in the Doge assembly language to the machine language of the Skynet computer.

With this assembler, programmers will be able to write programs in Doge, rather than zeros and ones required by Skynet.

The assembler will open the source file named assemblycode.txt, translate the source to machine language and send the translated output to the screen. To make grading easy I am asking a hexadecimal equivalent of the bit pattern to be output to the screen also. Keep in mind that C++ allows for hexadecimal as well as binary output, so you do not need to do any conversion. Sample output to the screen:

image text in transcribed

image text in transcribed

The assembler will open the source file named assemblycode.txt, translate the source to machine language and send the translated output to the screen. To make grading easy I am asking a hexadecimal equivalent of the bit pattern to be output to the screen also. Keep in mind that C++ allows for hexadecimal as well as binary output, so you do not need to do any conversion. Sample output to the screen: Address Content data 0000 0010 1101 2D 0001 1101 0001 D1 0010 0100 1001 49 code 0000 00110101 35 0001 11110001 F1 0010 00001001 09 Remember to test your C++ translator program on the web-based IDE www.REPL.IT before you upload. Hint: First have the program make one pass over the input file just to create the symbol table. Matching each user defined name to its address either in the code or the data section of memory. Then write the second pass to do the actual translation. If having problems with the first pass, do the second pass using zero for all addresses. Then you can come back complete the first pass after we have had some more discussions on the symbol table.

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 Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions