News:

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

Main Menu

Fasm and MasmBasic

Started by clamicun, April 25, 2017, 07:42:31 AM

Previous topic - Next topic

clamicun

Deleted MasmBasic
Installed version 24 April 17
Richmasm.exe opens a MessageBox ...Bad DLL  RichEdit20A and closes

??? My Computer ?

clamicun

Deleted MasmBasic
Installed 24 April 2017

RichMasm.exe opens a messagebox  "Bad DLL?"
                                                      "RichEdit20A"
and closes.
??? my computer ?

jj2007

Strange. During the installation,
- did you see the big box with "Accept & install"?
- immediately after, did you see the green document titled "This help file refers to MasmBasic version 24 April 2017"?

If yes, RichMasm had no problem with the RichEd20.dll
If no, i.e. if immediately after the "Accept & install" you saw that ugly box, then I have a problem :(

Which Windows version are you using? Brazilian version of WinXX? Even so, it should find a valid \System32\RichEd20.dll ::)

Do you have C:\Program Files (x86)\Common Files\microsoft shared\OfficeXX folders?

Btw no need to delete the MasmBasic folder. The re-installation does not overwrite any valuable files.

clamicun

Strange. During the installation,
- did you see the big box with "Accept & install"?

YES

- immediately after, did you see the green document titled "This help file refers to MasmBasic version 24 April 2017"?

NO

If yes, RichMasm had no problem with the RichEd20.dll
If no, i.e. if immediately after the "Accept & install" you saw that ugly box, then I have a problem :(

Which Windows version are you using? Brazilian version of WinXX? Even so, it should find a valid \System32\RichEd20.dll ::)

Win7Ultimate

Do you have C:\Program Files (x86)\Common Files\microsoft shared\OfficeXX folders?

Thats what I have ... C:\Program Files\Common Files\microsoft shared\ ....

Installs perfectly but when it starts the mentioned messagebox appears ...

No way to use it

clamicun

Now I installed the April version but use the old RichMasm.exe from janary ... everything works

felipe

Quote from: hutch-- on April 25, 2017, 06:42:22 PM
:biggrin: Now you will have to be careful with this 1.5k bloated pig, its written in pure MASM.  :P

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
    include \masm32\include\masm32rt.inc
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    .code
      nmfile db "mysqld.exe",0
      mbtext db "Sorry, can't find that file",0
      mbtitl db "Error",0

start:
   
; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    call main
    exit

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

main proc

    invoke WinExec,OFFSET nmfile,1

    .if eax == ERROR_FILE_NOT_FOUND || eax == ERROR_PATH_NOT_FOUND
      invoke MessageBox,0,OFFSET mbtext,OFFSET mbtitl,MB_OK
      ret
    .endif

  ; ---------------------------
  ; do what you want to do here
  ; ---------------------------

    ret

main endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

end start

I know this code it's trivial for you, but i come from assembly real mode programming in ms-dos and i'm learning to do assembly programming in 32 bits since a couple of months. But i want to say that this code it's both: illustrative and really good.  Thanks for sharing again!  :t :eusa_boohoo:


hutch--

Hi felipe,

You will find that once you get used to what this stuff looks like that its both simpler and a lot cleaner than the old real mode DOS. The FLAT memory model means no segment/offset, just linear addressing, instead of interrupts you just call system functions which is what the API functions are. The real fun though is still in pure mnemonic code and here you have a wider range of instructions, less restrictions and a lot more power.

jj2007

Quote from: clamicun on April 26, 2017, 01:12:54 AM
Now I installed the April version but use the old RichMasm.exe from janary ... everything works

Great, but that doesn't solve the mystery :biggrin:

Can you do me a favour and copy the console messages which the attached test version will throw?
Just extract ReTest.exe to the same folder as RichMasm.exe, i.e. \Masm32\MasmBasic\ReTest.exe, run it, switch to the console, maximise it and copy the text (see Copy To the Clipboard From the Windows Command Prompt).

You should get something like
LoadRich: RE-used []

Expanded
eax             75
ecx             0
$esi            C:\Program Files (x86)\Common Files\Microsoft shared\Office1?\RichEd20.dll
$ebx            ?\RichEd20.dll

out
flags:          czSo
$esi            C:\Program Files (x86)\Common Files\Microsoft shared\Office11\RichEd20.dll
$ebx            1\RichEd20.dll

used
flags:          cZso
$esi            C:\Program Files (x86)\Common Files\Microsoft shared\Office11\RichEd20.dll
GetInfo correction for MainX=0

felipe

Hutch:
I'm aware now of the high level capacity of masm (ml) like in using .if or similars, for example. And i have been learning all the differences between the 8086 and the 386 (as a base starting point) architectures. But, yes, the differences between: a) The int instructions in real mode programming and the bios functions or even the dos functions, and, b)The windows api functions is what takes me more time to get. That's why this kind of code it's illustrative for me, because i'm learning the rules to call this functions from the assembly program.  :dazzled:... :lol:

clamicun

LoadRich: RE-used []

Expanded
eax             69
ecx             0
$esi            C:\Program Files\Common Files\Microsoft shared\Office1?\RichEd20
.dll
$ebx            ?\RichEd20.dll

out
flags:          cZso
$esi            C:\Program Files\Common Files\Microsoft shared\Office1
$ebx

used
flags:          cZso
$esi            C:\Program Files\Common Files\Microsoft shared\Office1

jj2007

Thanks, very helpful :icon14:
Is that a 32-bit OS? I would have expected C:\Program Files (x86)\ ::)

Attached another debug version.

nidud

#26
deleted

jj2007

Yes indeed. I use this:

txOffice db "%CommonProgramFiles%\Microsoft shared\Office1?\RichEd20.dll", 0

clamicun

32bit

RichEd20.dll requested (0=Office11 or Sys32): []

Expanded
eax             69
ecx             0
$esi            C:\Program Files\Common Files\Microsoft shared\Office1?\RichEd20
.dll
$ebx            ?\RichEd20.dll

out
flags:          cZso
$esi            C:\Program Files\Common Files\Microsoft shared\Office11\RichEd20
.dll
$ebx            1\RichEd20.dll

used
flags:          cZso
$esi            C:\Program Files\Common Files\Microsoft shared\Office11\RichEd20
.dll







jj2007

Thanks a lot for testing this, clamicun. If the attached new version works (and it should!), I'll update the package.

RichMasm it looks in these Office folders for the best version of RichEd20.dll. If it can't find any (frequent case), the fallback option is Windows\System32\RichEd20.dll - old and slow but it's installed everywhere.

Unfortunately, the fallback option was completely broken - too much messing around with the other versions :(
Those who have M$ Office installed would have never noticed. But apparently, you don't have these Office folders.