Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Must be done in c++ . Thanks. In this program you are to simulate a 2-pass assembler in C++. The input to this program is
Must be done in c++. Thanks.
In this program you are to simulate a 2-pass assembler in C++. The input to this program is an assembly language program (see the handout on SMC 68000) and the output should include a symbol table and the machine code version of the input. You have to echo the input. Do file I/O You are implementing two classical algorithms (Fig. 6.1 & Fig 6.2). INPUT ORG MOVE TRAP MOVE MOVE ADD MOVE ADDI TRAP TRAP END S00000500 #79, $00002000 #1 DO, S00002004 S00002000, DO S00002004, DO DO, S00002002 #18,$00002002 #2 #0 READLN (Y), INPUT INTO DO STORE DO IN LOCATIONY FETCH VARIABLE I FOR THE AD ADD Y+1 LOOP1 STORE THE SUM IN X LOOP2 ADD 18 TOX PRINT X STOP OUTPUT Address Machine code Operands Instructions 00000500 33FC 4F MOVE #79, s00002000Step 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