I see the reason in your example, I ended up storing the IOCB in a location, there is a routine for getting the iocb from descriptor:
;setscreen fd - file descriptor for screen
.proc __setscreen
jsr fdtoiocb
sta SIOCB
rts
.endproc
SIOCB: .byte $00
that means either to drag it as parameter or call as a set method:
int fd = _graphics(8);
_setscreen(fd);
I wonder if this is needed at all or cc65 can just guarantee channel 6