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 independent loops in fortran program, Q. Show Independent loops in for...

Q. Show Independent loops in fortran program? In the subsequent code portion the directives point to the outer two loops are independent. The inner loop allocates elements of A

In which page replacement policies balady’s anomaly occurs, In which page r...

In which page replacement policies Balady’s anomaly occurs? FIFO that is First in First Out.

Arithmetic pipeline, Arithmetic Pipeline The complex arithmetic operati...

Arithmetic Pipeline The complex arithmetic operations like floating point and multiplication operations use a lot of the time of the ALU. These operations can also be pipelined

Functions carried out by different operating systems, Functions carried out...

Functions carried out by different operating systems The below is a list of functions carried out by different operating systems: - Provides a user interface - Device man

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

Show the steps of execution of instructions, Q. Show the steps of execution...

Q. Show the steps of execution of instructions? Fetch First Instruction into CPU: Step 1: Find/calculate the address of first instruction in memory. In this machine illust

Give an example, Write the HTML code for the following table: ...

Write the HTML code for the following table: T E M P E R A T U R E C I T I E S

I want a computer science homework tutor, I can send you the lecture notes ...

I can send you the lecture notes and assignments, and you will walk me through (either record a screencast, or kind on the assignments in red colored font) steps on how to do the a

What are the five popular hashing functions, Five popular hashing functions...

Five popular hashing functions are as follows:- Division Method Midsquare Method Folding Method Multiplicative method Digit Analysis

Two services that are used to deal with communication, Explain about the tw...

Explain about the two services that are used to deal with communication. Message Service: Used by the application servers to change short internal messages, all system commu

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