Create system.c

This will implement the api from "api/system.h"