Author Topic: can't get this code to work on 64-bit GoAsm  (Read 9157 times)

shankle

  • Member
  • ****
  • Posts: 833
Re: can't get this code to work on 64-bit GoAsm
« Reply #15 on: March 26, 2013, 11:36:21 PM »
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.
« Last Edit: March 27, 2013, 01:17:36 AM by shankle »

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: can't get this code to work on 64-bit GoAsm
« Reply #16 on: March 27, 2013, 01:40:35 AM »
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

  • Member
  • ****
  • Posts: 833
Re: can't get this code to work on 64-bit GoAsm
« Reply #17 on: March 27, 2013, 01:57:55 AM »
Ok Dave,
Will give it a whirl....

shankle

  • Member
  • ****
  • Posts: 833
Re: can't get this code to work on 64-bit GoAsm
« Reply #18 on: April 08, 2013, 01:14:48 AM »
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

  • Member
  • **
  • Posts: 207
    • WJR's website
Re: can't get this code to work on 64-bit GoAsm
« Reply #19 on: April 08, 2013, 02:03:50 AM »
Code: [Select]
ErrorLimit DB 04000000h DUP ? ;maximum, above this gives an error
WarningLimit DB 00100000h DUP ? ;above this gives a warning