Import question of microprocessor

 1.  Procedure, Re-entrant and Recursive Procedure:

Writing and using procedures

• Avoid writing the same sequence of instruction again and again.

• Write it in a separate subprogram and call that subprogram whenever necessary.

• For that CALL instruction is used.

•Reentrant procedures: The procedure which can be interrupted, used and “reentered” without losing or writing over anything.

•Recursive procedure: It is the procedure which call itself.

 

2. CALL and RET instructions, ISA, Data Types.

Ans:

CALL and RET instruction:




ISA

● Stands for Instruction Set Architecture.

● Provides functional specifications for software programmers to use/program hardware to perform certain tasks.

● Provides the functional requirements for hardware designers so that their hardware design (called micro-architectures) can execute software programs.

 

Data types

● The basic capability of using different classes of values.

● Typical data types.

● Numbers .

● Integers of different lengths (8, 16, 32, 64 bits).

▪ Possibly signed or unsigned.

▪ Commonly available.

       ● Floating point numbers, e.g. 32 bits (single precision) or 64 bits (double precision)

▪ Available in some processors such as PowerPC.

       ● BCD (binary coded decimal) numbers

▪ Available in some processors, such as 68K.

          ● Non-numeric

  ● Boolean

  ● Characters


3. Status register, PUSH and POP registers, Macros, and Procedures

 

Status register:

● Contains a number of bits with each bit associated with CPU operations

● Typical status bits:

● V: Overflow

● C: Carry

● Z: Zero

● N: Negative

● Used for controlling program execution flow.

 

PUSH and POP register:

• The PUSH register/memory instruction decrements the stack pointer by 2 and copies the contents of the specified 16-bit register or memory location to memory at the new top-of-stack location.

• The POP register/memory instruction copies the word on the top-of-stack to the specified 16-bit register or memory location and increments the stack pointer by 2.




4. Big- & Little-Endian





No comments

Theme images by hdoddema. Powered by Blogger.