Skip to content

Files

Latest commit

Jul 20, 2017
f4c361e · Jul 20, 2017

History

History
23 lines (10 loc) · 511 Bytes

File metadata and controls

23 lines (10 loc) · 511 Bytes

Question 12

What is the program return code?

Answer

The return code (or exit status) of a program is a number it returns to signify its execution status. If it executed correctly, the convention is to return 0. Otherwise, we return an error code. It is a programmer's responsibility to map these codes to abnormal situations in the code.

The assembly programs return the exit status by passing it to the exit system call as its first argument (in rdi).

prev +++ next