For each I/O request, the IOS determines which drivers to call and in what order to call them by using the calldown chain in the given DCB. Initially, the IOS sets the IOP_calldown_ptr member in the IOP structure to the address of the first entry in the calldown chain. Each driver in the chain is responsible for updating this member by setting it to the address of the next entry in the chain. A driver updates this member by adding the size, in bytes, of an DCB_cd_entry member to the value of IOP_calldown_ptr. After updating, the current driver calls the next driver in the chain by pushing the address of the IOP on the stack and calling the next driver's entry point:
;increment to next calldown entry add [ebx].IOP_calldown_ptr, size DCB_cd_entry mov eax, [ebx].IOP_calldown_ptr ; get call down address push edi ; place *IOP on stack call [eax].DCB_cd_io_address ; call next layer add esp, 4 ; restore stack
See also DCB, DCB_cd_entry, IOP