Action Types Another view of ISA is what is its function. This can be broken into several catagories. Various commands in these catagories may overlap, but they are listed by their primary function. Program control - Jump, Call, Interrupt and the appropriate returns. These may be an absolute value or relative to the current IP settings. In general, each of these behaved slightly different.
Call - refered to by several different names. The Call records the address of the command immediately following the Call and a matching command retrieves this information to return to the calling rountine. This can be implemented in a variety of ways that can take a large or small amount of system resources. On Intel, the return data is stored on the stack which has its own pointer and storage area. On the IBM 360, the user specifys the register that will hold the return address until needed and its the user's responsibility to not destroy that information.
Interrupt - An interrupt usually records the return address, and the conditon status of the current process environment. On some systems, it may record even more. Some systems allow masking or restriction of different interrupt requests or request types.
Conditionals - Most systems have conditional versions of the above command types. Often address calculations switch to relative addressing.
Return - Both the calls and interrupts require matching return commands. These implicit instructions invoke standardized actions whose outcome is based on the previous state of the system
Single operand manipulation instructions - negate, either 1s or 2s complement, increment (usually by 1), decrement, and zero. On some systems, multiple actions may be included in the command, such as decrement and branch if counter = 0.
Bit Manipulation - Set, Clear and test using masks. Offers several of the boolean and single op commands applied to individual bits rather than to the whole byte or word.
Shift and Rotate - shifting the data unit in left or right. This can be used to effectively multiply or divide. Additionally, it can be used to simulate some of the bit manipulation commands. Shifts can vary in their behavior. Bits shifted out may be lost or preserved and bits shifted in may be zero or obtained from somewhere else (such as the carry flag).
Also, some systems allow both logical and arithmetic shifts. In a logical shift the whole byte, register or word is involved. In arithmetic, the high bit recognized as a sign flag is not shifted.
Arithmetic - add, subtract, multiply, divide. On the single register integer level, these features can be accomplished with the boolean, single operation, and shift functions. However, many systems handle multi-register values, floats, and BCD numbers. Additionally some systems provide additonal features such as trig. functions for graphic calculations.
For these to work, the stack has to be hardware (ISA) supported usually with a dedicated regiser.
Pop removes a value.
Swap switches the last to values added.
Rotate (with a possible value) takes each value and moves it down one and moves the last value to the top.