News:

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

Main Menu

can't get this code to work on 64-bit GoAsm

Started by shankle, March 22, 2013, 12:11:54 AM

Previous topic - Next topic

shankle

#15
To Dave,
I'm really doing the same thing as your last post but with different names.
To QWord,
Any  of my "testmsg" are defined in the GoAsm Data Section.

However I think I have found the culprit.
In Microsofts expansion of the blue screen window it is complaining about a module
called "ntdll.dll". Listed under Fault Module Name.
I have included a zip file of the window.

As far as I know my Windows 7 pro 64-bit is up to date.
Lot of stuff on the internet about this module but I am afraid to use it.
Usually you get more than you bargained for with these programs.
Ran Microsofts "sfc /scannow" and it showed no errors.
Have no idea how to proceed from this point.

dedndave

in that pic, the "Exception Code: c0000005" line tells you what the problem is
the "Exception Offset: 00000000000533dd" line tells you where, in your code, it occurs

c0000005 is an ACCESS_VIOLATION
it happens when you try to access memory in a section that does not have the proper attribute
this is quite often caused by accessing memory at an address of 0   :P
so, i am guessing that the allocation fails, and RBX = 0 when you try to read the byte
if you disassemble or debug your code, i bet you'll find the MOV AL,[RBX] instruction is at address 533ddh

write a little test program, using the code as i have it in my previous post
the exception should not occur   :t

i don't have a 64-bit machine, nor do i have GoAsm, or i would test it myself

there are a few differences in the code
for example, i use a flag of NULL, where you use generate exceptions
my code tests for success after the allocation

shankle


shankle

Thanks guys for helping.
As I have said before Globalalloc works in 32-bit GoAsm.
In 64-bit GoAsm neither Globalalloc or the Heap instructions work for me.
And I'll admit the problem is probably me.
So i tried another solution.
Defined a field as Blah1 db ?.
There seems to be a limit to the data that can be put in this field.
If I redefine Blah1 to Blah1  db 500000. This allows my entire source file to be read in.
The obvious reason for not wanting to do this the size of the executable file.
So I guess I am asking what is the limit of the size of an uninitialized field????

wjr


ErrorLimit DB 04000000h DUP ? ;maximum, above this gives an error
WarningLimit DB 00100000h DUP ? ;above this gives a warning