marmakoide
Still Fresh
Hi everybody
I made for my personal use a little C library, in the spirit of the Rlyeh lib : no C standard lib, simple memory management withou mallocs. But I still need to speak a little bit with Linux. Currently, I ripped an assembler source code from Dzzz tutorials. Here it is the beast, syscall.s
Now, I want to add some calls, as the read call to load something like PNG pictures or scripts. Where I can find the information to fill my file syscall with more calls ?
I made for my personal use a little C library, in the spirit of the Rlyeh lib : no C standard lib, simple memory management withou mallocs. But I still need to speak a little bit with Linux. Currently, I ripped an assembler source code from Dzzz tutorials. Here it is the beast, syscall.s
Code:
#
# GP2X Linux system calls
#
.align 4
.globl open
.globl close
.globl munmap
.globl chdir
.globl exec
.globl mmap
open:
swi #0x900005
mov pc, lr
close:
swi #0x900006
mov pc, lr
munmap:
swi #0x90005B
mov pc, lr
chdir:
swi #0x90000C
mov pc, lr
exec:
swi #0x90000B
mov pc, lr
mmap:
stmdb sp!, {r0, r1, r2, r3}
mov r0, sp
swi #0x90005A
add sp, sp, #16
mov pc, lr
Now, I want to add some calls, as the read call to load something like PNG pictures or scripts. Where I can find the information to fill my file syscall with more calls ?