but since I was messing with /COMMENTED while teaching myself more asm I noticed this and have some suggestions on improvements as well.
The following code:
Code: Select all
Procedure.l AbsL(value)
!MOV eax,[p.v_value]
!CDQ
!XOR eax,edx
!SUB eax,edx
ProcedureReturn
EndProcedure
Code: Select all
_Procedure0:
PS0=4
p.v_value equ esp+PS0+0
MOV eax,[p.v_value]
CDQ
XOR eax,edx
SUB eax,edx
JMP _EndProcedure1
XOR eax,eax
_EndProcedure1:
RET 4
Code: Select all
_Procedure0:
PS0=4
p.v_value equ esp+PS0+0
MOV eax,[p.v_value]
CDQ
XOR eax,edx
SUB eax,edx
RET 4
Code: Select all
_Procedure0:
PS0=4
p.v_value equ esp+PS0+0
MOV eax,[p.v_value]
CDQ
XOR eax,edx
SUB eax,edx
RET 4
XOR eax,eax
_EndProcedure1:
RET 4
Oh in case anyone wonders this is a Abs() routine for longs I use.
Obviously it would be ideal to have the above AbsL() asm fully inline like Abs() currently is
