News:

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

MASM32 refusing to assemble

Started by boogara, June 18, 2007, 07:38:59 PM

Previous topic - Next topic

boogara

Short story shorter, whenever I try to assemble assembly in RadASM (doubt this holds any significance, though), I get this error:

\masm32\lib\masm32.lib(1) : error A2008: syntax error : !
\masm32\lib\masm32.lib(2) : error A2044: invalid character in file
\masm32\lib\masm32.lib(3) : error A2044: invalid character in file

With the "invalid character in file" error repeating itself about 100 times more before erroring out w/ a "this has reached 100 repeats, aborting" kind of message.

Specs:

MASM32 v9 (w/ SP2)
Windows XP SP2
RadASM IDE (apparently, as stated above :D)

What I did was:

1.  Download and install both MASM32 v9 and SP2 from http://www.masm32.com/
2.  After I copied over all the files in their required directories, I re-ran the "makelibs.bat" file located in C:\masm32

Does anyone have a fix to this, perhaps?

Edit

If you're wondering, I was using the rather basic tutorial hutch put up (with comments and stuff modified by me) when I get this error...code:

.486 ; 32-bit code
.model flat, stdcall ; 32-bit memory model
option casemap:none  ; casesensitive

include \masm32\include\windows.inc ; always first (for love)
include \masm32\macros\macros.asm   ; lets support dem macros

; MASM prototypes for functions
include \masm32\include\masm32.inc
include \masm32\include\gdi32.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc

; We need the libraries now for the above libraries
include \masm32\lib\masm32.lib
include \masm32\lib\gdi32.lib
include \masm32\lib\user32.lib
include \masm32\lib\kernel32.lib

; Now, let's start the code
.code

start: ; Code entry point baby!

print char$("Hey, this actually works.", 13, 10)
exit

end start ; No more code

ragdog

hi boogara


build as console app

try this you can compile with radasm



include \masm32\include\masm32rt.inc

.data
string db "Hey, this actually works.",0

; Now, let's start the code
.code

start: ; Code entry point baby!

print ADDR string,13,10
inkey "Press any key to exit..."

exit
end start ; No more code


ragdog

boogara

Quote from: ragdog on June 18, 2007, 07:52:33 PM
hi boogara


build as console app

try this you can compile with radasm



include \masm32\include\masm32rt.inc

.data
string db "Hey, this actually works.",0

; Now, let's start the code
.code

start: ; Code entry point baby!

print ADDR string,13,10
inkey "Press any key to exit..."

exit
end start ; No more code


ragdog
Hmmm....that worked just fine XD;

Is there any reason for what I posted to not work, though?

sinsi

From this

; We need the libraries now for the above libraries
include \masm32\lib\masm32.lib
include \masm32\lib\gdi32.lib
include \masm32\lib\user32.lib
include \masm32\lib\kernel32.lib

To this

; We need the libraries now for the above libraries
includelib \masm32\lib\masm32.lib
includelib \masm32\lib\gdi32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib


"Include" tells the assembler to include a text file.
"Includelib" tells the linker to use a library.
Light travels faster than sound, that's why some people seem bright until you hear them.

hutch--

boogara,

Just check that the libraries DID build correctly. The LIB directory should have a large number of LIB files in it. With your SP2 version of XP, make sure you turn OFF the DEP as this interferes with a numbr of operations. It is because Microsoft changed the specs for PE files after the release of version 9.0 of masm32.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

boogara

Quote from: hutch-- on June 19, 2007, 12:47:08 AM
boogara,

Just check that the libraries DID build correctly. The LIB directory should have a large number of LIB files in it. With your SP2 version of XP, make sure you turn OFF the DEP as this interferes with a numbr of operations. It is because Microsoft changed the specs for PE files after the release of version 9.0 of masm32.
@simsi:

Thanks ^_^;  I feel rather foolish now over such a simple mistake XD;

@hutch:

There's 214 libs with a total size of 9.39 MB ^_^  I turned off DEP before I ever reconsidered rejoining the ASM league (and, from reading all the threads on this board dealing with DEP in some way, yeeeeah...XD; ).

Thank you both for the help ^_^

I have it working to the best of it's abilities now again :)  Only problem the "inkey" function fails because of a definition problem with kbhit and getch...but, no worries.

hutch--

boogara,

The "inkey" macro requires the MSVCRT library so make sure you include both the MSVCRT include file and lib. Check its there in the lib directory and if its not, go to the TOOLS directory and run the batch file in the MAKECIMP directory and it should both create and copy the files to the correct places.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

boogara

Quote from: hutch-- on June 19, 2007, 01:50:20 AM
boogara,

The "inkey" macro requires the MSVCRT library so make sure you include both the MSVCRT include file and lib. Check its there in the lib directory and if its not, go to the TOOLS directory and run the batch file in the MAKECIMP directory and it should both create and copy the files to the correct places.
Ahhh...heh, gotcha.  Yeah, they were all there :)  Just not defined in "masm32.inc", only in "masm32rt.inc" ^_^;

Thanks much for the help!