Author Topic: MasmBasic  (Read 153814 times)

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7756
  • Assembler is fun ;-)
    • MasmBasic
Fearless beta testers wanted!
« Reply #90 on: August 23, 2013, 09:07:14 AM »
Since the zipped package was very close to the Forum's 512k limit, I wrote an installer which pushed it down to 322k. Feedback sought regarding
- the EULA
- the extraction process
- whatever observation you may have 8)

Just open the attachment and double-click on MbSetup.exe
(It's not MSI, sorry, but it seems to do the job, too - source will be available soon)

P.S.: Second version posted, the first one didn't find the image for the title bar :(
P.S.: Third version attached, #2 tried to sell VB to Dave, and I hope that is fixed for the time being ;-)

P.S.: See reply #100 for version #4
« Last Edit: August 24, 2013, 05:57:47 PM by jj2007 »

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: MasmBasic - a fast and easy-to-use library
« Reply #91 on: August 23, 2013, 01:08:23 PM »
oops - lol
it says MasmBasic is not for me, then googles VB for me   :lol:
nothing cryptic about that message

i have some of my masm32 subfolders named a little differently
perhaps you could tell us which subfolders must be in place before throwing us to the wolves   :biggrin:

great idea, though
i always wondered if i had it set up correctly, before

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7756
  • Assembler is fun ;-)
    • MasmBasic
Re: MasmBasic - a fast and easy-to-use library
« Reply #92 on: August 23, 2013, 03:40:05 PM »
oops - lol
it says MasmBasic is not for me, then googles VB for me   :lol:

Soooorry... that means I have to revise the routine that checks if user X is a valid member of the Masm32 community :redface:

What I did is check the registry for the asm_auto_file editor. If there is \Masm32\ in one of the possible entries, you are a good user. Which means you are a bad user, Dave :eusa_naughty:

  call IsMasm32        ; check if user has Masm32 installed
  .if eax
        inc GoodUser
        wLet Button1$="Accept && Install"
        wLet Static$="MasmBasic will be installed to "+wChr$(M32$)+"MasmBasic"
  .else
        wLet Button1$="Continue"        ; will open Google ;-)
        wLet Static$="Bye..."
  .endif

IsMasm32:
        ; If an entry exists in both HKLM\SOFTWARE\Classes and HKEY_CURRENT_USER\SOFTWARE\Classes,
        ; then the value of the entry in HKEY_CURRENT_USER\SOFTWARE\Classes takes precedence (MSDN).
        ; Win7: HKCU & HKCR
        Let edi=GetRegVal("HKCU\SOFTWARE\Classes\asm_auto_file\shell\open\command", 0, "No luck in HKCU...")
        .if !Instr_(edi, "\Masm32\", 1)
                Let edi=GetRegVal("HKLM\SOFTWARE\Classes\asm_auto_file\shell\open\command", 0, "No luck in HKLM...")
        .endif
        .if !Instr_(edi, "\Masm32\", 1)
                Let edi=GetRegVal("HKCR\asm_auto_file\shell\open\command", 0, "No luck in HKCR...")
        .endif
        .if !Instr_(edi, "\Masm32\", 1)
                FileWrite "tmp.asm", "MasmBasic is great"
                lea edi, TmpPath$
                invoke FindExecutable, esi, Chr$("\"), edi
                Kill esi
        .endif
        Clr$ esi
        push Instr_(edi, "\Masm32\", 1)
        .if eax
                or ecx, -1
                .Repeat
                        inc ecx
                .Until byte ptr [edi+ecx]>="A"
                sub edx, ecx
                lea eax, [edi+ecx]
                Let M32$=Left$(eax, edx+7)
        .endif       
        pop eax
        retn
end start

Antariy

  • Member
  • ****
  • Posts: 541
Re: MasmBasic - a fast and easy-to-use library
« Reply #93 on: August 23, 2013, 07:58:08 PM »
Since the zipped package was very close to the Forum's 512k limit, I wrote an installer which pushed it down to 322k. Feedback sought regarding
- the EULA
- the extraction process
- whatever observation you may have 8)

Just open the attachment and double-click on MbSetup.exe
(It's not MSI, sorry, but it seems to do the job, too - source will be available soon)

P.S.: Second version posted, the first one didn't find the image for the title bar :(

Just downloaded it, Jochen :t
As for MSI - no need in excuses - don't like MSI packages :biggrin:

As for search for "asm_auto_file", the robust way is to get in HKCR\.asm key the default value contents - if it's empty, then search for the "Shell\Open\command" subkey in the same key, otherwise it will be the name of the key with right "Shell\Open\command". HKCR\.asm default value usually contains redirection to "asm_auto_file", so right redirection path is HKCR\asm_auto_file, but the redirection may be other - depends on different things and how user setup the handling of files, like the opening program.

Antariy

  • Member
  • ****
  • Posts: 541
Re: MasmBasic - a fast and easy-to-use library
« Reply #94 on: August 24, 2013, 09:13:59 AM »
Version 3 works for me, Jochen :t It founds MASM32 package path properly.

dedndave

  • Member
  • *****
  • Posts: 8751
  • Still using Abacus 2.0
    • DednDave
Re: MasmBasic - a fast and easy-to-use library
« Reply #95 on: August 24, 2013, 10:23:59 AM »
it looks like it installed correctly   :t

the title bar in the browser flickers continuously - well - it's odd behaviour - the cursor is nutty - lol
it would be nice to have an "installation test" program that assembles using MB

sinsi

  • Member
  • *****
  • Posts: 1005
Re: MasmBasic - a fast and easy-to-use library
« Reply #96 on: August 24, 2013, 12:49:31 PM »
V3 works for me, but a success/fail message would be nice...
In RichMasm, the menu in the title bar overwrites the title bar text - normal behaviour?
I can walk on water but stagger on beer.

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7756
  • Assembler is fun ;-)
    • MasmBasic
Re: MasmBasic - a fast and easy-to-use library
« Reply #97 on: August 24, 2013, 04:47:12 PM »
the title bar in the browser flickers continuously - well - it's odd behaviour - the cursor is nutty - lol
There is one spot between System Apps and Help that flickers for me - will have to solve that one day. But no continuous flicker on my machines. What exactly do you see? Which OS, which resolution?

Quote
it would be nice to have an "installation test" program that assembles using MB
Will add my testbed in version 4, now that the 512k limitation is far away.

V3 works for me, but a success/fail message would be nice...
In RichMasm, the menu in the title bar overwrites the title bar text - normal behaviour?
Not really. Are your title bars centered, or right-aligned? Windows 8, I guess?

The problem here is/was Aero. The idea was to maximise the height of the editor's "real estate", since Assembler is a "vertical language" (note that FF and Thunderbird nowadays do something similar). So I placed the menus inside the caption, and made them also show without clicks (I hate clicking). But then Lingo complained about not seeing them with Vista/Aero, and I found this solution, which is not perfect but works most of the time.

But it should not flicker, and not overwrite titles, of course. Grateful for more detailed descriptions of the problems, folks :icon14:

Bookmarks to the right and listbox are working properly?

sinsi

  • Member
  • *****
  • Posts: 1005
Re: MasmBasic - a fast and easy-to-use library
« Reply #98 on: August 24, 2013, 05:34:55 PM »
On the laptop (win8):
Download masm32 and install...ok
Download and install masmbasic...f**k this, I'm going to use VB
Step 2 needs to be "try to open a .asm file, fail, associate it with something"

Interestingly, SmartScreen blocked masmbasic install but not masm32.

Windows 8 has no aero and centred titles.
I can walk on water but stagger on beer.

jj2007

  • Moderator
  • Member
  • *****
  • Posts: 7756
  • Assembler is fun ;-)
    • MasmBasic
Re: MasmBasic - a fast and easy-to-use library
« Reply #99 on: August 24, 2013, 05:56:10 PM »
On the laptop (win8):
Download masm32 and install...ok
Download and install masmbasic...f**k this, I'm going to use VB
Step 2 needs to be "try to open a .asm file, fail, associate it with something"

Interestingly, SmartScreen blocked masmbasic install but not masm32.

Windows 8 has no aero and centred titles.

Thanxalot, John. Could you please run the register tests attached here? In my installations, qEditor.exe has a HKCR\Applications\qEditor.exe\shell\open\command key, so I wonder where that one is gone...

Re SmartScreen: I have added a manifest to the Setup.exe; does it convince SmartScreen?

Antariy

  • Member
  • ****
  • Posts: 541
Re: MasmBasic - a fast and easy-to-use library
« Reply #100 on: August 24, 2013, 06:08:57 PM »
Jochen, maybe it will be useful to make the installation path variable? Like "MasmBasic will be installed to ..." and near this a button "Change location..." - for those who have more than one MASM32 installation on different drives.

sinsi

  • Member
  • *****
  • Posts: 1005
Re: MasmBasic - a fast and easy-to-use library
« Reply #101 on: August 24, 2013, 06:11:18 PM »
Could you please run the register tests attached here?
Here? Nope  :P
I can walk on water but stagger on beer.

Antariy

  • Member
  • ****
  • Posts: 541

sinsi

  • Member
  • *****
  • Posts: 1005
Re: MasmBasic - a fast and easy-to-use library
« Reply #103 on: August 25, 2013, 04:23:50 PM »
Fresh install of everything on my win7 box
Code: [Select]
Before any install ------------------------------------------------------------------------------------------------
C:\Users\User\Desktop>IsMasm32.exe
*** Running Windows 7 Home Premium ***

### Testing asm files: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.asm\UserChoice
Progid=[* failed *]
HKCR\.asm
default=[* failed *]
HKCR\* failed *\shell\Open\Command
default=[* failed *]

### Testing inc files: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.inc\UserChoice
Progid=[* failed *]
HKCR\.inc
default=[* failed *]
HKCR\* failed *\shell\Open\Command
default=[* failed *]

### Testing rc files: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.rc\UserChoice
Progid=[* failed *]
HKCR\.rc
default=[* failed *]
HKCR\* failed *\shell\Open\Command
default=[* failed *]

### Finding the path for qEditor.exe: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\qEditor.exe    [* failed *]
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\qEditor.exe    [* failed *]
HKCR\Applications\qEditor.exe\shell\open\command        [* failed *]

### Finding the path for winword.exe: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\winword.exe    [* failed *]
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\winword.exe    [C:\PROGRA~1\MICROS~3\Office14\WINWORD.EXE]
HKCR\Applications\winword.exe\shell\open\command        [* failed *]

Messy, right? Now trying to find the editor elsewhere...

Registry HKCU   $edi            No luck in HKCU...
Registry HKLM   $edi            No luck in HKLM...
Registry HKCR   $edi            No luck in HKCR...
Registry HKCR   $edi            No luck in HKCR...

FileWrite
$esi            C:\Users\User\Desktop\~tmp25081517.asm
$edi            C:\Windows\system32\NOTEPAD.EXE

After installing masm32, same as above ---------------------------------------------------------------------------

After associating .asm with qeditor.exe --------------------------------------------------------------------------
C:\Users\User\Desktop>IsMasm32.exe
*** Running Windows 7 Home Premium ***

### Testing asm files: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.asm\UserChoice
Progid=[* failed *]
HKCR\.asm
default=[asm_auto_file]
HKCR\asm_auto_file\shell\Open\Command
default=["D:\masm32\qeditor.exe" "%1"]

### Testing inc files: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.inc\UserChoice
Progid=[* failed *]
HKCR\.inc
default=[* failed *]
HKCR\* failed *\shell\Open\Command
default=[* failed *]

### Testing rc files: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.rc\UserChoice
Progid=[* failed *]
HKCR\.rc
default=[* failed *]
HKCR\* failed *\shell\Open\Command
default=[* failed *]

### Finding the path for qEditor.exe: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\qEditor.exe    [* failed *]
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\qEditor.exe    [* failed *]
HKCR\Applications\qEditor.exe\shell\open\command        ["D:\masm32\qeditor.exe" "%1"]

### Finding the path for winword.exe: ###
HKCU\Software\Microsoft\Windows\CurrentVersion\App Paths\winword.exe    [* failed *]
HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\winword.exe    [C:\PROGRA~1\MICROS~3\Office14\WINWORD.EXE]
HKCR\Applications\winword.exe\shell\open\command        [* failed *]

Messy, right? Now trying to find the editor elsewhere...

Registry HKCU   $edi            "D:\masm32\qeditor.exe" "%1"
Registry HKLM   $edi            No luck in HKLM...
Registry HKCR   $edi            "D:\masm32\qeditor.exe" "%1"
Registry HKCR   $edi            "D:\masm32\qeditor.exe" "%1"

FileWrite
$esi            C:\Users\User\Desktop\~tmp25081536.asm
$edi            D:\masm32\qeditor.exe

Your Masm32 root        $M32$           D:\masm32\
Your asm files editor   $edi            D:\masm32\qeditor.exe
One thing I found, once you pick a program not in the "open with" dialog it gets added to HKCR\Applications\the.exe\shell\open\command.
That makes it available in other "open with" dialogs without having to browse. Handy to know.

Alex, so it was there instead of here  :biggrin:
jj needs a refresher on using the url tag...
I can walk on water but stagger on beer.

Magnum

  • Member
  • *****
  • Posts: 2242
Re: MasmBasic - a fast and easy-to-use library
« Reply #104 on: August 25, 2013, 05:41:50 PM »
I see that some Volks ask for extra free stuff when your programs are already free.

Jeez.

Your patience is admirable.

Take care,
                   Andy

Ubuntu-mate-16.04-desktop-amd64

http://www.goodnewsnetwork.org