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

Computer graphics, what do you mean by inter leasing.how it is display the ...

what do you mean by inter leasing.how it is display the frame having 525 scan lines

Assignment, Find the Regular Grammar for the following Regular Expression: ...

Find the Regular Grammar for the following Regular Expression: a(a+b)*(ab*+ba*)b.

Computer graphics, explain area sub division method algorithm

explain area sub division method algorithm

Integrating virtual memory, Integrating Virtual Memory, TLBs, and Caches - ...

Integrating Virtual Memory, TLBs, and Caches - computer architecture:   There are 3 types of misses: 1. a cache miss 2. TLB miss 3. a page fault 2 techniqu

Why are arrays usually processed with for loop, The real power of arrays co...

The real power of arrays comes from their facility of using an index variable to traverse the array, accessing every element with the similar expression a[i]. All the is required t

Invariant of the class, What are the conditions that have to be met for a c...

What are the conditions that have to be met for a condition to be an invariant of the class? Ans) ? The condition should hold at the end of each constructor. ? The conditi

Block diagram of a microcomputer system, Q. Block Diagram of a Microcompute...

Q. Block Diagram of a Microcomputer System? Before going on to consider the I/O sub/systems of a computer, let's discuss how a digital computer system can be realized by a micr

Why do businesses need systems analysts, Q. Why do businesses need systems ...

Q. Why do businesses need systems analysts? A computerized system allows an organization to provide accurate information and respond faster to queries, events etc. If a busines

what are the advantages of threads over processes, What are the advantages...

What are the advantages of threads over processes? Some of the useful threads offer over processes includes: i)   It does not take more time to create and finished a new thr

Develop a system to store change logs , The ?rst task in the project is to ...

The ?rst task in the project is to develop a sane system to store change logs and versions of ?les. The simplest approach is to create a "dot" directory in the location of the ?le

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