News:

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

Main Menu

Re: Beginner...Masm64 new install VIRUS ???? (not a virus)...Richard-001.asm

Started by jj2007, December 31, 2020, 10:34:45 PM

Previous topic - Next topic

Richard

@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??????

jj2007

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

Richard

@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.

jj2007

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, 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 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:

Richard

@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)

jj2007

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.

Richard

@_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.

_japheth

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

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
RDISK: 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
or XMGR.SYS


Dummheit, gepaart mit Dreistigkeit - eine furchtbare Macht.