Statement: An ASCII character is being received on SID pin of 8085. Write a program in assembly language of 8085 to assemble this character and store it in memory. Write comment for each instruction.
Home
8085 Forum
8085 Free Projects
8085 Free Programs
8085 Tutorials
8085 details
Interfacing Techniques
Electronic Tutorials
Electronic Projects
Assembler/ IDE
Datasheets
Guest Book
About Me
Source program:

       LXI SP, 27FFH
       LXI H, 2000H                        : Memory pointer
       RIM                                : Read SID
       ANI 80H                        : Check D7 bit of Accumulator
       CALL Delay                        : 1/2 bit time delay for stop bit
       MVI B, 08H                        : Initialize bit counter
       MVI D, 00H                        : Clear data register
     UP1: ALL Delay                        : 1 bit time
       RIM                                : Read SID line
       ANI 80H                        : Mask bits B6 - Bo
       ORA D                                : OR data bit with previous bits
       RRC                                
       MOV D, A                        : Store data bit at appropriate position
       DCR B
       JNZ UP1
       RLC                                : Shift left to correct result
       MOV M, A                        : Store result
       RIM                                : Read stop bit
       ANI 8OH
       CZ error                        : If not stop bit call error                
       HLT                                : Terminate program.



FLOWCHART




Delay subroutine:

Delay: LXI D, Count
Back: DCX D                        
       MOV A, D        
       ORA E                
       JNZ Back                
       RET

Flowchart for Source Program:
Flowchart for Delay routine: