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

Pruning - artificial intelligence, Pruning - artificial intelligence: ...

Pruning - artificial intelligence: Recall which pruning a search space means deciding that there certain branches to should not be explored. Moreover if an agent knows for sur

Explain automated and manual systems, Q. Explain Automated and Manual syste...

Q. Explain Automated and Manual systems? Automated and Manual systems: The system that doesn't need human intervention is known as'Automated system'. In this system whole proce

Keyboard status word generator, Q.  Write short note on Interfacing Keyboar...

Q.  Write short note on Interfacing Keyboard, giving block diagram. Why do we need to introduce circuitry called Keyboard Status Word Generator?

Find out if a particular file is available in a disk, Q. Find out if a part...

Q. Find out if a particular file is available in a disk in DOS? Sometimes you may like to find out if a particular file is available in a disk. In that case, you can identify t

Feature Extraction and clustering, Hi, It is a data mining project I have ...

Hi, It is a data mining project I have a CSV file that has numbers data set. The data set contains images of handwritten digits. Recognizing handwritten digits is already a mature

Poor technology or system requirements definition, Poor Technology or Syste...

Poor Technology or System Requirements Definition - Information System Previously we looked at product design and specifically the importance of requirements capture as part o

State the advantages of real time processing, Real time (transaction) proce...

Real time (transaction) processing In real time (transaction) processing files are generally updated in real time (for example when booking flights on an airplane); however in

-bit comparator using combinational logic, Design a 4-bit comparator using ...

Design a 4-bit comparator using combinational logic, and Karnaugh Maps. The inputs of the circuit are two 2-bit numbers. a) Construct the truth table given 2-bits inputs A and B, a

What is clock gating, What is Clock Gating? Clock gating is one of the...

What is Clock Gating? Clock gating is one of the power-saving methods used on several synchronous circuits with the Pentium four processors. To save power, clock gating consid

Show the bus and memory transfers, Q. Show the Bus and Memory Transfers? ...

Q. Show the Bus and Memory Transfers? A digital computer has many registers and rather than connecting wires amid all registers to transfer information between them a common bu

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