Linux provides two system calls to create and remove a directory. Details about these
system calls are given below:
System call 39 — Creates a directory
Inputs: EAX = 39
EBX = path
ECX = permissions
Returns: EAX = 0 if no error
Error: EAX = error code
This function creates the directory given in the path (a pointer to a character string like
the filenames). For details on permissions, see our discussion for the file-create system
call. If the call is successful, it returns 0 in EAX. Otherwise, it returns an error code as
in other system calls.
The system call to remove a directory is similar (it does not require permissions):
System call 40 — Removes a directory
Inputs: EAX = 40
EBX = path
Returns: EAX = 0 if no error
Error: EAX = error code
Write two procedures: one to create and the other to remove a directory. Each procedure
takes a pointer to a path and creates the directory. (The create directory procedure uses
default permissions.) You should also write a main program to test the procedure.
Devise suitable error reporting mechanism (see the last ).