Author Topic: Open source file manager in plain x64 assembly (MASM)  (Read 2363 times)

dp4

  • Regular Member
  • *
  • Posts: 2
Open source file manager in plain x64 assembly (MASM)
« on: October 12, 2016, 12:23:58 AM »
I just want to announce the release of my project here: http://www.codeproject.com/Articles/1136934/Accessing-Windows-API-with-Plain-x-Assembly-Langua

Maybe some other assembly enthusiastics will like it.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4750
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #1 on: October 12, 2016, 12:36:19 AM »
Looks like you have done some interesting work here. If you write a prologue/epilogue pair of macros, you can do both high level and low level procedures. The high level ones look like this.

WndProc proc hWin:QWORD,uMsg:QWORD,wParam:QWORD,lParam:QWORD

For high level you automate the filling of the shadow space with the first 4 register arguments and can use any of the arguments directly. Low level bypasses all of this passing directly in the 4 registers to a procedure that has no stack frame. The number of registers when used correctly make algorithms a lot easier to write and you can avoid using the stack, just a slightly different brain to Win32.

hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

jj2007

  • Member
  • *****
  • Posts: 7453
  • Assembler is fun ;-)
    • MasmBasic
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #2 on: October 12, 2016, 03:45:25 AM »
Nice project, Stephan, really :t

The multilingual interface (English, German and Italian) might need some attention, though:
« Last Edit: October 12, 2016, 09:39:56 AM by jj2007 »

fearless

  • Member
  • ***
  • Posts: 271
    • LetTheLightIn
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #3 on: October 12, 2016, 06:11:30 AM »
Some splash screen shows then a crash dialog

Exception Code:    c0000005
Fault Module Name: ole32.dll

Running windows 7 x64 - no av or other products that might cause an issue
fearless

CM690II Case, HX1000 PSU, Asus Z97, Intel i7-4790K, Seidon 120v Cooler, 16GB DDR3, MSI GTX 980TI, Samsung 256GB + 1TB SSD, WD Black 2TB x2 + 4TB HDD, Asus 27" LCD

www.LetTheLight.in  My Github

Vortex

  • Member
  • *****
  • Posts: 1691
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #4 on: October 12, 2016, 08:30:48 AM »
Both of the applications cannot run XP 64-bit :

Code: [Select]
setup.exe is not a valid Win32 application.
Code: [Select]
micrommander is not a valid Win32 application.

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 4750
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #5 on: October 12, 2016, 10:14:12 AM »
I went to download the project but the site requires that you log in first so I did not bother as I am tired of spam from sites I have visited once. RE: It not running correctly on some OS versions, this could probably be fixed easily enough as it is likely to be how the stackframe is setup. As far as 64 bit XP, I don't know how compatible it is with Win7 64 and later.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin:

Vortex

  • Member
  • *****
  • Posts: 1691
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #6 on: October 13, 2016, 04:49:09 AM »
The file manager works fine on the Windows 7 Preinstallation Environment 64-bit ( Win7PE SE 64-bit )

GuruSR

  • Member
  • **
  • Posts: 116
  • Assembler (6500, 68k, Intel), C(all), VB6, no .Net
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #7 on: October 13, 2016, 05:57:04 AM »
I went to download the project but the site requires that you log in first so I did not bother as I am tired of spam from sites I have visited once. RE: It not running correctly on some OS versions, this could probably be fixed easily enough as it is likely to be how the stackframe is setup. As far as 64 bit XP, I don't know how compatible it is with Win7 64 and later.

Umm...  after all the WoW 64 stuff I've been going through, I can tell you from first hand, 64 bit XP isn't anywhere near 64bit Vista+.  As for code functionality, 64bit stuff rarely worked correctly in XP due to it being a "first version" of 64 bit for Microsoft on a whole.  XP64 bit is Vista x64 SP0, but without the redirection/reflections in the registry, and those parts are undocumented.  Not to mention, most of the x64 environment changed in Vista and don't exist in XP64.  I *think* the Syswow64 folder *may* be in XP64, but don't quote me on it, it's as rare as Vista 32bit Enterprise.

GuruSR.
Learned 68k Motorola Asm instruction set in 30 minutes on the way to an Amiga Developer's Forum meeting.
Following week wrote a kernel level memory pool manager in 68k assembler for fun.

Vortex

  • Member
  • *****
  • Posts: 1691
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #8 on: October 13, 2016, 06:08:39 AM »
The Wow64 system exists on Windows XP 64-bit :

Code: [Select]
C:\WINDOWS\SysWOW64
I am able to do 64-bit programming on this operating system. No any problem.

LiaoMi

  • Member
  • **
  • Posts: 118
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #9 on: October 17, 2016, 05:29:27 AM »
Commander fails, when you open the administrator folders from a simple user   :(

dp4

  • Regular Member
  • *
  • Posts: 2
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #10 on: October 17, 2016, 10:28:04 PM »
Thanks for all the feedback :icon_cool: I'll check some of the errors. I tried only on Win10 x64, never saw a XP x64 version. Win7 however should work..

GuruSR

  • Member
  • **
  • Posts: 116
  • Assembler (6500, 68k, Intel), C(all), VB6, no .Net
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #11 on: October 20, 2016, 02:38:21 PM »
The Wow64 system exists on Windows XP 64-bit :

Code: [Select]
C:\WINDOWS\SysWOW64
I am able to do 64-bit programming on this operating system. No any problem.

Ah, okay.  I know the redirection of it in the registry is a silly pain in the behind.  Much like my woes with figuring how to migrate a 32bit registry into that Wow64 mess...  So far, partially working, crashes IE (ugh), other things like resources aren't being registered (or I got harsh on the restrictions and cut my own throat, not sure what stuff in the registry I need to keep, M$ still guards all that with secrecy).

GuruSR.
Learned 68k Motorola Asm instruction set in 30 minutes on the way to an Amiga Developer's Forum meeting.
Following week wrote a kernel level memory pool manager in 68k assembler for fun.

User_1960

  • Regular Member
  • *
  • Posts: 8
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #12 on: November 29, 2016, 05:51:06 PM »
In order for the programs to run in XP they must be linked with the "/SUBSYSTEM:WINDOWS,5.01" Linker switch. The Linker DP4 used defaults to "6.0" that is Vista, the minimum OS version required.

Regards

Negens

  • Regular Member
  • *
  • Posts: 5
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #13 on: January 16, 2017, 09:32:48 AM »
In order for the programs to run in XP they must be linked with the "/SUBSYSTEM:WINDOWS,5.01" Linker switch. The Linker DP4 used defaults to "6.0" that is Vista, the minimum OS version required.

Regards

Hi, I tried this and 5.01 is considered as an error by link.exe.
Is there another way to make programs run since XP ?

User_1960

  • Regular Member
  • *
  • Posts: 8
Re: Open source file manager in plain x64 assembly (MASM)
« Reply #14 on: January 23, 2017, 03:54:41 AM »
In order for the programs to run in XP they must be linked with the "/SUBSYSTEM:WINDOWS,5.01" Linker switch. The Linker DP4 used defaults to "6.0" that is Vista, the minimum OS version required.

Regards

Hi, I tried this and 5.01 is considered as an error by link.exe.
Is there another way to make programs run since XP ?

Which Linker are you using ?