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

Interrupt handling - computer architecture, Interrupt handling: Handlin...

Interrupt handling: Handling Interrupts  Several  situations where the processor should avoid interrupt requests Interrupt-enable Interrupt-disable  Typical

Explain about data segment, DATA SEGMENT  NUM1            DB      15h;...

DATA SEGMENT  NUM1            DB      15h;     First number   NUM2            DB      20h;     Second number  RESULT DB?  ; Put sum here  CARRY DB? ; Put any carry he

Define wilkes control unit, Q. Define Wilkes Control Unit? Prof. M. V. ...

Q. Define Wilkes Control Unit? Prof. M. V. Wilkes of the Cambridge University Mathematical Laboratory invented the term microprogramming in 1951. He offered a systematic altern

Simple maze game, The following is a requirements specification for a simpl...

The following is a requirements specification for a simple game based on a player moving through a maze of connected rooms from an entrance door to an exit door. The required sy

What is fish bone diagram, What is Fish Bone Diagram? Or Explain Ishikawa D...

What is Fish Bone Diagram? Or Explain Ishikawa Diagram. Fish Bone Diagram is also known as Ishikawa Diagram or Cause and Effect Diagram. It is known as Fish Bone Diagram be

What is optical character recognition, What is Optical character recognitio...

What is Optical character recognition (OCR)  Information on paper is automatically read by a scanner and is then processed/analysed by OCR software and stored in an electronic

Structure of internet servers address, Structure of Internet Servers Addres...

Structure of Internet Servers Address Structure of an Internet server's address keyed into a client's software is as below: http://www.expertsmind.com Where: htt

In a for loop, In a for loop, if the condition is missing, then, It is s...

In a for loop, if the condition is missing, then, It is supposed to be present and taken to be true.

In how many ways the data can be passed to functions, Object Oriented Progr...

Object Oriented Programming 1. Describe that in how many ways the Data can be passed to functions? Explain with the help of one example. 2. Describe how you create class a

How is secure sockets layer relied on the certificates, How is Secure Socke...

How is Secure Sockets Layer relied on the certificates? The Secure Sockets Layer standard is not a single protocol, but quite a set of accepted data transfer routines which a

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