Illustrate code segment with example, Computer Engineering

Assignment Help:

CODE SEGMENT

; Set DS register

MOV AX, DATA     ;    boiler plate code to set the DS register so that the

MOV DS, AX          ;    program can access the data segment.

 

; read first digit from keyboard

                MOV AH, 08

INT   21H

MOV BL, AL

SUB BL, '0'

MUL BL, 10H

; read second digit from keyboard

MOV   AH, 08H

INT    21H

MOV   DL, AL

SUB   DL, '0'

; DL = 9 AND BL = 30 

SUM     BL, DL

; Now BL store 39

CODE ENDS.

Note: Boilerplate code is the code which is present less or more in the similar form in each assembly language program.


Related Discussions:- Illustrate code segment with example

What is a javabean, JavaBeans are reusable software components written in t...

JavaBeans are reusable software components written in the Java programming language, designed to be influenced visually by a software development environment, like JBuilder or Visu

What search method would be most appropriate and why, (a) Describe fully in...

(a) Describe fully in your own words the following terms: (i) Turing Test (ii) Agent (iii) Utility-based agent (b) A Mars rover has to leave the lander, collect rock sample

Differences between one hot and binary encoding, What are differences betwe...

What are differences between one hot and binary encoding? Common classifications used to explain the state encoding of an FSM is Binary or highly encoded and one hot. A bina

What is rational administrator, Use the Rational Administrator to: * M...

Use the Rational Administrator to: * Make and manage projects. * Make a project under configuration management. * Make a project outside of configuration management.

Optimum solution based on constraint problems, Optimum solution based on co...

Optimum solution based on constraint problems: Whether depending on what solver you are using so there constraints are often expressed as relationships between variables as e.

What are cosmic rays, Q. What are cosmic rays? The ionising radiation s...

Q. What are cosmic rays? The ionising radiation several times stronger than γ-rays entering the earth from all the directions from cosmic or interstellar space is known as cosm

Illustrate what is a centrifugal force, Q. Illustrate what is a Centrifugal...

Q. Illustrate what is a Centrifugal Force? Answer:- Centrifugal force is the force that is equivalent in magnitude but opposite in direction to the centripetal force which

Diffrentiate between non-relocatable & relocatable programs, How non-reloca...

How non-relocatable programs are different from relocatable programs? Non relocatable program: It is one that cannot be made to execute in any type of area of storage other t

Appropriate name for the superclass, Suppose that your team is then asked t...

Suppose that your team is then asked to expand the system. The publisher now wishes to make other computer science publications. As a team member, you are asked to make a class tha

Electing neil, ELECTING NEIL : The response for this is, of course. In...

ELECTING NEIL : The response for this is, of course. In this case, we considered the point of the search or researching is to find an artifact  -  a word which is an anagram o

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