1: /* @(#)read.s 2.2 SCCS id keyword */ 2: / C library -- read 3: 4: / nread = read(file, buffer, count); 5: / nread ==0 means eof; nread == -1 means error 6: 7: .globl _read 8: .globl cerror 9: 10: _read: 11: mov r5,-(sp) 12: mov sp,r5 13: mov 4(r5),r0 14: mov 8(r5),-(sp) 15: mov 6(r5),-(sp) 16: sys read+200 17: bec 1f 18: cmp (sp)+, (sp)+ 19: jmp cerror 20: 1: 21: cmp (sp)+, (sp)+ 22: mov (sp)+,r5 23: rts pc