News:

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

how to configure hla to run masm32's qeditor

Started by jacksrack, October 29, 2005, 06:01:12 AM

Previous topic - Next topic

jacksrack

Please help with this problem.

Assembling: C:\programming\hla\hw.asm
C:\programming\hla\hw.asm(1) : error A2088: END directive required at end of file
Volume in drive C has no label.
Volume Serial Number is 9C65-D2BC

Directory of C:\programming\hla

10/24/2005  01:20 AM                 0 hw.asm
10/20/2005  10:21 AM                 0 hw.bss.inc
10/20/2005  10:21 AM               161 hw.consts.inc
10/20/2005  10:21 AM               284 hw.data.inc
10/20/2005  10:21 AM               517 hw.extpub.inc
10/20/2005  09:44 AM               146 hw.hla
10/20/2005  10:21 AM               181 hw.link
10/20/2005  10:21 AM                 0 hw.ro.inc
10/28/2005  01:48 PM               123 hw.txt
               9 File(s)          1,412 bytes
               0 Dir(s)  73,147,930,624 bytes free

I tried to assemble  this hw asm prg, but it gives this error. Can someone pls help me how to setup masm32 qeditor to run hla.

thanks.

bye  :U

Evenbit

Quote from: jacksrack on October 29, 2005, 06:01:12 AM
Please help with this problem.

Assembling: C:\programming\hla\hw.asm
C:\programming\hla\hw.asm(1) : error A2088: END directive required at end of file


The error report is telling you that you have a bug in your source code.  HLA requires that code be constructed like this:


program MyProgName;

//directives, functions, and data declarations

begin MyProgName;

//main program code

end MyProgName;



Your program is missing the last line above.

Nathan.

Evenbit

Not sure whether I have the latest version of QEditor or not, but from what I see, if you look under the "Edit" menu then select "Edit Menu" you will get a dialog that allows choosing the BAT file to run for the Assemble, Link, etc commands.  Take a look at the "ASSEMBL.BAT" file under the "masm\bin\" directory to see how the MASM toolchain is launched -- then make the appropriate changes to launch HLA instead.

Nathan.

jacksrack

Hi!

I am just loading the program Hello World as it was distributed with the hla package or the downloaded source programs from the Webster site.

Here is the sample prg downloaded from the hla files

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

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

end HelloWorld;

And here is the error generated when I ran the prg using ml.exe from masm32 using the Qeditor.

Assembling: C:\programming\hla\AoA\Volume1\Ch02\HelloWorld.asm
MASM : fatal error A1000: cannot open file : C:\programming\hla\AoA\Volume1\Ch02\HelloWorld.asm
Volume in drive C has no label.
Volume Serial Number is 9C65-D2BC

Directory of C:\programming\hla\AoA\Volume1\Ch02

03/12/2002  05:29 PM               150 HelloWorld.hla
               1 File(s)            150 bytes
               0 Dir(s)  72,818,987,520 bytes free


Thats it.

All I have to do now is find out why it is generating an error code and then I can move on in my learning assembly.

Hope you can help me.

thanks a lot.

bye.   :U


Sevag.K

Sounds like an environment issue.  Did HLA properly produce the .asm file and if so, where did it create the file?

You might also try using HIDE (HLA IDE) which takes care of all this stuff for you so that you can get to learning assemblhy right away!


Evenbit

You have to run HLA in order to compile "HelloWorld.hla" into "HelloWorld.asm" before running MASM.  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

...then you can CD into the directory of you program and issue a command like this:

HLA -v HelloWorld

...depending on which version of HLA you downloaded, you may have to do:

HLA -v -sm -masm HelloWorld

...to keep it from defaulting to FASM.  If you are wanting to run MASM seperately, do:

HLA -v -sm HelloWorld

If you are still dead-set on doing the compile from QEditor instead of the command line, then you'll have to modify QEditor's setup to launch HLA instead of MASM.

But like Sevag said, you don't have to worry about any of this stuff if you download HIDE.

Nathan.

jacksrack

Quote from: Evenbit on October 30, 2005, 05:37:00 PM
You have to run HLA in order to compile "HelloWorld.hla" into "HelloWorld.asm" before running MASM.  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

...then you can CD into the directory of you program and issue a command like this:

HLA -v HelloWorld

...depending on which version of HLA you downloaded, you may have to do:

HLA -v -sm -masm HelloWorld

...to keep it from defaulting to FASM.  If you are wanting to run MASM seperately, do:

HLA -v -sm HelloWorld

If you are still dead-set on doing the compile from QEditor instead of the command line, then you'll have to modify QEditor's setup to launch HLA instead of MASM.

But like Sevag said, you don't have to worry about any of this stuff if you download HIDE.

Nathan.


I would like to compile QEditor instead to run MASM. How do I modify QEditor's setup to launch MASM instead of HLA.   :P

hutch--

Jack,

Its still a matter of writing a batch file that will do what you want. I think Nathan has shown you the command line requirements necessary, just write the batch file to build the code and put it in the direcory for the project you want to build. If yoy name the batchfile someting like "makehla.bat" you can just add a generic entry on one of the QE menus that will run that batch file if it is present in the current directory that QE is in.

The problems you are having are simple PATH problems. If you want to run a file, you must have EITHER the path present on the command line or with some tools you can set the path in the environment.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

Randall Hyde

Quote from: jacksrack on October 30, 2005, 10:10:54 AM
Hi!

I am just loading the program Hello World as it was distributed with the hla package or the downloaded source programs from the Webster site.

Here is the sample prg downloaded from the hla files

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

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

end HelloWorld;

And here is the error generated when I ran the prg using ml.exe from masm32 using the Qeditor.

Assembling: C:\programming\hla\AoA\Volume1\Ch02\HelloWorld.asm
MASM : fatal error A1000: cannot open file : C:\programming\hla\AoA\Volume1\Ch02\HelloWorld.asm
Volume in drive C has no label.
Volume Serial Number is 9C65-D2BC

Directory of C:\programming\hla\AoA\Volume1\Ch02

03/12/2002  05:29 PM               150 HelloWorld.hla
               1 File(s)            150 bytes
               0 Dir(s)  72,818,987,520 bytes free


Thats it.

All I have to do now is find out why it is generating an error code and then I can move on in my learning assembly.

Hope you can help me.

thanks a lot.

bye.   :U



Are you compiling from within the Ch02 directory? If not, try CD'ing there first and run HLA from within that directory and see if that fixes things for you.
Cheers,
Randy Hyde

jacksrack

Quote from: Evenbit on October 30, 2005, 05:37:00 PM
You have to run HLA in order to compile "HelloWorld.hla" into "HelloWorld.asm" before running MASM.  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

...then you can CD into the directory of you program and issue a command like this:

HLA -v HelloWorld

...depending on which version of HLA you downloaded, you may have to do:

HLA -v -sm -masm HelloWorld

...to keep it from defaulting to FASM.  If you are wanting to run MASM seperately, do:

HLA -v -sm HelloWorld

If you are still dead-set on doing the compile from QEditor instead of the command line, then you'll have to modify QEditor's setup to launch HLA instead of MASM.

But like Sevag said, you don't have to worry about any of this stuff if you download HIDE.

Nathan.


I have this Menu batch file that runs Qeditor below.

[&Project]
Compile &Resource File,\MASM32\BIN\Bres.bat {b}
&Assemble ASM file,\MASM32\BIN\Assmbl.bat {b}
-
&Link OBJ File,\MASM32\BIN\Lnk.bat {b}
Assemble && Link,\MASM32\BIN\Build.bat {b}
&Build All,\MASM32\BIN\Bldall.bat {b}
Run &Makeit.bat,makeit.bat
-
Console Link &OBJ File,\MASM32\BIN\Lnkc.bat {b}
&Console Assemble && Link,\MASM32\BIN\Buildc.bat {b}
Console Build &All,\MASM32\BIN\Bldallc.bat {b}
-
&Run Program,{b}.exe

[&Tools]
; -----------------------------
; put you resource editor here
; -----------------------------
&Prostart 3 Code Wizard,\MASM32\pstart3.exe
&Microsoft Image Editor,\MASM32\BIN\Imagedit.exe
-
API &Library List,\masm32\Liblist.exe
&TheGun Text Editor,\MASM32\Thegun.exe
-
&Procedure Browser,\MASM32\Qetb.exe \MASM32\procs
Browse MASM32 &Lib,\masm32\qetb.exe \masm32\m32lib
-
&Hex to Mnemonic,\MASM32\Mnemonix.exe
&MASM32 Folder,\MASM32\Shellex.exe \masm32
-
&Dis-assemble EXE file,\MASM32\BIN\dasm.bat {b}
Dis-&assemble DLL,\masm32\BIN\Dasmd.bat {b}
-
&Indent .IF Block,\masm32\Indenta.dll
Block &C++ Comment,\MASM32\Cblockc.dll
Block &ASM Comment,\MASM32\Ablockc.dll

[&Code]
&Prostart 4 Code Wizard,\masm32\Pstart4.exe
&SubClass Wizard,\MASM32\subclass.exe
-
&Binary to DB Convertor,\masm32\Bintodb.exe
&RC Menu to .IF asm code,\masm32\Mnutoasm.exe
-
&Algo Testbed,\masm32\Testbed.qsc
&Blank Dialog,\masm32\Blankdlg.qsc
Dialog &Template,\MASM32\dlgproc.qsc
Add In &Dialog,\MASM32\dlgtmplt.qsc
-
Bare ASM &Model,\MASM32\model.qsc
-
Create Lib &Module,\masm32\Libmod.qsc
Create bld&lib.bat,\masm32\Libbat.qsc
-
Create &DLL,\masm32\Blddll.qsc

[Te&mplates]
Template &Advisor,\MASM32\PLUGIN\Template.dll
-
&Dialog Application Template,\MASM32\PLUGIN\Dialog.dll
&Add In Dialog Template,\MASM32\PLUGIN\Addindlg.dll
&Small Dialog App,\MASM32\PLUGIN\Dlgapp.dll
&Test Dialog,\MASM32\PLUGIN\Tstdlg.dll

[Scr&ipt]
&MessageBox,\MASM32\msgbox.qsc
Debug Message&Box,\masm32\msgboxdb.qsc
-
Line to &DB,\MASM32\Txt2db.qsc
Line to &Script,\MASM32\txt2qsc.qsc
Line to &fprint,\masm32\T2fp.qsc
-
&FPU Library Declarations,\MASM32\fpuhdr.qsc
-
&Create makeit.bat,\masm32\Bldmakit.qsc
Create basic &RC file,\masm32\makerc.qsc
-
Push 3 regs,\masm32\pushem.qsc
Pop 3 regs,\masm32\popem.qsc
-
&Comment Line «««««,\MASM32\comment.qsc
Comment&2 Line ¤=÷=¤,\MASM32\comment2.qsc
Comment&3 Line -----,\MASM32\comment3.qsc

[help]
&MASM32 Help,\MASM32\HELP\masm32.hlp
MASM32 &Lib Help,\MASM32\HELP\Masmlib.hlp
MASM32 Dialog Help,\MASM32\HELP\Dialogs.hlp
&FPU Lib Help,\MASM32\HELP\Fpulib.hlp
-
&Opcodes Help,\MASM32\HELP\Opcodes.hlp
&FP Opcodes Help,\masm32\HELP\Fphelp.hlp
-
&ASM Intro Help,\masm32\HELP\Asmintro.hlp
&Prostart Help,\masm32\HELP\Prostart.hlp
-
&VKdebug Help,\masm32\HELP\dbgwin.hlp

If I would like to assemble this file using Qeditor, how do I configure it to run hla using the Qeditor's Masm32

Evenbit

Quote
I have this Menu batch file that runs Qeditor below.
[snip]
If I would like to assemble this file using Qeditor, how do I configure it to run hla using the Qeditor's Masm32

That is not a batch file...it is a configuration file for Qeditor.  But the first section of it indicates the batch files that you need to modify:


[&Project]
\MASM32\BIN\Bres.bat
\MASM32\BIN\Assmbl.bat
-
\MASM32\BIN\Lnk.bat
\MASM32\BIN\Build.bat
\MASM32\BIN\Bldall.bat
makeit.bat
-
\MASM32\BIN\Lnkc.bat
\MASM32\BIN\Buildc.bat
\MASM32\BIN\Bldallc.bat
-



For instance, "Build.bat" looks something like this:

@echo off

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

\masm32\bin\ml /c /coff "%1.asm"
if errorlevel 1 goto errasm

if not exist rsrc.obj goto nores

\masm32\bin\Link /SUBSYSTEM:WINDOWS "%1.obj" rsrc.obj
if errorlevel 1 goto errlink

dir "%1.*"
goto TheEnd

:nores
\masm32\bin\Link /SUBSYSTEM:WINDOWS "%1.obj"
if errorlevel 1 goto errlink
dir "%1.*"
goto TheEnd

:errlink
echo _
echo Link error
goto TheEnd

:errasm
echo _
echo Assembly Error
goto TheEnd

:TheEnd

pause



Just replace references to the MASM toolset with references to the HLA toolset (with appropriate option switches) and it should work!

Nathan.