Statistics

Members: 1925
News: 293
Web Links: 1
Visitors: 3830360

Who's Online

Damn Vulnerable LinuxDamn Vulnerable Linux (DVL) is a Linux-based (modified Damn Small Linux) tool for IT-Security & IT-Anti- Security and Attack & Defense. [CLICK HERE FOR MORE INFOS! ]

Featured Conference Video

T16-Recon2006-Joe_Stewart-OllyBonE.gif OllyBone - Semi-Automatic Unpacking on IA-32. View the conference video here!
Home
Absolute Value
User Rating: / 0
PoorBest 
Written by Laura Fairhead   


The Challenge
-------------
Find the absolute value of a register in only 4 bytes.

The Solution
------------
 
        NEG AX
        JL SHORT $-4

This was not completely my original idea (is there such thing??); I
found a similar sequence which used the more obvious branch 'JS'. The
JS had the problem that it goes into an infinite loop if AX=08000h.