Two major classes of computer architecture emerged.
Harvard Architecture, named after Harvard series of relay calculators
developed by Howard Aiken at Harvard
Von Neumann Architecture, developed by John Von Neumann at
Princeton university. In
Back CMP [VarX],#0
Implementation of the WHILE loop constructs:
WHILE (VarX > 0)
Implementation of WHILE in
VIP assembly language
Note: VarX is an address
label. In VIP
Add source operand to the destination operand.
e.g. ADD R0,#1 ; R0 = R0 + 1
ADD R0,R1 ; R0 = R0 + R1
CCR flags that may be affected are N, Z, V and C.
Destination operand is overwritten with result
High Level Programming
How is the IF construct implemented?
if (a > b)
Imitating the high-level test condition does not result in
Computer Interfacing and Peripherals
Parallel data transfer allows more than one-bit of data to be
transferred simultaneously between the computer and the
Typically synchronous, requiring clock information to govern
the data transfer.
Modular Program Design
Large, complex software should be decomposed
into several less complex modules.
Modules can be designed and tested independently.
Modules can reduce overall program size as
To achieve this, all working registers used by the
subroutine must be saved on the stack on entry and
restored from stack before returning.
A transparent subroutine will not affect any CPU
resources used by t
The assembly code produced varies between compilers
and depends on the nature and range of the case values.
case 0 : cfw_S0;
case 1 : cfw_S1;
case 2 : cfw_S2;
case 3 : cfw_S3;
The system stack is a very important requirement
in all microprocessor system.
Beside subroutine calls, system
stack is also used in exception
handling and as a temporary
storage area for local variables
Instruction Set Basic Groups
Non system-level instructions in a processor can
be typically classified into three basic groups:
Data transfer instructions that move data between
registers and/or memory.
Data processing instructions that mo