Wednesday, 28 May 2014

Microprocessor lab external-2

          The program that I had got in interfacing part was an ALP to perform logical XOR operation.The reason for me writing this program is very simple.Later in life whenever I recall microprocessor lab external and if I am not able to recall which program I had got,my blogpost will be there to help me recollect the question as well as the answer.
    Here is the solution for above mentioned question:

Data segment
Pa equ 0e800h
Pb equ 0e801h
Pc equ 0e802h
Cr equ 0e803h
Data ends
Code segment 
Assume cs:code,ds:data
Start:mov ax,data
        Mov ds,ax
        Mov al,082h
        Mov dx,cr
        Out dx,al
Repeat:mov dx,pb
            In al,dx
            And al,03h
            Cmp al,00h
            Jz display
             Cmp al,03h
             Jz display
             Mov al,0ffh
             Mov dx,pa
              Out dx,al
              Jmp repeat
Display:mov al,00h
             Mov dx,pa
             Out dx,Al
              Jmp repeat
Code ends 
End start

No comments:

Post a Comment