Explain XLAT instruction with help of example, Computer Engineering

Assignment Help:

Q. Explain XLAT instruction with help of example?

Let's presume a table of hexadecimal characters signifying all 16 hexadecimal digits in table:

HEXA      DB      '0123456789ABCDEF'

760_Explain XLAT instruction with help of example.png

The table comprises the ASCII code of every hexadecimal digit:

(All value in hexadecimal)

If we place 0Ah in AL with the thought of converting it to ASCII we have to set BX to offset of HEXA and invoke XLAT.  You need not specify table name with XLAT hence it is implicitly passed by setting BX to HEXA table offset. This instruction would do the subsequent operations:

It will first add AL to BX producing an effective address which points to eleventh entry in the HEXA table.

Content of this entry is now moved to AL register which means 41h is moved to AL. 

Or we can say in other words, XLAT sets AL to 41h since this value is located at HEXA table offset 0Ah. Please consider that 41h is the ASCII code for hex digit A. The subsequent sequence of instructions will accomplish this:

MOV AL, 0Ah    ; index value

MOV BX, OFFSET HEXA; offset of the table HEXA

XLAT     

The above tasks can be executed without XLAT instruction however it will need a long series of instructions like:

MOV AL, 0Ah                                   ; index value

MOV   BX, OFFSET HEXA             ; offset of the table HEXA

PUSH BX                                           ; save the offset

ADD BL, AL                                     ; add index value to table

                                                                        ; HEXA offset

MOV   AL, [BX]                                ; retrieve the entry

POP    BX                                           ; restore BX


Related Discussions:- Explain XLAT instruction with help of example

What is write miss, What is write miss? During the write operation if t...

What is write miss? During the write operation if the addressed word is not in cache then said to be write miss.

Describe about digital audio tape, Q. Describe about Digital Audio Tape? ...

Q. Describe about Digital Audio Tape? The most proper tape for backing up data from a disk today is Digital Audio Tape (DAT). It employs a 4mm tape covered in a cartridge. It e

What is home shopping, Home Shopping TV broadcast of goods for purchase...

Home Shopping TV broadcast of goods for purchase, sent directly to a viewer . This online shopping is available because of e-commerce.

Create a web page from which customers can order equipment, Q. Create a Web...

Q. Create a Web page from which customers can order equipment? Suppose your boss wants you to create a Web page from which customers can order computer equipment. You need to c

SERVER, How to configure TSM server

How to configure TSM server

Optimal number of disks , John Lindsay sells disks that have 25 software pa...

John Lindsay sells disks that have 25 software packages that show a variety of financial functions, including net present value, internal rate of return, and other financial progra

What is unique port number, Q. What is Unique port number? A port is an...

Q. What is Unique port number? A port is an extra 16-bit number which uniquely identifies particular service on any given machine on Internet. Port numbers are 16 bit wide, con

Io devices and i/o subsystem and direct memory access, Why IO devices canno...

Why IO devices cannot be connected directly to the system bus? Ans: The IO devices can't be directly connected to the system bus because the following reason A) The data tra

Cobol coding, What is cobol codin for heap sort?

What is cobol codin for heap sort?

Tree strucred directory, what is the operations in atree structured directo...

what is the operations in atree structured directory.

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