CSc 354 – Assignments #3 and #4 solution

$29.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (4 votes)

Pass 1 is to be implemented as a standalone module. Pass 2 is to be implemented as a standalone module. The following is a list of required SIC/XE assembler features that must be implemented:
• Instruction Set // Appendix A pages 495–498 o All SIC/XE instructions • Instruction Formats // Appendix A page 498 o 1, 2, 3 and 4 • Addressing Modes // Appendix A pages 498–499 o Simple/Direct (with or without Indexing), Indirect, Immediate o Base relative, Program-counter relative • Additional Features o Comments (full & partial line), Literals (C & X), Modules (Control Sections) • Assembler Directives o BASE BYTE END EQU EXTDEF EXTREF RESB RESW START WORD operations.dat contains all assembly language instructions and their associated attributes. File format: MNEMONIC FORMAT OPCODE (Hex) // Operation Code lookup table required for this ADD 3 18 // Sorted array using Binary Search // 3 supports both format 3 and format 4 The input to the assembler consists of the following: • Pass #1 o Free format SIC/XE source program. § Obtain the file name from the command line – prompt for when not specified • Pass #2 o Intermediate file generated by Pass #1. The output of the assembler consists of the following: • Pass #1 o Intermediate file consisting of the source program with line numbers and LC values added. § File named the same as the source program with the extension of (.int). o Symbol Table, Literal Table • Pass #2 o Assembly listing written to a file named the same as the source program with the extension of (.lst). § Include the Symbol Table and Literal Table at the bottom of this file. o Object program written to a file named the same as the source program with the extension of (.obj). • All output is also written to the screen for testing and grading purposes.
All source programs used for grading will be syntactically correct.
Bonus points can be earned by performing error checking on the source programs: • Pass #1 (assignment #3) o illegal instruction (2 points) o invalid symbol (3 points) • Pass #2 (assignment #4) o undefined symbol (3 points) o illegal addressing (3 points) o address out of range (4 points) • Indicate with each assignment submission whether or not error checking has been included.