The “close” system call is used to sever explicitly the connection between a user program and a file and thus can be regarded as the inverse of “open”.
The user program’s file identification is passed via r0. The value is validated by “getf” (6619), the “u.u_ofile” entry is erased, and a call is made on “closef”.