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 the differences between logical and physical address, Explain the d...

Explain the differences between Logical and physical address space Logical Vs physical address space (1) An address produced by the CPU is commonly referred to like a logica

What is single program multiple data, Q. What is Single Program Multiple Da...

Q. What is Single Program Multiple Data? A general style of writing data parallel programs for MIMD computers is SPMD (single program, multiple data) means all processors execu

Identifying constraints between objects, Identifying Constraints between Ob...

Identifying Constraints between Objects In a system, there are few boundaries to work on. Boundaries or Constraints are functional dependencies among objects which are not con

Explain the outsourcing barriers that an organization faces, Explain the ou...

Explain the outsourcing barriers that an organization faces. 1. Critical operations that cannot be outsourced. 2. Negative customer reaction. 3. Employee resistance. 4

Programming languages array operations, Q. Programming languages array oper...

Q. Programming languages array operations? In programming languages array operations are written in compact form which frequently makes programs more understandable. Conside

Where protocol operates to monitor and control n/w devices, Protocol used t...

Protocol used to monitor and control network devices operates at? Protocol operates at application layer to monitor and control network devices operates.

Drawbacks to resolution theorem, Drawbacks to resolution theorem: Thus...

Drawbacks to resolution theorem: Thus the underlining here identifies some drawbacks to resolution theorem proving: It only works for true theorems that can be expresse

What are spa/gpa parameters (sap memory), What are SPA/GPA parameters (SAP ...

What are SPA/GPA parameters (SAP memory) SPA/GPA parameters are field values saved globally in memory.  There are two ways to use SPA/GPA parmeters: By setting field attrib

Difference between field-group header and other field groups, What is the d...

What is the difference between field-group header and other field groups? The header field group is a particular field group for the sort criteria.  The system automatically p

Explain the architectural description languages, Explain the Architectural ...

Explain the Architectural description languages Architectural description languages (ACLs) have been developed for the architectural description in analysis and design process

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