How to? (student need help)
Author Message
How to? (student need help)

Enter a number with a virgule in a full word?

Example : NUMBER    DC     F'1,8' or F'1.8' but it doesn't work :-(

Wed, 25 Jul 2001 03:00:00 GMT
How to? (student need help)

+Enter a number with a virgule in a full word?
+
+Example : NUMBER    DC     F'1,8' or F'1.8' but it doesn't work :-(
+
+
Full words are integers.

--
dlmiller/at/netdirect/dot/net

Wed, 25 Jul 2001 03:00:00 GMT
How to? (student need help)
Representation of decimal data in fixed binary is difficult.

What you have will work, but you have to tell the Assembler how many
binary digits to allow for the fraction by using the scale modifier.
For example

NUMBER   DC    FS4'1.5'

Will correctly convert the number to X'00000018' (I think).

I fiddled around with this last year, and was not impressed with the
end results after I tried to do arithmetic on the values.

In my opinion, if you really want to do fixed point decimal numbers, you
are almost 100% better off using packed decimal numbers.

Quote:
>Enter a number with a virgule in a full word?

>Example : NUMBER    DC     F'1,8' or F'1.8' but it doesn't work :-(

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.

Wed, 25 Jul 2001 03:00:00 GMT
How to? (student need help)
Specify a scaling factor to reserve bits for the fractional portion of
the number FSn'1.8' where n is the scaling factor. FS8'1.8' assembles as
000001CD where CD=205 computes as 205/255=.8

Go to:
.PDF format copy of the assembler language reference manual.  Scaling is
explained in detail there.
:-)

Quote:

> Enter a number with a virgule in a full word?

> Example : NUMBER    DC     F'1,8' or F'1.8' but it doesn't work :-(

Wed, 25 Jul 2001 03:00:00 GMT
How to? (student need help)

Quote:
>NUMBER   DC    FS4'1.5'

>Will correctly convert the number to X'00000018' (I think).

Thanks, i'll try this method :)

Thu, 26 Jul 2001 03:00:00 GMT
How to? (student need help)

Quote:
>.PDF format copy of the assembler language reference manual.  Scaling is
>explained in detail there.
> :-)

Thanks a lot, i need it ;)

marc

Thu, 26 Jul 2001 03:00:00 GMT
How to? (student need help)
Hey!? What happened to floating point? I personally, think it's a highly
viable platform to work on...

And for the original queestion poster, the 'F' does NOT indicate floating
point. It means Fullword in our vernacular.

*** Posted from RemarQ - http://www.remarq.com - Discussions Start Here (tm) ***

Thu, 26 Jul 2001 03:00:00 GMT
How to? (student need help)

Quote:

> Full words are integers.

It ain't necessarily so! As Steve pointed out, you can have modifiers on
the DC.

Quote:
> --
> dlmiller/at/netdirect/dot/net

--

Shmuel (Seymour J.) Metz
Reply to host nsf (dot) gov, user smetz

Fri, 27 Jul 2001 03:00:00 GMT
How to? (student need help)
You know, I think we got hung up on the F.  Maybe the assignment was to create a floating point number, e.g.,

NUMBER DC  E'1.8'

That certainly creates a number with a decimal point, and none of this scaling hassle, either!

Quote:

>> Full words are integers.

>It ain't necessarily so! As Steve pointed out, you can have modifiers on
>the DC.

>> --
>> dlmiller/at/netdirect/dot/net

>--

>Shmuel (Seymour J.) Metz
>Reply to host nsf (dot) gov, user smetz

-- Steve Myers

The E-mail addresses in this message are private property.  Any use of them
to  send  unsolicited  E-mail  messages  of  a  commerical  nature  will be
considered trespassing,  and the originator of the message will be  sued in
small claims court in Camden County,  New Jersey,  for the  maximum penalty
allowed by law.

Fri, 27 Jul 2001 03:00:00 GMT

 Page 1 of 1 [ 9 post ]

Relevant Pages