A surgical apparatus, comprising: (a) a body assembly, wherein the body assembly comprises: (i) a rotary drive output, (ii) a linear drive output, and (iii) a control module; (b) a shaft assembly (500, 600, 700), wherein the shaft assembly comprises: (i) a distal end, wherein the distal end includes a type of end effector (502, 602, 702) configured to operate on tissue, and (ii) a proximal end, wherein the proximal end is configured to removably couple with the body assembly, wherein the proximal end comprises one or both of: a rotary drive input (608, 710) configured to couple with the rotary drive output, or a linear drive input (508, 708) configured to couple with the linear drive output, wherein the shaft assembly is configured to actuate the end effector in response to movement of one or both of the rotary drive input or the linear drive input; wherein the control module is configured to selectively actuate the rotary drive output or the linear drive output based on the type of end effector of the shaft assembly, wherein the body assembly further comprises a first rotary motor, wherein the rotary motor is operable to drive one or both of the rotary drive output or the linear drive output, wherein the body assembly further comprises a transmission assembly, wherein the transmission assembly is operable to switch between a first state and a second state, wherein the transmission assembly is configured to couple the first rotary motor with the rotary drive output in the first state, wherein the transmission assembly is configured to couple the first rotary motor with the linear drive output in the second state, characterized in that the transmission assembly is further operable to switch to a third state, wherein the transmission assembly is configured to couple the first rotary motor with both the rotary drive output and the linear drive output in the third state. (a) a body assembly, wherein the body assembly comprises: (i) a rotary drive output, (ii) a linear drive output, and (iii) a control module; (i) a rotary drive output, (ii) a linear drive output, and (iii) a control module; (b) a shaft assembly (500, 600, 700), wherein the shaft assembly comprises: (i) a distal end, wherein the distal end includes a type of end effector (502, 602, 702) configured to operate on tissue, and (ii) a proximal end, wherein the proximal end is configured to removably couple with the body assembly, wherein the proximal end comprises one or both of: a rotary drive input (608, 710) configured to couple with the rotary drive output, or a linear drive input (508, 708) configured to couple with the linear drive output, wherein the shaft assembly is configured to actuate the end effector in response to movement of one or both of the rotary drive input or the linear drive input; wherein the control module is configured to selectively actuate the rotary drive output or the linear drive output based on the type of end effector of the shaft assembly, wherein the body assembly further comprises a first rotary motor, wherein the rotary motor is operable to drive one or both of the rotary drive output or the linear drive output, wherein the body assembly further comprises a transmission assembly, wherein the transmission assembly is operable to switch between a first state and a second state, wherein the transmission assembly is configured to couple the first rotary motor with the rotary drive output in the first state, wherein the transmission assembly is configured to couple the first rotary motor with the linear drive output in the second state, characterized in that the transmission assembly is further operable to switch to a third state, wherein the transmission assembly is configured to couple the first rotary motor with both the rotary drive output and the linear drive output in the third state. (i) a distal end, wherein the distal end includes a type of end effector (502, 602, 702) configured to operate on tissue, and (ii) a proximal end, wherein the proximal end is configured to removably couple with the body assembly, wherein the proximal end comprises one or both of: a rotary drive input (608, 710) configured to couple with the rotary drive output, or a linear drive input (508, 708) configured to couple with the linear drive output, wherein the shaft assembly is configured to actuate the end effector in response to movement of one or both of the rotary drive input or the linear drive input; wherein the control module is configured to selectively actuate the rotary drive output or the linear drive output based on the type of end effector of the shaft assembly, wherein the body assembly further comprises a first rotary motor, wherein the rotary motor is operable to drive one or both of the rotary drive output or the linear drive output, wherein the body assembly further comprises a transmission assembly, wherein the transmission assembly is operable to switch between a first state and a second state, wherein the transmission assembly is configured to couple the first rotary motor with the rotary drive output in the first state, wherein the transmission assembly is configured to couple the first rotary motor with the linear drive output in the second state, characterized in that the transmission assembly is further operable to switch to a third state, wherein the transmission assembly is configured to couple the first rotary motor with both the rotary drive output and the linear drive output in the third state. a rotary drive input (608, 710) configured to couple with the rotary drive output, or a linear drive input (508, 708) configured to couple with the