News:

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

Compiler Errors

Started by Ev!LC0N, October 05, 2006, 06:20:41 AM

Previous topic - Next topic

Ev!LC0N

Greetings-

I've purchased AoA by Randall Hyde. I know nothing when it comes to Assembly Language Programming. From the instructions in the CD, I have installed MASM32 & HLA on the C: drive.  Later I downloaded the HLA v1.86 onto C:\HLA.

Used Notepad as the editor and renamed the file to hw.hla for my First "Hello World" program.

program helloworld;

#include ("stdlib.hhf")

begin helloworld;

stdout.put( "Hello, World Of Assembly Language", n1 );

end helloworld;

When I compiled the Program, I'm getting the error message shown below.

C:\hla\projects\hw>hla hw.hla
Error in file "hla.hhf" at line 691 [errid:1616/hla.flx]:
Macro called in file "hw.hla" at line 7
Macro called in file "hw.hla" at line 7
stdout.put: Unknown data type
(n1 is type "").
Near: << ) >>

File hla.hhf is in the C:\hla\include folder.

Would someone be able to give any hints where I should be looking to resolve this issue?

Cheers
Ev!LC0N

Evenbit

Pretty easy to fix this.  Just change the "1", one, into an "l", lowercase elle, in the following line:

stdout.put( "Hello, World Of Assembly Language", n1 );

it should read:

stdout.put( "Hello, World Of Assembly Language", nl );

The "nl" stands for "new line".

Nathan.

P.S. -  Alternatively, one could do this:

program helloworld;

#include ("stdlib.hhf")

var
    n1    :dword    :=    42;

begin helloworld;

stdout.put( "Hello, World Of Assembly Language", n1 );

end helloworld;

Ev!LC0N

Greetings-

Thanks Evenbit for your reply. I changed 'n1' to 'nl' and when I compile it, it gives me the below error:

C:\hla\projects\hw>hla hw.hla
'ml' is not recognized as an internal or external command,
operable program or batch file.
Error returned by Assembler = 1

I don't want to give the impression that I want to be spoon fed. I don't. I don't know how to explain, but I would request members to be patient during these initial steps.

Cheers

Evenbit

This is a common problem.  In fact, I'll just copy my reply from a previous thread:

You might want to write a batch file so that when you go to the command prompt it will set up the following:

path=C:\hla;C:\masm32\bin;%path%

set lib=C:\masm32\lib;C:\hla\hlalib;%lib%

set include=C:\hla\include;C:\masm32\include;%include%

set hlainc=C:\hla\include

set hlalib=C:\hla\hlalib\hlalib.lib

http://www.masm32.com/board/index.php?topic=3090.0

Nathan.

Ev!LC0N

Greetings-

Thanks Evenbit for your reply.  When I typed 'set' below is the output:

C:\hla\projects\hw>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\F0REN$IC$\Application Data
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=*****
ComSpec=C:\WINDOWS\system32\cmd.exe
FP_NO_HOST_CHECK=NO
hlainc=c:\hla\include
hlalib=c:\hla\hlalib\hlalib.lib
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\*****
lib=;c:\hla\hlalib
LOGONSERVER=\\*****
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=c:\hla;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Pro
gram Files\ATI Technologies\ATI Control Panel;C:\PROGRA~1\COMMON~1\SONICS~1\;C:\
Program Files\Support Tools\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 8, GenuineIntel
PROCESSOR_LEVEL=6
PROCESSOR_REVISION=0d08
ProgramFiles=C:\Program Files
PROMPT=$P$G
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=*****
TMP=*****
USERDOMAIN=*****
USERNAME=*****
USERPROFILE=C:\Documents and Settings\*****
windir=C:\WINDOWS

I'm using Notepad as the editor.  When I compiled the program, I see hw.rohw.link, hw.extpub, hw.data, hw.consts, hw.bss files in my c:\hla\projects\hw folder.  I'm assuming these files are created due to compile.

What else am I missing?

Cheers

Evenbit

The current version of HLA uses either MASM or FASM (or GAS on Linux) as "backend assembler" for one step of the compile process.  Since you've downloaded the MASM32 package, I assume you've downloaded the MASM "version" of HLA.  In that case, you will want to set the environment variables properly for MASM.

Your best bet is not to mess with any of this.  Just download HIDE from here:
http://www.geocities.com/kahlinor/HLA.html

HIDE is an IDE specifically for HLA and doesn't require you to set any environmental variables... it runs "out of the box".

Nathan.

Ev!LC0N

Greetings-

Thanks Evenbit for HIDE.  It was easy to use and I was able to build and run my first HLA program. 

Cheers
Ev!LC0N

DarkWolf

You should thank sevag, it's his program and I have found it to be really useful.
--
Where's there's smoke, There are mirrors.
Give me Free as in Freedom not Speech or Beer.
Thank You and Welcome to the Internet.

Ev!LC0N

Quote from: DarkWolf on October 12, 2006, 12:31:48 AM
You should thank sevag, it's his program and I have found it to be really useful.


Greetings-

Thankyou Sevag for HIDE.

Cheers