glosarium asm
enum option_e {
STOP = 'q',
CONTINUE = 'c',
NEW = 'n',
EDIT = 'e',
DELETE = 'd'
}
int main(){
char optionbuf[4];
while(optionbuf[0] != STOP){
scanf("%4s, optionbuf);
if (optionbuf[0] == STOP){
handlestop();
} else if (optionbuf[0] == CONTINUE) {
handleContinue();
} else if (optionbuf[0] == NEW) {
handleEdit();
} else if (optionbuf[0] == EDIT) {
handleDelete();
} else if (optionbuf[0] == DELETE) {
}
}
122c> call 1090 < __isoc99_scanf@plt> : calling 1090 stack address which later contain scanf function
movzx eax, BYTE PTR [rbp-0xc] : moving zero extender at BYTE POINTER with specific address is [rbp-0xc] to eax or al for later. nb: eax is stack execution for processed later
explanation: we grabing a first byte of our input from 1090 via BYTE PTR specificaly [rbp-0xc] and putting to EAX(4byte register in CPU)
cmp al, 0x71 : compare the last significant byte with 0x71
explanation: al is last significant byte of stack execution from eax(4byte cpu register)
jne 1245 <main+0x49> : jump not equal if cmp which here refer from <main+0x49> then we'are going to 1245
1245> movzx eax, BYTE PTR [rbp-0xc] : move this byte again [rbp-0xc] to eax
cmp al, 0x63 : and compare 0x63 with al, which is last significant byte from eax
1245 and 122c is jump table entries
conclusion: many this jump and walk along kan get cache miss instead we can work with case