The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: korte on October 17, 2007, 09:12:47 AM

Title: store filename
Post by: korte on October 17, 2007, 09:12:47 AM
i want store filename string in my program

work: %echo Break: @FileCur(@CatStr(%@Line))

not work:
   db   "&@FileCur&"
   db   "@FileCur"
   db    @FileCur




Title: Re: store filename
Post by: hutch-- on October 17, 2007, 09:27:40 AM
try this.


  .data
    file1 db "myfile.ext",0
    file2 db "nextfile.ext",0
Title: Re: store filename
Post by: zooba on October 17, 2007, 10:45:32 AM
Or this:

.const          ; or .data
% thisFile DB "&@FileCur&", 0


Cheers,

Zooba :U
Title: Re: store filename
Post by: korte on October 17, 2007, 10:48:16 AM
WORK!!!  :bg

   arg catstr <">,@FileCur,<">
   db arg


But next problem

@CodeSize allways 0

Title: Re: store filename
Post by: zooba on October 17, 2007, 11:24:01 AM
From MSDN (http://msdn2.microsoft.com/En-US/library/e6x752dz(VS.80).aspx):

Quote0 for TINY, SMALL, COMPACT, and FLAT models, and 1 for MEDIUM, LARGE, and HUGE models

I assume you are using the FLAT memory model, in which case @CodeSize should always be zero.

Cheers,

Zooba :U