News:

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

installation problem

Started by kb7wg, February 05, 2006, 09:11:55 PM

Previous topic - Next topic

kb7wg

hey nathan...explain something to me......when i was coding....long time ago......all i had to do was assemble a text file to a obj file and run it........then only complier there was....was for basic.what is a linker?   why do i have to complile anything.....and why do u have all these lib files?.......i have read the first 5 ass tuts on programmers haven.....and not one word of these things????
where can i get this info?
earl

Sevag.K

Quote from: kb7wg on February 11, 2006, 12:51:48 PM
and sevag......this is what i get when i run urs

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

READY C:\>khla hw
Assembling: hw.asm

READY C:\>cd hla

READY C:\hla>khla hw
    hw.hla
Could not open file
Could not open hw.hla
    hw.asm
Error with program execution

READY C:\hla>

i put ur files into hla dir.....if i run it from c....it says assembling and goes back to prompt......if i run it from hla dir.....i get some errors......

i have no idea what it means....earl

The errors are that it can't open hw.hla
When you run it from the folder that contains hw.hla, you don't get hw.exe?


kb7wg

ok....we got something.....

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

READY C:\>cd hla

READY C:\hla>khla hw
Error in file "hw.hla" at line 2 [errid:3462/hla.flx]:
Could not open include file "stdlib.hhf".
Near: << ) >>

    hw.asm
Error with program execution

READY C:\hla>


i hope this helps.....

kb7wg

this is my source.....

program HelloWorld;
#include ( "stdlib.hhf" )
begin HelloWorld;

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

end HelloWorld;


if that helps.....

Sevag.K

khla.exe and khla.ini have to be in your hla folder for this to work with the default initialization file (typically, the same location as hla.exe and hlaparse.exe), is that where you copied the files?

The directory structure should look something like this:

include
hlalib
hla.exe
hlaparse.exe
khla.exe
khla.ini


MichaelW

Earl,

This looks to me like the build succeeded. Did you try to run hello.exe?

Directory of C:\hla\test

02/11/2006 07:31 AM <DIR> .
02/11/2006 07:31 AM <DIR> ..
02/11/2006 07:30 AM 1,448 hello.asm
02/11/2006 07:30 AM 0 hello.bss.inc
02/11/2006 07:30 AM 319 hello.consts.inc
02/11/2006 07:30 AM 284 hello.data.inc
02/11/2006 07:31 AM 8,192 hello.exe
02/11/2006 07:30 AM 587 hello.extpub.inc
02/10/2006 11:22 PM 223 hello.hla
02/11/2006 07:30 AM 181 hello.link
02/11/2006 07:31 AM 1,139 hello.obj
02/11/2006 07:30 AM 0 hello.ro.inc
02/10/2006 11:45 PM 205 makeit.bat
02/10/2006 11:06 PM 249 _hello.link


If the build did succeed, then the problem is not with hlaparse.exe or anything following it, including ML and LINK. I think the problem must be in the path, the HLA environment variables, or in the shell app hla.exe. You could eliminate potential problems with the path by placing c:\hla; at the start of the path as shown in install.html. In the SET command output that you posted earlier the HLA environment variables and everything else except the path looked OK. I don't know enough about hla.exe to guess what sort of problems it could encounter.

If you cannot get hla.exe to work correctly, you could try HIDE. The installation consists essentially of unzipping the download. The IDE is easy to use and I had no problems building the few samples I tried, even without reading the tutorial or any of the documents. And if you run into trouble, you can ask the world's leading HIDE authority for help  :bg

If you cannot get HIDE to work, then you could do your builds with batch files, like this one for a console app:

set path=c:\hla;c:\masm32\bin;%path%

if exist "%1.asm" del "%1.asm"
if exist "%1.obj" del "%1.obj"
if exist "%1.exe" del "%1.exe"

hlaparse  -v -sm -test "%1.hla"

if not exist "%1.asm" goto errhla

ml /c /coff /Cp /Fo "%1.obj" "%1.asm"

if errorlevel 1 goto errasm

link /SUBSYSTEM:CONSOLE "%1.obj" @linkcmd.link

if errorlevel 1 goto errlink

dir "%1.*"
goto theend

:errlink
echo.
echo Assembly error
goto theend

:errasm
echo.
echo Assembly error
goto theend

:errhla
echo.
echo HLA error
goto theend

:theend
pause


And with this linker response file (named linkcmd.link for the batch file) in the current directory:

-heap:0x1000000,0x1000000
-stack:0x1000000,0x1000000
-base:0x4000000
-entry:HLAMain
-section:.text,ER
-section:.data,RW
-section:.bss,RW
c:\hla\hlalib\kernel32.lib
c:\hla\hlalib\user32.lib
c:\hla\hlalib\gdi32.lib
c:\hla\hlalib\hlalib.lib


You would need to create a slightly different batch file, and possibly modify the linker response file, for a GUI app, or if your project used resources, etc.
eschew obfuscation

kb7wg

ok sevag.....

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

READY C:\>cd hla

READY C:\hla>dir /w /p
Volume in drive C is Tom
Volume Serial Number is 5072-4B1A

Directory of C:\hla

[.]            [..]           FASM.EXE       fhla.exe       gdi32.lib
hla.exe        [hlalib]       hlaparse.exe   hw.hla         [include]
kernel32.lib   [khla]         khla.exe       KHLA.INI       KHLA.rtf
LINK.EXE       [misc files]   ML.ERR         ML.EXE         MSPDB50.DLL
polib.exe      polink.exe     pomake.exe     porc.dll       porc.exe
[projects]     [test]         unins000.dat   unins000.exe
              21 File(s)      3,861,619 bytes
               8 Dir(s)  48,243,662,848 bytes free

READY C:\hla>khla hw
Error in file "hw.hla" at line 2 [errid:3462/hla.flx]:
Could not open include file "stdlib.hhf".
Near: << ) >>

    hw.asm
Error with program execution

READY C:\hla>khla -v hw

KHLA - Customizable HLA shell utility
Written by Sevag Krikorian
Version 1.03

HLA (High Level Assembler) is
Written by Randall Hyde and released to the public domain.

===== Active Options =====
==========================
FORMAT: Win32 COFF output
ASSEMBLER: MASM
Generating CONSOLE Executable
Using Custom Link Section : Link
Processing Files:
        hw.hla
Compiling :hw.hla
hlaparse.exe -@ -v -sm "hw.hla"

HLA (High Level Assembler) Parser
Released to the public domain by Randall Hyde.
Version Version 1.79 build 10130 (prototype)
File: hw.hla
Output Path: ""

Compiling "hw.hla" to "hw.asm"
Error in file "hw.hla" at line 2 [errid:3462/hla.flx]:
Could not open include file "stdlib.hhf".
Near: << ) >>

    hw.asm
Error with program execution

READY C:\hla>dir /w /p
Volume in drive C is Tom
Volume Serial Number is 5072-4B1A

Directory of C:\hla

[.]             [..]            FASM.EXE        fhla.exe        gdi32.lib
hla.exe         [hlalib]        hlaparse.exe    hw.asm          hw.bss.inc
hw.consts.inc   hw.data.inc     hw.hla          hw.ro.inc       [include]
kernel32.lib    [khla]          khla.exe        KHLA.INI        KHLA.rtf
LINK.EXE        [misc files]    ML.ERR          ML.EXE          MSPDB50.DLL
polib.exe       polink.exe      pomake.exe      porc.dll        porc.exe
[projects]      [test]          unins000.dat    unins000.exe
              26 File(s)      3,862,207 bytes
               8 Dir(s)  48,243,662,848 bytes free

READY C:\hla>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\earl\Application Data
CLASSPATH=C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
CLIENTNAME=Console
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SYSTEM2
ComSpec=C:\WINDOWS\system32\cmd.exe;
FP_NO_HOST_CHECK=NO
hlainc=C:\hla\include
hlalib=C:\hla\hlalib
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\earl
lib=C:\hla\hlalib;C:\masm32\lib
LOGONSERVER=\\SYSTEM2
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
Path=C:\masm32;C:\masm\bin;C:hla;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Syste
m32\Wbem;C:\Program Files\Support Tools\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 31 Stepping 0, AuthenticAMD
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=1f00
ProgramFiles=C:\Program Files
prompt=READY $P$G
QTJAVA=C:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\WINDOWS
TEMP=C:\DOCUME~1\earl\LOCALS~1\Temp
TMP=C:\DOCUME~1\earl\LOCALS~1\Temp
tvdumpflags=8
USERDOMAIN=SYSTEM2
USERNAME=earl
USERPROFILE=C:\Documents and Settings\earl
windir=C:\WINDOWS
__COMPAT_LAYER=EnableNXShowUI

READY C:\hla>

all of ur files r in the hla folder......as u can see.....i get some errors.....but i also get some new files created in the hla folder...whether i got all that is suppose to be....i dont know.....earl


kb7wg

oh...and

READY C:\hla>hello
'hello' is not recognized as an internal or external command,
operable program or batch file.

READY C:\hla>hello .exe
'hello' is not recognized as an internal or external command,
operable program or batch file.

READY C:\hla>hello.exe
'hello.exe' is not recognized as an internal or external command,
operable program or batch file.

READY C:\hla>

MichaelW

According to your directory listing Hello.exe should be in C:\hla\test.

eschew obfuscation

kb7wg

im sorry....the files in test r from an the hlatestfile that u sent me.....the file im trying to run is hw.hla......this happens when i get side tracked with other programs. if all u guys can install masm3 and hla....and they work......i want to know why i cant. i installed hide on c....copied hw.hla to the bin folder in hide....ran prompt from there ....got same error as with hla.....earl
the files in test folder r from running makeit in ur test file.....not from running hla or hide.......earl.

kb7wg

hey micheal...in the hide doc...to change to masm....i cant find khla settings...where r they?

MichaelW

The instructions are in hide.rtf, section 3.3 Using MASM as default assembler:
Quote
If you have MASM installed and wish to use that instead, it may be done manually. First, set a path to where the MASM files are located (Options-> Set Paths -> User Path). Next to change the default behavior of HIDE all future files, you need to edit the HIDE\bin\khla.ini file.  To change the behavior of just one project, you need to edit the <projectname>.hpr file. Find [KHLA Settings].  In that section, there is a key label "Assembler=fasm". Edit it to read "Assembler=masm". From that point HIDE (and KHLA) will use MASM to assemble the output.

I set the user path and changed the ini file and it worked OK, but only for a project. So far I have found no way to verify that MASM is actually being used. And I doubt that this will solve your problem.
eschew obfuscation

kb7wg

i know it wont solve my hla-masm problem.....i was going to try hide....but i want it to use masm all the time. in the hide doc it says to change three things in order to do that...user settings...khla ini file...and khla settings.....cant find the khla settings......

MichaelW

The [KHLA Settings] section would be in a .hpr file in a project folder, but the setting would apply only for that particular project.

I'm beginning to think you have something broken in your windows installation that is making hla.exe fail.

eschew obfuscation

kb7wg

what wud u suggest?......a repair from my xp pro install disk?