Hey all
Ive got hla installed at c:\hla
Ive got nmake in there - aswell as nmake installed via visual studio.
Ive got HIDE and Radasm installed correctly.
However - teaching myself assembly and HLA/MASM via the book "The art of assembly" is vexing me..
The following code just wont build.
program intInput;
#include( "stdlib.hhf" )
var
i8: int8;
i16: int16;
i32: int32;
begin intInput;
// Read integers of varying sizes from user:
stdout.put("Enter a small integer between -128 and +127: ");
stdin.geti8();
mov(al, i8);
stdout.put("Enter a small integer between -32768 and +32767: ");
stdin.get.geti16();
mov(ax, i16);
stdout.put("Enter a small integer between +/- 2 billion: ");
stdin.get.geti32();
mov(eax, i32);
//Now display input
stdout.put
(
nl,
"Here are the numbers you entered:". nl, nl,
"Eight-bit integer: ", i8:12, nl,
"16-bit integer: ", i16:12, nl,
"32-bit integer: ", i32:12, nl
);
end intInput;
The errors I get from trying to build in both HIDE and radasms are that nmake is expected '(' but instead got a '.' at line 19.
Which is the line..
stdin.get.geti16();
It seems its struggling with the 2 "gets" for some reason.
here is a copy of the error from HIDE below..
Build :C:\mycode\assembly\hla code\testhla\testhla.hla
-C:\mycode\assembly\hla code\testhla\testhla.hla
Error in file "C:\mycode\assembly\hla code\testhla\testhla.hla" at line 19 [errid:129196/hlaparse.c]:
syntax error, unexpected '.', expecting '('.
Near: << . >>
Error in file "C:\mycode\assembly\hla code\testhla\testhla.hla" at line 19 [errid:4213/hlaparse.bsn]:
Expected ';', encountered 'geti16'.
Near: << geti16 >>
HLAPARSE assembly failed with 2 errors
Return :2
------------------------------------------------------------------------
Build done
Processes launched : 1
Errors Returned :0
Anyone help? the code is character perfect to that which is in the book..
Scratches head******
Hyp
there is no such function as stdin.get.geti16() or stdin.get.geti32(). they must be a typos somewhere.
the correct functions are
stdin.geti16();
stdin.geti32();
Thanks for the assisst.
Problem solved :)
Now I can get on with studying - with a watchfulll eye for typos ^^
Hyp