Assignment Chef icon Assignment Chef

[SOLVED] Csc 354 – assignment #1 write a complete module used to maintain the symbol table for the sic/xe assembler

5.0 1 customer review Digital download

Digital download

$25.00

Availability
In stock
Checkout
One item

Need a hand?

Message us on WhatsApp for payment or download support.

WhatsApp QR code

Write a complete module used to maintain the symbol table for the SIC/XE assembler:

Write a complete main/driver program that uses the symbol table module to process two text files:

 

Basic Algorithm

 

SYMBOL (also referred to as a label in assembly language programing)

 

VALUE

 

RFLAG (Boolean)

 

IFLAG (Boolean)

 

MFLAG (Boolean)

 

Sample Program Run

 

Step #1 SYMS.DAT                       //  File names are case sensitive in Linux as well as some languages

ABCD:     50     True                          //  Valid – insert ABCD and all attributes into symbol table  (*)

B12_34:     -3     false                    //  Valid – insert B12_ and all attributes into symbol table  (*)

a1B2_c3_D4:   +45   true                 //  Valid – insert A1B2 and all attributes into symbol table  (*)

ABCD!:    33     true                      //  ERROR – symbols contain letters, digits and underscore:  ABCD!

1234567890:     0     false                   //  ERROR – symbols start with a letter:  1234567890

ABCD_EF:  +100  TRUE        //  ERROR – symbol previously defined:  ABCD  (+)

a1234:  3.5   FALSE                           //  ERROR – symbol a1234 invalid value:  3.5

XYZ:     100     5                            //  ERROR – symbol XYZ invalid rflag:  5

 

(*) no message displayed for valid symbols with valid attributes – set IFLAG to true – set MFLAG to false

(+) set MFLAG attribute to true for symbol ABCD

 

Step #2 search file

ABCD                                                 //  Found – display symbol ABCD and all attributes

A1b2C3_xYz                                 //  Found – display symbol A1B2 and all attributes

CDEF                                                  //  ERROR – CDEF not found in symbol table

abc~def                                     //  ERROR – symbols contain letters, digits and underscore:  abc~def

a1b2c3d4e5f6                                     //  ERROR – symbols contain 10 characters maximum:  a1b2c3d4e5f6

 

Step #3 view the symbol table – required output order and format

 

Symbol            Value  RFlag  IFlag    MFlag             //  Do not allow the data to scroll off of the screen

//  Hold the output every 20 lines – Tera Term screen size

A1B2               45        1          1          0                      //  Continue when user indicates to do so

ABCD             50        1          1          1

B12_               -3         0          1          0                      //  Perform an inorder traversal of symbol table

 

Notes and Suggestions

 

Other Requirements