Hi,
I wrote MatrixXY3.exe and it gives an error after SeeMatrixC
;...................................................................
; Operations
;...................................................................
print " See matrixR ", 13,10
int 3 ; <----***** INT 3 is here
invoke SeeMatrixC, addr _matrixR
invoke MovMatrixDDXY, addr _matrixR, addr _matrixC
invoke SeeMatrixC, addr _matrixC
;------------------------------------------------------
Well, i removed some code and i wrote MatrixXY_3.asm to test
the problem with MovMatrixDDXY.
start: finit
print "Show _matrixR",13,10
invoke SeeMatrixC, addr _matrixR ; show _matrixR
; -------------------------
; move _matrixR to _matrixC
; -------------------------
invoke MovMatrixDDXY, addr _matrixR, addr _matrixC
print "Show _matrixC",13,10
invoke SeeMatrixC, addr _matrixC ; show _matrixC
;------------------------------------------------------
There is no problem with SeeMatrixC or MovMatrixDDXY.
Why it gives error in MatrixXY3.exe ?
;------------------------------------------------------
note:
MatrixXY3.zip = MatrixXY3.exe (there is an int 3 there)
MatrixXY_3.zip = MatrixXY_3.exe and MatrixXY_3.asm
all is console assemble & link
The code of the executable is obviously not the code in the source file. It is a classical variant of stack corruption: pushfd->pushad->popfd->popad ;-)
Thank you qWord, it was exactly the problem !
Now MatrixXY3.exe is correct. One day i will post the source code, test code, etc.
for all cases
more: SeeMatrixC is not the same in both .asm files
but now i dont why !
Now, i wrote this
PRINTIT MACRO
pushad
push eax
print "X Y= "
print str$(ebx)
print chr$(" ")
print str$(esi),32
print " value= "
pop eax
;
print str$(eax),13,10
inkey " - ok?"
popad
PRINTIT ENDM
and i got this:
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.
Assembling: C:\MASM32\RCLArrays_5\MatrixXY3.asm
C:\MASM32\RCLArrays_5\MatrixXY3.asm(203) : fatal error A1008: unmatched macro nesting
_
Assembly Error
Prima qualquer tecla para continuar . . .
So, i cannot use macros like print inside PRINTIT, no ?
The syntax is:
PRINTIT macro
;...
endm
You should take a look in MASM's programmer's guide!
Well, i am not well today !
Thanks, is it qWord !