News:

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

Introduction and a small question

Started by SysMan, January 11, 2010, 10:01:30 PM

Previous topic - Next topic

SysMan

Hi All,

I bought AoA several years ago in a fit of enthusiasm but have only just got round to studying it now I'm retired and have the time. I'm getting on fine but I have a small question about the example program HexIO in chapter 2.

I cannot get this to compile correctly. It gives me the followiing error:
C:\hla\ch02>hla 2_04HexIO
Error in file "2_04HexIO.hla" at line 7 [errid:76499/hlaparse.bsn]:
Expected ':', encountered '('
(Possible undefined ID '.getd').
Near: << ( >>

HLAPARSE assembly failed with 1 errors


The code follows. The line giving the error is: stdin.getd();

program HexIO;
#include( "stdlib.hhf" );
static
    i32: int32;
begin HexIO;
    stdout.put( "Enter a hexadecimal value: " );
    stdin.getd();
    mov( eax, i32 );
    stdout.put( "The value you entered was $" );
    stdout.putd( i32 );
    stdout.newln();
end HexIO;


The version of HLA I'm using is :
HLA (High Level Assembler - HLABE back end, POLINK linker)
Version 2.6 build 3183 (prototype)
I've used my imagination and tried one or two alternative configurations but as the book is dated 2003, I'm wondering if things have changed since then?
I'm not too bothered by this and will be carrying on whether I get an answer or not as things have a habit of becoming clear as experience increases but as I said I also wanted to introduce myself on this forum  :bg
By the way my real name is Dick Summerfield and I live in the Netherlands...

Sevag.K

Changes have been made to the standard library.

For AoA compatibility, I believe there is a 'frozen' version of HLA, 1.99.

I can't seem to find the link at this time, but I do have a version of HIDE that comes with an AoA compatible version of HLA.

http://sites.google.com/site/highlevelassembly/downloads/hide

Make sure you click on the compatibility version link.  If you don't want to use the IDE, you can copy the libraries, headers and binaries to your working hla folder.

SysMan

Sevag,
Thanks for the tip. I also found the frozen version you refer to on the "Webster" download page: http://homepage.mac.com/randyhyde/webster.cs.ucr.edu/HighLevelAsm/dnld.html. Where it is described as follows:
QuoteHLA v1.99 is a frozen version that incorporates the HLA Standard Library v1.x as part of the package (for Windows and Linux users, only). Beginners who are just learning assembly language programming using the electronic edition of The Art of Assembly Language should download and use this version of HLA until they are comfortable programming in assembly language. The examples in The Art of Assembly Language use the routines found in the HLA standard library v1.x and beginning students will be able to use HLA v1.99/HLA stdlib v1.x without any problems.
The download link is just below this text on "Webster".

So I think I shall chuck out HLA 2.6  :( and replace it by 1.99 for the time being.

I like the look of your HIDE! I see things in the screenshot which remind me strongly of my favourite text editor SciTE. So I'm sure I'd feel at home with HIDE but I want to stick to the command line for the time being, until I'm more used to the HLA environment...

Enough fun stuff for the future then - back to 2.6, HIDE - I can't wait  :wink 


(P.S. I've downloaded the frozen version - just a zip file with the 1.99 executables which I unzipped over the folders of the 2.6 hla installation. The file which had the error now compiles and runs  correctly...  :U )

Randall Hyde

Note that the second edition of the Art of Assembly just arrived.
It fully supports the HLA v2.x syntax.
I'm not suggesting you go out and buy the new version (stick with v1.99 until you're comfortable with HLA), but just to let everyone else know.