The MASM Forum

Projects => Easy Code IDE 32/64-bit => Topic started by: anta40 on February 16, 2016, 09:00:02 PM

Title: How to use MASM32 include?
Post by: anta40 on February 16, 2016, 09:00:02 PM
This is a project, which doesn't build under EasyCode v2.00.0.0011

Quote
============== addr - Debug ==============

Assembling: addr
addr.asm(21) : error A2008:syntax error : str$

Of course I've added masm32.inc and masm32.lib into the project definition.
The zipped project is attached.

Title: Re: How to use MASM32 include?
Post by: jj2007 on February 16, 2016, 09:36:47 PM
Add \masm32\macros\macros.asm
Title: Re: How to use MASM32 include?
Post by: anta40 on February 17, 2016, 01:09:11 PM
OK, I've added \masm32\macros\macros.asm so it's enlisted in the include section at EasyCode.

Now I get more errors
Quote
============== addr - Debug ==============

Assembling: addr
ECMasm32.asm(437) : error A2008:syntax error : equ
 return(1): Macro Called From
  ECMasm32.asm(437): Include File
ECMasm32.asm(437) : error A2034:must be in segment block
 return(2): Macro Called From
  ECMasm32.asm(437): Include File
ECMasm32.asm(450) : error A2008:syntax error : equ
 LOWORD(1): Macro Called From
  ECMasm32.asm(450): Include File
ECMasm32.asm(450) : error A2034:must be in segment block
 LOWORD(2): Macro Called From
  ECMasm32.asm(450): Include File

Errors ocurred.
Title: Re: How to use MASM32 include?
Post by: HSE on February 17, 2016, 02:21:43 PM
I think str$ need msvcrt.inc and .lib.
Title: Re: How to use MASM32 include?
Post by: jj2007 on February 17, 2016, 02:47:19 PM
I think str$ need msvcrt.inc and .lib.

Line 2215 in macros.asm
Title: Re: How to use MASM32 include?
Post by: dedndave on February 17, 2016, 09:58:55 PM
look at the file \masm32\include\masm32rt.inc
Title: Re: How to use MASM32 include?
Post by: HSE on February 18, 2016, 02:24:24 AM
Sorry, dwtoa is in masm32.inc, and it's already included in the project.
Title: Re: How to use MASM32 include?
Post by: jj2007 on February 18, 2016, 05:03:05 AM
OK, for the record:
- no, it doesn't need the CRT
- yes, it does need macros.asm

If you don't believe me, go to line 55 in the attachment and comment out the macros.asm line.

Code: [Select]
include \masm32\include\masm32rtNoCRT.inc  ; ATTACHED

.Data
letters DB 'a', 'b', 'c', 'd', 'e', 'f', 13, 10

hInst HINSTANCE NULL


.Code

start:
Invoke GetModuleHandle, NULL
Mov hInst, Eax

Mov Esi, 10
Mov Ebx, Offset letters

@@:
print str$ ([Ebx]), 13, 10 ; error A2008: syntax error : str$
Add Ebx, 4
Sub Esi, 1
Jnz @B

Invoke ExitProcess, 0
End start
Title: Re: How to use MASM32 include?
Post by: rsala on February 18, 2016, 07:46:36 AM
Hi anta40,

Attached is your project corrected and working fine.

The Easy Code macros option, in the Project Properties, has been removed to avoid conflicts with the MASM32 macros.
Title: Re: How to use MASM32 include?
Post by: anta40 on February 18, 2016, 12:40:59 PM
thanks rsala,
it works  :t