News:

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

Main Menu

Entering the Heaven's Gate with FLAT:1

Started by aw27, June 07, 2019, 01:16:56 AM

Previous topic - Next topic

hutch--

 :biggrin:

I use the slob approach when dealing with interactions between 32 bit and 64 bit apps. Memory mapped files are easy to set up between them and HWND_BROADCAST works on both so you have both messaging and accessible memory that both can read/write.

Something I did for the sheer amusement was to write what was effectively a memory bank in 64 bit that could be used from a 32 bit app to store data so it could free up available 32 bit memory to do other things. The size of the memory mapped file was limited by the 32 bit address range but you could make multiple writes to the 64 bit software as data storage. Worked OK but I could not find a use for it, if I need big memory, I write it in 64 bit.

aw27

Quote from: hutch-- on June 08, 2019, 02:06:09 AM
:biggrin:

I use the slob approach when dealing with interactions between 32 bit and 64 bit apps. Memory mapped files are easy to set up between them and HWND_BROADCAST works on both so you have both messaging and accessible memory that both can read/write.

Something I did for the sheer amusement was to write what was effectively a memory bank in 64 bit that could be used from a 32 bit app to store data so it could free up available 32 bit memory to do other things. The size of the memory mapped file was limited by the 32 bit address range but you could make multiple writes to the 64 bit software as data storage. Worked OK but I could not find a use for it, if I need big memory, I write it in 64 bit.

Memory mapped files are extremely useful for inter-process communication and are extremely handy for inter-platform communication within the same process because the mapped file doesn't even need to be reopened - the same pointer can be used by both platforms, a direct line from Heaven to Earth..

habran

AW,
when I copied your mov rcx, 0123456789ABCDEFh it was not working because it was unicode
when I retyped it it was working fine:
mov rcx, 0123456789ABCDEFh
0000000000401010 48 B9 EF CD AB 89 67 45 23 01 mov         rcx,123456789ABCDEFh
Cod-Father

habran

here is what is wrong with your characters:

<006D><006F><0076><0020><0020><0020><0020><0072><0063><0078><002C><0020><202D><0030><0031><0032><0033><0034><0035><0036><0037><0038><0041><0042><0043><0044><0045><0046><0068>

that is why I get this: error A2102: Symbol not defined : ?012345678ABCDEFh
and VS was asking me if I want to save the file as a unicode
Cod-Father

aw27

Thank you Habran,  :thumbsup:

This was driving me crazy. Some phantom characters, very likely UTF-8, where inserted in the interstices of the instruction. This is what I am seeing with a hex editor:

00000310  66 66 6A 75 6D 70 3A 3A 0D 0A 09 09 3B 6D 6F 76  ffjump::....;mov
00000320  20 09 72 63 78 2C 20 E2 80 AD 30 31 32 33 34 35   .rcx, â€.012345
00000330  36 37 38 41 42 43 44 45 46 68 20 3B 22 45 72 72  678ABCDEFh ;"Err
00000340  6F 72 20 41 32 31 36 37 3A 20 4D 69 73 73 69 6E  or A2167: Missin
00000350  67 20 71 75 6F 74 61 74 69 6F 6E 20 6D 61 72 6B  g quotation mark
00000360  20 69 6E 20 73 74 72 69 6E 67 22 21 20 57 68 79   in string"! Why

What the hell!

aw27

I have been exploring the Heaven's Gate and found an innovative way (or better an improvement over an existing method) to load the 64-bit kernel32.dll (even in Windows 10, with the latest updates). See picture.
This contradicts this and many others (probably all the others).



I am not going to publish the source code here, may be I will do it somewhere else when I can compose something interesting  to illustrate. Of course, I will tell you guys when done.

I have been using UASM and need to congratulate the team for the work done.
Of course, there are a few bugs, which I have reported so far (one of them was not a bug).
I can manoeuvre even with the bugs, no worries. It is impressive that the high-level constructs like .while/.endw, .for/.endfor, etc work both in USE32 and USE64 . It is really a time saving. I will be back to this novel again.  :thumbsup:





johnsa

Awesome investigation this! I await the complete saga :)

In the meantime I'll PM you about the specific bugs and add them to the fix list.