old-MTGos-old/user/3ds/syscall.S

46 lines
876 B
ArmAsm
Raw Normal View History

2016-06-28 09:32:24 +00:00
.global screenout_init
// void * screenout_init(int err);
screenout_init:
2016-07-24 10:21:12 +00:00
stmdb sp!, {r0} //r0 is err
mov r0, #0
svc #0 //Only one svc
sub sp, #4
bx lr
2016-06-28 09:32:24 +00:00
.global screenout_out
// void * screenout_out(void* handle, char *str);
screenout_out:
2016-07-24 10:21:12 +00:00
stmdb sp!, {r1} // R1 is str
mov r1, r0 //R0 is handle
mov r0, #1
svc #0
add sp, #4
bx lr
2016-06-28 09:32:24 +00:00
.global screenout_clear
// void * screenout_clear(void* handle);
screenout_clear:
2016-07-24 10:21:12 +00:00
mov r1, r0
mov r0, #2
svc #0
bx lr
2016-06-28 09:32:24 +00:00
.global screenout_setcolor
// void * screenout_setcolor(void* handle, uint32_t BG, uint32_t FG)
screenout_setcolor:
2016-07-24 10:21:12 +00:00
stmdb sp!, {r1, r2}
mov r1, r0
mov r0, #3
svc #0
add sp, #8
bx lr
2016-06-28 09:32:24 +00:00
.global screenout_destroy
// void * screenout_destroy(void * handle)
screenout_destroy:
2016-07-24 10:21:12 +00:00
mov r1, r0
mov r0, #0x10000
sub r0, #1
svc #0
bx lr