mainframed767 icon

CALC.EXE

mainframed767 | PRO | 03/20/18 05:11:07 PM UTC | 0 ⭐ | 629 👁️ | Never ⏰ | []
text |

8.41 KB

|

None

|

0 👍

/

0 👎

CLR70    TITLE 'C L E A R - TSO'                                        00050000
         PRINT ON,DATA,GEN                                              00060000
CLEAR    CSECT                                                          00070000
*         SETUP registers and save areas thanks @bigendiansmalls      * 00080000
MAIN     STM   14,12,12(13)    # Save caller reg                        00090000
         LR    8,15            # Base register                          00100000
         USING MAIN,8          # R8 for addressability                  00110000
         GETMAIN RU,LV=72      # for our savearea                       00120000
         ST    13,4(,1)        # Store Caller's SA address              00130000
         ST    1,8(,13)        # Put my SA addr in caller's SA          00140000
         LR    13,1            # R13 has addr of our SA                 00150000
         DS    0H              # halfword boundaries                    00160000
* Let the fun Begin!                                                  * 00170000
* YREGS sets R0 through R15, it is in SYS1.MACLIB                       00180000
         YREGS                                                          00190000
* GTSIZE checks your terminal and sets R0 to the screen width and R0 to 00200000
* the height, also in SYS1.MACLIB                                       00210000
         GTSIZE                                                         00220000
         CH    R0,=H'1'        # Compare R0 (total number of lines)     00230000
*                                to 0x01 and set condition              00240000
         BL    EXITP           # If R0 is less than 0x01 exit           00250000
* Now turn on Full Screen MODE. Initial means                           00260000
* this is the first time we're using this macro                         00270000
         STFSMODE ON,INITIAL=YES                                        00280000
* Set Terminal Display Manager Options                                  00290000
* Basically we can turn on display manager and display interupt         00300000
* keys. KEYS=NO is how we would do that                                 00310000
         STTMPMD ON                                                     00320000
* the rest comes from http://www.tommysprinkle.com/mvs/P3270/hello2.htm 00330000
* TPUT Macro puts a data stream to TSO                                  00340000
* to escape the buffer you must pass 0x27                               00350000
* FULLSCR here basically means we send 3270 stream                      00360000
         TPUT  STREAM,STREAMLN,FULLSCR                                  00370000
* But it dissapears super fast unless we add a TGET                     00380000
* Which GETs input from the user                                        00390000
         TGET  INBUF,INBUFLN,ASIS                                       00400000
* And now undo the Full Screen and Display Manager                      00410000
         STFSMODE OFF                                                   00420000
         STTMPMD OFF                                                    00430000
*********************************************************************** 00440000
* And we Exit                                                           00450000
*********************************************************************** 00460000
EXITP    LR    1,13            # Move my SA into R1                     00470000
         L     13,4(,13)       # RST Caller SA Addr                     00480000
         FREEMAIN RU,A=(1),LV=72                                        00490000
         LM    14,12,12(13)    # restore registers                      00500000
         XR    15,15           # zero return code                       00510000
         BCR   15,14           # Branch back to caller                  00520000
STREAM   DS    0C                                                       00530000
         DC    X'27'       ESCAPE TSO CHARACTER                         00540000
         DC    X'F5'       ERASE/WRITE                                  00550000
         DC    X'C3'       WCC                                          00560000
         DC    X'114040'   SBA                                          00570000
         DC    X'2902'     SFE (Three Attribute Pairs To Follow)        00580000
         DC    X'C0F8'     ATTR #1 (BASIC = PROTECTED)                  00590000
         DC    X'42F1'     ATTR #3 (COLOR = BLUE)                       00600001
*  ---------------------                                                00610001
* |  _________________  |                                               00620001
* | |        5318008. | |                                               00630004
* | |_________________| |                                               00640001
* |  ___ ___ ___   ___  |                                               00650001
* | | 7 | 8 | 9 | | + | |                                               00660001
* | |___|___|___| |___| |                                               00670001
* | | 4 | 5 | 6 | | - | |                                               00680001
* | |___|___|___| |___| |                                               00690001
* | | 1 | 2 | 3 | | x | |                                               00700001
* | |___|___|___| |___| |                                               00710001
* | | . | 0 | = | | / | |                                               00720001
* | |___|___|___| |___| |                                               00730001
* |                     |                                               00740001
*  ---------------------                                                00750001
         DC    C'  --------------------- '                              00751003
         DC    56X'40'                                                  00751103
         DC    C' |  _________________  |'                              00752003
         DC 56X'40'                                                     00752103
         DC    C' | |        5318008. | |'                              00753004
         DC 56X'40'                                                     00753103
         DC    C' | |_________________| |'                              00754003
         DC 56X'40'                                                     00754103
         DC    C' |  ___ ___ ___   ___  |'                              00755003
         DC 56X'40'                                                     00755103
         DC    C' | | 7 | 8 | 9 | | + | |'                              00756003
         DC 56X'40'                                                     00756103
         DC    C' | |___|___|___| |___| |'                              00757003
         DC 56X'40'                                                     00757103
         DC    C' | | 4 | 5 | 6 | | - | |'                              00758003
         DC 56X'40'                                                     00758103
         DC    C' | |___|___|___| |___| |'                              00759003
         DC 56X'40'                                                     00759103
         DC    C' | | 1 | 2 | 3 | | x | |'                              00759203
         DC 56X'40'                                                     00759303
         DC    C' | |___|___|___| |___| |'                              00759403
         DC 56X'40'                                                     00759503
         DC    C' | | . | 0 | = | | / | |'                              00759603
         DC 56X'40'                                                     00759703
         DC    C' | |___|___|___| |___| |'                              00759803
         DC 56X'40'                                                     00759903
         DC    C' |                     |'                              00760003
         DC 56X'40'                                                     00760103
         DC    C'  --------------------- '                              00760203
STREAMLN EQU   *-STREAM                                                 01070000
*                                                                       01080000
INBUF    DS    XL128                                                    01090000
INBUFLN  EQU   *-INBUF                                                  01100000
         END   ,                                                        01110000

Comments