The PB DLL Manual states that the value in the EBX register must be preserved, however the example code in the manual shows it being loaded with a value and not preserved as in:
SUB KerPlunk
ASM mov EAX, 5
! mov EBX, &HFF
! add EAX, EBX
END SUB
My questions are:
Why is EBX special, while EAX is not? They are both general purpose registers. . .
Is PB doing something special with EBX?
When the above sub is exited is EBX restored to the value it had before the sub was called?
A side note, default compiler setting of:
#REGISTER DEFAULT
can lead to some very interesting results when inline assembly code is used, but anyone sharp enough to do inline assembly would already know that. It might be a good idea to place a warning in the help file and/or manual.
Tim
[This message has been edited by Tim Wisseman (edited June 21, 2000).]
SUB KerPlunk
ASM mov EAX, 5
! mov EBX, &HFF
! add EAX, EBX
END SUB
My questions are:
Why is EBX special, while EAX is not? They are both general purpose registers. . .
Is PB doing something special with EBX?
When the above sub is exited is EBX restored to the value it had before the sub was called?
A side note, default compiler setting of:
#REGISTER DEFAULT
can lead to some very interesting results when inline assembly code is used, but anyone sharp enough to do inline assembly would already know that. It might be a good idea to place a warning in the help file and/or manual.
Tim
[This message has been edited by Tim Wisseman (edited June 21, 2000).]
Comment