{"id":366,"date":"2012-01-09T13:13:38","date_gmt":"2012-01-09T19:13:38","guid":{"rendered":"http:\/\/tommysprinkle.com\/txxos\/?p=366"},"modified":"2021-04-17T18:21:44","modified_gmt":"2021-04-17T23:21:44","slug":"txxgmain-txxfmain-and-txxabend","status":"publish","type":"post","link":"https:\/\/tommysprinkle.com\/txxos\/?p=366","title":{"rendered":"TXXGMAIN, TXXFMAIN and TXXABEND"},"content":{"rendered":"<p>For now we just need something very simple for Getmain, Freemain and Abend processing. \u00a0This code will need to be updated but this will allow us to IPL and do some initial testing.<\/p>\n<pre>000000                                1 TXXGMAIN CSECT ,\r\n                            00000     2          USING TXXGMAIN,R15\r\n                                      3 *\r\n000000 5410 F030      00030           4          N     R1,=A(X'00FFFFFF')   CLEAN UP LENGTH\r\n000004 4110 1007      00007           5          LA    R1,7(,R1)            ROUND UP TO DOUBLE WORD\r\n000008 5410 F034      00034           6          N     R1,=A(X'00FFFFF8')\r\n                                      7 *\r\n00000C 5800 F01C      0001C           8          L     R0,COREPTR\r\n000010 1B01                           9          SR    R0,R1\r\n000012 1810                          10          LR    R1,R0\r\n000014 5010 F01C      0001C          11          ST    R1,COREPTR\r\n000018 1FFF                          12          SLR   R15,R15\r\n00001A 07FE                          13          BR    R14\r\n                                     14 *\r\n00001C 00100000                      16 COREPTR  DC    A(1024*1024)       1M<\/pre>\n<p>Getmain will round the requested length up to a double word value. \u00a0For now we will simply start at the 1 Meg mark and work backwards. \u00a0No attempt will be made to reuse memory when it is released via a Freemain. \u00a0This will allow us to IPL and run for a little while before we eventually start overlaying or Nucleus code.<\/p>\n<pre>000000                                1 TXXFMAIN CSECT ,\r\n                            00000     2          USING TXXFMAIN,R15\r\n000000 07FE                           3          BR    R14                RETURN TO CALLER<\/pre>\n<p>The Freemain routine is very simple. \u00a0It simply returns to the caller.<\/p>\n<pre>000000                                1 TXXABEND CSECT ,\r\n                            00000     2          USING TXXABEND,R15\r\n000000 8200 F008      00008           3          LPSW  ERRPSW\r\n000008                                4          DS    0D\r\n000008 00020000000BAD01               5 ERRPSW   DC    AL1(0,2,0,0),A(X'BAD01')<\/pre>\n<p>The Abend routine will simply load a wait state PSW.<\/p>\n<p>Although the code in these routines is not very robust it now gives us everything we need to link edit the Nucleus and IPL.<\/p>\n<p>[Next &#8211; <a title=\"Adding Some (Useful) Work To TXXDINIT\" href=\"http:\/\/tommysprinkle.com\/txxos\/?p=369\">Adding Some (Useful) Work To TXXDINIT<\/a>]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For now we just need something very simple for Getmain, Freemain and Abend processing. \u00a0This code will need to be updated but this will allow us to IPL and do some initial testing. 000000 1 TXXGMAIN CSECT , 00000 2 &hellip; <a href=\"https:\/\/tommysprinkle.com\/txxos\/?p=366\">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-366","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1CPQT-5U","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/366","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=366"}],"version-history":[{"count":4,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/366\/revisions"}],"predecessor-version":[{"id":474,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=\/wp\/v2\/posts\/366\/revisions\/474"}],"wp:attachment":[{"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=366"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=366"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tommysprinkle.com\/txxos\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=366"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}