.title gets .mcall fdof$l,get$ fdof$l ; define fdb offsets locally fdb=2 buf=4 siz=6 ap=%5 gets:: ; entry point mov @fdb(ap),r0 ; FDB address in r0 get$ ,buf(ap),@siz(ap) ; get the record bcs 10$ ; c set => error mov f.nrbd(r0),r0 ; return with byte count in r0 return 10$: mov f.err(r0),r0 ; return with error code in r0 swab r0 ; swap bytes so word is negative return .end