-
- ldy #5
- jsr ldaxysp ; get fd
- jsr fdtoiocb ; convert to iocb
- bmi iocberr
-; asl a ; iocb # --> iocb index
-; asl a
-; asl a
-; asl a
- sta tmp3 ; save it
- ldy #1
- jsr ldaxysp ; get size
- php ; save cond codes, for zero-ness
- stx tmp2
- ldx tmp3 ; iocb
- cpx #$80 ; iocb must be 0...7
- bcs iocberr
- sta ICBLL,x
- lda tmp2 ; size hi
- sta ICBLH,x
- ldy #3 ; get buf addr (was 2 in orig. version)
- jsr ldaxysp
- stx tmp2
- ldx tmp3
- sta ICBAL,x
- lda tmp2
- sta ICBAH,x
- jsr incsp6 ; pop args
- plp
- rts