Determine the use of loop instruction, Computer Engineering

Assignment Help:

Q. Determine the use of LOOP instruction?

Program:This program prints the alphabets (A-Z)

; Register used: AX, CX, DX

CODE SEGMENT

ASSUME: CS: CODE.    

MAINP:          MOV   CX, 1AH                    ; 26 in decimal = 1A in hexadecimal Counter.

                        MOV   DL, 41H                     ; Loading DL with ASCII hexadecimal of A.

NEXTC:          MOV   AH, 02H                     ; display result character in DL

            INT      21H                            ; DOS interrupt 

            INC      DL                             ; Increment DL for next char

            LOOP NEXTC                       ; Repeat until CX=0. (Loop automatically decrements

                                                                        ; CS and checks whether it is zero or not)

                        MOV   AX, 4C00H                ; Exit DOS

                        INT      21H                            ; DOS Call

CODE ENDS

END MAINP


Related Discussions:- Determine the use of loop instruction

Why we use modem, Q. Why we use Modem? A Modem is one device which most...

Q. Why we use Modem? A Modem is one device which most computer users who have surfed Internet are aware of.  A modem is neededsincehowever most of telecommunications have becom

Java, about java types

about java types

Which job is admitted to the system for processing, Jobs which are admitted...

Jobs which are admitted to the system for processing is called ? Ans. Long-term scheduling is admitted to the system for processing.

Execute the command in linux, Now that the user's command has been parsed i...

Now that the user's command has been parsed into an array of char*, we can pass this to the OS to execute the command. To execute the command, use the execvp() function from unis

Word puzzle, You are required to make a class of WordPuzzle, which is basic...

You are required to make a class of WordPuzzle, which is basically a game of finding words inside a 2d-array of characters. The class needs to take rows and columns as arguments an

Information systems development methodologies, Task 1:   Methodologies a...

Task 1:   Methodologies are 'regarded as a recommended series of steps and procedures to be followed in the course of developing an information system' and were introduced to im

Define resolution versus accuracy in mouse, Q. Define Resolution versus Acc...

Q. Define Resolution versus Accuracy in mouse? Resolution of mouse is known in CPI (Counts per Inch) it implies that number of signals per inch of travel.  This implies the mou

Design a bcd to seven segment decoder, Design a BCD to seven segment decode...

Design a BCD to seven segment decoder that accepts a decimal digit in BCS and generates the appropriate output for segments in display indicator. Ans: BCD-TO-seven-Segment

How do you make an image clickable in HTML, How do you make an image clicka...

How do you make an image clickable in HTML? Give an example. To create an image or text clickable hyperlinks are used, that use the and tags. Such tag has different paramet

Why sram are said to be volatile, Why SRAM are said to be volatile? Bec...

Why SRAM are said to be volatile? Because their contents are lost when power is interrupted. So SRAM are said to be volatile.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd