Hello Charles, if there are no updates yet, I would like to ask for one that may be complex...
but certainly easier than it would be for me to achieve the same.
It doesnt matter if i have to wait, because this is going to represent a few days or even weeks
of work that you may have easier access to fixing.
With all the pain in my soul, I'm going to have to roll my operator routines back, not because
they dont work, but because they run inconsistently between 32bit and 64bit, and sometimes
the executable is produced corrupted. I dont know why, but removing the code for the operators
fixes the issue.
Please see image attached. PluriBASIC displays that error, but the produced executable does not
run if i invoke it from the windows Explorer either.
These are my routines, i dont see anything wrong with them. Maybe implementing them at a
lower level will fix any issues.
FUNCTION ¤NOT(byval quad v1) AS QUAD
dword w1
dword w2
quad r
copy @w1, @v1, 4
copy @w2, @v1+4, 4
w1 = not(w1)
w2 = not(w2)
copy @r, @w1, 4
copy @r+4, @w2, 4
return r
END FUNCTION
FUNCTION ¤AND(byval quad v1, v2) as quad
dword w1
dword w2
quad r
copy @w1, @v1, 4
copy @w2, @v2, 4
w1 = (w1 and w2)
copy @r, @w1, 4
copy @w1, @v1+4, 4
copy @w2, @v2+4, 4
w1 = (w1 and w2)
copy @r+4, @w1, 4
return r
end function
FUNCTION ¤OR(byval quad v1, v2) as quad
dword w1
dword w2
quad r
copy @w1, @v1, 4
copy @w2, @v2, 4
w1 = (w1 or w2)
copy @r, @w1, 4
copy @w1, @v1+4, 4
copy @w2, @v2+4, 4
w1 = (w1 or w2)
copy @r+4, @w1, 4
return r
end function
I believe that, in order to fix them correctly, i may have to break the statements into parts and
compute every operation manually. This would represent a lot of work that you may already have
an bigger opportunity to get access to, because you are already doing that in your engine and i am not.
I believe that basically what you would need to do, is to check if the operands are quads, or single or double,
then convert them to a quad and use the routines above. This would make them work properly, as it is
working here already but inconsistently, at the point of making it unusable.
No rush, no pressure, no obligation either, but it would ease my work porting completely the engine, so
i request this as i have no way to do it at the moment (too much things to do).
The reason i have to believe that you may have easier access to this is, is beause you are already using OR
with DWORD and LONG, it would just be a matter of using QUADs to complete the operation with the routines
above. I believe this would complete the stuff needed to make the engine full 64 bit compatible, meaning it supports
also 64bit operators.
Thanks for reading this long post!