You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
549 B

pseudo code ==> if __value not even or out of range return 0
This code assumes that the two paremeters are passed in R12 and R14
and the return is passed back in R12
.name __even_in_range
bit.b #0, r12 ; //test: __value is even?
jnz NotValid
cmp.b r12, r14 ; // test: __value in range?
jlo Exit
NotValid: ; not valid set r12 = 0 else leave passed paremeter in r12 to be returned
mov.b #0, r12
.global __even_in_range