My uni course requires some basic assembly knowledge... even though I have NONE. However they gave us this sample assembly code:
080485fa <check_pin>:
80485fa: 55 push ebp
80485fb: 89 e5 mov ebp,esp
80485fd: 81 7d 08 bf 07 00 00 cmp DWORD PTR [ebp+0x8],0x7bf
8048604: 0f 94 c0 sete al
8048607: 0f b6 c0 movzx eax,al
804860a: 5d pop ebp
804860b: c3 ret
It is supposed to be more or less equivalent to the following C code:
int check_pin(int pin) {
return pin == 0x7bf;
}
I'm trying to figure out what exactly this assembly code do and I'm dumbfounded by this sete instruction. What does this instruction do?
Wikibooks has a course on x86 assembly, but I was not able to find anything about sete in the chapter devoted to assembly instructions.