cmp eax,4 >> eax - 4
SF : signed flag. Tukar jadi satu jika hasil tolak eax dengan 4 bernilai negatif
ZF: zero flag. Tukar jadi satu jika hasil tolak eax dan 4 bernilai 0.
instruction | Zero Flag | Sign Flag | Overflow Flag | | | JG | JE | JL |
---|---|---|---|---|---|---|---|
mov eax, 3 cmp eax,4 | 0 | 1 | 0 | - | - | jump | |
mov eax, 4 cmp eax,4 | 1 | 0 | 0 | - | jump | - | |
mov eax, 5 cmp eax,4 | 0 | 0 | 0 | jump | - | - |
test eax,4 >> bitwise 'AND' antara eax dan 4, Tukar flags SF, ZF, PF, CF, OF
instruction | Zero Flag | Sign Flag | Overflow Flag | | | JG | JE | JL |
---|---|---|---|---|---|---|---|
mov eax, 3 test eax,4 | 1 | 0 | 0 | - | - | jump | |
mov eax, 4 test eax,4 | 0 | 0 | 0 | - | jump | - | |
mov eax, 5 test eax,4 | 0 | 0 | 0 | jump | - | - |
No comments:
Post a Comment
Terima kasih