Question: 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

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, s00002000

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!