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

Show division and multiplication operation, Q. Show Division and multiplica...

Q. Show Division and multiplication operation? These operations can be represented as x + y = (N x   × 2 Ex-Ey + N y ) × 2 Ey and x-y = (N x × 2 Ex-Ey -N y ) × 2 Ey

How exceptions are handled in java, How exceptions are handled in java? ...

How exceptions are handled in java? Exception handing In Java: A java exception is an object which describes an exceptional condition which has occurred in a piece of code.

Security protocols used for e-commerce applications, Explain dissimilar sec...

Explain dissimilar security protocols used for e-commerce applications.   The e-commerce systems of today are composed of a number of components including: a commerce server, d

What is telex, Telex is a (A)  Telephone Service between various subsc...

Telex is a (A)  Telephone Service between various subscribers (B)  Tele printer Service between various subscribers (C)  Television Service between various subscri

Show the conditional jump in program with example, Q. Show the conditional ...

Q. Show the conditional jump in program? CMP    AX, BX                      ; compare instruction: sets flags JNE     FIX                             ; if not equal do addi

What is dynamic memory allocation, What is dynamic memory allocation? T...

What is dynamic memory allocation? The mechanism of allocating needs amount of memory at run time is known as dynamic allocation of memory. Sometimes it is needed to allocate m

What are controls and how to use them, What are controls? How to use them? ...

What are controls? How to use them? Give examples for control. Controls are objects that can be placed in a form. The dissimilar controls are available in the Tool Box. After

Interaction between the dynpro and the abap/4, How does the interaction bet...

How does the interaction between the Dynpro and the ABAP/4 Modules takes place? -A transaction is a collection os screens and ABAP/4 routines , controlled and implemented by a

What are the user interfaces of interactive lists, What are the user interf...

What are the user interfaces of interactive lists? If you require the user to communicate with the system during list display, the list must be interactive.  You can describe

Explain about cd-rom and dvd-rom, Q. Explain about CD-ROM and DVD-ROM? ...

Q. Explain about CD-ROM and DVD-ROM? Optical disks employ Laser Disk Technology that is the latest and most promising technology for high capacity secondary storage. Advent of

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