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

Define step by step procedure in computer programming, Define Step by Step ...

Define Step by Step Procedure in Computer Programming? The Computer programming is the skill and art of creating a computer program a defined set of instructions in source code

Address phase timing - computer architecture, Address phase timing: On...

Address phase timing: On the rising edge of clock 0, the initiator notes IRDY # and FRAME# both high, and GNT# low, so it drives the command, address and asserts FRAME# in tim

What is the draw back of access-3 code, Q. What is the draw back of Access-...

Q. What is the draw back of Access-3 Code? Give suggestion to over come this drawback.

Advantages on electronic payment system, Advantages on electronic payment s...

Advantages on electronic payment system It gives good security schemes.  Four necessary security requirements for safe e-payments are Authentication, Encryption, Integrity,

State about the object oriented analysis, State about the Object oriented a...

State about the Object oriented analysis Object oriented analysis (OOA) is concerned with developing software engineering specifications and requirements that expressed as a s

War (write after read) - data hazards , WAR (write after read) - Data hazar...

WAR (write after read) - Data hazards in computer architecture: WAR (write after read) - j tries to write at destination before it is read by i , hence i  wrongly gets the n

Mobile cameras, Mobile cameras are characteristically low-resolution Digita...

Mobile cameras are characteristically low-resolution Digital cameras integrated in mobile set. Photographs are characteristically only good enough to show on low resolution mobile

What is called when a program is in execution, A program in execution is ca...

A program in execution is called?  Ans. When a program in execution is known as Process.

Applications of generic framework for e-commerce executed, How are applicat...

How are applications of generic framework for e-commerce executed? To execute applications, this is essential to have Supporting Information and Organizational Infrastructure a

Binary search tree, Given the following interface public interface WordS...

Given the following interface public interface WordSet extends Iterable { public void add(Word word); // Add word if not already added public boolean contains(Word word);

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