Libraries

Description

The OSDK contains a decently complete standard library, and also some Oric specific functionalities.

Most other SDK are based on binary library files, and the right functions are included in the final executable during the link phase. This SDK works differently because the library is made of source code that is included in the main program by the linker before the final assembly pass.

This method is interesting because it's possible to easily add functions, and correct bugs.

Include folder

The OSDK\INCLUDE folder contains all the header files. If you add a function in the library, you will have to add a function declaration in one of the header files. LIB.H is a good choice for that operation.

LIB folder

The OSDK\LIB folder contains a bunch of assembly code source file, as well as a LIBRARY.NDX file.

The LIBRARY.NDX file simply is a list of all source files with the exported functions it contains.

The source files simply are normal assembly code functions and declarations. Please note that only function that starts by a underscore ("_") symbol will be accessible from C source code.



Known issues


Reported by RetrOric the Fri 1st February 2019


Issue #31: OSDK libraries should be system agnostic
Details: At the moment the OSDK libraries only work with 1.1 ROM, running programms that call the ROM will crash on Oric 1 or Telestrat. It would be nice to have some form of compatibility. (See: topic)


Reported by Waskol the Sun 2nd September 2018


Issue #26: Random generator conflicts
Details: When including lib.h, two defines exposing the 32 bit random generator conflicts with the RND function from the ROM, resulting in corrupted results. (See: topic)


Reported by Waskol the Tue 28th August 2018


Issue #28: Additional BASIC functions
Details: Some users would like to have additional functions, similar to BASIC, like PLOT, SCRN, etc... added to the OSDK. (See: topic)




Resolved issues


Reported by RetrOric the Fri 15th February 2019
Fixed in OSDK 1.15


Issue #32: Syntax error in include/sys/sound.h
Details: The "#define NOTE_C-SHARP 2" uses an invalid "-" symbol that does not compile, should have been an underscore instead.


Reported by Badger the Tue 28th August 2018
Fixed in OSDK 1.13


Issue #29: Link error when calling the Sedoric function
Details: For some reason calling the Sedoric() function results in a link error. (See: topic)


Reported by Fra the Sat 21st July 2018
Fixed in OSDK 1.12


Issue #24: scanf and sscanf do not assemble correctly
Details: When trying to use the 'scanf' functions from the OSDK libraries, XA complains with multiple syntax errors.


comments powered by Disqus
Coverity Scan Build Status
History
Version 1.14
  • Fixed a problem with itoa not correctly processing negative numbers (the '-'' was overwritten by the number printing routine). Also took the opportunity to optimize the code (removed the jsr itoa / rts as well as an unnecessary x register clearing (it's set to zero when we are back from udiv10)
  • Added support for %u to printf