The MASM Forum

Projects => MasmBasic & the RichMasm IDE => Topic started by: jj2007 on December 31, 2020, 10:34:45 PM

Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on December 31, 2020, 10:34:45 PM
Quote from: Richard on December 31, 2020, 10:30:10 PMThe C:\...\Richard-001.exe application cannot run in WIN32 mode.

Any idea how to overcome this error?

See reply #29, OPT_Run (http://masm32.com/board/index.php?topic=9050.msg99459#msg99459)
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: _japheth on January 01, 2021, 12:06:59 AM
Quote from: Richard on December 31, 2020, 10:30:10 PM
The C:\...\Richard-001.exe application cannot run in WIN32 mode.
Any idea how to overcome this error?

As jj already realized: It's a 64-bit DOS app, not a 64-bit Windows app. 64-bin Windows is able to run 32- and 64-bit Windows apps only, without emulator help.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 01:00:04 AM
Quote from: _japheth on January 01, 2021, 12:06:59 AMAs jj already realized: It's a 64-bit DOS app

I realised something else, Japheth :tongue:

My Win7-64 refuses to run your exe, and so does my WinXP-32 VM. What kind of exotic animal is that?

What I posted above is a standard 16-bit exe that won't run on Win7-64, but it does run in the VM, and it runs fine with the msdos.exe linked in reply #29.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: _japheth on January 01, 2021, 01:21:56 AM
Quote from: jj2007 on January 01, 2021, 01:00:04 AM
My Win7-64 refuses to run your exe, and so does my WinXP-32 VM. What kind of exotic animal is that?

As I said: a 64-bit DOS app. Formally, it's a Win64 PE binary, marked with "subsystem:native", so that Win64 won't try to load it if you double-click it.

It's probably a bit exotic, but not that much more exotic than writing 64-bit Windows Desktop apps using bare Win32-API in assembly language. If you don't believe me: ask anyone in a dotnet forum.  :joking:

Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 03:12:43 AM
@jj2007

Sorry but I am totally confused now.

I tried to install RichMasm and MasmBasic but it does not seem right.

In c:\Masm32\bin\  I initially had mspdb_MasmBasic_readme.txt as the only entry then later on i had uasm64.exe. I manually inserted msdos.exe from some Japanese(???) site using the option of 486x64 folder.

With RichMasm (main page a light blue color) trying the modified Richard-001a.asm (having include dpmi.inc  etc etc etc) on the Right Hand Side (white area) got message...


*** Start C:\Masm32\MasmBasic\Res\bldallRM.bat ***
*** Assemble, link and run Richard-001a ***
Tmp_File.asm(14) :Error A2106: Cannot open file: "dpmi,inc"[ENDENT]        NOTE dpmi.inc does not exist in MASM32 FOLDER
Tmp_File.asm(25): Error A2210: Syntax error: rmcs
...

I think I may have missed something in the install process - Google searches came up with year 2009 dated material.

I also tried just running in the cmd line msdos.exe -d Richard-001.exe but as I wrote it it did not work (I don't understand the usage requirements)

I think that a full directly listing of what should be in MASM32 FOLDER (as far as RichMasm and MasmBASIC are concerned) would be needed for me to check that these modules of yours are correctly installed (which I think are not)

I appreciate now that it seems a DOS exe will be produced and needs a supporting program (like msdos.exe) to be able to run - as opposed to a WINDOWS exe which needs File Explorer (or cmd line) to be able to run. I was not aware of the fact that not all exe's are created/used equally.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: _japheth on January 01, 2021, 04:27:27 AM
Quote from: Richard on January 01, 2021, 03:12:43 AM
Sorry but I am totally confused now.
*** Start C:\Masm32\MasmBasic\Res\bldallRM.bat ***
*** Assemble, link and run Richard-001a ***
Tmp_File.asm(14) :Error A2106: Cannot open file: "dpmi,inc"[ENDENT]        NOTE dpmi.inc does not exist in MASM32 FOLDER
Tmp_File.asm(25): Error A2210: Syntax error: rmcs

Yes, indeed.

Richard, please note: Masm32/64 are packages to support developing Windows applications (32/64-bit). JJ2007's MasmBasic is such an application.

OTOH, the modified Richard-001.asm that I uploaded is a (64-bit) DOS application, in no way related to Masm32/64 or MasmBasic. In the uploaded zip were ALL files needed to create the binary ( including dpmi.inc ). Better don't copy any of those files to the Masm32/64 folder - it will only add to the confusion.

I uploaded the sample because I read in one of your posts:

Quote
- with the ultimate aim of a DOS like environment WITHOUT windows present.

but I see now that it has only made a non-trivial matter more complicated. Sorry!
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 04:52:43 AM
@_japheth

Thanks for the clarification.

OK so there are a number of "camps" re modern day assembly and generally NOT interchangeable.

I am just trying to actually get something working on my computer (the DOS only FreeBASIC configuration will be a LONG time away - so Windows for NOW).

Silly question, re your zip and the nice small 5,632 byte exe that was produced lets call it Richard-001a.exe - what do I need to do/install to see Richard-001a.exe actually working (since I now know Windows complains)??
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: _japheth on January 01, 2021, 05:00:24 AM
Quote from: Richard on January 01, 2021, 04:52:43 AM
Silly question, re your zip and the nice small 5,632 byte exe that was produced lets call it Richard-001a.exe - what do I need to do/install to see Richard-001a.exe actually working (since I now know Windows complains)??

I wrote it runs "on bare metal" - that means, it runs in native DOS ( MS-DOS, FreeDOS, PC-DOS ), requires a 64-bit cpu and an installed XMS host ( Himem.sys ).
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 06:10:39 AM
Quote from: Richard on January 01, 2021, 03:12:43 AMI think that a full directly listing of what should be in MASM32 FOLDER (as far as RichMasm and MasmBASIC are concerned) would be needed for me to check that these modules of yours are correctly installed (which I think are not)

Open C:\Masm32\MasmBasic\Res\HelloWorld16.asc in C:\Masm32\MasmBasic\RichMasm.exe, then hit F6. If the little helper for DOS programs sits at C:\Masm32\bin\msdos.exe, then you should see a working 16-bit DOS program. It should also work with your minimally modified version attached to reply #24 (http://masm32.com/board/index.php?topic=9050.msg99434#msg99434) as FourX.asc :cool:
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: hutch-- on January 01, 2021, 11:03:29 AM
Come on guys, Richard is still learning how to make things that work, all this extra exotica just makes the task more difficult for him.

Same comment as before, learn ONE environment first to get things going then experiment with whatever takes your fancy. I recommend 32 bit as it is a lot simpler that Win64. You can migrate to Win64 when you have learnt enough in Win32.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 11:06:44 AM
@jj2007

Doing "one step at a time"...

The zip file shows various screens up to the F6 step inclusive (but no further).

I have "Pin to TaskBar" the RichMasm shortcut - very distinctive icon R - must stand for RICH(ard) ....:)
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 11:14:22 AM
\Masm32\MasmBasic\DosBasic.inc was missing - see attachment.

My apologies :rolleyes:

The Masm32 forum allows attachment up to 512kBytes; at a certain point I have thrown out some less frequently used stuff to care for more essential includes, therefore you didn't have it in your package. Just extract it to \Masm32\MasmBasic\DosBasic.inc  :cool:

Your own source attached to reply #24 as FourX.asc should work without DosBasic.inc, though.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: hutch-- on January 01, 2021, 11:17:49 AM
This is what confuses me, the Win10 64 console CMD.EXE works just fine. Why piss around with messy alternatives ?
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 11:24:17 AM
@hutch--

Thanks for message - I think I better just FIRST try to "get up and going" with MASM32 - EVENTUALLY (soon I hope) explore all "tangents" already touched on by jj2007, _japheth, etc and anything new else that pops up. This Subject I will always keep as a REFERENCE (for me) on-line as a reminder. Even though I can archive screenshots and mhtml files - I am starting to approach a large number of files (tricky to manage latter on) but the FORUM (this subject) is the most convenient "filing system" for me.

My learning curve resulted in "many more learning curves" - so "START with MASM32 - then later on investigate everything else"

I did a fresh install of MASM32 SDK on my G:\ drive to avoid confusion with MASM32 SDK (modified for MASM64 SDK) on my C:\ drive - or can I have both merged as one file (but 2 different shortcuts)? Using G:\ drive is OK for me (is installed internally on my laptop).
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 11:26:46 AM
Quote from: Richard on January 01, 2021, 11:24:17 AMcan I have both merged as one file (but 2 different shortcuts)?

You can indeed keep the 64-bit and 32-bit SDKs in the same \Masm32 folder. This is by design.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 12:03:42 PM
Quote
This is what confuses me, the Win10 64 console CMD.EXE works just fine.

Not to complain (or anything) - the two exe's

FourX.exe (from jj2007)
Richard-001a.exe (from _japheth)

were also run in CMD LINE mode (Windows 10 x64 Build 20H2 Intel i7) and screen shot attached.

Previously were just run in Windows File Explorer

I appreciate that anything from as above is a DOS exe (as opposed to run of the mill WINDOWS exe) and so MAY require a different launch platform (other than Windows Explorer to actually run the exe) - this is all part of "my learning curve" (new things for me to appreciate).

I am restarting myself into pure MASM32 SDK - certainly I am INTERESTED in learning/using all the other "tangent" stuff already touched on by others here.

I did not realize that a simple task (to me) of putting X's onto a retro-style window would cause such a "hassle" - SORRY

EDIT I did also try msdos.exe the 486x64 version (from some Japanese ???) site but could not understand how to use
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 12:14:49 PM
To get your 4X code running, you need to use msdos.exe FourX.exe (i.e. your exe becomes a commandline argument for msdos.exe)

RichMasm does it via the OPT_Run msdos.exe FourX.exe at the end of the file, but you can do it from the DOS prompt, too.

In contrast, Japheth's exe is a totally different animal - a 64-bit DOS application. It will apparently not run in a standard configuration, but I admit I haven't fully understood what it needs to run.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 12:31:23 PM
@jj2007 + everyone else interested

Just when I was giving up (on all the "tangents") - refer attachement

At last something "works" - I hope no one is "offended".

EDIT as mentioned much earlier by jj2007 - the YELLOW X's do not flash (but it is a helpful start for me - must always use "msdos.exe my.exe")
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 12:54:24 PM
FourX as 32-bit code, flashing :tongue:

include \masm32\MasmBasic\MasmBasic.inc
  Init
  xor ebx, ebx
  .Repeat
xor ebx, 1
.if Zero?
ConsoleColor cRed
.else
ConsoleColor cBlue
.endif
Print At(0,0) "X"
Print At(20) "X"
Print At(0, 15) "X"
Print At(20) "X"
Delay 500
invoke GetKeyState, VK_SHIFT
test ah, ah
  .Until Sign? ; quit when Shift is pressed
EndOfCode
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 01:40:58 PM
@jj2007

Thanks for include stuff which I added (refer attachment)...

Silly question - did F6 - see result on screen (see attachment) - where is the exe file???

The output is "much cleaner" (no prompt stuff) and the blinking cursor at row 25 column 80 (and as mentioned earlier by you YELLOW X not flashing).

The excitement (for me) continues...
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 08:50:53 PM
Quote from: Richard on January 01, 2021, 01:40:58 PMwhere is the exe file???

Press F9 to see the current folder - it's there.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 09:30:22 PM
@jj2007

I still cannot find the exe refer attachment.

I did a complete C:\ search for    FourX-as  (to find FourX-as32bitcode(reply#53).asm)

only the .asm and .bak files found

NO .obj or .exe

Maybe my file rename (rather long) is causing problems??
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 11:28:44 PM
Do a search for FourX.exe or FourX*, not FourX.as

Since your program runs, there must be an exe...

Quote from: Richard on January 01, 2021, 09:30:22 PM
FourX-as32bitcode(reply#53).asm
...
Maybe my file rename (rather long) is causing problems??

Long file names are not a problem, but brackets are; maybe also the # character. Try renaming to FourX-as32bitcode_reply53_.asm

Try to use the *.asc version for your editing - it keeps all settings and formatting. Once a source gets bigger, this has major advantages. You can always export a plain text version with OPT_Tmp2Asm 1 (at the end of the source; see here  (http://masm32.com/board/index.php?topic=5314.msg58605#msg58605)for some details on options).

Also, if you want to run 16-bit code on a 64-bit OS, you need the OPT_Run \Masm32\bin\msdos.exe [name of project].exe (and you need to adjust it if the name changes). In the moment when you switch to 32-bit code, disable the option.
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 01, 2021, 11:44:15 PM
@jj2007

Because I added your include code I changed the name (FourX.asm) to

FourX-as32bitcode(reply#53).asm

so as not to confuse with FourX.asm.

listed below is FourX-as32bitcode(reply#53).asm which when F6 get output but no obj or exe file produced

Quote
; OPT_Res   0      ; RichMasm thinks this code needs no resources - delete if rsrc.rc is needed
name     Xy                   ; Richard-001.asm
   .model    small
   .stack  100
   .data
MSG DB 'X$'                   ; Message to print is "X"   $ terminated string    MSG DB "X$",0
   .code
start:   
   include \masm32\MasmBasic\MasmBasic.inc
  Init
  xor ebx, ebx
  .Repeat
   xor ebx, 1
   .if Zero?
      ConsoleColor cRed
   .else
      ConsoleColor cBlue
   .endif
   Print At(0,0) "X"
   Print At(20) "X"
   Print At(0, 15) "X"
   Print At(20) "X"
   Delay 500
   invoke GetKeyState, VK_SHIFT
   test ah, ah
  .Until Sign?      ; quit when Shift is pressed
EndOfCode
push  ds


                              ; put YELLOW flashing X at TLHC (Top Left Hand Corner)
mov ah,02h
mov bh,00h                    ; page number 0
mov dh,00h                    ; 00h is top row
mov dl,00h                    ; 00h is left column
int 10h                       ; VIDEO - set cursor position (FirstRow, FirstColumn)     
mov ah,09h
mov al,58h                    ; "X" char to display
mov bh,0                      ; page number
mov bl,8eh                    ; attribute e= 14. = YELLOW   8x = flashing
mov cx,01h                    ; number of times to write character
int 10h                       ; VIDEO - write character and attribute at cursor position       


                              ; put YELLOW flashing X at TRHC (Top Right Hand Corner)
push  ds
mov ax, 0b800h                ; need preceeding 0 else is name    ;mov ax,0xb800
push ax
pop ds
mov word ptr ds:[0+158],8e58h ; YELLOW flashing X TRHC (FirstRow, LastColumn)   ; ,0x0e58       

pop ds                        ; LastColumn(=79.)*2 since WORD (CharByte+AttributeByte)


                              ; put X (only WHITE) at BLHC (Bottom Left Hand Cormer)
mov ah,02h
mov bh,00h                    ; page number 0
mov dh,18h                    ; 00h is top row
mov dl,00h                    ; 00h is left column
int 10h                       ; VIDEO - set cursor position  (LastRow, FirstColumn)     
mov dl,58h                    ; X @ cursor
INT 21h                       ; DOS 1+ - write character to standard output


                              ; put X (only WHITE) AT ~BRHC (approx Bottom Right Hand Corner)
mov ah,02h
mov bh,00h                    ; page number 0
mov dh,18h                    ; 00h is top row
mov dl,79-1                   ; 00h is left column - cannot write to LastColumn (=79.) since CrLf
int 10h                       ; VIDEO - set cursor position (LastRow, LastColumn-1)
push ds       
mov ax,@DATA                  ; resolved by linker
mov ds, ax
lea dx, MSG
mov ah,09h                    ; DOS 1+ write string to standard output
int 21h                       ; DS:DX -> $ terminated string  return al = 24h the "$" terminating the string
pop ds


                              ;  SET CURSOR POSITION ~HALF-WAY UP SCREEN
mov ah,02h
mov bh,00h                    ; page number 0
mov dh,08h                    ; 00h is top row
mov dl,40h                    ; 00h is left column
int 10h                       ; VIDEO - set cursor position mid screen       

pop ds
MOV Ax,4C00H                  ; - terminate with return code
INT 21h                       ; EXIT     

retf

end start

RichMasm options:
OPT_Verbose      1   ; show files created
OPT_Run      \Masm32\bin\msdos.exe FourX.exe   ; download (http://takeda-toshiya.my.coocan.jp/msdos/index.html); use binary\i486_x64\msdos.exe
OPT_Tmp2Asm    1

Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 01, 2021, 11:53:26 PM
Quote from: Richard on January 01, 2021, 11:44:15 PM
@jj2007

Because I added your include code I changed the name (FourX.asm) to

FourX-as32bitcode(reply#53).asm

so as not to confuse with FourX.asm.

Richard,

Windows is pretty tolerant, but certain filename constructs should be avoided, as explained in Reply #57 above. Rename it to something without brackets, and it will work.

Btw a filename like C:\Masm32\MasmBasic\Res\временная папка\Добро пожаловать.asc (with spaces and Unicode) works just fine on my Italian OS. Not all editors allow that...
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 02, 2021, 12:24:02 AM
@jj2007

I must have missed before re filename constraints.

I edited FourX.asc  to have the include code - refer attachment for what happened

Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 02, 2021, 01:28:36 AM
You are mixing 16- and 32-bit code here, which is not possible. Delete the lines above include ..., then choose another name for MSG (an important Win32 structure), and it will work :thumbsup:
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 02, 2021, 02:13:11 AM
@jj2007

refer attachment
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 02, 2021, 02:35:49 AM
Please save and zip the *.asc file and post it here. I must have a look at the source to understand what's going on...
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 02, 2021, 02:42:02 AM
@jj2007

refer attachment
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 02, 2021, 04:48:16 AM
Hi Richard,

Attached the two versions. I hope it is clearer now :thup:
Title: Re: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 02, 2021, 12:30:30 PM
Quote from: Richard on December 31, 2020, 04:32:56 PMI have given up with windows for a high precision timer (approaching microseconds on my 2.4 GHz Intel i7 x64 computer) - it displays using an API resolution down to microseconds but repeatability/accuracy is extremely poor for me.

Check NanoTimer() (http://www.jj2007.eu/MasmBasicQuickReference.htm#Mb1171): the effective resolution is about 0.3 microseconds; Delay until (http://www.jj2007.eu/MasmBasicQuickReference.htm#Mb1212) may also be interesting for you.
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: hutch-- on January 02, 2021, 10:30:09 PM
Richard,

The basic design of the 32 bit SDK allows for the addition of the 64 bit version. The 32 bit version works fine by itself if you have not modified it and if you want to use the 64 bit version, you add ALL OF THE 64 BIT version into the 32 bit installation. Add the 64 bit VS binaries into the "bin64" directory and then test the example code to see if it builds correctly. From the VS version, use the x86 binaries, just add the whole lot to the bin64 directory including the extra directory and it should work.

Get it all up and going and you can build both 32 and 64 bit executables.
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 03, 2021, 04:46:31 AM
@jj2007

Still Problems - refer attachment.

Note - your zip file (FourX_1632) was extracted into a Downloads Folder (and your .exe you supplied were moved elsewhere). F6 was used to start compile version from your asc file. (Everything done while in the RichMasm IDE)



Problem #1
I understand that I need an app (msdos.exe) to actually run any 16 bit exe generated by RichMasm. THE PROBLEM HERE is that the 16 bit .exe does not exist when using F6 to create it.

Problem #2
Does RichMasm not like where the .asc file resides?

Note the .exe you supplied me in the zip file (FourX_1632) WORK in the appropriate environments (msdos.exe .../Windows cmd line).

I was only trying to recreate them from the .asc versions in the same zip file


EDIT  I used Windows File Explorer SEARCH FUNCTION but it could not find a newly created FourX_16.exe. Also I used a 3rd party recovery program and there was no "deleted FourX_16.exe" in the folder where FourX_16.asc resides. This recovery program was run very soon after F6 for FourX_16.asc so not much disc changes would have occurred to confuse anything.

PS thanks for providing the "split" (16/32) .asc files - it helped clear things up as originally I thought I had to "include stuff" in my Richard-001.asm whereas actually it was your rewrite of my Richard-001.asm (as a 32 bit program)

Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 03, 2021, 10:07:58 AM
This is tricky, Richard. It seems that the linker tries to create the exe but cannot do so because... and that is the question. Are you sure that the exe is NOT in the folder where the asc sits? Try to delete the exe manually, and hit F6 afterwards.

Questions:
- Does the 32-bit version work as it should? You hit F6, and the program runs?
- Can you find the 32-bit exe in the folder?
- Is there any chance that your antivirus "eats" the exe without asking your for permission?

> Problem #2
> Does RichMasm not like where the .asc file resides?
Shouldn't be a problem, as long as the folder is on the same drive as the Masm32 installation. Anyway, try what happens if you copy the *.asc file to C:\Masm32\MasmBasic\FourX_16.asc, then open it there and hit F6.
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 03, 2021, 12:47:19 PM
@jj2007

This reply is split up (because maximum zip size = 512kB)

refer zip (...x16)

When in IDE (yellow) and hit F6 DOES NOT say as much info as when in IDE (yellow) pull down context menu and select "Build and Run F6"

I ASSUMED that F6 (ing) either way would be IDENTICAL???

see next post re(...x32)



EDIT   I forgot to mention...

An empty H:\ drive was created (100 MByte) and ONLY FourX_16.asc and FourX_32.asc were placed into same.

When run F6 first time a message saying .... needs to be installed - I choose the option to download (and extracted into H:\ drive).
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 03, 2021, 12:49:49 PM
@jj2007

refer attachment (...x32)

IDE (cyan) via FILE (context menu) "Build and Run F6" result
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 03, 2021, 01:32:28 PM
@jj2007

Possible GLITCH with RichMasm IDE

Refer attachment - this glitch occurs SOMETIMES - ie when the cursor is at "e" of FILE or "l" of FILE - as shown by the GREEN crosshairs - different context pull down menus are displayed.

Not a real problem for me as I have to read what the context menus say anyway.

It MAY be related to the fact that I have a high DPI display (3200 x 1800 native resolution).
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 03, 2021, 01:33:50 PM
@jj2007

continued from previous post

refer attachment
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 03, 2021, 02:07:01 PM
@jj2007


SUCCESS

I copied FourX_16.asc and FourX_32.asc into the Masm32\MasmBasic FOLDER (they were never there before) and pressed F6 (ie did not use FILE context menu method) and results as per attachment.

The .exe files also worked in the relevant environment (eg    msdos FourX_16.exe     AND   normal windows cmd FourX32.exe)

The x32 had the red/blue blinking effect (but the screenshot did not show them actually blinking (only static))     :)



EDIT Just curious (not that it really matters at this stage) - FourX_32.asm AND FourX_32.obj NOT GENERATED in FOLDER
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 03, 2021, 07:26:50 PM
Quote from: Richard on January 03, 2021, 02:07:01 PM
SUCCESS

Congrats :tongue:

QuoteFourX_32.asm AND FourX_32.obj NOT GENERATED in FOLDER

For tidiness, they are deleted once Assembly is finished (you can keep them with OPT_DelObj 0 and OPT_Tmp2Asm 1); apparently not for 16-bit code, I'll check that.

In any case, try if it works also from a different folder such as C:\Masm32\MasmBasic\AscUser (MyProjects32, My16BitCode etc); avoid the main MasmBasic folder and the Res folder.

Happy coding :thumbsup:

P.S.: If you are going the 32-bit road, check
a) your private messages
b) the deb macro (http://www.jj2007.eu/MasmBasicQuickReference.htm#Mb1019)
c) Integrated debugging (http://masm32.com/board/index.php?topic=5314.msg63302#msg63302) (you need OllyDbg (http://www.ollydbg.de/version2.html))

Let me know if it works, and keep posting :thup:
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 03, 2021, 10:12:03 PM
@jj2007

All appears to work with   Masm32\MasmBasic\RICHARD\FourX_1632\  FOLDER

Thanks
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 04, 2021, 12:47:27 AM
Great :thumbsup:

Under File/New Masm source you'll find many templates. If you want to continue with 16-bit code, there is less choice, see (no, it's not 16-bit COM). Besides, there is the non-MasmBasic folder C:\Masm32\examples, which is full of interesting sources (they all build fine with RichMasm afaik - if not, let me know).
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 04, 2021, 01:50:24 AM
@jj2007

Just tried to File/New Masm source - a strange problem...

The cursor is initially in the top right quadrant of the green box (to select from a list of example groups) but as I navigate to the left MOST of the time when I go to the left to select a group the cursor "spring-returns" to the cursor initial position before I can select an option.

On the very few times I can successfully select it seems to be when I am very slowly navigating and not releasing the held down button. This problem is both with a conventional mouse AND also with a touchpad.

EDIT is my laptop intel i7 2.4 GHz "too fast" and results in a "timeout" for the cursor timing routine for selection? 
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 04, 2021, 02:40:15 AM
Very odd. There is no timing routine for the cursor, it's a standard message loop. The green box is actually a normal RichMasm window, only the background colour is different. Do you have the same problem when you maximise the green window?
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 04, 2021, 02:55:49 AM
@jj2007

Now I can't reproduce the cursor spring-return problem - maybe I had too many background tasks (of mine) going and confusing the cursor.

Sometimes I cannot maximize the green box because "AutoCode' hides it = when I maximize the IDE (cyan background) I can get a second "green box" which can be maximized. So now I don't have the cursor spring return problem??????
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 04, 2021, 03:20:22 AM
Mysterious. Which Windows version is that?

include \masm32\MasmBasic\MasmBasic.inc
  Init
  Print Str$("This is Windows version %i", MbWinVersion()), Str$(".%i", ecx)
  Inkey Str$(", build %i\n", MbWinVersion(build))
EndOfCode
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 04, 2021, 03:30:26 AM
@j2007


Windows 10 pro x64 Build 20H2 (latest build updated to about a month ago) with Intel i7 processor.

I am constantly having issues with windows 10 - Microsoft quickly "breaks things" that used to work and take forever, it seems like 6-9 months to repair broken things and end up breaking new things. I have never experienced with windows 10 a properly working "File explorer" for standard common tasks (file copying, moving etc) - currently with File explorer copying files - File explorer just crashes (other apps still running OK) - this is occurring quite frequently and is often requiring me to repeat complicated file selection for moving.
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 04, 2021, 03:49:46 AM
I am still on Win7-64, but my wife has Win10. The last 20 years or so I have been using an old version of FreeCommander (https://freecommander.com/en/downloads/), it's lightyears better than Windows Explorer.

Try this:
include \masm32\MasmBasic\MasmBasic.inc
  Init
  GetFiles *.as?|*.rc|*.inc
  SortFiles
  For_ ecx=0 To eax-1 ; print the results
PrintLine Str$(GfSize(ecx)), Tb$, GfDate$(ecx), Spc2$, GfTime$(ecx), Tb$, Files$(ecx)
  Next
EndOfCode


If you hover (in RichMasm) over a keyword like SortFiles (http://www.jj2007.eu/MasmBasicQuickReference.htm#Mb1060) or PrintLine, the cursor turns into a question mark; then right-click to see help on the keyword. If you are fast enough, you can left-click into the green area and copy what you need :cool:
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 04, 2021, 05:49:30 AM
@hutch--

Thanks for info (re your reply #32 this subject)

At present I have a MASM32 SDK install on my C:\ drive (PCIe NVME 256GByte) WITH the 64 stuff (I think installed correctly).

Also PURE (unaltered) MASM32 SDK on my internal G:\ drive (SSD SATA 4Tbyte almost full)

The short-cut for the C:\ drive launches qeditor.exe 67,072 bytes (64 project) with a RED aspect for the pull down menus.

The short-cut for the G:\ drive launches qeditor.exe 37,192 bytes (32 project) with a BLUE aspect for the pull down menus.

In order for me to only ever use one MASM32 folder (on the C:\ drive) is it a simple matter of having the two different qeditor.exe (say call them qeditor32.exe and qeditor64.exe) with the short-cuts pointing to the respective exe's?

Now that I think the framework for RichMasm appears to be properly set-up I was thinking that to become familiar with 32 bit assembly that I try to do whatever conversion is necessary to interchange examples between RichMasm 32 and MASM32 (via .asm files). This might be "more fun" then from scratch trying to write brand new code. Eventually I plan to try my own original code (referring first to the extensive collections in both Masm32 and RichMasm)
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: jj2007 on January 04, 2021, 06:45:41 AM
Quote from: Richard on January 04, 2021, 05:49:30 AMI was thinking that to become familiar with 32 bit assembly that I try to do whatever conversion is necessary to interchange examples between RichMasm 32 and MASM32 (via .asm files).

In the green template box, the first two lines link to pure Masm32 SDK examples that do not require the MasmBasic includes. No conversion necessary. The same applies to the numerous \Masm32\examples sources; I would suggest, though, to open (for example) \Masm32\examples\exampl01\generic\generic.asm and, before editing, save it immediately e.g. as ..\Richard\generic.asc. Thus the original SDK remains untouched.
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: Richard on January 05, 2021, 02:14:28 PM
@_japheth    (or anyone else)    re reply #7

I have finally had a chance to run my laptop outside of a Windows environment.

I formatted a 16 GByte usb stick to have FreeBASIC (DOS version) and I BOOT off the usb stick (where now the usb stick is the C:\ drive and there is no knowledge of Windows)

My AUTOEXEC.bat is


rem @ECHO OFF
set PATH=.;\;\LOCALE
echo Using US-English keyboard with US-English codepage [437]
SET DIRCMD = /A/L/O
VER
DATE
TIME




and my CONFIG.sys is


device=himem.exe /VERBOSE /METHOD:ALWAYSON
rem device=c:\hiram.exe
SHELL=command.com /P /E:768
lastdrive=F
DOS=high,umb
FILES=40
BUFFERS=20
STACKS=9,256



When I BOOT off the usb stick and run MEM.exe the following table is produced


Memory type            Total           Used             Free
-----------------------------------------------------------------
Conventional            631K            21K             610K
Upper                     0K             0K               0K
Reserved                393K           393K               0K
Extended (XMS)    1,518,080K           168K       1,517,912K
-----------------------------------------------------------------
Total Memory      1,519,104K           582K       1,518,522K

Total under 1 MB        631K            21K             610K

Largest executable program size 610K (624,128 bytes)

FreeDOS is resident in the high memory area



The HIMEM.exe switches possible are
Quote
(Please place DEVICES=HIMEM.EXE before any driver using XMS)

HIMEM [/MAX=####] [/METHOD:xxx] [/HMAMIN=n] [/NUMHANDLES=m] [/TESTMEM:ON|OFF] [/VERBOSE] [/NOABOVE16] [/X] [/LOG]

where

/MAX=##### limit memory controlled by HIMEM to #####K

/METHOD:xxx specifies the method to be used for A20 handling. Possible values for xxx
ALWAYSON - assume that A20 line is permanently ON
BIOS - use BIOS to toggle A20 line
FAST - use port 92h, bypas INT 15h test
PS2  - use port 92h, bypass PS/2 test
KBC  - use the keyboard controller
PORT92 - use port 92h always

/HMAMIN=n  - specifies minimum number of Kb of HMA that a program must request to gain access to the HMA (default: 0Kb)

/NOX2MAX32 - do not limit XMS 2.0 free/avail. memory report to 32M-1K

/NUMHANDLES=m  - specifies number of XMS handles avail (def 72)

/TESTMEM:ON|OFF  - perform or skips an extended memory test (def: OFF)

/VERBOSE  -  give extra information

/NOABOVE16  -  do not use INT 15h function E801h to detect >64M

/X             -   do not use INT 15h function E820h to detect >64 M

/X2MAX32  - limit XMS 2.0 free/avail memory report to 32M-1K (def)

/LOG   - logs the driver activity to a log file




Also note that HIRAM.exe information is
Quote

   ÄÒÄ    ÄÒÄ   Ò
    º     º    Ð
    º     º
    ÇÄÄÄÄÄÄĶ   Ä·   ÄÒÄÄÄ·  ÖÄÄÄÄ·   ÄÒÄÄÄÒÄÄÄ·
    º     º    º    º     ÖÐÄÄÄĶ    º    º   º
    º     º    º    º     º   º    º    º   º
   ÄÐÄ    ÄÐÄ  ÄÐÄ  ÄÐÄ     ÓÄÄÄÄÄÐÄ  ÄÐÄ ÄÐÄ ÄÐÄ  V1.9

      Copyright (C) 1992-1993 by JVP



Private or commercial use is subject to the following conditions:
- credit always goes to the author.
- sale of this software is forbidden.
- usage in commercial products is forbidden.

HiRAM was thoroughly tested for reliability and should function under the
specified operating conditions without problems.
All responsabilities however, fall on the user for any damages that may or may
not have been caused directly or indirectly by HiRAM.

WARNING:
HiRAM.EXE may NOT be compressed with programs such as DIET, LZEXE or PKLITE,
because it is both an executable and a DEVICE driver!

Create a bootable DOS diskette before using HIRAM.EXE!
In any case you should be familiar with the:
- CONFIG.SYS "?" instruction.
- F5/F8 keys to skip CONFIG.SYS on bootup.

INTRO:

The range between the segments A000h and F000h is designed for ISA/PCI/AGP
extension/add-on cards since the release of version 5.0 of DR-DOS and MS-DOS,
which allows UMA (Upper Memory Area) to be used.
This way the free conventional DOS memory can be increased up to ~ 620 KB.
HiRAM supports UMA on PCs with 8086/88 or 80286 processors and memory between
the segments A000h and E000h (inclusively). On PCs with 386/486 and Shadow RAM
within the above mentioned area, HiRAM can also be used, even without EMM386
and its V86 (Virtual) Mode UMBs.
Device drivers can be loaded high with DEVICEHIGH/INSTALLHIGH in CONFIG.SYS or
LOADHIGH in AUTOEXEC.BAT.

The table below shows the output of MEM (DR-DOS 6.0) on a AT/286 with 640 KB
RAM and 64 KB auxiliary RAM in the segment E000h after using HiRAM.EXE:

Memory type   (KBytes)   Available
----------------------------------------------
Conventional   655.360 (640K)   643.040 (627K)
Upper memory   65.488 (63K)   288 (0K)

Since the use of the UMA differs clearly with the DOS versions, HiRAM adjusts
automatically to the used version. Optional parameters should be used only for
special configurations or in the case of errors.

HiRAM was successfully tested under MS-DOS 3.21, 3.30, 4.01, 5.0 and 6.0, as
well as DR-DOS 3.41 and 6.0.

It is assumed HiRAM is installed in the C:\HIRAM directory.

USAGE:

Usage may differ depending on used DOS versions and/or particular hardware
requirements:

- MS-DOS starting from version 5, 8086/88 or 80286 without Extended MEMORY,
but with auxiliary memory.

CONFIG.SYS         AUTOEXEC.BAT
--------------------------------------------------------
DOS=UMB            C:\HIRAM\HiFILES=12
DEVICE=C:\HIRAM\HiRAM.EXE   LH KEYB GR,,KEYBOARD.SYS
FILES=8            ...
DEVICEHIGH=...

- MS-DOS starting from version 5, 80286 with Extended MEMORY, 80386/486 with
Shadow RAM.

DEVICE drivers and TSR programs load into the UMA, but the OS kernel does not.

CONFIG.SYS         AUTOEXEC.BAT
--------------------------------------------------------
DOS=HIGH,UMB         C:\HIRAM\HiFILES=12
DEVICE=C:\HIRAM\HiRAM.EXE   LH KEYB GR,,KEYBOARD.SYS
FILES=8            ...
DEVICEHIGH=HIMEM.SYS
...

DEVICE drivers and TSR programs load into the UMA, but the OS kernel does not.

- DR-DOS starting from version 5, 8086/88 or 80286 without Extended MEMORY,
but with auxiliary memory.

CONFIG.SYS         AUTOEXEC.BAT
---------------------------------------------------------
HIDOS=ON         MEMMAX +U
SHELL=COMMAND.COM /P /MU   C:\HIRAM\HiFILES=15
DEVICE=C:\HIRAM\HiRAM.EXE   KEYB GR,,KEYBOARD.SYS /MU
FILES=5            HILOAD ...
HIBUFFERS=...
HIDEVICE=...

DEVICE drivers, TSR programs and the OS kernel load into the UMA.

- DR-DOS starting from version 5, 80286 with Extended MEMORY, 80386/486 with
Shadow RAM.

CONFIG.SYS         AUTOEXEC.BAT
---------------------------------------------------------
HIDOS=ON         MEMMAX +U
SHELL=COMMAND.COM /P /MH   C:\HIRAM\HiFILES=15
DEVICE=HIDOS.SYS /BDOS=FFFF   KEYB GR,,KEYBOARD.SYS /MH
DEVICE=C:\HIRAM\HiRAM.EXE   HILOAD ...
FILES=5
HIBUFFERS=...
HIDEVICE=...

DEVICE drivers and TSR programs load into the UMA, but the OS kernel is
shifted into the HMA.

HiRAM tests the upper memory in 4 KB steps for the presence of upper RAM and
initializes it if necessary.

HiRAM does not occupy additional memory after successful initialization if
using DR-DOS 3.41 and MS-DOS. If using DR-DOS 5.0 or 6.0 only 48 Bytes load in
the UMA.

Optional Parameters:

In special cases HiRAM behavior can be controlled by specific command line
parameters.
Syntax:

DEVICE=[Lw:][\Pfad\]HiRAM.EXE [/option [/option [...]]]

Debug tests the upper memory and outputs the determined allocation at the
display, however initialization and installation are prevented.

   /Exclude=area
   /X=area
   /E=area
DEVICE=HiRAM.EXE /X=-D100, e800-e9ff, eb00, ed00
exclude the range from A000h-D1FFh, E800h-E9FFh, EB00h-EBFFh and ED00h-EFFFh.

   /FixMSDOS
initialize the memory expansion according to type of MS-DOS 5.0/6.0.

   /FixDRDOS
initialize the memory expansion according to type of DR-DOS 5.0/6.0.

   /Chain
causes the connection of conventional memory and UMBs.

   /NoChain
prevents the connection of conventional memory and UMBs.

   /Int2F
causes the installation of INTERRUPT Handlers, which broadcast the available
upper memory to the operating system. The Handler for MS-DOS 5.0/6.0 is only
temporary, i.e., it reports according to the request of upper memory
independently from the memory. Therefore this option should be used with
extreme caution, in order to avoid system crashes.

   /NoInt2F
prevents the standard installation messages of INTERRUPT Handlers.

Internal defaults used for:

- MS-DOS 5:
   /FixMSDOS /NoChain /Int2F

- MS-DOS 4 + DR-DOS 3.41:
   /FixMSDOS /Chain /NoInt2F

- DR-DOS 5:
   /FixDRDOS /Chain /Int2F







With the above setup (AUTOEXEC.bat + CONFIG.sys) I was able to run J.exe (which was Richard-001.exe supplied by you but renamed to conform to 8.3 filename)

Similarly I was able to run exe file generated by (DOSbox + MASM5.1 (16 bit)).


Questions

I crashed my computer when attempted to execute HIRAM.exe in config.sys - any clue how to configure it?

I wanted to have a RAM drive (call it D:\)  -  how to set up and with maximum possible size + more than one RAM drive?.

How to configure the UPPER MEMORY?

Any way to increase the XMS (Extended) memory?

Kernel compatibility 7.10 - WATCOM FAT32 support
C:HD1, Pri[1].CHS = 0-32-33, start = 1MB,size=15,255 MB
HIMEM:DOS XMS Driver Version 3.10 - 09/30/98 Extended Memory Specification (XMS) Version 3.0 (Microsoft) applies

FreeCom version 0.84.pre2 XMS_Swap [Aug 28 2006 00:29:00]  applies

FreeDOS kernel 2042 (build 2042 OEM:0xfd) [compiled may 11 2016] applies

Summary - how to maximize my setup ??? (for all the bells and whistles)  -my laptop is x64 intel i7 with 32 GByte RAM




So my "bare metal" setup is working (I think) - just want to improve it please.


It is nice for me to have an environment that is void of WINDOWS because of many windows issues I am experiencing.
Title: Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm
Post by: _japheth on January 05, 2021, 11:15:37 PM
Quote from: Richard on January 05, 2021, 02:14:28 PM
Questions

I crashed my computer when attempted to execute HIRAM.exe in config.sys - any clue how to configure it?

Better forget HIRAM.exe. It's too old. If you want to increase conventional memory, use UMBPCI:

https://www.uwe-sieber.de/umbpci.html (https://www.uwe-sieber.de/umbpci.html)

and perhaps, if needed, edit your config.sys by adding "high" to lastdrive (lastdrivehigh=f), stacks=0,0, fileshigh=40

Quote
I wanted to have a RAM drive (call it D:\)  -  how to set up and with maximum possible size + more than one RAM drive?.

There are many options, here two of them:

SHSURDRV: http://adoxa.altervista.org/shsufdrv/index.html (http://adoxa.altervista.org/shsufdrv/index.html)
RDISK: http://optimizr.dyndns.org/dos/drivers.html (http://optimizr.dyndns.org/dos/drivers.html)


Quote
How to configure the UPPER MEMORY?

UMBPCI will increase your upper memory. Nothing to do.

Quote
Any way to increase the XMS (Extended) memory?

Use HIMEMX.EXE: https://github.com/Baron-von-Riedesel/HimemX/releases/tag/v3.36 (https://github.com/Baron-von-Riedesel/HimemX/releases/tag/v3.36)
or XMGR.SYS