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

Explain simplifying the sop boolean expression using k-map, Explain Simplif...

Explain Simplifying the SOP f the Boolean expression using the K-Map? To simplify the SOP of the Boolean expression using the K map, first identify all the input combinations tha

Write your array of text into file, Part I: 1. The program starts by prin...

Part I: 1. The program starts by printing your initial with an end sign ">". For example, "cjx >"; 2. Then, you can type in the following "vi filename". For example, "vi myp.c

Types of port, Define port? Give types of port available? Ans: An I/O in...

Define port? Give types of port available? Ans: An I/O interface consists of circuitry needed to connect an I/O device to computer bus. One side consists of a data path contain

Define interrupt and isr, Define interrupt and ISR? An interrupt is a r...

Define interrupt and ISR? An interrupt is a request from an I/O device for service by the processor. The processor gives the requested service by implementing the interrupt ser

Unification - artificial intelligence, Unification - Artificial intelligenc...

Unification - Artificial intelligence: We have said that the laws of inference for propositional logic detailed in the previous lecture can also be used in first-order logic.

What is a macro, What is a macro ? How it is defined ? Preprocessor' is...

What is a macro ? How it is defined ? Preprocessor' is a translation phase that is applied to  source code before the compiler  proper  gets  its  hands on  it.  Generally,  th

Define the thread libraries, Q. Define the Thread libraries? The most d...

Q. Define the Thread libraries? The most distinctive representatives of shared memory programming models are thread libraries present in most of modern operating systems. Illus

Which memory can not be accessed randomly, Which of following can not be ac...

Which of following can not be accessed randomly DRAM, SRAM, ROM or Magnetic tape ? Ans. Magnetic tape cannot be accessed randomly; it can only be accessed sequentially.

C, usability of union

usability of union

Statistical technique, Ask qa survey was conducted among the residents of p...

Ask qa survey was conducted among the residents of pune city,it suburbs and the pune cantonment area.the following three pie diagrams show their respective preferences for living i

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