{"id":421,"date":"2012-01-17T18:57:30","date_gmt":"2012-01-18T00:57:30","guid":{"rendered":"http:\/\/tommysprinkle.com\/txxos\/?p=421"},"modified":"2021-04-17T18:19:52","modified_gmt":"2021-04-17T23:19:52","slug":"operator-console","status":"publish","type":"post","link":"https:\/\/tommysprinkle.com\/txxos\/?p=421","title":{"rendered":"Operator Console"},"content":{"rendered":"<p>Now that we have the ability to perform I\/O we can think about communicating with a device. \u00a0We will start with the beginnings of an operator console. \u00a0We will use a locally attached 3270 device as the our console. \u00a0We will need to have a UCB defined for the device.<\/p>\n<p>To begin we will start with providing the ability to write to the console. \u00a0To do this we need to define two new control blocks. \u00a0The first is the Console Communication Block (CCB) and the other is the Console Message Buffer (CMB).<\/p>\n<p>The CCB defines a console and is the anchor for the console buffers.<\/p>\n<pre>@CCB     DSECT ,                  CONSOLE COMMUNICATIONS BUFFER \r\nCCBNEXT  DS    A                  NEXT CONSOLE                  \r\nCCBMBQ   DS    A                  MESSAGE BUFFER QUEUE          \r\nCCBFMQ   DS    A                  FREE MESSAGE QUEUE            \r\nCCBECB   DS    F                  MESSAGE AVAILABLE ECB         \r\nCCBDEV   DS    XL2                CONSOLE DEVICE ADDRESS        \r\nCCBQLEN  DS    XL2                QUEUE LENGTH<\/pre>\n<p>It begins with a pointer to the next CCB but for now we will only support one console. CCBMBQ points to Console Message Buffers (CMB&#8217;s) that are queued to the console. The CMB&#8217;s contain the message text to be written to the console. CCBFMQ is a queue of free message buffers for the console. When a message is queued to the console a free buffer is removed from the free buffer queue and added to the message buffer queue. CCBECB is an ECB that will be posted when a message is placed on the message queue. CCBDEV is the device address of the console. CCBQLEN is the total number of message buffers allocated to the console.<\/p>\n<pre>@CMB     DSECT ,                  CONSOLE COMMUNICATIONS BUFFER \r\nCMBNEXT  DS    A                  NEXT BUFFER                   \r\nCMBTEXT  DS    CL79               TEXT                          \r\nCMBFLAG  DS    X                  FLAG<\/pre>\n<p>The Console Message Buffer consists of a pointer to the next buffer on the queue. We allow for a message length of 79 bytes.<\/p>\n<p>We define the CCB and CMB&#8217;s in module TXXCCB. \u00a0We will define the message buffers in this module.<\/p>\n<pre>000000                                1 TXXCCB   CSECT ,\r\n                                      2          @CCB  DSECT=N,DEV=010.\r\n000000                                3+CCB010   DS    0F \r\n000000 00000000                       4+         DC    A(0)\r\n000004 00000000                       5+         DC    A(0)\r\n000008 00000014                       6+         DC    A(@M0101)\r\n00000C 00000000                       7+         DC    F'0'\r\n000010 0010                           8+         DC    XL2'010'\r\n000012 0040                           9+         DC    AL2(64)\r\n                                     10+*\r\n000014 0000006840404040              12+@M0101   DC     A(@M0102),CL79' ',X'00'\r\n000068 000000BC40404040              13+@M0102   DC     A(@M0103),CL79' ',X'00'\r\n                              .\r\n                              .\r\n                              .\r\n00146C 000014C040404040              74+@M01063  DC     A(@M01064),CL79' ',X'00' \r\n0014C0 0000000040404040              75+@M01064  DC     A(@M01065),CL79' ',X'00'\r\n                            00000    76+@M01065  EQU    0\r\n                                     77          END   ,<\/pre>\n<p>Here is the assembly listing for TXXCCB which is the expansion of the @CCB macro. \u00a0We define 64 message buffers and they are all placed on the free buffer queue.<\/p>\n<p>[Next &#8211; ]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that we have the ability to perform I\/O we can think about communicating with a device. \u00a0We will start with the beginnings of an operator console. \u00a0We will use a locally attached 3270 device as the our console. \u00a0We &hellip; <a href=\"https:\/\/tommysprinkle.com\/txxos\/?p=421\">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-421","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1CPQT-6N","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/421","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=421"}],"version-history":[{"count":3,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions"}],"predecessor-version":[{"id":423,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/421\/revisions\/423"}],"wp:attachment":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}