Jump to content
Tuts 4 You

Need Quick Help With Asm Code


The Old Pirate

Recommended Posts

The Old Pirate
Posted (edited)
mov al, byte ptr ds:[address1]
not al
mov byte ptr ds:[address1], al
cmp al, 255
je address2

How to enshorten this code? Or any other way?

Edited by The Old Pirate
Posted

cmp al, 255 ????

Posted

try

not byte ptr ds:[address1]

cmp byte ptr ds:[address1], 0FFh

je address2

Note that al is not modified at all by this code

Ziggy

The Old Pirate
Posted

Thanks. AL doesn't matter, the point is to make other condition for the jump in each pass.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...