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