2018-12-12 15:25:04 +01:00
|
|
|
## API List
|
2018-12-09 13:44:32 +01:00
|
|
|
|
2018-12-12 15:25:04 +01:00
|
|
|
APIs given by COS2000 libraries
|
2018-12-09 13:44:32 +01:00
|
|
|
|
|
|
|
|
2018-12-14 01:06:37 +01:00
|
|
|
### LIBSYS
|
|
|
|
|
|
|
|
All fonctions in the "libsys" library.
|
2018-12-09 13:44:32 +01:00
|
|
|
|
2018-12-12 15:25:04 +01:00
|
|
|
------
|
2018-12-09 13:44:32 +01:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
`u32 exit(u32 resultcode);`
|
2018-12-20 16:29:04 +01:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
*Description:End a task for user or kernel domain*
|
2018-12-20 16:29:04 +01:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
* syscall id : **5**
|
|
|
|
* arguments : **1**
|
|
|
|
* * argument 1 : **u32 resultcode** *Code result of the execution*
|
2018-12-20 16:29:04 +01:00
|
|
|
* results : **u32**
|
|
|
|
* dump of register cpu: **no**
|
|
|
|
|
|
|
|
------
|
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
`u32 getticks(void);`
|
2018-12-09 13:44:32 +01:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
*Description:Return the internal value of the timer*
|
2018-12-12 15:25:04 +01:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
* syscall id : **4**
|
|
|
|
* arguments : **0**
|
2018-12-14 01:06:37 +01:00
|
|
|
* results : **u32**
|
2018-12-27 14:24:47 +01:00
|
|
|
* dump of register cpu: **no**
|
2018-12-14 01:06:37 +01:00
|
|
|
|
|
|
|
------
|
|
|
|
|
|
|
|
`u8 waitkey(void);`
|
2018-12-12 17:57:23 +01:00
|
|
|
|
2018-12-14 01:06:37 +01:00
|
|
|
*Description:Wait for user to press a key and return the ascii code pressed*
|
2018-12-12 17:57:23 +01:00
|
|
|
|
|
|
|
* syscall id : **1**
|
2018-12-14 01:06:37 +01:00
|
|
|
* arguments : **0**
|
|
|
|
* results : **u8**
|
|
|
|
* dump of register cpu: **no**
|
|
|
|
|
|
|
|
------
|
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
`u32 testapi(u32 arg1, u32 arg2, u32 arg3);`
|
2018-12-14 01:06:37 +01:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
*Description:Simple function to test if SYSCALL API is correctly running*
|
2018-12-14 01:06:37 +01:00
|
|
|
|
2018-12-27 14:24:47 +01:00
|
|
|
* syscall id : **0**
|
|
|
|
* arguments : **3**
|
|
|
|
* * argument 1 : **u32 arg1** *first argument of your choice*
|
|
|
|
* * argument 2 : **u32 arg2** *second argument of your choice*
|
|
|
|
* * argument 3 : **u32 arg3** *third argument of your choice*
|
2018-12-20 16:29:04 +01:00
|
|
|
* results : **u32**
|
2018-12-27 14:24:47 +01:00
|
|
|
* dump of register cpu: **yes**
|
2018-12-14 01:06:37 +01:00
|
|
|
|
|
|
|
|
|
|
|
### LIBVIDEO
|
|
|
|
|
|
|
|
All fonctions in the "libvideo" library.
|
|
|
|
|
|
|
|
------
|
|
|
|
|
|
|
|
`u32 print(u8* string);`
|
|
|
|
|
|
|
|
*Description:Show a string on the screen*
|
|
|
|
|
|
|
|
* syscall id : **2**
|
2018-12-12 17:57:23 +01:00
|
|
|
* arguments : **1**
|
2018-12-14 01:06:37 +01:00
|
|
|
* * argument 1 : **u8* string** *string to show in ascii format*
|
|
|
|
* results : **u32**
|
|
|
|
* dump of register cpu: **no**
|
|
|
|
|
2018-12-12 17:57:23 +01:00
|
|
|
|