Search This Blog

Showing posts with label vtu 4th sem microprocessors hardware programes. Show all posts
Showing posts with label vtu 4th sem microprocessors hardware programes. Show all posts

Tuesday, July 12, 2011

vtu 4th sem microprocessors hardware programes

program 1.b as per syllebus


.model small
.code
        mov ax,@data
        mov ds,ax
        mov dx,0e803h
        mov al,82h
        out dx,al
        mov dx,0e801h
        in al,dx
        mov cl,8
        mov ah,0
     n2:ror al,1
        jc n1
        dec cl
        jnz n2
        jmp nxt
     n1:inc ah
        dec cl
        jnz n2
    nxt:mov al,ah
        and al,01
        cmp al,00
        je dff
        mov al,0
        jmp next
    dff:mov al,0ffh
   next:mov dx,0e800h
        out dx,al
     
        mov si,05fffh
   ret2:mov di,0ffffh
   ret1:dec di
        jnz ret1
        dec si
        jnz ret2
        mov al,ah
        mov dx,0e800h
        out dx,al
        mov ah,4ch
        int 21h
        end