diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-07-05 02:34:11 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-07-05 02:34:11 +0200 |
| commit | beb76e4dd362374b8f42cd971d394bba1074cd8d (patch) | |
| tree | 3ea4cc342737afb9225c01160c92647ba66c78bd /libpsn00b/psxapi/stdio.S | |
| parent | 5d9aa2d3dfc7d6e51c2eb942ab4cdbae5571a40a (diff) | |
| download | psn00bsdk-fix-include.tar.gz | |
Replace .include with #includefix-include
For some reason, both mipsel-unknown-elf-gcc 8.2.0 and mipsel-non-elf
15.1.0 were unable to resolve .include assembler directives.
As a workaround, it is still possible to use the preprocessor, and
therefore the usual #include preprocessor directive. However, this
requires the assembly files to use the uppercase .S file extension.
Diffstat (limited to 'libpsn00b/psxapi/stdio.S')
| -rw-r--r-- | libpsn00b/psxapi/stdio.S | 140 |
1 files changed, 140 insertions, 0 deletions
diff --git a/libpsn00b/psxapi/stdio.S b/libpsn00b/psxapi/stdio.S new file mode 100644 index 0000000..14c6d03 --- /dev/null +++ b/libpsn00b/psxapi/stdio.S @@ -0,0 +1,140 @@ +# PSn00bSDK BIOS API stubs +# (C) 2022 spicyjpeg - MPL licensed + +# This file has been generated automatically. Each function is placed in its +# own section to allow the linker to strip unused functions. + +.set noreorder + +## A0 table functions (14) + +.section .text.open +.global open +.type open, @function +open: + li $t2, 0xa0 + jr $t2 + li $t1, 0x00 + +.section .text.lseek +.global lseek +.type lseek, @function +lseek: + li $t2, 0xa0 + jr $t2 + li $t1, 0x01 + +.section .text.read +.global read +.type read, @function +read: + li $t2, 0xa0 + jr $t2 + li $t1, 0x02 + +.section .text.write +.global write +.type write, @function +write: + li $t2, 0xa0 + jr $t2 + li $t1, 0x03 + +.section .text.close +.global close +.type close, @function +close: + li $t2, 0xa0 + jr $t2 + li $t1, 0x04 + +.section .text.ioctl +.global ioctl +.type ioctl, @function +ioctl: + li $t2, 0xa0 + jr $t2 + li $t1, 0x05 + +.section .text.isatty +.global isatty +.type isatty, @function +isatty: + li $t2, 0xa0 + jr $t2 + li $t1, 0x07 + +.section .text.getc +.global getc +.type getc, @function +getc: + li $t2, 0xa0 + jr $t2 + li $t1, 0x08 + +.section .text.putc +.global putc +.type putc, @function +putc: + li $t2, 0xa0 + jr $t2 + li $t1, 0x09 + +.section .text.getchar +.global getchar +.type getchar, @function +getchar: + li $t2, 0xa0 + jr $t2 + li $t1, 0x3b + +.section .text.putchar +.global putchar +.type putchar, @function +putchar: + li $t2, 0xa0 + jr $t2 + li $t1, 0x3c + +.section .text.gets +.global gets +.type gets, @function +gets: + li $t2, 0xa0 + jr $t2 + li $t1, 0x3d + +.section .text.puts +.global puts +.type puts, @function +puts: + li $t2, 0xa0 + jr $t2 + li $t1, 0x3e + +.section .text.printf +.global printf +.type printf, @function +printf: + li $t2, 0xa0 + jr $t2 + li $t1, 0x3f + +## B0 table functions (2) + +.section .text._get_errno +.global _get_errno +.type _get_errno, @function +_get_errno: + li $t2, 0xb0 + jr $t2 + li $t1, 0x54 + +.section .text._get_error +.global _get_error +.type _get_error, @function +_get_error: + li $t2, 0xb0 + jr $t2 + li $t1, 0x55 + |
