Skip to content

ABI

ABI

Interface between User Programs and Kernel

Defines - - Machine model - Logical division of memory - File format - Low level system call interface - Low level runtime library interface (provides a layer of abstraction between the low level system call interface and the application program by providing a unified interface for the system calls.)

Virtual Address Space Model

X_LSIZE = 1024 words X_HSIZE = 1024 words X_CSIZE = 2048 words X_SSIZE = 1024 words

eXpOS provides a library that provides a unified interface for system calls and dynamic memory allocation and deallocation routines, which is pre-loaded into memory at the time of OS startup.

Pasted image 20251209030103.png

XEXE Executable File Format

Pasted image 20251209030128.png

Pasted image 20251209030133.png

Maximum size of the file is 2048 words

XMAGIC - Number indicating the type of executable file. All XEXE files will have magic number 0.

Entry point - Virtual address in memory of the first instruction to be executed.

Text Size, Data Size, Heap Size and Stack size indicates the sizes of Text, Data, Heap and Stack regions to be allocated by the OS loader when the file is loaded for execution.

If the Runtime Library must be included when the file is loaded, the Library Flag is set to 1 in the executable file.

The data region is stored within the stack region, meaning that global values are stored in stack as well, ignoring the data size

The eXpOS loader does not guarentee that the values of SP and BP be initialized to these values, must be specified within the code

Low Level System Call Interface

  • Before the system call, the stack must be set up with the arguments
  • After the system call, the return value be be retrieved from the stack