Arithmetic overflow is not detected because C does not provide any way of detecting integer overflow. On many computers, keyboard input is not passed directly to the executing program. Instead, it is buffered, and corrected according to backspacing, echoed on the screen, and when the return (or enter) key is pressed, then it is passed to the executing program. This is a problem for us because an INP instruction is supposed to input one character straight from the keyboard. It is not supposed to be automatically sent to the screen (but you can choose to do so with an OUT instruction). And then the next INP instruction will unfortunately get the return (or enter) character that was just meant to cause the previous character to be sent on to the program. The UNIX operating system has a command stty to change this. So in ax.c the following three lines appear near the end of the program: system("stty cbreak -echo"); execute (trace); system("stty -cbreak echo"); In the first line, cbreak means send the input directly to the program without buffering, and -echo means turn off echoing the input on the screen. After execution, the third line puts things back the way they were. If you are not using UNIX or a version of UNIX (like LINUX), the two system lines must be changed for the operating system you are using. Or, you can just delete them and live with the input problem. There are 3 other lines specific to UNIX. #include void finish (int i) {system("stty -cbreak echo"); exit(0);} signal(SIGINT, finish); Their purpose is as follows. If your program goes into an infinite loop you need to interrupt it (that's control-C on UNIX), but before quitting you want to execute system("stty -cbreak echo"); so that afterward anything you type on the keyboard will be echoed and correctable.