Instruction Set and Assembly Language Programming 153
The data type, permitted by the processor, may vary widely, depending upon the processor. Some allow
8 and 16 bits of data. Others may allow 8, 16 and 32 bits of data. In some processors, even 1 bit of data
may be handled alongwith 8 or 16-bit data. There are some processors allowing 4-bit of data handling.
The bit-wise nomenclature of data is presented in Figure 6.1 . We have already indicated in Chapter 3 that
bit is the smallest storage cell, generally a ip- op, which can store either 1 or 0 in electrical form. Note
that the term ‘word’ is also used to denote the general number of bits used by the processor. For example,
a 32-bit processor might be referred as accommodating instruction set of word length of 32-bit. However,
the de nitions of bit, nibble, and byte remain unchanged and are not controversial (so far).
Figure 6.1 Bit-wise designation of data
Some special type of data transfer instructions are always present in all processors, related with
some special memory segment. For example, PUSH and POP instructions are always related with data
movements in connection with system stack area, pointed by the stack pointer. Finally, it is not true that
all internal registers of a processor may be accessed by data transfer instructions. For example, the pro-
gram counter register of 8051 cannot be accessed by any instruction directly, to read its value. However,
instructions are available in 8051 instruction set to reload its program counter by some speci c data.
6.3.2 Arithmetic and Logical Type
This group of instructions of any processor is responsible for number crunching. As we shall observe,
most processors offer instructions for four basic arithmetic operations (add, subtract, multiply and divide)
with signed and unsigned integers and essential logical operations, e.g., AND, OR, XOR, NOT, with shift
and rotate instructions. In Chapter 4, we have discussed about the representation of various types of data.
Using these instructions all types of data manipulations become possible for any processor.
For BCD arithmetic, some processors offer special instructions like decimal adjust . As most of the
need would be on decimal number processing, this type of instruction helps the program to quickly
solve the problem of BCD manipulation using binary representation.
In case of data move operations, the condition ags of the processor generally remain unaffected.
However, in general, arithmetic and many logical operations re ect their results’ conditions through
different ags, for further processing and for deciding the program- ow.
6.3.3 Program Flow Control Type
Program ow control instructions form the third major group of processor instructions. Generally, they
are sub-divided as conditional and unconditional branching and subroutine call and return. As indicated
earlier, it is the status of processor ags that decides the conditional branching. Depending upon the
processor, there may be very few or very large number of branching instructions.
M06_GHOS1557_01_SE_C06.indd 153M06_GHOS1557_01_SE_C06.indd 153 4/29/11 5:09 PM4/29/11 5:09 PM