Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

TO READ AN ALPHABET AND READ NEXT 7 ALPHABET IN SEQUENCE

Posted By: Adela Fischer     Category: Assembly Language     Views: 5927

PROGRAM TO READ AN ALPHABET AND READ NEXT 7 ALPHABET IN SEQUENCE.

Code for TO READ AN ALPHABET AND READ NEXT 7 ALPHABET IN SEQUENCE in Assembly Language

        .MODEL SMALL
        .DATA


                STR1 DB  0DH,0AH,  ' ENTER THE ALPHA:   $ '
                VAR1 DB  0DH,0AH,  ' YOUR ANSWER IS :   $ '
                X DB ?

        .CODE


START PROC



         MOV AX,@DATA

         MOV DS,AX


         MOV DX,OFFSET STR1
         MOV AH,09H
         INT 21H




         MOV CX,7
         MOV AH,01H
         INT 21H

         MOV X,AL

         MOV DX,OFFSET VAR1
         MOV AH,09H
         INT 21H

         MOV DL,X

         CMP DL,97
         JL STOP

         CMP DL,122
         JG STOP




         MOV AH,02H
         JMP DISLOOP


         MODIFYLOOP:

                MOV DL,97

        DISLOOP:
                

                JCXZ STOP

                INT 21H

                INC DL

                CMP DL,123

                JZ MODIFYLOOP

                LOOP DISLOOP


  STOP:

              ;  MOV AX,4C00H
              ;  INT 21H


              .EXIT

      START ENDP
      END

;************************************************************************
;                                     OUTPUT
;ENTER THE ALPHA: a
;YOUR ANSWER IS : abcdefg





  
Share: 


Didn't find what you were looking for? Find more on TO READ AN ALPHABET AND READ NEXT 7 ALPHABET IN SEQUENCE Or get search suggestion and latest updates.

Adela Fischer
Adela Fischer author of TO READ AN ALPHABET AND READ NEXT 7 ALPHABET IN SEQUENCE is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!