The Court of Criminal Appeals, the District Courts, the County Courts, or any Judge of said Courts, have power to issue the writ of habeas corpus; and it is their duty, upon proper motion, to grant the writ under the rules prescribed by law.Acts 1965, 59th Leg., vol. 2, p. 317, ch. 722.