Thanks Ryan for your detailed explanations about Sprms.
Sorry for this delay, as there was some problem with my mail server. I
will be sending the patch for SprmOperationsVm.java soon
Thanks & Regards
Praveen
Praveen Mathew
IBM Software Labs,Airport Road,
Bangalore - 560 017,India.
Ph : +91- 80 - 504 4609 (Direct)
+91 - 80 - 5262355 Extn: 3609
Email: [EMAIL PROTECTED]
"Ryan Ackley" <[EMAIL PROTECTED]>
18/07/2003 19:20
Please respond to "POI Developers List"
To: "POI Developers List" <[EMAIL PROTECTED]>
cc:
Subject: Praveen, answers to your questions
Praveen, sorry there was such a delay.
> In the Sprm bits eplanation table, I could not get where
> 1. ispmd is used (0-8)
> 2. fspec is used (9).
ispmd is unique for each sgc. fSpec sounds like some kind of convenience
flag that the programmers used.
> Are they checking for the full OpCode value for the field "sprm".
>Why have you used, short operand = (short)(sprm & 0x1ff); to pass this to
the
>DoXXXOperation().
>Cant we directly check the "sprm" for the respective Values like if(sprm
>== 0x4600).
It all depends on how you decide to implement it. Yes, you can just check
for the entire sprm. I broke it up because I wanted a division of labor. I
come from a computer engineering background, so I was trying to treat it
like a virtual machine. My first function gets out the parameters and
routs
it to the correct function. It was still pretty ugly, so thats why I
wanted
you to rewrite it.
> In the eplanation given for "sprmPlncLvl" it says The sprm is three
bytes
long and consists
> of the sprm code and a one byte
> two's complement value. Are they refering this to just the Parameter(3
byte case). Or 2 byte >Opcopde
>+ 1 byte Parameter.
2byte + 1 byte parameter. Usually when they refer to the sprm they are
referring to the entire structure including the two byte opcode. Also, if
you look at the table of sprms it says that sprmPIncLvl has a 1 byte
parameter size.
> If its latter, then as per spec we have to take the LSByte of the
"param"
> we r passing to the function & check its sign bit & so on..
> If its Former then we hv to check the sign bit of "param" itself..
All java primitives are already two's complements so you don't have to
worry
about this. Just DON'T use getUnsignedByte. "2's complement" is just a
fancy
way of saying "signed"
>NB: If MS could have given atleastt a better Documentation which is
>Clear,Readable, Understandable and in a well arranged manner, it would
>have been more easier for me!!. Now just for implementing a SPRM I have
to
>search its info scattered throughout the entire Document, still not sure
>If I missed something.
Amen...
Ryan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]