The CLI (Command Line Utility) is a simple userspace application that not only demonstrates how to build an application that IMP OS can load and run, but serves as the default (first) application that IMP OS runs after initialisation, allowing for a simple interface that allows the user to request other programs be loaded and run.

CLI references the IMP OS Standard Library, which enables the code to gain access to the SVC (SWI) facilities of the kernel. This allows CLI to invoke the kernel’s OS_ProcessBegin functionality. The end result is a main() function for CLI that simply – and repeatedly – requests the name of the application to be loaded and run, before appending “.bin” to the program name and using the kernel to request that the relevant application binary be loaded into memory and run.

Using the Standard Library

It is important to recognise that CLI requires access to the Standard Library in order to be compiled successfully and do its job. The ext/stdlib folder within the repository contains a default copy of the (at the time) Standard Library header files and library (.a) file (which allow the C compiler to do its job).

Therefore, if the Standard Library itself is updated, these reference copies of the Standard Library files (both .h and .a files) will require refreshing, to ensure that CLI is being compiled correctly against the latest version of the Standard Library.