SDSU CS530 Spring 2003 SIC/EM Translator Specification

----------------------------------------------------------------------

SIC/EM Translator

You shall develop an absolute translator for a subset of the SIC/XE machine instructions described in your course text (BECK). It will use the same machine instruction mnemonics, opcodes, registers, formats, and requirements as described in BECK, except where noted. The subset will be referred to as a SIC/EM machine (SIC Economy Model).

BECK Appendix A is an important reference for machine instructions. Chapter provides further details, such as the numerical designations for the different registers.

Your translator shall read a special language described below, and generate at most a single machine instruction for each statement it reads.

SIC/EM Machine

The SIC/EM machine, as an economy model of the SIC/XE, is missing some of the features of the SIC/XE, but like the SIC/XE, is upward-compatible with the basic SIC machine. Also, SIC/EM programs will run on a SIC/XE machine, as the SIC/EM does not introduce any new features.

The SIC/EM machine lacks a floating-point unit, and so does not have a floating-point register, nor does it handle any of the floating-point instructions specified for the SIC/XE. Also, the SIC/EM does not have a base register, so no base-relative addressing modes are provided. (The "b" bit is always zero in a SIC/EM instruction.) Only direct addressing and PC-relative addressing are understood by the SIC/EM machine. Further, the SIC/EM does not support channel I/O, so those instructions are likewise not supported.

Translator Language

The translator shall read statements until an EOF (end of file) is read. Each statement will be read and then processed. Each statement shall have the following format:

MNEMONIC MODE OPERAND MODIFIER ;COMMENT

Symbols and instructions are not case sensitive. (You may cast all input to upper or lower case as you desire.) All symbols begin with a character in A..Z (or a..z), and are followed by up to seven additional characters in A..Z0..9 (or a..z0..9). Symbols longer than eight characters should generate an error. No user-defined symbol may be the same as any instruction or psuedo-operation.

Note that since a ,P (PC-relative addressing) mode is explicitly specified, the assembler does not have to decide whether or not to choose simple addressing over relative addressing. However, it still must check -- if PC-relative addressing is specified, and the specified location is not in the range PC-2048..PC+2047 (PC-x800..PC+x7FF), then an error should occur ("Operand out of range"). This is not the techniqued specified by BECK.

Psuedo-Operations

A number of psuedo-operations, or assembler directives, are defined for this assembler.

Sample Input

Sample input and output files will be provided.

---------------------------------------------------------------------- $Id: SICEM_spec.html,v 1.5 2003/02/10 07:55:19 stremler Exp stremler $