On Wed, 30 Apr 2008 06:34:31 -0700 Howard Rifkind <[EMAIL PROTECTED]> wrote:
:>But can you give me an example of how one would code
:>the instruction, showing a difference between GPR and
:>the floating point register.
The S/370-Z assembler is different that the assemblers for Intel.
The opcodes for the S/370 assembler specify the type of operand. If you wish
to copy a 32 bit value from a GPR to another GPR, you use LR. If you wish to
copy a 32 bit value from one FPR to another, you use LER. To copy a FPR into a
GPR you use LGDR. Each instruction generates a unique machine instruction.
For Intel, as I recall it, there was a simple MOV opcode which would generate
different machine code based on the operands.
:>If you could use an EQU it would clear up the
:>confusion to anyone reading the program.
EQU is irrelevant to the issue.
You can do
FP2 EQU 2
R2 EQU 2
and if you
LR R3,FP2
GR2 will be copied, not FPR2. The opcode itself specifies what the operands
are.
:>--- Binyamin Dissen <[EMAIL PROTECTED]>
:>wrote:
:>> On Sun, 27 Apr 2008 11:28:00 -0700 Howard Rifkind
:>> <[EMAIL PROTECTED]> wrote:
:>> :>I want to use some of the floating point registers
:>> for
:>> :>general register purposes. I was told I could do
:>> this
:>> :>but I don't understand how to define them in the
:>> :>assembler language program.
:>> Only for some purposes.
:>> :>For instance, I would define a general register
:>> with
:>> :>an equate such as:
:>> :>R10 EQ 2 Equate Register 2 to R10
:>> :>However I would I do this for Floating point
:>> register
:>> :>3.
:>> :>Hope my questions is clear.
:>> :>And do I have to normalize the floating point
:>> register
:>> :>to use it for normal addresses?
:>> You can't use them to address data.
:>> You can save a GPR in an FPR with the appropriate
:>> hardware, but it would lead
:>> to most confusing code (IMHO).
:>> You can use them for fixed point operations.
--
Binyamin Dissen <[EMAIL PROTECTED]>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html