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

What do you mean by file, Q. What do you mean by File? In computer voca...

Q. What do you mean by File? In computer vocabulary, file is a collection of text or data stored on a storage device, such as a Floppy Disk or Hard Disk. If you a fresher to c

Explain about distributed shared memory systems, Explain about Distributed ...

Explain about Distributed Shared Memory Systems? Distributed Shared Memory (DSM) systems emulate a shared memory abstraction on loosely coupled architectures in order to allow

Explain the effect of cell breathing, Problem : (a) State and describe ...

Problem : (a) State and describe the transmission ranges associated with wireless transmission. Illustrate your answer with a diagram. (b) Sketch a graph representing how a

What is branch prediction logic, What is Branch prediction logic Bran...

What is Branch prediction logic Branch prediction logic in Pentium: Pentium microprocessor uses branch prediction logic to decrease the time needed for a branch caused by in

What are the characteristics of semiconductor ram memories, What are the ch...

What are the characteristics of semiconductor RAM memories? They are available in a wide range of speeds. Their cycle time range from 100ns to less than 10ns. The

Which transmission mode is used for data communication, Which transmission ...

Which transmission mode is used for data communication along telephone lines? Serial transmission mode is utilized for data communication along telephone lines.

What is model, What is model?  A universe together with an assignment o...

What is model?  A universe together with an assignment of relations to relation symbol is known as a model.  A model M is a tuple (U, P1, P2..Pk), where U is the universe and P

Explain the concept behind pre-compositing adobe, Question 1: (a) Expl...

Question 1: (a) Explain the concept behind Pre-Compositing Adobe After Effects. (b) Briefly describe the Wiggler function in Animation help in Adobe After Effects. (c)

Data stream and instruction stream-flynn’s classification, Data Stream an...

Data Stream and Instruction Stream The term 'stream' refers to an order or flow of either data operated or instructions on by the computer. In the complete chain of instructi

What are the methods for handling deadlocks, What are the methods for handl...

What are the methods for handling deadlocks?  The deadlock problem can be dealt with in one of the three ways:  a. Use a protocol to prevent or avoid deadlocks, make sure th

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