Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   assembly language program help (http://www.go4expert.com/forums/assembly-language-program-help-t25774/)

Shynash21 13May2011 10:45

assembly language program help
 
Hello the below 8086 ALP program is to display FIRE and HELP messages alternatively with flickering effects on a seven segment display interface...
Code:

.model small
.data
msg1 db 86h,88h,of9h,8eh 
msg2 db 8ch,0c7h,86h,89h 
.code
mov ax,@data
mov ds,ax
mov dx,133h
mov al,80h
out dx,al
mov cx,25
again: lea si,msg1
          push cx
          call disp
          call delay
          lea si,msg2
          call disp
          call delay
          pop cx
          loop again
        mov ah,4ch
        int 21h

  disp proc near
  mov cx,04
l1:  mov bl,08
    mov al,[si]
l2:  rol al,01
    mov dx,131h
    out dx,al
    push ax
    mov al,0ffh
  mov dx,132h
  out dx,al
  dec bl
  pop ax
  jnz l1
l3:  inc si
    loop l1
    ret
    disp endp

please explain me how the codes in msg1 and msg 2 are equivalent to "FIRE" and "HELP" and please explain me the display procedure of the 7 segment display interface

neo_vi 22May2011 13:30

Re: assembly language program help
 
It depends whether the 7 segment Common cathode or common anode.
Please refer http://en.wikipedia.org/wiki/Seven-segment_display
and you can convert accordingly.
Hope this helps


All times are GMT +5.5. The time now is 04:49.