Line 375:
Line 375:
|-
|-
| 0x93 || || ||
| 0x93 || || ||
+
|}
+
+
== Syscalls (via ARM syscall instruction) ==
+
These types of syscalls are created with the ARM syscall instruction. The exception handler is empty and just do nothing and returns. These syscalls are [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/Bgbjhiea.html RealView semihosting operations] that allow communication with a debugger. Currently only syscall 0x04 is still used in production versions of IOSU.
+
+
<source lang="c">
+
MOVS r0, #syscall_number
+
SVC 0xAB
+
</source>
+
+
Register r0 takes the syscall number.
+
Register r1 takes the first parameter.
+
+
{|border=1
+
|-
+
! ID # !! Internal name !! Description !! Return value
+
|-
+
| 0x04 || write(const char *string) || Prints a null-terminated debug message || None
+
|-
+
| 0x05 || || unused ||
+
|-
+
| 0x06 || || unused ||
+
|-
+
| 0x07 || || unused ||
+
|-
+
| 0x08 || || unused ||
+
|-
+
| 0x09 || || unused ||
+
|-
+
| 0x0A || || unused ||
+
|-
+
| 0x0C || || unused ||
+
|-
+
| 0x0D || || unused ||
+
|-
+
| 0x0E || || unused ||
+
|-
+
| 0x0F || || unused ||
+
|-
+
| 0x10 || || unused ||
+
|-
+
| 0x11 || || unused ||
+
|-
+
| 0x12 || || unused ||
+
|-
+
| 0x13 || || unused ||
+
|-
+
| 0x15 || || unused ||
+
|-
+
| 0x16 || || unused ||
+
|-
+
| 0x30 || || unused ||
+
|-
+
| 0x31 || || unused ||
|}
|}