Please help me !
I instaled HLA, masm32. When I assebmle simple "Hello world" program like this down
program HelloWorld;
#include( "stdlib.hhf" )
begin HelloWorld;
stdout.put( "Hello, World of Assembly Language", nl );
end HelloWorld;
it works,
but when I try to assemble simple Iczelions tutorials programs like this one down
.386
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
.data
.code
start:
invoke ExitProcess,0
end start
it fails. What is the problem. It took me days and still i dont know what is the problem.
Exactly how did you try to assemble it, and how did it fail. ML and the linker, like most such tools, return error messages when they fail. Those error messages are the key to determining what went wrong.
When you post code you should put it between code tags. If you don't already know how, click the "#" button above the edit window to insert a pair of these tags.
This code,
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
.386
.model flat, stdcall
option casemap:none
include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
includelib \masm32\lib\kernel32.lib
.code
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
start:
invoke ExitProcess,0
end start
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
builds at 1536 bytes as follows.
Microsoft (R) Macro Assembler Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
Assembling: H:\asm3\ml80\tst.asm
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Volume in drive H is WIN2K_H
Volume Serial Number is 20E8-3719
Directory of H:\asm3\ml80
01/29/2007 03:04p 224 tst.asm
01/29/2007 03:05p 553 tst.obj
01/29/2007 03:05p 1,536 tst.exe
3 File(s) 2,313 bytes
0 Dir(s) 19,335,446,528 bytes free
Press any key to continue . . .
Using the default masm32 menu option "Assemble and Link".
In the same directory as the source code for that Icz Tute you will find a file named "readme.txt" which you can open in Notepad. There is also a file named "makeit.bat" which you can run and it should compile the example program for you.
Than you my friend for answer
Here is what I do.
I name this simple file "12.hla"
I type in the dos prompt "hla 12"
Here is exectly what i get:
ERROR IN FILE "12.HLA" AT LINE 1 [ERRID:98042/HLAPARSE.C]:
SYNTAX ERROR, UNEXPECTED '.', EXPECTING DoOneValStmt.
NEAR:<< .>>
I wil explain my problem more deeply:
I make simple file like
.386
.MODEL Flat, STDCALL
.DATA
.DATA?
.CONST
.CODE
end
I save it under the name "icz1.hla"
Then I write to the command prompt " ml icz1.hla "
Then I get this message
Error in file "icz1.hla" at line 1 [errid:98042/hlaparse.c]:
syntax error, unexpected '.', expecting DoOneValStmt.
Near: << . >>
Assembling: icz1.asm
LINK : error LNK2001: unresolved external symbol _HLAMain
icz1.exe : fatal error LNK1120: 1 unresolved externals
allso if I type "hla icz1.hla "I get message
Error in file "icz1.hla" at line 1 [errid:98042/hlaparse.c]:
syntax error, unexpected '.', expecting DoOneValStmt.
Near: << . >>
Assembling: icz1.asm
LINK : error LNK2001: unresolved external symbol _HLAMain
icz1.exe : fatal error LNK1120: 1 unresolved externals
but when I make file "Hw.hla" like
program HelloWorld;
#include( "stdlib.hhf" )
begin HelloWorld;
stdout.put( "Hello, World of Assembly Language", nl );
end HelloWorld;
and type HLA hw.hla
it works OK
allso if I type ml "hw.hla" I get a lot of error messages
g.hla(80) : error A2044: invalid character in file
g.hla(81) : error A2044: invalid character in file
g.hla(82) : error A2044: invalid character in file
g.hla(83) : error A2044: invalid character in file
g.hla(84) : error A2044: invalid character in file
g.hla(85) : error A2044: invalid character in file
g.hla(86) : error A2044: invalid character in file
g.hla(87) : error A2044: invalid character in file
g.hla(88) : error A2044: invalid character in file
g.hla(89) : error A2044: invalid character in file
g.hla(90) : error A2044: invalid character in file
g.hla(91) : error A2044: invalid character in file
g.hla(92) : error A2044: invalid character in file
g.hla(93) : error A2044: invalid character in file
g.hla(94) : error A2044: invalid character in file
g.hla(95) : error A2044: invalid character in file
g.hla(96) : error A2044: invalid character in file
g.hla(97) : error A2044: invalid character in file
g.hla(98) : error A2044: invalid character in file
g.hla(99) : error A2044: invalid character in file
g.hla(100) : error A2044: invalid character in file
g.hla(101) : error A2044: invalid character in file
g.hla(102) : fatal error A1012: error count exceeds 100; stopping assembly
(there is allso part above first line but I can't copy it)
Can anyone help me!
For your next experiment, try to get a C++ compiler to accept some Ruby source code. If that fails, try to get some Visual Basic code to run in a Java VM. Do you get the picture?
You have successfully proven to yourself the following truths:
The MASM assembler understands MASM source code.
The HLA assembler understands HLA source code.
The MASM assembler *does not* understand HLA source code.
The HLA assembler *does not* understand MASM source code.
To complete your training, I suggest that you experiment with more assemblers:
Pelle's Assembler (POASM): http://www.masm32.com/board/index.php?topic=5640.0
The Flat Assembler (FASM): http://flatassembler.net/
The Netwide Assembler (NASM): http://sourceforge.net/projects/nasm/
Nathan.
Starter,
Nathan has a point here, you are trying to combine two different systems which is complicated to do even when you know both systems faultlessly. I would suggest that you either try out HLA or try out MASM32 but give up on the idea of combining them at a beginners level or you will get nowhere.
My dear friends
It is OK now . I made it finaly. All I had to do is
ml /c /coff "---------.asm"
Link /SUBSYSTEM:WINDOWS "-----.obj"
and I did not wrote that midle part -- " /c /coff" and "/SUBSYSTEM:WINDOWS " .I am just beginer.
Thank you very much for trying to help me. God bless you.