1 # xstormy16 system calls for the simulator
11 bnz r1,#0,syscall_error
13 0: .size exit,0b-_exit
19 bnz r1,#0,syscall_error
21 0: .size open,0b-_open
27 bnz r1,#0,syscall_error
29 0: .size close,0b-_close
35 bnz r1,#0,syscall_error
37 0: .size read,0b-_read
43 bnz r1,#0,syscall_error
45 0: .size write,0b-_write
51 bnz r1,#0,syscall_error
53 0: .size lseek,0b-_lseek
59 bnz r1,#0,syscall_error
61 0: .size unlink,0b-_unlink
67 bnz r1,#0,syscall_error
69 0: .size getpid,0b-_getpid
75 bnz r1,#0,syscall_error
77 0: .size kill,0b-_kill
83 bnz r1,#0,syscall_error
85 0: .size fstat,0b-_fstat
91 bnz r1,#0,syscall_error
93 0: .size chdir,0b-_chdir
99 bnz r1,#0,syscall_error
101 0: .size stat,0b-_stat
107 bnz r1,#0,syscall_error
109 0: .size chmod,0b-_chmod
115 bnz r1,#0,syscall_error
117 0: .size utime,0b-_utime
123 bnz r1,#0,syscall_error
125 0: .size time,0b-_time
129 mov r1,#SYS_gettimeofday
131 bnz r1,#0,syscall_error
133 0: .size gettimeofday,0b-_gettimeofday
139 bnz r1,#0,syscall_error
141 0: .size times,0b-_times
147 bnz r1,#0,syscall_error
149 0: .size link,0b-_link
152 # Return value for the syscall is in r2. Save it here, as
153 # _errno will overwrite it with the address of the errno
154 # variable. r0 is the errno.
162 0: .size syscall_error,0b-syscall_error