100%(1)100% au considerat acest document util (1 vot)
24 vizualizări20 pagini
The document discusses the Simple As Possible Computer (SAP-2) microprocessor. It includes block diagrams showing the architecture and operation of the SAP-2. It also provides tables listing the mnemonics and opcodes used in assembly language programming for the SAP-2. Examples are given of assembly language instructions and the step-by-step operation and timing of instructions like LDA (load accumulator) and jump instructions.
The document discusses the Simple As Possible Computer (SAP-2) microprocessor. It includes block diagrams showing the architecture and operation of the SAP-2. It also provides tables listing the mnemonics and opcodes used in assembly language programming for the SAP-2. Examples are given of assembly language instructions and the step-by-step operation and timing of instructions like LDA (load accumulator) and jump instructions.
The document discusses the Simple As Possible Computer (SAP-2) microprocessor. It includes block diagrams showing the architecture and operation of the SAP-2. It also provides tables listing the mnemonics and opcodes used in assembly language programming for the SAP-2. Examples are given of assembly language instructions and the step-by-step operation and timing of instructions like LDA (load accumulator) and jump instructions.
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET Block Diagram
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET Mnemonics and Op-code Mnemonics Op code Mnemonics Op code ADD B 80H HLT 76H ADD C 81H IN byte DBH ANA B A0H INR A 3CH ANA C A1H INR B 04H ANI byte E6H INR C 0CH CALL address CDH JM address FAH CMA 2FH JMP address C3H DCR A 3DH JNZ address C2H DCR B 05H JZ address CAH DCR C 0DH LDA address 3AH
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET Mnemonics and Op-code Mnemonics Op code Mnemonics Op code MOV A,B 78H ORA C B1H MOV A,C 79H ORI byte F6H MOV B,A 47H OUT byte D3H MOV B,C 41H RAL 17H MOV C,A 4FH RAR 1FH MOV C,B 48H RET C9H MOV A,byte 3EH STA address 32H MOV B,byte 06H SUB B 90H MOV C,byte 0EH SUB C 91H NOP 00H XRA B A8H ORA B B0H XRA C A9HH
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET Example MVI A,17H Mnemonics Opcode MVI A,byte 3E H MVI B,2DH MVI B,byte 06 H ADD B ADD B 80 H STA address 32 H STA 5600H INR A 3C H INR A MOV C,A 4F H
MOV C,A HLT 76 H
HLT
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA address LDA 8000H : Load the accumulator with the content of address 8000H
RAM address Content
2000H 3A H 2001H 00 H 2002H 80 H
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H T1 State: Address State Output of PC is 2000H 2000H is sent to the W bus MAR loads 2000H The content of address 2000H of RAM is available
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H T2 state: Increment State PC has increased its value to 2001H 2001H is now available at PC’s output
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H T3 State: Memory State MDR enables the content of RAM address to W bus IR loads the content
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H Execution Cycle: T4
PC’s output 2001H is
enabled to W bus Content of W bus is loaded to MAR
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H Execution Cycle: T5 PC increases its output to 2002H Content of address 2001H is enabled to W bus and loaded to B register
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H Execution Cycle: T6 PC’s output 2002H is enabled to W bus Content of W bus is loaded to MAR
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H Execution Cycle: T7 PC increases its value to 2003H Content of 2002H is enabled to W bus and loaded to C register
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H Execution Cycle: T8 Contents of B & C registers are enabled to W bus to create the 16 bit address 8000H 16 bit address is then loaded to MAR
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET LDA 8000H Execution Cycle: T9 Content of memory address 8000H is enabled to W bus Content of W bus is loaded to the Accumulator
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET JUMP Instruction Instead of fetching the next instruction in the usual way, jumps to another part of program, e.g. JMP 3000H Unconditional Jump
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET JUMP Instruction JM 3000H : Jump to address 3000H if the sign flag is 1 (content of accumulator is -ve) Otherwise fetch the next instruction at 2006H Conditional Jump
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET CALL and RET CALL 5000H : Call the subroutine starting from 5000H RET : return, Have to return to the address next to the address where CALL 5000H was stored CALL is unconditional
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET CALL and RET When CALL is executed, the content of PC is automatically saved in memory locations FFFEH and FFFFH Infinite Loop?
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET Thank You
EEE 415: MICROPROCESSOR & EMBEDDED Md. Shafiqul Islam
1/14/2020 SYSTEM Assistant Professor, Dept of EEE, BUET