{"id":45,"date":"2011-06-17T09:29:24","date_gmt":"2011-06-17T14:29:24","guid":{"rendered":"http:\/\/tommysprinkle.com\/txxos\/?p=45"},"modified":"2021-04-17T18:32:05","modified_gmt":"2021-04-17T23:32:05","slug":"input-output-basics","status":"publish","type":"post","link":"https:\/\/tommysprinkle.com\/txxos\/?p=45","title":{"rendered":"Input Output Basics"},"content":{"rendered":"<p>I\/O operations on S\/370 are used to transfer information to and from I\/O devices which are attached to channels.\u00a0 There are many types of I\/O devices including card readers, card punches, printers,\u00a0 tape devices, terminals and disk storage devices.<\/p>\n<p>A channel attached device can be thought of as a very simple computer that uses a very limited programming language.\u00a0 The programming instructions are called Channel Command Words (CCW).\u00a0 A CCW indicates the operation to be performed (such as read a card or print a line), the data location in the processor memory and the length of the data operation.\u00a0 In addition there are some flags that may be set in the CCW to further indicate how to execute the requested operation.<\/p>\n<p>Each individual device type has a set of commands that it will respond to.\u00a0 An invalid command will result in an execution error of the channel program.\u00a0 When writing channel programs it is necessary to know the programming specifications for each specific device being used.<\/p>\n<p>An I\/O operation is initiated by building a channel program consisting of one or more CCWs.\u00a0 The address of the channel program is placed in a fixed position in low storage called the Channel Address Word (CAW).\u00a0 An I\/O operation is initiated using the Start I\/O (SIO) instruction. This instruction along with all other I\/O commands can only be executed when operating in privileged mode.<\/p>\n<p>When the channel program is complete an I\/O interrupt will be generated if interrupts are enabled.\u00a0 If interrupts are disabled for the device, the interrupt will be queued.\u00a0 A queued I\/O interrupt can be cleared either by enabling interrupts or using the Test I\/O (TIO) instruction.<\/p>\n<p>When the pending I\/O interrupt condition for a device is cleared the Channel Status Word (CSW) in low storage will be updated providing information on the completion status of the I\/O operation.<\/p>\n<p><a title=\"Channel Command Word\" href=\"http:\/\/tommysprinkle.com\/txxos\/?p=47\">[Next &#8211; Channel Command Word]<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I\/O operations on S\/370 are used to transfer information to and from I\/O devices which are attached to channels.\u00a0 There are many types of I\/O devices including card readers, card punches, printers,\u00a0 tape devices, terminals and disk storage devices. A &hellip; <a href=\"https:\/\/tommysprinkle.com\/txxos\/?p=45\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"template-page-builder-no-sidebar.php","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-45","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1CPQT-J","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/45","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45"}],"version-history":[{"count":5,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions"}],"predecessor-version":[{"id":535,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/45\/revisions\/535"}],"wp:attachment":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}