Simplified Instructional Computer

Last updated

The Simplified Instructional Computer (abbreviated SIC) is a hypothetical computer system introduced in System Software: An Introduction to Systems Programming, by Leland Beck. Due to the fact that most modern microprocessors include subtle, complex functions for the purposes of efficiency, it can be difficult to learn systems programming using a real-world system. The Simplified Instructional Computer solves this by abstracting away these complex behaviors in favor of an architecture that is clear and accessible for those wanting to learn systems programming.

Contents

SIC Architecture

The SIC machine has basic addressing, storing most memory addresses in hexadecimal integer format. Similar to most modern computing systems, the SIC architecture stores all data in binary and uses the two's complement to represent negative values at the machine level. Memory storage in SIC consists of 8-bit bytes, and all memory addresses in SIC are byte addresses. Any three consecutive bytes form a 24-bit 'word' value, addressed by the location of the lowest numbered byte in the word value. Numeric values are stored as word values, and character values use the 8-bit ASCII system. The SIC machine does not support floating-point hardware and has at most 32,768 bytes of memory. There is also a more complicated machine built on top of SIC called the Simplified Instruction Computer with Extra Equipment (SIC/XE). The XE expansion of SIC adds a 48-bit floating point data type, an additional memory addressing mode, and extra memory (1 megabyte instead of 32,768 bytes) to the original machine. All SIC assembly code is upwards compatible with SIC/XE.

SIC machines have several registers, each 24 bits long and having both a numeric and character representation:

  • A (0): Used for basic arithmetic operations; known as the accumulator register.
  • X (1): Stores and calculates addresses; known as the index register.
  • L (2): Used for jumping to specific memory addresses and storing return addresses; known as the linkage register.
  • PC (8): Contains the address of the next instruction to execute; known as the program counter register.
  • SW (9): Contains a variety of information, such as carry or overflow flags; known as the status word register.

In addition to the standard SIC registers, there are also four additional general-purpose registers specific to the SIC/XE machine:

  • B (3): Used for addressing; known as the base register.
  • S (4): No special use, general purpose register.
  • T (5): No special use, general purpose register.
  • F (6): Floating point accumulator register (This register is 48-bits instead of 24).

These five/nine registers allow the SIC or SIC/XE machine to perform most simple tasks in a customized assembly language. In the System Software book, this is used with a theoretical series of operation codes to aid in the understanding of assemblers and linker-loaders required for the execution of assembly language code.

Addressing Modes for SIC and SIC/XE

The Simplified Instruction Computer has three instruction formats, and the Extra Equipment add-on includes a fourth. The instruction formats provide a model for memory and data management. Each format has a different representation in memory:

  • Format 1: Consists of 8 bits of allocated memory to store instructions.
  • Format 2: Consists of 16 bits of allocated memory to store 8 bits of instructions and two 4-bits segments to store operands.
  • Format 3: Consists of 6 bits to store an instruction, 6 bits of flag values, and 12 bits of displacement.
  • Format 4: Only valid on SIC/XE machines, consists of the same elements as format 3, but instead of a 12-bit displacement, stores a 20-bit address.

Both format 3 and format 4 have six-bit flag values in them, consisting of the following flag bits:

  • n: Indirect addressing flag
  • i: Immediate addressing flag
  • x: Indexed addressing flag
  • b: Base address-relative flag
  • p: Program counter-relative flag
  • e: Format 4 instruction flag

Addressing Modes for SIC/XE

SIC Assembly Syntax

SIC uses a special assembly language with its own operation codes that hold the hex values needed to assemble and execute programs. A sample program is provided below to get an idea of what a SIC program might look like. In the code below, there are three columns. The first column represents a forwarded symbol that will store its location in memory. The second column denotes either a SIC instruction (opcode) or a constant value (BYTE or WORD). The third column takes the symbol value obtained by going through the first column and uses it to run the operation specified in the second column. This process creates an object code, and all the object codes are put into an object file to be run by the SIC machine.

       COPY   START  1000        FIRST  STL    RETADR        CLOOP  JSUB   RDREC               LDA    LENGTH               COMP   ZERO               JEQ    ENDFIL               JSUB   WRREC               J      CLOOP        ENDFIL LDA    EOF               STA    BUFFER               LDA    THREE               STA    LENGTH               JSUB   WRREC               LDL    RETADR               RSUB        EOF    BYTE   C'EOF'        THREE  WORD   3        ZERO   WORD   0        RETADR RESW   1        LENGTH RESW   1        BUFFER RESB   4096        .        .      SUBROUTINE TO READ RECORD INTO BUFFER        .        RDREC  LDX    ZERO               LDA    ZERO        RLOOP  TD     INPUT               JEQ    RLOOP               RD     INPUT               COMP   ZERO               JEQ    EXIT               STCH   BUFFER,X               TIX    MAXLEN               JLT    RLOOP        EXIT   STX    LENGTH               RSUB        INPUT  BYTE   X'F1'        MAXLEN WORD   4096        .        .      SUBROUTINE TO WRITE RECORD FROM BUFFER        .        WRREC  LDX    ZERO        WLOOP  TD     OUTPUT               JEQ    WLOOP               LDCH   BUFFER,X               WD     OUTPUT               TIX    LENGTH               JLT    WLOOP               RSUB        OUTPUT BYTE   X'06'               END    FIRST 

If you were to assemble this program, you would get the object code depicted below. The beginning of each line consists of a record type and hex values for memory locations. For example, the top line is an 'H' record, the first 6 hex digits signify its relative starting location, and the last 6 hex digits represent the program's size. The lines throughout are similar, with each 'T' record consisting of 6 hex digits to signify that line's starting location, 2 hex digits to indicate the size (in bytes) of the line, and the object codes that were created during the assembly process.

       HCOPY 00100000107A        T0010001E1410334820390010362810303010154820613C100300102A0C103900102D        T00101E150C10364820610810334C0000454F46000003000000        T0020391E041030001030E0205D30203FD8205D2810303020575490392C205E38203F        T0020571C1010364C0000F1001000041030E02079302064509039DC20792C1036        T002073073820644C000006        E001000 

Sample program

Given below is a program illustrating data movement in SIC.

LDA FIVE
STA ALPHA
LDCH CHARZ
STCH C1

ALPHA RESW 1
FIVE WORD 5
CHARZ BYTE C'Z'
C1 RESB 1

Emulating the SIC System

Since the SIC and SIC/XE machines are not real machines, the task of actually constructing a SIC emulator is often part of coursework in a systems programming class. The purpose of SIC is to teach introductory-level systems programmers or collegiate students how to write and assemble code below higher-level languages like C and C++. With that being said, there are some sources of SIC-emulating programs across the web, however infrequent they may be.

See also

Related Research Articles

<span class="mw-page-title-main">Data General Nova</span> 16-bit minicomputer series

The Data General Nova is a series of 16-bit minicomputers released by the American company Data General. The Nova family was very popular in the 1970s and ultimately sold tens of thousands of units.

<span class="mw-page-title-main">MCS-51</span> Single chip microcontroller series by Intel

The Intel MCS-51 is a single chip microcontroller (MCU) series developed by Intel in 1980 for use in embedded systems. The architect of the Intel MCS-51 instruction set was John H. Wharton. Intel's original versions were popular in the 1980s and early 1990s, and enhanced binary compatible derivatives remain popular today. It is a complex instruction set computer, but also has some of the features of RISC architectures, such as a large register set and register windows, and has separate memory spaces for program instructions and data.

<span class="mw-page-title-main">Intel 8085</span> 8-bit microprocessor by Intel

The Intel 8085 ("eighty-eighty-five") is an 8-bit microprocessor produced by Intel and introduced in March 1976. It is the last 8-bit microprocessor developed by Intel.

x86 assembly language is the name for the family of assembly languages which provide some level of backward compatibility with CPUs back to the Intel 8008 microprocessor, which was launched in April 1972. It is used to produce object code for the x86 class of processors.

<span class="mw-page-title-main">IBM 1130</span> 16-bit IBM minicomputer introduced in 1965

The IBM 1130 Computing System, introduced in 1965, was IBM's least expensive computer at that time. A binary 16-bit machine, it was marketed to price-sensitive, computing-intensive technical markets, like education and engineering, succeeding the decimal IBM 1620 in that market segment. Typical installations included a 1 megabyte disk drive that stored the operating system, compilers and object programs, with program source generated and maintained on punched cards. Fortran was the most common programming language used, but several others, including APL, were available.

Mach-O, short for Mach object file format, is a file format for executables, object code, shared libraries, dynamically loaded code, and core dumps. It was developed to replace the a.out format.

<span class="mw-page-title-main">RCA 1802</span> Early microprocessor

The COSMAC is an 8-bit microprocessor family introduced by RCA. It is historically notable as the first CMOS microprocessor. The first production model was the two-chip CDP1801R and CDP1801U, which were later combined into the single-chip CDP1802. The 1802 represented the majority of COSMAC production, and today the entire line is known simply as the RCA 1802.

Addressing modes are an aspect of the instruction set architecture in most central processing unit (CPU) designs. The various addressing modes that are defined in a given instruction set architecture define how the machine language instructions in that architecture identify the operand(s) of each instruction. An addressing mode specifies how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction or elsewhere.

The zero page or base page is the block of memory at the very beginning of a computer's address space; that is, the page whose starting address is zero. The size of a page depends on the context, and the significance of zero page memory versus higher addressed memory is highly dependent on machine architecture. For example, the Motorola 6800 and MOS Technology 6502 processor families treat the first 256 bytes of memory specially, whereas many other processors do not.

In computer engineering, an orthogonal instruction set is an instruction set architecture where all instruction types can use all addressing modes. It is "orthogonal" in the sense that the instruction type and the addressing mode vary independently. An orthogonal instruction set does not impose a limitation that requires a certain instruction to use a specific register so there is little overlapping of instruction functionality.

In computing, a word is the natural unit of data used by a particular processor design. A word is a fixed-sized datum handled as a unit by the instruction set or the hardware of the processor. The number of bits or digits in a word is an important characteristic of any specific processor design or computer architecture.

<span class="mw-page-title-main">WDC 65C02</span> CMOS microprocessor in the 6502 family

The Western Design Center (WDC) 65C02 microprocessor is an enhanced CMOS version of the popular nMOS-based 8-bit MOS Technology 6502. It uses less power than the original 6502, fixes several problems, and adds new instructions. The power usage is on the order of 10 to 20 times less than the original 6502 running at the same speed; its reduced power consumption has made it useful in portable computer roles and industrial microcontroller systems. The 65C02 has also been used in some home computers, as well as in embedded applications, including medical-grade implanted devices.

Atari Assembler Editor is a ROM cartridge-based development system released by Atari, Inc. in 1981. It is used to edit, assemble, and debug 6502 programs for Atari 8-bit computers without the need for additional tools. It was programmed by Kathleen O'Brien of Shepardson Microsystems, the company which wrote Atari BASIC, and Assembler Editor shares many design concepts with that language implementation.

Intel hexadecimal object file format, Intel hex format or Intellec Hex is a file format that conveys binary information in ASCII text form, making it possible to store on non-binary media such as paper tape, punch cards, etc., to display on text terminals or be printed on line-oriented printers. The format is commonly used for programming microcontrollers, EPROMs, and other types of programmable logic devices and hardware emulators. In a typical application, a compiler or assembler converts a program's source code to machine code and outputs it into a object or executable file in hexadecimal format. In some applications, the Intel hex format is also used as a container format holding packets of stream data. Common file extensions used for the resulting files are .HEX or .H86. The HEX file is then read by a programmer to write the machine code into a PROM or is transferred to the target system for loading and execution. There are various tools to convert files between hexadecimal and binary format, and vice versa.

<span class="mw-page-title-main">TI-990</span> Series of 16-bit computers by Texas Instruments.

The TI-990 was a series of 16-bit minicomputers sold by Texas Instruments (TI) in the 1970s and 1980s. The TI-990 was a replacement for TI's earlier minicomputer systems, the TI-960 and the TI-980. It had several unique features, and was easier to program than its predecessors.

<span class="mw-page-title-main">Word addressing</span> Support by a hardware architecture of accessing memory only in units of words larger than a byte

In computer architecture, word addressing means that addresses of memory on a computer uniquely identify words of memory. It is usually used in contrast with byte addressing, where addresses uniquely identify bytes. Almost all modern computer architectures use byte addressing, and word addressing is largely only of historical interest. A computer that uses word addressing is sometimes called a word machine.

The PDP-11 architecture is a 16-bit CISC instruction set architecture (ISA) developed by Digital Equipment Corporation (DEC). It is implemented by central processing units (CPUs) and microprocessors used in PDP-11 minicomputers. It was in wide use during the 1970s, but was eventually overshadowed by the more powerful VAX architecture in the 1980s.

In IBM System/360 through present day z/Architecture, an address constant or "adcon" is an assembly language data type which contains the address of a location in computer memory. An address constant can be one, two, three or four bytes long, although an adcon of less than four bytes is conventionally used to hold an expression for a small integer such as a length, a relative address, or an index value, and does not represent an address at all. Address constants are defined using an assembler language "DC" statement.

The IBM System/360 architecture is the model independent architecture for the entire S/360 line of mainframe computers, including but not limited to the instruction set architecture. The elements of the architecture are documented in the IBM System/360 Principles of Operation and the IBM System/360 I/O Interface Channel to Control Unit Original Equipment Manufacturers' Information manuals.

<span class="mw-page-title-main">WD16</span> Microprocessor produced by Western Digital

The WD16 is a 16-bit microprocessor introduced by Western Digital in October 1976. It is based on the MCP-1600 chipset, a general-purpose design that was also used to implement the DEC LSI-11 low-end minicomputer and the Pascal MicroEngine processor. The three systems differed primarily in their microcode, giving each system a unique instruction set architecture (ISA).

References