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

Describe data structures used during passes of assembler, Describe Data str...

Describe Data structures used during passes of assembler and their use. During passes of assembler, the Data structures define as: Pass 1 data base Input source pro

Bi polar junction transistor, draw input and output charectoristics of BJT ...

draw input and output charectoristics of BJT and justify CE configuration provides large current amplification

Addressability of memory - computer architecture, Addressability: Loc...

Addressability: Location-addressable Each alone accessible unit of information in storage is chosen with its numerical memory address. In the modern computers, location-a

What is artificial intelligence neural networks, For the sake of trying to ...

For the sake of trying to make intelligent behavior though really all that's being done is work with artificial neural networks where every cell is a very easy processor and the go

The values 15 and 11 can also be defined by variable, In the statement Writ...

In the statement Write:/15(10) lfa1-lifnr. The values 15 and 11 can also be defined by variable. No, the value of 11 nad 15 is not described by variable.

What is electronic data interchange, What is Electronic Data Interchange? ...

What is Electronic Data Interchange? Electronic Data Interchange (EDI): It is used by organizations for transactions which arise on regular basis to a pre-found format.

Applications of electronic data interchange in business, What are the appli...

What are the applications of Electronic Data Interchange in business? The applications of Electronic Data Interchange are as given below: 1. Organisations that use EDI 2

Determine the channel of common channel signalling in ss7, Common channel s...

Common channel signalling in SS7 is (A) out band control channel. (B) In band control channel. (C) Speech control channel. (D) None of the above. Ans:

Two ways of converting a two input nand gate to an inverter, 1)      Short ...

1)      Short both I/Ps of NAND gate & use the gate as an inverter. 2)      Connect any one of the two I/Ps to VCC & use the remaining I/P & use the gate as an inverter.

Define bus, Define bus A group of lines that serves as a connecting pat...

Define bus A group of lines that serves as a connecting path for various devices is known as a bus.

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