CS208 Introduction to Computer Systems Monday, 19 February 2024 + Questions about the homework - When you provide your input string, where is it going? cat ctarget.phase1 | ./hex2raw > ctarget.phase1.raw ./ctarget < ctarget.phase1.raw + Questions for you - What does callq do, exactly? - What does retq do, exactly? - What does pushq do? - What does popq do? + Misc experiments - Where do local variables go on the stack? - Can I overflow a buffer to corrupt another variable? - How do char array initializations get performed? - ... + A few Unix concepts - stdout ("standard output") a stream where the output from a command goes printf sends bytes to standard output putchar sends one byte to standard output fprintf(stdout,...) sends bytes to stdout etc. by default, stdout is opened when you launch a command by default, stdout is attached to your terminal screen you can change what stdout is attached to with | or > - stdin ("standard input") a stream where input to a command appears scanf reads from stdin fscanf(stdin,...) reads from stdin getchar reads from stdin by default, stdin is attached to the keyboard - Users - Groups - File permissions - Directory permissions - Processes