News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

MasmBasic

Started by jj2007, May 23, 2012, 10:16:07 PM

Previous topic - Next topic

anta40

Pardon my ignorance. How to quit the RichMasm gracefullly? 
I assume you need not to use the Task Manager :redface:

jj2007

#361
Hit Alt F4

jj2007

For a while, RichMasm had forgotten how to display tooltips :(
Fixed with version 21 Feb 2017 - please reinstall.

Quote from: jj2007 on February 08, 2017, 02:48:59 AMan intelligent AV should indeed shout foul 8)
Interesting that nobody asked why... check the filename Explorer.exe very, very carefully. You may find out that the o is not the usual one. The whole AV battery at Jotti's found nothing to complain, which confirms my theory that they cooperate closely with the malware scene. It's called a "business model" :P

jj2007

Since full Unicode support was introduced some days ago, RichMasm had a problem with commandline arguments: If there was e.g. an OPT_Arg1 test.gif in the text, it created files named myname.exe test.exe instead of myname.exe

Fixed with MasmBasic update of 25 February, please reinstall

jj2007


LordAdef

Hi JJ,

I wrote this little prog for my Ascii game. It compresses the txt file even more than I got the last time (original= 89.999, new size= 4.323).

I´s all good but I have a question.

I´m using (for the first time) the Switch case MACRO from MasmBasic (masm32 didn´t like how I did it):

Quote
Quote    ;========== FILTER UNWANTED CHARS ====================
          xor edi, edi      
     filter:
           mov   bl, BYTE Ptr  [esi + edi]
      Switch_ bl
      Case_ '='
         mov bl, " "
      Case_ 60, 62
         mov bl, '@'                        ; chars < , > (bombers)
      Endsw_
      
   add    edi, 1               ;add counter
   cmp   edi, tLen                ;end of file?
   jnz     filter   

All good except from one thing: My file got 23kb fatter with MasmBasic. 26kb as opposed to 3kb with masm32rt.
Am I missing something?

By the way, check this colour set up, it´s really nice to work with.
Cheers,
Alex

jj2007

Quote from: LordAdef on March 02, 2017, 06:10:59 PMAll good except from one thing: My file got 23kb fatter with MasmBasic. 26kb as opposed to 3kb with masm32rt.

It's the 20k overhead of common functions like e.g. array handling. In exchange, you get interesting stuff like the Recall and Store pair, or, most important, the deb macro ;)


QuoteBy the way, check this colour set up, it´s really nice to work with.

Looks nice indeed.

Btw, compliments, you are making big progress. Coding RLE in assembler is not a beginner's job :t

jj2007

Update 3 March:
- RichMasm works again as it should under Windows XP (F6 used to build code, but it wouldn't run it...); there were no problems under Win7 and Win10
- ComCtl32$() takes now an optional format string:

include \masm32\MasmBasic\MasmBasic.inc
  Init
  Inkey ComCtl32$("This program uses ComCtr32.dll version %3f\ncheck your manifest if you expected a higher version")
EndOfCode


Without a manifest, you will see the old pre-XP version of the common controls dll:This program uses ComCtr32.dll version 5.82

In RichMasm,
- go to the end of the file
- click on menu AutoCode, Resources: manifest (this inserts a Rsrc section, including a manifest)
- hit F6 again to seeThis program uses ComCtr32.dll version 6.16

As mentioned in the Manifests in 64-bit land thread, the same manifest works also for 64-bit assembly. Even the 32-bit example that uses 64-bit code works fine with this manifest.

jj2007

Update 6 March brings a new feature: the FileProp$() array.

include \masm32\MasmBasic\MasmBasic.inc      ; download
  Init
  Print "Searching ", ExpandEnv$("%ProgramFiles%"), " ..."
  GetFiles ExpandEnv$("%ProgramFiles%\ms*.exe|ms*.dll")      ; limit to all executables starting with ms
  deb 4, "** files found", eax
  For_ ct=0 To Min(999, eax-1)            ; max 1000 files
            mov ecx, Files$(ct)
            GetFileProps ecx
            .if FileProp$(?)>1            ; more than one file property found
                  .if Rinstr(ecx, "\")
                        inc eax            ; put eax after the \
                        xchg eax, ecx            ; we don't show the full path
                  .endif
                  Print ecx            ; the filename
                  PrintLine At(40) FileProp$(FileDescription)
            .endif
  Next
  PrintLine CrLf$, "Finally, all properties of the current file:"
  GetFileProps            ; no args = current file
  For_ ecx=0 To FileProp$(?)-1
      Print Str$("%_i  ", ecx), FilePropName$(ecx)
      PrintLine At(30) FileProp$(ecx)
  Next
  Inkey "ok?"
EndOfCode


Typical output:Searching C:\Program Files (x86) ...
** files found      eax             630
msvcp60.dll                             Microsoft (R) Visual C++
msvcp71.dll                             Microsoft® Visual Studio .NET
msvcr71.dll                             Microsoft® Visual Studio .NET
msvcp80.dll                             Microsoft® Visual Studio® 2005
msvcr80.dll                             Microsoft® Visual Studio® 2005
msvcp71.dll                             Microsoft® Visual Studio .NET
msvcp80.dll                             Microsoft® Visual Studio® 2005
msvcr71.dll                             Microsoft® Visual Studio .NET
msvcr80.dll                             Microsoft® Visual Studio® 2005
msvcp71.dll                             Microsoft® Visual Studio .NET
msvcr71.dll                             Microsoft® Visual Studio .NET
MSVCP60.DLL                             Microsoft (R) Visual C++
msvcrt.dll                              Microsoft (R) Visual C++
MSDEUI.DLL                              Microsoft Data Environment 1.0
MSADDNDR.DLL                            AddInDesigner Object Library
MSDE.DLL                                Microsoft Data Environment 1.0
MSDERUN.DLL                             Microsoft Data Environment Runtime 1.0
MSHTMPGD.DLL                            DHTMLPageDesigner Object Library
MSHTMPGR.DLL                            DHTMLPageDesigner Object Library
MSWCRUN.DLL                             WebClass Runtime Object Library
MSOEURO.DLL                             Microsoft Office 2003
mshwgst.dll                             Microsoft® Windows® Operating System
mshwLatin.dll                           Sistema operativo Microsoft® Windows®
MSPFLTRS.DLL                            Microsoft Office Document Imaging
...
MSSP7SW.DLL                             Natural Language Components
mssp7tr.dll                             Natural Language Components
msoe.dll                                Microsoft® Windows® Operating System
MSOERES.dll                             Sistema operativo Microsoft® Windows®

Finally, all properties of the current file:
0  Lang                      080904B0
1  Comments                  This is a comment
2  InternalName              Internal name
3  ProductName               Jochen's Assembly Tools Collection
4  CompanyName               MasmBasic
5  LegalCopyright            © 2017 Jochen@Masm32
6  ProductVersion            Release version 6 March 2017
7  FileDescription           Testing FilePropDemo
8  LegalTrademarks           ?
9  PrivateBuild              ?
10  FileVersion               1.0
11  OriginalFilename          FilePropDemo
12  SpecialBuild              ?


Demo attached. Open in RichMasm, hit F6 to build it. Remove the "ms" in GetFiles to get all executables 8)

Spamm3r

So hi! I am starting to learn asm and i have just found MasmBasic and to be honest after problems with VS (still cant set up subsystem) I am happy with it. But is there an possibility to change resolution of this ?

And is there an way to customize colors of background of text? I want to make it darker. Thanks!

jj2007

Quote from: Spamm3r on April 15, 2017, 12:04:41 AMBut is there an possibility to change resolution of this

What exactly do you mean with "resolution"? Does it look better if you hold Shift when opening a file, and use "screenshot mode"?

QuoteAnd is there an way to customize colors of background of text? I want to make it darker. Thanks!

Ctr G, udc=14, <Return>

LordAdef

This fellow programmer reminds me of my suggestion of some colour tabs... remember?

Any chance of you giving us this powerful colour enhancement?

http://masm32.com/board/index.php?topic=6055.msg64384#msg64384

jj2007

Quote from: LordAdef on April 16, 2017, 08:33:38 PMAny chance of you giving us this powerful colour enhancement?

Real MenTM select the text, hit Ctrl G and type col=ff8000h :P

Spamm3r

Any chance to get more sharp titles (I mean, file, edit etc) Beacuse on 1920x1080 they are not sharp...

jj2007

Sharp titles: If you hold Shift when opening a file e.g. from the recent files list, and confirm "screenshot mode", do they look better? There is a problem with the Gdi+ font that I use to work around Aero...