17.05.2015 Views

~ National ~ Semiconductor - Al Kossow's Bitsavers

~ National ~ Semiconductor - Al Kossow's Bitsavers

~ National ~ Semiconductor - Al Kossow's Bitsavers

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5.0 Instruction Set Overview<br />

INTRODUCTION<br />

Utilizing a total of only 30 basic instructions and capable of<br />

5 basic addressing modes, the BCP's instruction set is very<br />

easy to learn, executes extremely fast, and greatly reduces<br />

the programming effort required in communications processing.<br />

This is possible because the BCP is a Reduced<br />

Instruction Set Computer; (Le., employs a RISC processor.)<br />

The following paragraphs introduce the BCP's architecture<br />

by discussing addressing modes and briefly discussing the<br />

Instruction Set. For detailed explanations and examples of<br />

each instruction, refer to the Instruction Set Reference Section.<br />

INSTRUCTION AND DATA MEMORY<br />

The BCP utilizes a true Harvard Architecture, where the instruction<br />

and data memory are organized into two independent<br />

memory banks, each with their own address and data<br />

buses. Both the Instruction Address Bus and the Instruction<br />

Bus are 16 bits wide with the Instruction Address Bus addressing<br />

memory by words. (A word of memory is 16 bits<br />

long; Le., 1 word = 2 by1es.) Most of the instructions are<br />

one word long. The exceptions are two words long, containing<br />

a word of instruction followed by a word of immediate<br />

data. The combination of word sized instructions and a word<br />

based instruction address bus eliminates the typical instruction<br />

alignment problems faced by many CPU's.<br />

The Data Address Bus is 16 bits wide, (with the low order 8<br />

bits multiplexed on the Data Bus), and the Data Bus is 8 bits<br />

wide, (Le., one byte wide). The Data Address Bus addresses<br />

memory by bytes. Most of the BCP's instructions operate on<br />

by1e-sized operands.<br />

Note that although both instruction addresses and data addresses<br />

are 16 bits long, these addresses are for two different<br />

buses and, therefore, have two different numerical<br />

meanings, (Le., byte address or word address.) Each instruction<br />

determines whether the meaning of a 16-bit address<br />

is that of an instruction word address or a data byte<br />

address. Little confusion exists though because only the<br />

program flow instructions interpret 16-bit addresses as instruction<br />

addresses.<br />

OPERAND ADDRESSING MODES<br />

An addressing mode is the mechanism by which an instruction<br />

accesses its operand(s). The BCP's architecture supports<br />

five basic addressing modes: register, immediate, indexed,<br />

immediate-relative, and register-relative. The first<br />

two allow instructions to execute the fastest because they<br />

require no memory access beyond instruction fetch. The<br />

remaining three addressing modes point to data or instruction<br />

memory. Typical of a RISC processor, most of the instructions<br />

only support the first three addressing modes,<br />

with one of the operands always limited to the register addressing<br />

mode.<br />

Register Addressing Modes<br />

There are two terminologies for the register addressing<br />

modes: Register and Limited Register. Instructions that allow<br />

Register operands can access all the registers in the<br />

CPU. Note that only 32 of the 44 CPU registers are available<br />

at any given point in time because the lower 12 register<br />

locations (RO-R11) access one of two switchable register<br />

banks each. (See the "CPU Register Set" section for more<br />

information on the CPU register banks.) Instructions that allow<br />

the Limited Register operands can access just the first<br />

28 registers of the CPU. Again, note that only 16 of these 28<br />

registers are available at any given point in time. Table I<br />

shows the notations used for the Register and Limited Register<br />

operands. Some instructions also imply the use of certain<br />

registers, for example the accumulators. This is noted in<br />

the discussions of those instructions.<br />

Immediate Addressing Modes<br />

The two types of the immediate addressing modes available<br />

are: Immediate numbers and Absolute numbers. Immediate<br />

numbers are 8 bits of data, (one data by1e), that code directly<br />

into the instruction word. Immediate numbers may represent<br />

data, data address displacements, or relative instruction<br />

addresses. Absolute numbers are 16-bit numbers. They<br />

code into the second word of two word instructions and they<br />

represent absolute instruction addresses. Table II shows<br />

the notations used for both of these addressing modes.<br />

TABLE I. Register Addressing Mode Notations<br />

Notation Type of Register Operand Registers <strong>Al</strong>lowed<br />

Rs Source Register RO-R31<br />

Rd Destination Register RO-R31<br />

Rsd Register is both a Source & Destination RO-R31<br />

rs Limited Source Register RO-R15<br />

rd Limited Destination Register RO-R15<br />

rsd Limited Register is both a Source & Destination RO-R15<br />

TABLE II. Immediate Addressing Mode Notations<br />

Notation Type of Immediate Operand Size<br />

n Immediate Number 8 Bits<br />

nn Absolute Number 16 Bits<br />

2-91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!