Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the use of TRT instruction and how it is working?

Answer Posted / phils

TRT is used to scan a string of characters byte by byte,
using the hexadecimal value of each character to 'index'
into a 256 byte translate table, If the resultant table byte
is set to X'00', then processing continues with the next
input character, and so on until end of input string, or a
non-zero table byte is encountered.



TRT sets the condition code to indicate the results
of the scanning operation as follows:

Condition Code Indications

0 ( Zero ) All table bytes X’00’.
1 ( Minus ) nonzero tabl found before the end
of operand 1
2 ( Positive ) A nonzero table byte was found at
the end of the operand 1

The condition code can be tested using BZ, BNZ, BM, BNM,
BP, or BNP.

In this way we can test that a string contains only
'desirable values' by setting the equivalent bytes in the
translate table to X'00' e.g. testing for numerics as in
answer 4.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how to produce soc7 abend?

1013


What is need of start 0?

1058


Explain the difference between various read and find statement and which one should be used when for better adabas performance?

942


What is house keeping in assembler?

948


Explain how to access vsam file?

1038


Explain about house keeping in assembler?

997


What is maximum displacement and how to cross this limit?

1117


How many maximum base registers we can have in a single program?

1020


explain icm instruction?

1022


Explain about base register?

1004


Why do we use "drop"?

928


Explain the difference in data type "x" and "p"?

969


how to retrieve the instream data in sysin?

1090


Ap wkur,=p5 where wkur is a label?

1066


How to pass the parameters from jcl to assembler program?

941