answersLogoWhite

0

mov ax, @data ; Initialize data section

mov ds, ax

mov bx, offset lookup ; Load offset of lookup in bx

mov al, key ; key no. in al

xlat ; translate byte in al

mov bh, al ; al = lookup(key)

mov ch, 02h ; Count of digits to be displayed

mov cl, 04h ; Count to roll by 4 bits

l2: rol bh, cl ; roll bl so that msb comes to lsb

mov dl, bh ; load dl with data to be displayed

and dl, 0fH ; get only lsb

cmp dl, 09 ; check if digit is 0-9 or letter A-F

jbe l4

add dl, 07 ; if letter add 37H else only add 30H

l4: add dl, 30H

mov ah, 02 ; Function 2 under INT 21H (Display character)

int 21H

dec ch ; Decrement Count

jnz l2

mov ah, 4cH ; Terminate Program

int 21H

end

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the assembly language development phases?

Really no different than development in any other language: requirements definition, general design, detail design, coding, testing and implementation.


Translating an algorithm into a programming language is called what?

CODING Implementation


What is the DNA segment that carries information coding for a particular amino acid?

Nucleotide


You use Visual Basic 6 and you are use to the coding language What is the newest edition with exactly the same coding language?

You said Visual Studio 2010 but does it have the BASIC language.


Can you mix both c and assembly coding in one program?

yes......


What is coding in HTML?

HTML is a Markup Language.


Why you need of HTML creating a website?

HTML or Hypertext Markup Language is a system used to display a page of content which includes text, colours, graphics and fonts. You need to use HTML because, all modern browsers are looking for that coding to display your webpages in a standard format.


What is the Cpt coding for Four segment kyptectomy?

The CPT code for a four-segment kyphectomy is typically 22634. This code describes the procedure for a percutaneous vertebral augmentation, including the removal of bone tissue from multiple vertebral segments. However, specific coding may vary based on the details of the procedure and the documentation, so it's important to verify with the latest coding guidelines or consult a coding specialist for accuracy.


How did you learn a coding language Respond with the coding language and link/text?

Coding is a step-by-step guide that enables computers to do the things you want. Coding allows us to create software, games, apps, websites, and other computer programs.


Why assembly language is still needed if you have hll offering sophisicated tools?

Yes, assembly language is definitely still used. Many I/O drivers and much of the bootstrap code that starts a computer must be written in assembly language as high level languages do not provide means for coding certain special purpose instructions needed for these operations. Also high level languages usually require that subroutine library codes be available, while assembly language does not. As these subroutine library codes usually cannot be loaded until the Operating System is up and running, assembly language must be used for much of the code that bootstraps the computer and loads the Operating System.


Why do you need two types of coding in one programming language?

It would be easier to answer, if you explained what the 'two types of coding' were.


What is an international coding system for text-based data using any written language?

binary coding system