News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

compiling Jwasm UASM with Visual studio 2019

Started by TouEnMasm, December 11, 2020, 08:57:20 PM

Previous topic - Next topic

TouEnMasm

Hello,
I try to compile various source of Jwasm  and Uasm.
There is various errors who are generarated and not too much hard to correct.
One in particular put me on the trouble and is generated by the isspace on a comment ( comment or ;)
The error is a debug assertion failed given by the isspace function   
Any experiment on this ?.
Fa is a musical note to play with CL

TimoVJL

isspace is just a macro.
ucrt might have a low level  function for it.
EDIT: ucrtbase have a function for it.
May the source be with you

morgot

You can use Pelles C and UASM (Timo make some tools...)
Sorry for the bad English

TimoVJL

MS Visual C++ is good for UAsm, i just wanted sources to be in C and be compilable with several compilers.
Even i made suggestions of changes for Pelles C, UAsm should be in current C format, not in Microsoft own C++ format.
May the source be with you

habran

isspace() has problems to handle some characters
I was using before character "¦''  in .for() loop which is 0xA6, and isspace() was stumbling on it
Cod-Father

nidud

#5
deleted

TouEnMasm


Found the problem

c proto   // _Check_return_ _CRT_JIT_INTRINSIC _ACRTIMP int __cdecl isspace(_In_ int _C);  // _C is int = DWORD

here what wait the function
static void StartComment( const char *p )                                                                 <<< passed a char
/***************************************/
{
    while ( zisspace( *p ) ) p++;
    if ( *p == NULLC ) {
        EmitError( COMMENT_DELIMITER_EXPECTED );
        return;
    }
    ModuleInfo.inside_comment = *p++;
    if( strchr( p, ModuleInfo.inside_comment ) )
        ModuleInfo.inside_comment = NULLC;
    return;
}

so i have replace isspace par zisspace  following what say msdn of the function

Quote
int __cdecl zisspace(_In_ char _C)
{
    int result=0;
    if (_C == 0x0D | _C == 0x20 | _C == 0x09)
        result = 1;
    return result;
}


+ corrections of local non initialised to 0
  :eusa_dance: Now I have a JWASM 2.13 builded by myself with visual studio 2019








Fa is a musical note to play with CL