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...


How do you round the addition or subtraction of two numbers
in assembler?

what does the following code do?
AP WKUR,=P'5' where WKUR is a label

Answers were Sorted based on User's Feedback



How do you round the addition or subtraction of two numbers in assembler? what does the followi..

Answer / dave grund

This is a vague two-part question.
1) You can round by adding .5
2) Adds 5 to WKUR, but it had better be a valid packed field, and not just a label.

Is This Answer Correct ?    3 Yes 1 No

How do you round the addition or subtraction of two numbers in assembler? what does the followi..

Answer / steve holton

Vague, indeed....as you would round differently depending
upon the data type of the numbers involved. You can add
intergerss, floats (and doubles) and packed decimal numbers
in assembler - to which does this question refer?

As the second half of the Q addresses packed decimal, I will
assume that part one does as well...

There are various ways to round data - truncation is one
valid way, another is to move to the closest "whole value"
in the least significant digit desired in the result, or you
can mov4e to the closest number towards +infinity, or to the
closest towards -infinity, or the closest towards 0, etc.,
So first off, you need a better definition of "round". What
I think this question was attempting to get at was to see it
you know about the SRP (shift-and-round-packed) instruction,
which allows you to apply a rounding factor and shift the
packed decimal result to the desired number of significant
digits.

Is This Answer Correct ?    2 Yes 1 No

How do you round the addition or subtraction of two numbers in assembler? what does the followi..

Answer / karta

After we do an add or , to Round it , we can do a SRP

SRP is shift and round packed.

Here SRP Value ,64-4,5 . usually we do right shifting after a DP and do add 5 to round it. eirther 0 or 5 will be issued. if zero, no rounding takes place.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Assembler Interview Questions

how to pass the parameters from jcl to assembler pgm?

0 Answers   IBM,


what is need of start 0? In steed of

0 Answers   IBM,


What is need of start 0?

0 Answers  


what is need of START 0?. In steed of '0' can we use any other numerics?. if we use what will happen?.

4 Answers   CSC, TCS,


Ap wkur,=p5 where wkur is a label?

0 Answers   IBM,


What does LA R3,R3 ?

1 Answers   Amdocs,


Explain how to access vsam file?

0 Answers  


about ICM instruction.

4 Answers   EDS,


about maximum displacement and how to cross this limit.

2 Answers   EDS,


What does "using" do?

0 Answers  


How are data passed from jcl parm to assembler program?

0 Answers  


What is house keeping in assembler?

0 Answers  


Categories