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 do you mean by communication traffic, Q. What do you mean by Communica...

Q. What do you mean by Communication Traffic? Communication Traffic offers a pictorial view of communication traffic in interconnection network with respect to time in progress

What is input - output interface, The I/O interface provides a technique fo...

The I/O interface provides a technique for transferring information between external I/O devices and internal storage. Peripherals linked to a computer require special communicatio

Where the grade of service is measured, The grade of service is measured in...

The grade of service is measured in (A) Percentage                                  (B)  Number (C)  Fractional Number                    (D)  Logarithmic Number  Ans

Difference between visual basic, Visual basic is useful if you are planning...

Visual basic is useful if you are planning to make the programs from scratch. This language helps you in producing Active x controls, exe files, etc. Visual script is a powerful t

Define memory management system, Define memory management system? The p...

Define memory management system? The part of the computer system that supervises the flow of information among auxiliary memory and main memory is known as memory management sy

What happens if a function module runs in an update task, What happens if a...

What happens if a function module runs in an update task? The system performs the module processing asynchronously.  Instead of carrying out the call immediately, the system w

Classes of experts system, 1. The Consultant : A consultant is an experts...

1. The Consultant : A consultant is an experts person who possesses a high level of expertise in the area. He guide and educate the executives regarding establishing the e

Local variables and global variables in lingo programming, Question: (a...

Question: (a) Differentiate between local variables and global variables in Lingo programming. (b) Using examples differentiate between deleteProp() and deleteAt() function

Advantage of doubly linked list over singly linked list, What is the advant...

What is the advantage of doubly linked list over singly linked list?       Ans: Benefits of the doubly linked list over singly linked list 1. A doubly linked list can be pas

Returns information about present virtual machine, Q. Returns information a...

Q. Returns information about present virtual machine? int pvm_parent( void ) Returns the tid of process which spawned the calling process.  int pvm_tidtohost(

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