sap ii articture ,sap 2
DESCRIPTION
MICRTRANSCRIPT
![Page 1: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/1.jpg)
SAP-2
![Page 2: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/2.jpg)
Bidirectional Registers
• Either enable or load only active .• During load input lines active output line float• During Enable output lines active input line
float.
• Input and output pins are shorted. • Single set of wires(path) between register and
w-bus.
![Page 3: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/3.jpg)
Architecture
![Page 4: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/4.jpg)
Input port
Port 1 and Port 2Port 1• Hexadecimal keyboard encoder• Sends ready signal to bit 0 of port 2 (indicates
the data in port 1 is valid)Port 2Serial In
![Page 5: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/5.jpg)
Program Counter
16 bit address
Thus can count from PC= 0000 0000 0000 0000PC= 1111 1111 1111 1111(FFFFH)
LOW CLR’
![Page 6: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/6.jpg)
MAR and MEMORY
16- bit address to MAR(From ???).
• MAR OUTPUT to RAM • Memory Capacity(?????)• 2K ROM(0000H-07FFH) => Monitor Program• 62K RAM(0800H-FFFFH)
![Page 7: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/7.jpg)
Memory Data Register
• 8-bit Register• Output setup RAM• Receives data from the bus before write
operation• Data to the bus after read operation
![Page 8: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/8.jpg)
Instruction Register
• 8-bit op code• Can accommodate 256 instruction• Only 42 instruction
![Page 9: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/9.jpg)
Controller Sequencer
As usual• Generates the control words
(microinstructions)• Has more hardware(larger number of
instruction)• Control Word is bigger (CON)
![Page 10: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/10.jpg)
Accumulator
Same as SAP-1
![Page 11: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/11.jpg)
ALU and Flags
ALU :- Includes both arithmetic and logical operation4 or more control bits for determining the operation to be performed
Flag: Represent the status of the arithmetic and logical operation Filp flops are used;Zero Flag(Z)Sign Flag(S)
![Page 12: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/12.jpg)
Temp,B,and C registers
Temporary register (TEMP)Register B and C are used to move data during program run and accessible to programmers.
![Page 13: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/13.jpg)
Outport Ports
2 output ports(3 and 4)
Port 3 : Drives Hexadecimal display
Port 4: sends ACKNOWLEDGE signals used to hexadecimal encoder.(Handshaking)Serial Out: Serial Transmission of data.
![Page 14: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/14.jpg)
Microprocessor Instruction
LDA and STA
Eg:LDA 2000HSTA 8000H
![Page 15: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/15.jpg)
MVI
MVI-Move Immediate
MVI A,37H
MVI A,byteMVI B,byteMVI c, byte
![Page 16: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/16.jpg)
Register Instruction
MOV
MOV A,BMOV A,C MOV B,AMOV B,CMOV C,AMOV C,B
![Page 17: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/17.jpg)
Register Instruction
ADD and SUB
Eg ADD B /SUB B
ADD BADD CSUB BSUB C
![Page 18: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/18.jpg)
Register Instruction
INR and DCR
INR A/DCR AINR B/DCR BINR C/DCR C
![Page 19: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/19.jpg)
Jump And Call Instruction
JMP
JMP 3000H
JM (Jump if Minus)JZ(Jump if zero)JNZ(Jump if not zero)
![Page 20: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/20.jpg)
Jump And Call Instruction
CALLSubroutine ????
Call is used to call the subroutineRetReturn back from subroutineProgram Counter contents ???? -----stored in the last two location of memory(FFFEH and FFFFH)
![Page 21: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/21.jpg)
Logic Instruction
CMA-Complement the accumulatorANA-And the accumulator with specified register
eg ANA BORA- OR the accumulator with specified register
eg ORA BXRA- XOR the accumulator with specified register
eg XRA B
![Page 22: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/22.jpg)
ANI: And Immediate
Eg ANI C7H (AND accumulator with immediate data C7H)ORI: OR immediateEg ORI C7HXRI: XOR immediateEg XRI C7H
![Page 23: SAP II ARTICTURE ,SAP 2](https://reader033.vdocument.in/reader033/viewer/2022061511/5561effad8b42aa5068b5752/html5/thumbnails/23.jpg)
Other Instruction
OUT ( OUT byte eg: OUT 03H: accumulator to designated port) HLTIN(Input : Enter the data from designated input port to accumulator) eg: IN 02HNOPRAL(Rotate the accumulator left) A=1011 0100 After execution A=0110 1001RAR (Rotate the accumulator right) A= 1011 0100 After execution A=0101 1010