Mine
public text v1 · immutable; Task: Getting the absolute value of EAX
; Approach 1
cwd ; sign-extend into edx
xor eax, edx ; eax is negated if negative
sub eax, edx ; one is added (-1 is subtracted) to eax
; Approach 2
cwd ; sign-extend into edx
shl edx, 1 ; ensure least significant bit is zero (0->0, -1->-2)
xor eax, edx ; negate eax if it was negative