, , , , , , , , , ,

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

$25

File Name: Csc_354_____assignment__1__write_a_complete_module_used_to_maintain_the_symbol_table_for_the_sic_xe_assembler.zip
File Size: 1026.78 KB

5/5 - (1 vote)

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

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

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