News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

A Beginner question

Started by Pestilence, August 14, 2009, 05:40:05 PM

Previous topic - Next topic

Pestilence

Hai people....i have a little question....im just learning HLA (for 3 days now) from The Art Of Assembly by Randall Hyde and im using HIDE for building and running my progs.Now up to Listing 2-3 all my progs run ok but when i try to build Listing 2-3: Variable-less Hexadecimal to Decimal converter i got a Return 2 Error:

Error in file "C:\*****\ConvertToDecimal2.hla" at line 11 [errid:75076/hlaparse.bsn]:
Expected ' : ', encountered ' ( '
(Possible undefined ID 'geti32').
Near: << ) >>

Return :2


Line11 is: stdout.put.geti32( ebx );

I really see no mistake(i typed everything from the book)........


Ps: Here is the full code from the book,

program ConvertToDecimal2;

#include ("stdlib.hhf")


begin ConvertToDecimal2;

stdout.put("Input a hexadecimal value: ");
stdin.get( ebx );
stdout.put("The value $",ebx, "converted to decimal is ");
stdout.put.geti32( ebx );
stdout.newln();


end ConvertToDecimal2;

brethren

stdout.put.geti32(ebx);

looks wrong, try changing that line to

stdout.puti32(ebx);

Pestilence

Hai brethren and thanks for replying man.....when i do that it runs ok....but why is it that i cant do it like in the book...stdout.put.geti32( ebx );.....its kinda weird...or maybe its just me hahaha.....and how long are you into HLA?....its my fourth day now....im lucky i know some c++ so i just glimped over the statements part....they are kinda similair......i hope a lot of it is.....but anyway thanks again for the reply  ;-))

Sevag.K

Quote from: Pestilence on August 15, 2009, 12:57:14 PM
Hai brethren and thanks for replying man.....when i do that it runs ok....but why is it that i cant do it like in the book...stdout.put.geti32( ebx );.....its kinda weird...or maybe its just me hahaha.....and how long are you into HLA?....its my fourth day now....im lucky i know some c++ so i just glimped over the statements part....they are kinda similair......i hope a lot of it is.....but anyway thanks again for the reply  ;-))

The book says that?  It must be a typo.

Pestilence

Yup i think so.....this is what the book says:

The stdout.puti8 routine will output its paramater as a 8-bit signed integer.Any 8-bit parameter will work.So you could pass an 8-bit register, an int8 variable or a byte variable as the parameter to stdout.puti8 and the result will always be decimal.

- -> The stdout.put.geti16 and stdout.put.geti32 provide the same capabilities for 16-bit and 32-bit objects.

And in the program above....so it must be....but now i know...and Sevag....you made a bad-ass IDE man....it works like a charm and i like it.....damn good work :-)))


griviel

#5
Yes indeed, gotta give it up to you guys, you just made me a programmer this month, forget being a better one, I wasn't able to do anything. I was having the hardest time learning any kind of programming till HLA, HIDE and this cool forum fell in my lap after doing a ton of reading and researching. Now as odd as it sounds I can read MASM, more FASM and understand a lot more disassembled or debugged code. I'm really not sure how, but it's gotta be HLA.

Right now I'm going through NeHe tuts for opengl, they aren't even in HLA, but I can understand enough to make the MASM examples work in HLA, now that's true magic. :)


Griviel