Author Topic: MasmBasic  (Read 223257 times)

HSE

  • Member
  • ****
  • Posts: 890
  • <AMD>< 7-32>
Re: MasmBasic
« Reply #450 on: November 30, 2018, 03:16:20 AM »
It has been a while..

- could not open MenusRM.ini
- problem with @AsmUsed$()

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8959
  • Assembler is fun ;-)
    • MasmBasic
Re: MasmBasic
« Reply #451 on: November 30, 2018, 02:09:40 PM »
- could not open MenusRM.ini
- problem with @AsmUsed$()

Both problems fixed, please reinstall MasmBasic. Grateful if you could test this snippet with the new version:

GuiParas equ "Hello World", w160, h100
include \masm32\MasmBasic\Res\MbGui.asm
GuiControl MyEdit, "RichEdit", Cat$("This program was assembled with "+@AsmUsed$()+" and uses common controls version "+ComCtl32$())
GuiEnd xp
« Last Edit: November 30, 2018, 03:33:14 PM by jj2007 »

Phrediac

  • Regular Member
  • *
  • Posts: 1
Re: MasmBasic
« Reply #452 on: January 17, 2019, 09:46:13 AM »
Hi

I get this popping up when I try to run the program. It's not from the AV software (Avast).
I'm running Windows 7.

Sorry, can't figure out how to upload images.

Many thanks
-Ian

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8959
  • Assembler is fun ;-)
    • MasmBasic
Avast false positive
« Reply #453 on: January 17, 2019, 02:15:51 PM »
Hi Ian,

RichMasm.exe is the editor, and I use it all the time on several machines. It is clean, no virus there, I know it because I build it from the source, over 20,000 lines. However, several AV scanners report malware, see the VirusTotal results: 18 out of 70! Here is the report for the same file but uncompressed, and the detection rate drops to 6 of 69. So simple compression is sufficient for 12 of these brilliant AV engines to shout foul. The reason is that no AV can test for all viruses and trojans in the wild, the databases would be huge, and testing would slow down your Windows to a crawl. So they use "heuristics" for detecting "suspicious behaviour", such as: Does the instruction "pushad" appear in the exe? Normal for assembler, almost never used by C compilers.

Check what the better AV engines report, like Kaspersky, Symantec etc., and then decide whether you really want to learn assembly. Once your executables grow a bit in size, they will never look like mainstream C/C++ executables - bad luck :P

I see you are using Avast. Virustotal says Avast reports Win32:Evo-gen, and googling for that virus leads quickly to
Is Win32.Evo-gen(Susp) a False Positive? and What's with all the new Win32:Evo-gen [Susp] false positives?  (Read 23100 times), so RichMasm.exe is not the only victim of Avast.

If you are interested, the forum has a dedicated section "AV Software sh*t list".

Cheers, Jochen

P.S.: VirusTotal has "Details" and "Behaviour" tabs. Here are details for the attached uncompressed RichMasm.exe:
Code: [Select]
Win32 Executable MS Visual C++ 4.x (59.6%)
Win32 Executable MS Visual C++ (generic) (13.8%)
Win64 Executable (generic) (12.2%)
Windows screen saver (5.8%)
Win32 Dynamic Link Library (generic) (2.9%)

So they believe with 59.6+13.8%=73.4% probability that it was built with MS Visual Crap :icon_mrgreen:

Here is another example, it is the Download URL with UTF8 executable:
Code: [Select]
Win64 Executable (generic) (47.7%)
Windows screen saver (22.6%)
Win32 Dynamic Link Library (generic) (11.3%)
Win32 Executable (generic) (7.7%)
OS/2 Executable (generic) (3.5%)

So they believe it's a Win64 exe. Or a DLL, or maybe a screensaver. Oh well, this is hitech, folks :t

I attach the uncompressed version of RichMasm.exe - welcome to the Forum :icon14:

felipe

  • Member
  • *****
  • Posts: 1060
  • Eagles are just great!
Re: MasmBasic
« Reply #454 on: January 18, 2019, 04:00:31 AM »
nice info  :icon14:
Felipe.

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 8959
  • Assembler is fun ;-)
    • MasmBasic
MasmBasic updated
« Reply #455 on: January 20, 2019, 10:52:51 AM »
Install MasmBasic, updated on 20 January 2019.

Minor improvements under the hood, plus one new macro; my old favourite programming language, GfaBasic, had local variables (of course), but in contrast to MASM one could initialise them. This is now possible in Assembler:

include \masm32\MasmBasic\MasmBasic.inc         ; download
.code

MyTest proc uses esi edi ebx arg1, arg2
 LOCAL var1, var2, rc:RECT, buffer[100]:BYTE                   ; "normal" locals, will be initialised to zero
_Local MyR4:REAL4=12345.6789, MyR8:REAL8=1234567890.1234567890         ; REAL variables
_Local var3=arg2, var4=200, x$=arg1, y$="Hello World"                  ; DWORDs and strings
  ClearLocals                          ; clear or set locals
  Print Str$("v1=%i", var1), Str$(", v2=%i", var2), Str$(", v3=%i", var3), Str$(", v4=%i", var4), Str$(", a2=%i", arg2)
  Print Str$(", R4=%7f", MyR4), Str$(", R8=%Df", MyR8)
  PrintLine ", x$=", x$, ", y$=", y$
  ret
MyTest endp

  Init
  For_ ecx=0 To 150
        invoke MyTest, Str$(ecx), ecx
  Next
EndOfCode


The syntax is _Local var=whatever (i.e. understroke plus camel case Local). The declarations must be followed by ClearLocals. Full project is attached.

P.S.: NoTag$() recognises many more special characters now. Test it:

include \masm32\MasmBasic\MasmBasic.inc         ; download
  Init
  Let esi=FileRead$("http://masm32.com/board/index.php?topic=94.0")     ; assign page to a string
  FileWrite "temp.txt", NoTag$(esi)     ; strip the tags and write plain text to disk
  ShEx "temp.txt"               ; have a look with ShellExecute
EndOfCode