.model small
.stack 100h
.data
str db "flopy is enable $" ; A string to display1
str1 db "floppy is disable $" ; A string to display2
str2 db "math co processor is enable $" ; A string to display2
str3 db "math co processor is disbale $" ; A string to display2
str4 db "dma is enable $" ; A string to display2
str5 db "dma is disable $" ; A string to display1
str6 db "number of video mode $" ; A string to display2
str7 db "number of disk in a system $" ; A string to display2
str8 db "capslock is off $" ; A string to display2
str9 db "capslock is onn$" ; A string to display2
.code
main: mov ax, @data
mov ds, ax
mov ah,2
int 16h ;keyword services
mov cl,7 ;mov value
shr al,cl ;shift right function
jc to_jmp_long ;check capslock if on then jump otherwise continuee
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str8 ;show output
mov ah,9h
int 21h
int 11h ;checking intrrupt
mov bx,ax ;for tempry store
mov cl,1 ;mov value
shr ax,cl ;shift right function
jc floppydiskon ; check floppy
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str1 ;show output
mov ah,9h
int 21h
mathcop:
mov ax,bx
mov cl,2
shr ax,cl
jc mathcoproceesor_on
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str3 ;show output
mov ah,9h
int 21h
dma:
mov ax,bx
mov cl,9
shr ax,cl
jc dma_on
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str5 ;show output
mov ah,9h
int 21h
to_jmp_long:
jmp capslockon
jmp ending
dma_on:
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str4 ;show output
mov ah,9h
int 21h
jmp ending
mathcoproceesor_on:
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str2 ;show output
mov ah,9h
int 21h
jmp dma
floppydiskon:
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str ;show output
mov ah,9h
int 21h
jmp mathcop
capslockon:
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str9 ;show output
mov ah,9h
int 21h
ending:
mov ah, 4ch ; Service # to terminate a program normally
int 21h ;
end main
.stack 100h
.data
str db "flopy is enable $" ; A string to display1
str1 db "floppy is disable $" ; A string to display2
str2 db "math co processor is enable $" ; A string to display2
str3 db "math co processor is disbale $" ; A string to display2
str4 db "dma is enable $" ; A string to display2
str5 db "dma is disable $" ; A string to display1
str6 db "number of video mode $" ; A string to display2
str7 db "number of disk in a system $" ; A string to display2
str8 db "capslock is off $" ; A string to display2
str9 db "capslock is onn$" ; A string to display2
.code
main: mov ax, @data
mov ds, ax
mov ah,2
int 16h ;keyword services
mov cl,7 ;mov value
shr al,cl ;shift right function
jc to_jmp_long ;check capslock if on then jump otherwise continuee
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str8 ;show output
mov ah,9h
int 21h
int 11h ;checking intrrupt
mov bx,ax ;for tempry store
mov cl,1 ;mov value
shr ax,cl ;shift right function
jc floppydiskon ; check floppy
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str1 ;show output
mov ah,9h
int 21h
mathcop:
mov ax,bx
mov cl,2
shr ax,cl
jc mathcoproceesor_on
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str3 ;show output
mov ah,9h
int 21h
dma:
mov ax,bx
mov cl,9
shr ax,cl
jc dma_on
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str5 ;show output
mov ah,9h
int 21h
to_jmp_long:
jmp capslockon
jmp ending
dma_on:
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str4 ;show output
mov ah,9h
int 21h
jmp ending
mathcoproceesor_on:
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str2 ;show output
mov ah,9h
int 21h
jmp dma
floppydiskon:
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str ;show output
mov ah,9h
int 21h
jmp mathcop
capslockon:
mov dl,10 ;newline
mov ah,2h
int 21h
lea dx,str9 ;show output
mov ah,9h
int 21h
ending:
mov ah, 4ch ; Service # to terminate a program normally
int 21h ;
end main