comparison src/syscall.c @ 34:a7144583914c

fix
author mir3636
date Thu, 14 Feb 2019 23:33:57 +0900
parents 96af12a50fdb
children
comparison
equal deleted inserted replaced
33:7a63dacab7f8 34:a7144583914c
172 proc->cbc_arg.cbc_console_arg.num = num; 172 proc->cbc_arg.cbc_console_arg.num = num;
173 goto (cbccodes[num])(cbc_ret); 173 goto (cbccodes[num])(cbc_ret);
174 } 174 }
175 175
176 176
177 if((num > 0) && (num <= NELEM(syscalls)) && syscalls[num]) { 177 if((num > 0) && (num < NELEM(syscalls)) && syscalls[num]) {
178 ret = syscalls[num](); 178 ret = syscalls[num]();
179 179
180 // in ARM, parameters to main (argc, argv) are passed in r0 and r1 180 // in ARM, parameters to main (argc, argv) are passed in r0 and r1
181 // do not set the return value if it is SYS_exec (the user program 181 // do not set the return value if it is SYS_exec (the user program
182 // anyway does not expect us to return anything). 182 // anyway does not expect us to return anything).