2 ; common iocb setup routine for read, write
3 ; expects __fastcall__ parameters (int fd, void *buf, int count)
15 pha ; push size in stack
18 jsr popax ; get buffer address
22 jsr popax ; get handle
23 jsr fdtoiocb ; convert to iocb
24 bmi iocberr ; negative (X=$FF or A>$7F) on error.
34 ora ICBLH,x ; returns Z if length is 0
41 ldx #$FF ; indicate error + clear ZF