Discussion:
Need help here.
(too old to reply)
s***@crayne.org
2007-04-21 09:05:56 UTC
Permalink
hi all!
Iam trying to install hla and masm32 as given in Randall Hyde's book
'art of assembly windows version' but i cant get it right.
i went to http://webster.cs.ucr.edu and installed hla v1.91,hla
executable for windows and masm32.
I was reading the book and I encountered a line which i cant
understand.that is 'If possible, you should install HLA using root/
administrator priviledges;....................'.I ignored it.
then i created c:\IHLA.BAT as instructed in the book.
And then went to command prompt and did the following:

-----------------------------------------------------------------------------------------------------------------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\Documents and Settings\Administrator>c:

C:\>IHLA

C:\>path=c:\hla;c:\masm32\bin;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS
\System32
\Wbem

C:\>set lib=c:\masm32\lib;c:\hla\hlalib;;c:\asm\hlalib;D:\asm\hla
\hlalib;C:\hla\
hlalib;C:\hla\hlalib

C:\>set include=c:\hla\include;c:\masm32\include;

C:\>set hlainc=c:\hla\include

C:\>set hlalib=c:\hla\hlalib\hlalib.lib
------------------------------------------------------------------------------------------------------------------------
then i proceeded as given in the book.And the book says
"At this point, HLA should be properly installed and ready to run. Try
typing "hla -?" at the command line prompt and verify that you get the
HLA help message."
------------------------------------------------------------------------------------------------------------------------
C:\> hla -?
Usage: hla options filename(s)

HLA (High Level Assembler - FASM back end, POLINK linker)
Version 1.91 build 12099 (prototype)

options:
-license Display license information.
-@ Do not generate linker response file.
-@@ Force generation of a new linker response file.
-dxx Define VAL symbol xx to have type BOOLEAN and value TRUE.
-dxx=str Defile VAL symbol xx to have type STRING and value str.
-e:name Executable output filename (appends ".exe" under Windows).
-x:name Executable output filename (does not append ".exe").
-o:omf Produce OMF files (for Windows).
-o:coff Produce win32 COFF files (for Windows).
-o:elf Produce ELF files (for Linux).

Press the enter key to continue:

-s Compile to .ASM files only (using default ASM syntax).
-sm Compile to MASM source files only.
-sf Compile to FASM source files only.
-st Compile to TASM source files only.
-sg Compile to GAS source files only.
-c Compile and assemble to object file only.
-cf Compile and assemble to object file only (using FASM).
-cm Compile/assemble to object using MASM (Windows only).
-ct Compile/assemble to object using TASM (Windows only).
-cg Compile/assemble to object using GAS (Linux only).
-co Compile/assemble to object using internal FASM back-end.
-xf Compile/assemble/link to executable (using FASM).
-xm Compile/assemble/link to object using MASM (Windows only).
-xt Compile/assemble/link to object using TASM (Windows only).
-xg Compile/assemble/link to object using GAS (Linux only).
-xo Compile/assemble/link to object internal FASM back-end.

Press the enter key to continue:

-axxxxx Pass xxxxx as command line parameter to assembler.
-lxxxxx Pass xxxxx as command line parameter to linker.
-m Create a map file during link
-w Compile as windows app (default is console app).
-polink Force use of Pelles C linker/resource compiler.
-mslink Force use of Microsoft linker/resource compiler.
-sym Dump symbol table after compile.
-test Send diagnostic info to stdout rather than stderr.
-p:path Use <path> as the working directory for temporary files.
(overrides hlatmp environment variable.)
-r:name <name> is a text file containing cmd line options.
-obj:path Use <path> as the directory to hold the object files.
-v Verbose compile (also sends output to stdout).
-level=h High-level assembly language.
-level=m Medium-level assembly language.
-level=l Low-level assembly language.
-level=v Machine-level assembly language (very low level).
-? Display this help message.


Press the enter key to continue:

Include and Library Path Control:

-i:path Include path (used to override HLAINC environment
variable).
-lib:path Library path (used to overide HLALIB environment
variable).

HLA Environment Variables:

hlalib=<path> sets path to hlalib.lib file (e.g., c:\hla\hlalib
\hlalib.lib)
hlainc=<path> sets path to HLA include subdirectory (e.g., c:\hla
\include)
hlatmp=<path> sets path to directory to hold temp files (optional)
hla=<asm> sets default assembler behavior
<asm>:
hla- uses internal version of FASM
ohla- uses internal version of FASM
fhla- uses FASM as the back-end assembler
Windows Only:
mhla- uses MASM as the back-end assembler
thla- uses TASM as the back-end assembler
Linux Only:
ghla- uses GAS as the back-end assembler
hlalink=<lnkr> sets default linker behavior
<lnkr>:
Windows Only:
mslink- use Microsoft's link.exe linker
polink- use the Pelles C polink.exe linker
Linux Only:
ld- use the FSF/GNU ld linker
-------------------------------------------------------------------------------------------------------------------------
obviously, i dont know what's the meaning of all this.doesnt look like
a help message to me.But i decided to proceed.
Then i typed 'ML/?' (as the book says).Some information came onscreen
and 'the book asks' me to ignore it.Similarly i typed 'link/?' and
ignored what came onscreen.
Finally, i typed
----------------------
program HelloWorld;
#include( "stdlib.hhf" )
begin HelloWorld;
stdout.put( "Hello, World of Assembly Language", nl );
end HelloWorld;
----------------------
into a text editor and saved it as 'c:\HW.HLA'.And then went to
command prompt and typed "HLA -v HW".(again I dont know what it
means).
the following is what came onscreen..........
------------------------------------------------------------------------------------------------------------------------------
C:\>HW.HLA

C:\>HLA -v HW
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version Version 1.91 build 12099 (prototype)
Win32 COFF output
OBJ output using internal FASM back-end
-test active

HLA Lib Path: c:\hla\hlalib\hlalib.lib
HLA include path: c:\hla\include
HLA temp path:
Linker Lib Path: c:\masm32\lib;c:\hla\hlalib;;c:\asm\hlalib;D:\asm\hla
\hlalib;C
:\hla\hlalib;C:\hla\hlalib;c:\hla\hlalib

Files:
1: HW.hla

Compiling 'HW.hla' to 'HW.obj'
using command line [hlaparse -level=high -v -sf -ccoff -test
"HW.hla"]

----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version Version 1.91 build 12098 (prototype)
-t active
File: HW.hla
Output Path: ""
Language Level: high

Compiling "HW.hla" to "HW.obj"
Compilation complete, 7820 lines, 0.063 seconds, 124127 lines/
second
Using flat assembler version C1.66
3 passes, 932 bytes.
----------------------
Linking via [polink @HW.link._.link]
POLINK: warning: /SECTION:.bss ignored; section is missing.

C:\>
----------------------------------------------------------------------------------------------------------------
But this is not what's supposed to come onscreen.it should have
been ......
-----------------------------------------
HLA (High Level Assembler)
Written by Randall Hyde and released to the public domain.
Version Version 1.32 build 4904 (prototype)
Files:
1: hw.hla
Compiling "hw.hla" to "hw.asm"
Assembling hw.asm via "ml /c /coff /Cp hw.asm"
......
......
(blah blah blah)
----------------------------------------------------
Can anyone say(or predict) where i went wrong???
rhyde@cs.ucr.edu
2007-04-21 18:16:54 UTC
Permalink
Post by s***@crayne.org
hi all!
Iam trying to install hla and masm32 as given in Randall Hyde's book
'art of assembly windows version' but i cant get it right.
i went tohttp://webster.cs.ucr.eduand installed hla v1.91,hla
executable for windows and masm32.
I was reading the book and I encountered a line which i cant
understand.that is 'If possible, you should install HLA using root/
administrator priviledges;....................'.I ignored it.
then i created c:\IHLA.BAT as instructed in the book.
---------------------------------------------------------------------------­--------------------------------------------
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>IHLA
C:\>path=c:\hla;c:\masm32\bin;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS
\System32
\Wbem
C:\>set lib=c:\masm32\lib;c:\hla\hlalib;;c:\asm\hlalib;D:\asm\hla
\hlalib;C:\hla\
hlalib;C:\hla\hlalib
C:\>set include=c:\hla\include;c:\masm32\include;
C:\>set hlainc=c:\hla\include
C:\>set hlalib=c:\hla\hlalib\hlalib.lib
---------------------------------------------------------------------------­---------------------------------------------
then i proceeded as given in the book.And the book says
"At this point, HLA should be properly installed and ready to run. Try
typing "hla -?" at the command line prompt and verify that you get the
HLA help message."
---------------------------------------------------------------------------­---------------------------------------------
C:\> hla -?
Usage: hla options filename(s)
HLA (High Level Assembler - FASM back end, POLINK linker)
Version 1.91 build 12099 (prototype)
-license Display license information.
-dxx Define VAL symbol xx to have type BOOLEAN and value TRUE.
-dxx=str Defile VAL symbol xx to have type STRING and value str.
-e:name Executable output filename (appends ".exe" under Windows).
-x:name Executable output filename (does not append ".exe").
-o:omf Produce OMF files (for Windows).
-o:coff Produce win32 COFF files (for Windows).
-o:elf Produce ELF files (for Linux).
-s Compile to .ASM files only (using default ASM syntax).
-sm Compile to MASM source files only.
-sf Compile to FASM source files only.
-st Compile to TASM source files only.
-sg Compile to GAS source files only.
-c Compile and assemble to object file only.
-cf Compile and assemble to object file only (using FASM).
-cm Compile/assemble to object using MASM (Windows only).
-ct Compile/assemble to object using TASM (Windows only).
-cg Compile/assemble to object using GAS (Linux only).
-co Compile/assemble to object using internal FASM back-end.
-xf Compile/assemble/link to executable (using FASM).
-xm Compile/assemble/link to object using MASM (Windows only).
-xt Compile/assemble/link to object using TASM (Windows only).
-xg Compile/assemble/link to object using GAS (Linux only).
-xo Compile/assemble/link to object internal FASM back-end.
-axxxxx Pass xxxxx as command line parameter to assembler.
-lxxxxx Pass xxxxx as command line parameter to linker.
-m Create a map file during link
-w Compile as windows app (default is console app).
-polink Force use of Pelles C linker/resource compiler.
-mslink Force use of Microsoft linker/resource compiler.
-sym Dump symbol table after compile.
-test Send diagnostic info to stdout rather than stderr.
-p:path Use <path> as the working directory for temporary files.
(overrides hlatmp environment variable.)
-r:name <name> is a text file containing cmd line options.
-obj:path Use <path> as the directory to hold the object files.
-v Verbose compile (also sends output to stdout).
-level=h High-level assembly language.
-level=m Medium-level assembly language.
-level=l Low-level assembly language.
-level=v Machine-level assembly language (very low level).
-? Display this help message.
-i:path Include path (used to override HLAINC environment
variable).
-lib:path Library path (used to overide HLALIB environment
variable).
hlalib=<path> sets path to hlalib.lib file (e.g., c:\hla\hlalib
\hlalib.lib)
hlainc=<path> sets path to HLA include subdirectory (e.g., c:\hla
\include)
hlatmp=<path> sets path to directory to hold temp files (optional)
hla=<asm> sets default assembler behavior
hla- uses internal version of FASM
ohla- uses internal version of FASM
fhla- uses FASM as the back-end assembler
mhla- uses MASM as the back-end assembler
thla- uses TASM as the back-end assembler
ghla- uses GAS as the back-end assembler
hlalink=<lnkr> sets default linker behavior
mslink- use Microsoft's link.exe linker
polink- use the Pelles C polink.exe linker
ld- use the FSF/GNU ld linker
---------------------------------------------------------------------------­----------------------------------------------
obviously, i dont know what's the meaning of all this.doesnt look like
a help message to me.But i decided to proceed.
Then i typed 'ML/?' (as the book says).Some information came onscreen
and 'the book asks' me to ignore it.Similarly i typed 'link/?' and
ignored what came onscreen.
Finally, i typed
----------------------
program HelloWorld;
#include( "stdlib.hhf" )
begin HelloWorld;
stdout.put( "Hello, World of Assembly Language", nl );
end HelloWorld;
----------------------
into a text editor and saved it as 'c:\HW.HLA'.And then went to
command prompt and typed "HLA -v HW".(again I dont know what it
means).
the following is what came onscreen..........
---------------------------------------------------------------------------­---------------------------------------------------
C:\>HW.HLA
C:\>HLA -v HW
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version Version 1.91 build 12099 (prototype)
Win32 COFF output
OBJ output using internal FASM back-end
-test active
HLA Lib Path: c:\hla\hlalib\hlalib.lib
HLA include path: c:\hla\include
Linker Lib Path: c:\masm32\lib;c:\hla\hlalib;;c:\asm\hlalib;D:\asm\hla
\hlalib;C
:\hla\hlalib;C:\hla\hlalib;c:\hla\hlalib
1: HW.hla
Compiling 'HW.hla' to 'HW.obj'
using command line [hlaparse -level=high -v -sf -ccoff -test
"HW.hla"]
----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version Version 1.91 build 12098 (prototype)
-t active
File: HW.hla
Output Path: ""
Language Level: high
Compiling "HW.hla" to "HW.obj"
Compilation complete, 7820 lines, 0.063 seconds, 124127 lines/
second
Using flat assembler version C1.66
3 passes, 932 bytes.
----------------------
POLINK: warning: /SECTION:.bss ignored; section is missing.
C:\>
---------------------------------------------------------------------------­-------------------------------------
But this is not what's supposed to come onscreen.it should have
been ......
-----------------------------------------
HLA (High Level Assembler)
Written by Randall Hyde and released to the public domain.
Version Version 1.32 build 4904 (prototype)
1: hw.hla
Compiling "hw.hla" to "hw.asm"
Assembling hw.asm via "ml /c /coff /Cp hw.asm"
......
......
(blah blah blah)
----------------------------------------------------
Can anyone say(or predict) where i went wrong???
Yes, you installed a newer version of HLA (v1.91, vs 1.32) which has a
lot of fundamental changes.
If you *really* want it to behave more like what the old installation
instructions describe, use a "-xm" command-line parameter, e.g.,

hla -v -xm hw.hla

There will still be many differences in the output, but it will be
closer to what the (ancient, at this point) 1.32 installation
documentation discusses.

This is good. This is call "progress". Unfortunately, we can't go back
and change all the books that have been printed (though I'm discussing
a 2nd edition option with the publisher right now, which would solve
some of the problems you're having).

BTW, you should have been able to run "hw" just fine from the command-
line. Did you try that?
hLater,
Randy Hyde
s***@crayne.org
2007-04-22 08:22:32 UTC
Permalink
thanks.it works.
I have learnt that asm codes can be written in borland C++.
I tried this "asm mov ax,bx;" and it works.
So i was wondering whether we can write hla programs in c++ or not.
I tried the 'hello world' program.but it didnt work.
Tim Roberts
2007-04-24 05:08:10 UTC
Permalink
Post by s***@crayne.org
I have learnt that asm codes can be written in borland C++.
I tried this "asm mov ax,bx;" and it works.
So i was wondering whether we can write hla programs in c++ or not.
I tried the 'hello world' program.but it didnt work.
No. Every assembler and compiler defines its own variant of assembly
language. The basic CPU instructions are pretty much the same, but the
details vary wildly.

HLA, in particular, is a language on its own, and can only be processed by
the HLA assembler.
--
Tim Roberts, ***@probo.com
Providenza & Boekelheide, Inc.
Betov
2007-04-24 05:39:26 UTC
Permalink
Post by Tim Roberts
Every assembler and compiler defines its own variant of assembly
language. The basic CPU instructions are pretty much the same, but
the details vary wildly.
Yes.
Post by Tim Roberts
HLA, in particular, is a language on its own, and can only be
processed by the HLA assembler.
Absurd. HLA has no relationship with Assembly.


Betov.

< http://rosasm.org >
sevag.krikorian@gmail.com
2007-04-25 16:42:20 UTC
Permalink
Post by Betov
Post by Tim Roberts
Every assembler and compiler defines its own variant of assembly
language. The basic CPU instructions are pretty much the same, but
the details vary wildly.
Yes.
Post by Tim Roberts
HLA, in particular, is a language on its own, and can only be
processed by the HLA assembler.
Absurd. HLA has no relationship with Assembly.
Betov.
<http://rosasm.org>
Nonsense. HLA is as much assembler as any assembler in use.

-sevag.k
www.geocities.com/kahlinor
munawwarfiroz
2007-04-25 18:59:11 UTC
Permalink
Thanks guys!!
Here's another question.
I picked the question from the 3rd chapter of Randall Hyde's book(DOS
version).

Note : I dont know how to find the three-bit sum using full
adders(which is the actual problem).
i just need the logic (or equations) behind the program.
And here's the question
(you may need the simx86.exe program from the 3rd chapter subdirectory
to understand the question).

"Write a program that reads two two-bit numbers from switches (FFF0/
FFF2) and
(FFF4/FFF6). Treating these bits as logical values, your code should
compute the three-bit
sum of these two values (two-bit result plus a carry). Use the logic
equations for the full
adder from the previous chapter. Do not simply add these values using
the x86 add instruction.
Display the three-bit result on LEDs FFF8, FFFA, and FFFC."
munawwarfiroz
2007-05-01 04:53:12 UTC
Permalink
Post by munawwarfiroz
Thanks guys!!
Here's another question.
I picked the question from the 3rd chapter of Randall Hyde's book(DOS
version).
Note : I dont know how to find the three-bit sum using full
adders(which is the actual problem).
i just need the logic (or equations) behind the program.
And here's the question
(you may need the simx86.exe program from the 3rd chapter subdirectory
to understand the question).
"Write a program that reads two two-bit numbers from switches (FFF0/
FFF2) and
(FFF4/FFF6). Treating these bits as logical values, your code should
compute the three-bit
sum of these two values (two-bit result plus a carry). Use the logic
equations for the full
adder from the previous chapter. Do not simply add these values using
the x86 add instruction.
Display the three-bit result on LEDs FFF8, FFFA, and FFFC."
Hey guys!!! I still dont have the answer for the program above.Dont
worry! it's not my 'homework'.i havent joined a college yet.

Now i have another problem.........I typed the following program into
a text editor and saved it as a HLA file (c:\int.hla).
(there is no error in the code)
---------------------------------
program intInput;
#include( "stdlib.hhf" );
var
i8: int8;
i16: int16;
i32: int32;
begin intInput;
// Read integers of varying sizes from the 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.geti16();
mov( ax, i16 );
stdout.put( "Enter an integer between +/- 2 billion: " );
stdin.geti32();
mov( eax, i32 );
// Display the input values.
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;
--------------------------
then i went to command prompt and typed "ihla" then "hla -v int".
This is what came onscreen
--------------------------------------------------------
C:\>hla -v int
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version Version 1.91 build 12099 (prototype)
Win32 COFF output
OBJ output using internal FASM back-end
-test active

HLA Lib Path: c:\hla\hlalib\hlalib.lib
HLA include path: c:\hla\include
HLA temp path:
Linker Lib Path: c:\masm32\lib;c:\hla\hlalib;;c:\asm\hlalib;D:\asm\hla
\hlalib;C
:\hla\hlalib;C:\hla\hlalib;C:\hla\hlalib;c:\hla\hlalib

Files:
1: int.hla

Compiling 'int.hla' to 'int.obj'
using command line [hlaparse -level=high -v -sf -ccoff -test
"int.hla"]

----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version Version 1.91 build 12098 (prototype)
-t active
File: int.hla
Output Path: ""
Language Level: high

Compiling "int.hla" to "int.obj"
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Illegal character in file: <ô>(147/$93).
Near: << ô >>

Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Expected ')', encountered 'values'.
Near: << values >>

Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
syntax error, unexpected ')'.
Near: << ) >>

Compilation complete, 7652 lines, 0.064 seconds, 119562 lines/
second
Using flat assembler version C1.66
hla.hhf [72]:
error: undefined symbol.
----------------------
C:\>int
'int' is not recognized as an internal or external command,
operable program or batch file.
------------------------------------------------------
(end of story.Not a happy ending! isnt it?)
What went wrong???
Frank Kotler
2007-05-01 10:10:36 UTC
Permalink
munawwarfiroz wrote:

...
Post by munawwarfiroz
(there is no error in the code)
[snip]

Nope. Works for me!

...
Post by munawwarfiroz
Compiling "int.hla" to "int.obj"
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Illegal character in file: <ô>(147/$93).
Near: << ô >>
There really shouldn't be any "Greek" characters anywhere in this file~
Post by munawwarfiroz
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Expected ')', encountered 'values'.
Near: << values >>
The only instance of the word "values" is in a comment - and not on that
line...

...
Post by munawwarfiroz
Using flat assembler version C1.66
error: undefined symbol.
Hmmm, didn't even get that far... Fasm (cFasm, I guess) didn't complete
assembling the file (and no linker was invoked)...
Post by munawwarfiroz
----------------------
C:\>int
'int' is not recognized as an internal or external command,
operable program or batch file.
... So *this* one is expected...
Post by munawwarfiroz
------------------------------------------------------
(end of story.Not a happy ending! isnt it?)
Givin' up so easy? :)
Post by munawwarfiroz
What went wrong???
It looks like your hla.hhf got totally butchered somehow. Unzipping and
installing again *might* fix it - I'd download it again - might as well
upgrade to 1.93 while you're at it...

You may notice in 1.93 that you have to use "hla -v int.hla" instead of
just "hla -v int" - This has been reported, I can't confirm it - doesn't
happen in Linux... Things are different in Linux, but I'm quite sure you
aren't getting those error messages from a "correct" hla.hhf!

Best,
Frank
munawwarfiroz
2007-05-03 06:31:52 UTC
Permalink
...> (there is no error in the code)
[snip]
Nope. Works for me!
...
Post by munawwarfiroz
Compiling "int.hla" to "int.obj"
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Illegal character in file: <ô>(147/$93).
Near: << ô >>
There really shouldn't be any "Greek" characters anywhere in this file~
Post by munawwarfiroz
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Expected ')', encountered 'values'.
Near: << values >>
The only instance of the word "values" is in a comment - and not on that
line...
...
Post by munawwarfiroz
Using flat assembler version C1.66
error: undefined symbol.
Hmmm, didn't even get that far... Fasm (cFasm, I guess) didn't complete
assembling the file (and no linker was invoked)...
Post by munawwarfiroz
----------------------
C:\>int
'int' is not recognized as an internal or external command,
operable program or batch file.
... So *this* one is expected...
Post by munawwarfiroz
------------------------------------------------------
(end of story.Not a happy ending! isnt it?)
Givin' up so easy? :)
Post by munawwarfiroz
What went wrong???
It looks like your hla.hhf got totally butchered somehow. Unzipping and
installing again *might* fix it - I'd download it again - might as well
upgrade to 1.93 while you're at it...
You may notice in 1.93 that you have to use "hla -v int.hla" instead of
just "hla -v int" - This has been reported, I can't confirm it - doesn't
happen in Linux... Things are different in Linux, but I'm quite sure you
aren't getting those error messages from a "correct" hla.hhf!
Best,
Frank
i installed hla again but it still doesnt work!!!
munawwarfiroz
2007-05-08 05:19:46 UTC
Permalink
Post by munawwarfiroz
Post by munawwarfiroz
Thanks guys!!
Here's another question.
I picked the question from the 3rd chapter of Randall Hyde's book(DOS
version).
Note : I dont know how to find the three-bit sum using full
adders(which is the actual problem).
i just need the logic (or equations) behind the program.
And here's the question
(you may need the simx86.exe program from the 3rd chapter subdirectory
to understand the question).
"Write a program that reads two two-bit numbers from switches (FFF0/
FFF2) and
(FFF4/FFF6). Treating these bits as logical values, your code should
compute the three-bit
sum of these two values (two-bit result plus a carry). Use the logic
equations for the full
adder from the previous chapter. Do not simply add these values using
the x86 add instruction.
Display the three-bit result on LEDs FFF8, FFFA, and FFFC."
Hey guys!!! I still dont have the answer for the program above.Dont
worry! it's not my 'homework'.i havent joined a college yet.
Now i have another problem.........I typed the following program into
a text editor and saved it as a HLA file (c:\int.hla).
(there is no error in the code)
---------------------------------
program intInput;
#include( "stdlib.hhf" );
var
i8: int8;
i16: int16;
i32: int32;
begin intInput;
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.geti16();
mov( ax, i16 );
stdout.put( "Enter an integer between +/- 2 billion: " );
stdin.geti32();
mov( eax, i32 );
// Display the input values.
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;
--------------------------
then i went to command prompt and typed "ihla" then "hla -v int".
This is what came onscreen
--------------------------------------------------------
C:\>hla -v int
HLA (High Level Assembler)
Use '-license' to see licensing information.
Version Version 1.91 build 12099 (prototype)
Win32 COFF output
OBJ output using internal FASM back-end
-test active
HLA Lib Path: c:\hla\hlalib\hlalib.lib
HLA include path: c:\hla\include
Linker Lib Path: c:\masm32\lib;c:\hla\hlalib;;c:\asm\hlalib;D:\asm\hla
\hlalib;C
:\hla\hlalib;C:\hla\hlalib;C:\hla\hlalib;c:\hla\hlalib
1: int.hla
Compiling 'int.hla' to 'int.obj'
using command line [hlaparse -level=high -v -sf -ccoff -test
"int.hla"]
----------------------
HLA (High Level Assembler) Parser
use '-license' to view license information
Version Version 1.91 build 12098 (prototype)
-t active
File: int.hla
Output Path: ""
Language Level: high
Compiling "int.hla" to "int.obj"
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Illegal character in file: <ô>(147/$93).
Near: << ô >>
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Expected ')', encountered 'values'.
Near: << values >>
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
syntax error, unexpected ')'.
Near: << ) >>
Compilation complete, 7652 lines, 0.064 seconds, 119562 lines/
second
Using flat assembler version C1.66
error: undefined symbol.
----------------------
C:\>int
'int' is not recognized as an internal or external command,
operable program or batch file.
------------------------------------------------------
(end of story.Not a happy ending! isnt it?)
What went wrong???- Hide quoted text -
- Show quoted text -
i have been waiting 4 an answer and truly my patience is
eroding...........somebody please help me(an that's an
order......please)!!!!
Frank Kotler
2007-05-08 12:17:04 UTC
Permalink
munawwarfiroz wrote:

...
Post by munawwarfiroz
Post by munawwarfiroz
Compiling "int.hla" to "int.obj"
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Illegal character in file: <ô>(147/$93).
Near: << ô >>
Error in file "hla.hhf" at line 426
Macro called in file "stdout.hhf" at line 636
Macro called in file "int.hla" at line 11
Expected ')', encountered 'values'.
Near: << values >>
...
...
Post by munawwarfiroz
i have been waiting 4 an answer and truly my patience is
eroding...........somebody please help me(an that's an
order......please)!!!!
I just downloaded the 'doze version to be sure, and that cruft does
*not* appear in hla.hhf. You said you re-installed... re-download, too?
Same error message, I assume? Only thing I can suggest is try it still
*again*...

Or... If one tool isn't workin' for you, try another. I like Nasm -
there are lots of other options! But they won't help you with AoA. :(

Possibly try HIDE... (Sevag's IDE for HLA - same include files, but
maybe they'll work for ya...)

http://www.geocities.com/kahlinor/HIDE.html

Or... consider installing Linux?

Best,
Frank
munawwarfiroz
2007-05-09 06:41:28 UTC
Permalink
i downloaded and installed the whole thing but again, no use.....:(
I remember that i installed masm then masm32. i remember doing all
sorts of stuff (like installing ucr library,stdlib,visual c++, and
there are lot of junk in my PC.............i think that's it).Probably
one of the programs might be interfering with hla.

i didnt tamper with the hla folder.probably masm is
malfunctioning.....
what do you think??
Frank Kotler
2007-05-09 09:46:44 UTC
Permalink
Post by munawwarfiroz
i downloaded and installed the whole thing but again, no use.....:(
I remember that i installed masm then masm32. i remember doing all
sorts of stuff (like installing ucr library,stdlib,visual c++, and
there are lot of junk in my PC.............i think that's it).Probably
one of the programs might be interfering with hla.
Possible. That kind of thing *can* cause problems. But in this case, I
don't think so. According to the error message, the problem is
specifically in hla.hhf. You *might* just have an older version of the
file that isn't being overwritten by your upgrades.. or the "hlainc"
environment variable might not point to where you've put the "correct"
version.

What do you see if you *look* at line 426 in hla.hhf - that might give
you a clue. I recently posted to the !Yahoo! group*, "can anybody help
that guy on clax?" I joked that it sounded like you had a broken
"unzip.exe". Just a joke, but - judging just from the error messages you
showed - I really think that file is getting corrupted... somehow.
Post by munawwarfiroz
i didnt tamper with the hla folder.probably masm is
malfunctioning.....
what do you think??
No, it's a problem with HLA, or its include file(s). Masm isn't involved
at *all* with recent versions of HLA, unless you specifically ask for
it. You could delete everything Masm-related and HLA would still work. I
don't know if "ihla.bat" is still required... possibly not. (an old
version of "ihla.bat" with new HLA might be a problem???)

Recent versions of HLA have included code from Fasm - "built in", so
there's no external assembler called. Turns out these versions are all
somewhat buggy. If, by any chance, you've got 1.89 or earlier around, it
might help to roll back to those. I don't think there's a "downgrade"
option on the Webster download page, but I hope to see one Real Soon
Now! (there's a "showstopper" in the recently released 1.94 - Linux
version...)

If it were easy, everybody'd be doin' it! :)

Best,
Frank

* http://tech.groups.yahoo.com/group/aoaprogramming/
rhyde@cs.ucr.edu
2007-05-09 13:56:23 UTC
Permalink
Post by munawwarfiroz
Thanks guys!!
Here's another question.
I picked the question from the 3rd chapter of Randall Hyde's book(DOS
version).
Okay, I've just uploaded HLA v1.94 to Webster. Grab a new copy and see
if this doesn't solve your problems. It fixes some severe problems
with the internal version of FASM that is being used. If you continue
to have problems, install MASM as described in the documentation and
rename "HLA.EXE" to "MHLA.EXE" and see if that makes things better.
The internal FASM version should be working better now, though.
hLater,
Randy Hyde
munawwarfiroz
2007-05-10 19:51:18 UTC
Permalink
i installed v1.94 and renamed hla.exe to mhla.exe.Not working
again.....same errors as above with 'Compiling "int.hla" to "int.asm"'
as the only difference.
These are the lines in hla.hff that's showing errors (i think these
are the lines....man, iam too dumb at this--Feels like iam sitting for
a chemistry exam)

this is line number 426 (including the blank lines.i dont know how the
numbering is done!! So i included few more lines just in case)
-------------------
'...........?@global:hla._prefix_ :string := @string:_package_ + ".";
?@global:hla._pType_ := @pType( @text( @global:hla._id_ ));
#if( @pType( @text( @global:hla._id_ )) <> hla.ptPointer )

?@global:hla._pType_ := @basepType( @text( @global:hla._id_ ));

#endif

// Assume the result is valid.

?@global:hla._valid_ := true;

// Okay, determine if the caller supplied a field width
// value with this parameter.


?@global:hla._fieldCnt_ := @elements( @global:hla._parmArray_ );
?@global:hla._width_ := "-1"; // Default width value.
?@global:hla._decpts_ := "-1"; // Default fractional value.
?@global:hla._sizeParms_ := ""; // Assume no size parameter(s)
?@global:hla._typename_ := hla.ptypeStrs[ @global:hla._pType_ ];
?@global:hla._valid_ := true;

#if( @global:hla._fieldCnt_ = 1 )

#if( !_package_.validPutType[ @global:hla._pType_ ] )

?@global:hla._valid_ := false;
#error( "This output type is not supported" )

#else

?@global:hla._func_ :string :=
@global:hla._prefix_ +
_package_.putFunc[ @global:hla._pType_ ];

#endif


#elseif( @global:hla._fieldCnt_ = 2 )

#if( !_package_.validPutSizeType[ @global:hla._pType_ ] )

?@global:hla._valid_ := false;
#error( "This type does not support an output width" )

#else

?@global:hla._func_ :string :=
@global:hla._prefix_ +
_package_.putSizeFunc[ @global:hla._pType_ ];

?@global:hla._width_ := @trim( @global:hla._parmArray_[ 1 ], 0 );
?@global:hla._sizeParms_ := "," + @global:hla._width_ + ",' '";

#endif

#elseif( @global:hla._fieldCnt_ = 3 )

// Determine if the user supplied a fractional width
// value with this parameter.


#if( !_package_.validPutSize2Type[ @global:hla._pType_ ] )

?@global:hla._valid_ := false;
#error
(
"This type does not support a second (decpts) output width"
)

#else.............blah bla bla (actually chemistry was a lot better
than this)'
--------------
it's too large to display the whole thing here.....wish i could upload
it somewhere(or i can send it directly to you through mail)...
Hey is there any available older versions of hla.probably that would
work!
anyway, thanks for all your help.
***********
"i like knowledge and people with knowledge.Do not allow knowledge to
die."--me-(munawwar) (this is original and not copied from any
movie.ya i know-i go crazy sometimes.)
Frank Kotler
2007-05-11 09:51:46 UTC
Permalink
Post by munawwarfiroz
i installed v1.94 and renamed hla.exe to mhla.exe.Not working
again.....same errors as above with 'Compiling "int.hla" to "int.asm"'
as the only difference.
These are the lines in hla.hff that's showing errors (i think these
are the lines....man, iam too dumb at this--Feels like iam sitting for
a chemistry exam)
I sympathize... although it was the chem *lab* exam that really messed
me up!
Post by munawwarfiroz
this is line number 426 (including the blank lines.i dont know how the
numbering is done!! So i included few more lines just in case)
-------------------
[snip]
That looks right. That completely blows my theory! If hla.hhf is okay,
and you're still getting those errors (it's the "illegal character" that
really gets me!)... perhaps HLA is finding some other instance of
hla.hhf? That doesn't seem very likely, but it's the only thing I can
think of. You could experiment by putting a deliberate error in hla.hhf
just before the line that HLA's complaining about, and see if HLA
complains about it. This is real "desperation" stuff - you shouldn't
have to do that!!!

...
Post by munawwarfiroz
#else.............blah bla bla (actually chemistry was a lot better
than this)'
Yeah, more "interesting" when a chemistry project "blows up". This is
just frustrating.
Post by munawwarfiroz
it's too large to display the whole thing here.....
That's okay. The question was only "is there an illegal character on
that line?" No, and no word "values" either. I'm stumped.
Post by munawwarfiroz
wish i could upload
it somewhere(or i can send it directly to you through mail)...
I doubt if that would do any good.
Post by munawwarfiroz
Hey is there any available older versions of hla.probably that would
work!
That would be a good idea. 1.86 was considered stable, I guess. I
thought 1.89 was okay. The 1.9x versions seem troublesome. I've got a
selection of Linux versions (I smartened up and renamed "hla.tar.gz" to
"hla-1.94.tar.gz" so they don't overwrite each other). I think the
newest Windows version I've got is 1.52, and that's a bit *too* old I
think. fbkotler at verizon dot net if you want it.

A much better solution would be for Randy to put an "emergency
downgrade" package on Webster, IMHO. That might not solve your problem.
Those error messages you're getting are *very* strange!
Post by munawwarfiroz
anyway, thanks for all your help.
Heh! If and when you get any. :)
Post by munawwarfiroz
***********
"i like knowledge and people with knowledge.Do not allow knowledge to
die."--me-(munawwar) (this is original and not copied from any
movie.ya i know-i go crazy sometimes.)
Yeah! Knowledge isn't heavy to lug around, and you don't have to set
armed guards around it. Yeah!

Best,
Frank
munawwarfiroz
2007-05-16 08:47:45 UTC
Permalink
i cant get hla to execute the program.never mind...
iam going learn the dos version.
but here too i have a problem....

i have been trying to run shell.asm file.cant figure out how..
i tried the following
-------------------
c:\>set include=c:\stdlib\include
c:\>set lib=c:\stdlib\lib

C:\>c:\masm32\bin\ml c:\stdlib\examples\shell.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.

Assembling: c:\stdlib\examples\shell.asm
MASM : fatal error A1020: cannot find link.exe

C:\>
-------------------------------------
how do i include the link.exe file??
Frank Kotler
2007-05-17 07:10:46 UTC
Permalink
Post by munawwarfiroz
i cant get hla to execute the program.never mind...
Strictly speaking, HLA would assemble your program, not "execute" it (if
you could get it to work at all).
Post by munawwarfiroz
iam going learn the dos version.
I personally think that's a good idea. Don't spend *too* much time on it
- dos really *is* pretty useless these days.
Post by munawwarfiroz
but here too i have a problem....
i have been trying to run shell.asm file.cant figure out how..
i tried the following
-------------------
c:\>set include=c:\stdlib\include
c:\>set lib=c:\stdlib\lib
You may want to also do:

c:\path=c:\masm32\bin;%PATH%

and:

c:\path=c:\where\you\put\link.exe ; 16-bit linker!!!
Post by munawwarfiroz
C:\>c:\masm32\bin\ml c:\stdlib\examples\shell.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: c:\stdlib\examples\shell.asm
MASM : fatal error A1020: cannot find link.exe
C:\>
-------------------------------------
how do i include the link.exe file??
Well, you could set the "path" variable to include it. Or, you could
pass the "/c" switch to ml, and invoke the linker by giving the full
path to link, just as you do to ml.

However, you'll *still* have a problem! The linker that comes with
masm32 is for 32-bit code, and won't work for 16-bit code. If you see
"incremental linker" and something about "converting to coff" (and it
doesn't link your file), you've got the 32-bit linker. The 16-bit one
will say "segmented linker"... and *will* link your 16-bit code (we hope).

You can get the 16-bit linker from here (thanks to Nathan for the "link"
to "link" :)

http://website.masm32.com/microsft.htm

I think what I'd do is, first(!), rename link.exe to "link32.exe", then
download the 16-bit linker, and rename it to "link16.exe" (all in the
/masm32/bin directory), then copy "link16.exe" or "link32.exe" to
"link.exe", depending on which you want... You still may need to give ml
the "/c" switch, and run the linker "by hand"... the command line passed
to the linker by ml may not be correct for "link16"... try it and see!

Where are all the Masm users to answer these questions???

Best,
Frank

(I'll be sending you that promised Nasm example... soon)
nbaker2328
2007-05-17 21:08:47 UTC
Permalink
Post by munawwarfiroz
i cant get hla to execute the program.never mind...
iam going learn the dos version.
but here too i have a problem....
i have been trying to run shell.asm file.cant figure out how..
i tried the following
-------------------
c:\>set include=c:\stdlib\include
c:\>set lib=c:\stdlib\lib
C:\>c:\masm32\bin\ml c:\stdlib\examples\shell.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: c:\stdlib\examples\shell.asm
MASM : fatal error A1020: cannot find link.exe
C:\>
-------------------------------------
how do i include the link.exe file??
This should cure your HLA installation problems:

v 1.24.10
http://home.comcast.net/~kyzra/hlafiles/HIDE124.zip

Nathan.
rhyde@cs.ucr.edu
2007-05-18 16:36:01 UTC
Permalink
Post by nbaker2328
Post by munawwarfiroz
i cant get hla to execute the program.never mind...
iam going learn the dos version.
but here too i have a problem....
i have been trying to run shell.asm file.cant figure out how..
i tried the following
-------------------
c:\>set include=c:\stdlib\include
c:\>set lib=c:\stdlib\lib
C:\>c:\masm32\bin\ml c:\stdlib\examples\shell.asm
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: c:\stdlib\examples\shell.asm
MASM : fatal error A1020: cannot find link.exe
C:\>
-------------------------------------
how do i include the link.exe file??
v 1.24.10
http://home.comcast.net/~kyzra/hlafiles/HIDE124.zip
Nathan.- Hide quoted text -
- Show quoted text -
And while you're at it, grab a copy of HLA v1.96 which is now up on
Webster.
hLater,
Randy Hyde
arun.mukundan
2007-05-23 09:42:16 UTC
Permalink
'polink' is not recognised as an internal or external command,
operable program or batch file.
error returned by POLINK = 1

thats the error i get even for the hello world prog.
where have i gone wrong?
rhyde@cs.ucr.edu
2007-04-25 20:36:30 UTC
Permalink
Post by Tim Roberts
Post by s***@crayne.org
I have learnt that asm codes can be written in borland C++.
I tried this "asm mov ax,bx;" and it works.
So i was wondering whether we can write hla programs in c++ or not.
I tried the 'hello world' program.but it didnt work.
No. Every assembler and compiler defines its own variant of assembly
language. The basic CPU instructions are pretty much the same, but the
details vary wildly.
HLA, in particular, is a language on its own, and can only be processed by
the HLA assembler.
Actually, *every* assembler out there is an "anguage on its own" and
can be processed only by the particular assembler. You cannot, for
example, compile MASM source code with FASM, FASM source code with
NASM, etc.

Even MASM and TASM, which are about as close as you'll see assemblers
get these days, have a wide variety of differences. If you don't
believe me, ask anyone who uses TASM's ideal mode.
hLater,
Randy Hyde
rhyde@cs.ucr.edu
2007-05-24 01:09:05 UTC
Permalink
Post by arun.mukundan
'polink' is not recognised as an internal or external command,
operable program or batch file.
error returned by POLINK = 1
thats the error i get even for the hello world prog.
where have i gone wrong?
Well, that means that polink.exe is not in your execution path. I'll
check the HLA installation to make sure it is installing polink.exe.
In the meantime, if you have the Microsoft linker handy, you can use
the -mslink command-line option to HLA to tell it to use Microsoft's
linker instead of polink (something I recommend anyway, as you won't
get the annoying BSS warning from MSLink).

If you've got a copy of the MASM32 package installed (or otherwise
have obtained the MASM assembler and Microsoft linker), renaming
hla.exe to mhla.exe will tell HLA to run MASM/MSLINK rather than FASM/
POLINK. So that's another alternative.
hLater,
Randy Hyde

Loading...