News:

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

Main Menu

New right trim algo.

Started by hutch--, June 13, 2014, 01:14:42 AM

Previous topic - Next topic

nidud

#45
deleted

jj2007

   Print "RTRIM$: |", Rtrim$("                Trim a string                "), "|",CrLf$

Output:
RTRIM$: |                Trim a string|

Looks OK for me...

The exe in your attachment crashes indeed, but even with full symbols the test.asm you sent assembles to a 35k file - your exe has 45k. So it was produced with a different source. Can you post source and matching exe, please?

nidud

#47
deleted

nidud

#48
deleted

jj2007

Quote from: nidud on July 19, 2014, 12:17:23 AM
ok. I updated the library -- no crash
however, it still mess up the font

Try a MbCpAnsi=437 before the first Print. See the orange section here for details.

nidud

#50
deleted

jj2007

Quote from: nidud on July 19, 2014, 04:24:34 AM
The standard code page for the console is normally "DOS code pages", 850 on my machine. The default for MasmBasic seems to be "Windows-1252".

Indeed. You can change that with MbCpAnsi=850

Quoteif I test the Rtrim$(" \r\n") macro nothing happens
proc_7 proc string:dword
    mov eax,Rtrim$(string)
    mov eax,string
    ret
proc_7 endp


returns " \r\n"

Yes, because Rtrim$() doesn't change the original string. Comment out the mov eax,string to get a pointer to the copy.