Computer Instructions

Views:
 
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

PowerPoint Presentation:

Seminar on Presented By Miss. Snehal Patil “Computer Instructions”

PowerPoint Presentation:

Introduction. Instructions. Instruction Format. Basic Computer Instructions. Table for Basic Computer Instructions. INDEX

PowerPoint Presentation:

Introduction

PowerPoint Presentation:

Instruction: An instruction is a segment of code that contains steps that need to be executed by the computer processor. Computer Instructions: Computer instructions are a set of steps or documentation that includes information on how to operate, perform, or otherwise maintain particular computer software or hardware. Instruction

PowerPoint Presentation:

Program : Program is a sequence of machine instructions. Machine Instruction : A group of bits that tell the computer to perform a specific operation i.e a sequence of micro-operation. The instructions of a program, along with any needed data are stored in memory. The CPU reads the next instruction from memory. It is placed in an Instruction Register (IR). Instruction

PowerPoint Presentation:

A computer instruction is often divided into 2 parts: An opcode (Operation Code) that specifies the operation for that instruction. An address that specifies the registers and/or locations in memory to use for that operation. In the Basic Computer, since the memory contains 4096 (= 2 12 ) words, we needs 12 bit to specify which memory address this instruction will use. In the Basic Computer, bit 15 of the instruction specifies the addressing mode (0: direct addressing, 1: indirect addressing) Instruction Format

PowerPoint Presentation:

Opcode Address Instruction Format 15 14 12 0 1 11 Addressing mode Since the memory words, and hence the instructions, are 16 bits long, that leaves 3 bits for the instruction’s opcode . Instruction Format

PowerPoint Presentation:

Basic Computer Instruction Format 15 14 12 11 0 I Opcode Address Memory-Reference Instructions (OP-code = 000 ~ 110) Register-Reference Instructions (OP-code = 111, I = 0) Input-Output Instructions (OP-code =111, I = 1) 15 12 11 0 Register operation 0 1 1 1 15 12 11 0 I/O operation 1 1 1 1 BASIC COMPUTER INSTRUCTIONS

PowerPoint Presentation:

Hex Code Symbol I = 0 I = 1 Description AND 0xxx 8xxx AND memory word to AC ADD 1xxx 9xxx Add memory word to AC LDA 2xxx Axxx Load AC from memory STA 3xxx Bxxx Store content of AC into memory BUN 4xxx Cxxx Branch unconditionally BSA 5xxx Dxxx Branch and save return address ISZ 6xxx Exxx Increment and skip if zero CLA 7800 Clear AC CLE 7400 Clear E CMA 7200 Complement AC CME 7100 Complement E CIR 7080 Circulate right AC and E CIL 7040 Circulate left AC and E INC 7020 Increment AC S P A 7010 Skip next instr. if AC is positive S N A 7008 Skip next instr. if AC is negative S Z A 7004 Skip next instr. if AC is zero S ZE 7002 Skip next instr. if E is zero HLT 7001 Halt computer INP F800 Input character to AC OUT F400 Output character from AC SKI F200 Skip on input flag SKO F100 Skip on output flag ION F080 Interrupt on IOF F040 Interrupt off BASIC COMPUTER INSTRUCTIONS

PowerPoint Presentation:

Instructions , of most modern computers, may be classified into the following groups: Data transfer (40% of user program instructions) Arithmetic Logical Input/Output MOV , LOAD. ADD, SUB, DIV, MUL. AND, OR, NOT, SHIFT, ROTATE. Separate Input/Output space input/output. Instruction Types

PowerPoint Presentation:

Program-control - may be classified into the following four groups: Unconditional branch 2. Conditional branch BRB NEXT % branch to the label NEXT SOBGTR R5, LOOP % repeat until R5=0 ADBLEQ R5, R6, LOOP % repeat until R5>R6 Instruction Types

PowerPoint Presentation:

3. Subroutine call 4. Interrupt-handling CALL SUB % push PC; branch to SUB RET % pop PC TRAP % generate an internal interrupt Instruction Types

authorStream Live Help