...they are a bit off for normal humans to understand. :)

Village store
You are standing in the village shop. Commands here include
'buy <item>','sell <item>' and 'list'. A clerk is normally
here attending to customers.
Exits: <west>
clerk
>list
The clerk says,'Here is what we have in stock:'
oil: 0000_0006
sword: 0000_004B
cleaver: 0000_00B4
The clerk says,'Take your time.'
Gold: 0000_00C8
>

Numbers are stored in eax.

I'm sure my bank would love me if I said,"Yes, I'd like 0000_00C8 coins and 0000_004B dollar bills, please." :) hehe

Sincerely,

Paul Panks
dunric@yahoo.com
Posted on 2003-05-10 05:51:53 by Paul Panks
Hi paul

>...they are a bit off for normal humans to understand.

Not really, I like the Hex form more :)

Any way U can use :

stdout.puti32(any_Value_of_type_32bits);
stdout.puti16(any_Value_of_type_16bits);
stdout.puti16(any_Value_of_type_8bits);

All kind simple in- & out-puts are in the Example Demo "stdoutDemo.hla".
That's the Example packag in HLA..

Regards..
Posted on 2003-05-10 16:40:03 by mistronr1
So I should be using:

stdout.puti32(what_ever_value);

??

I am assuming "puti32" places the value in the range of a 32-bit common integer, correct? If so, then my hex problems are cured. :)

Sincerely,

Paul Panks
dunric@yahoo.com
Posted on 2003-05-10 22:27:31 by Paul Panks

...they are a bit off for normal humans to understand. :)

Village store
You are standing in the village shop. Commands here include
'buy <item>','sell <item>' and 'list'. A clerk is normally
here attending to customers.
Exits: <west>
clerk
>list
The clerk says,'Here is what we have in stock:'
oil: 0000_0006
sword: 0000_004B
cleaver: 0000_00B4
The clerk says,'Take your time.'
Gold: 0000_00C8
>

Numbers are stored in eax.

I'm sure my bank would love me if I said,"Yes, I'd like 0000_00C8 coins and 0000_004B dollar bills, please." :) hehe

Sincerely,

Paul Panks
dunric@yahoo.com


By default, HLA believes values in EAX to be of type dword, and by default, HLA's standard library routines (like stdout.put) print dword values in hexadecimal.

There are two solutions: (1) use the data type specific output routines (e.g., stdout.puti32) or (2) cast EAX to a different type. (1) you've already seen (in a previous reply). Here's
how to do (2):

stdout.put( "EAX = ", (type uns32 eax), nl );

Cheers,
Randy Hyde
Posted on 2003-05-11 20:56:24 by rhyde
Hello Randy,

Your suggestions worked. :) Here is the modified version:

http://www.geocities.com/dunric/westfront.html

or

http://members.tripod.com/~panks/hlaadv.html

Sincerely,

Paul Panks
dunric@yahoo.com
Posted on 2003-05-11 21:35:02 by Paul Panks