TXXGMAIN, TXXFMAIN and TXXABEND

For now we just need something very simple for Getmain, Freemain and Abend processing.  This code will need to be updated but this will allow us to IPL and do some initial testing.

000000                                1 TXXGMAIN CSECT ,
                            00000     2          USING TXXGMAIN,R15
                                      3 *
000000 5410 F030      00030           4          N     R1,=A(X'00FFFFFF')   CLEAN UP LENGTH
000004 4110 1007      00007           5          LA    R1,7(,R1)            ROUND UP TO DOUBLE WORD
000008 5410 F034      00034           6          N     R1,=A(X'00FFFFF8')
                                      7 *
00000C 5800 F01C      0001C           8          L     R0,COREPTR
000010 1B01                           9          SR    R0,R1
000012 1810                          10          LR    R1,R0
000014 5010 F01C      0001C          11          ST    R1,COREPTR
000018 1FFF                          12          SLR   R15,R15
00001A 07FE                          13          BR    R14
                                     14 *
00001C 00100000                      16 COREPTR  DC    A(1024*1024)       1M

Getmain will round the requested length up to a double word value.  For now we will simply start at the 1 Meg mark and work backwards.  No attempt will be made to reuse memory when it is released via a Freemain.  This will allow us to IPL and run for a little while before we eventually start overlaying or Nucleus code.

000000                                1 TXXFMAIN CSECT ,
                            00000     2          USING TXXFMAIN,R15
000000 07FE                           3          BR    R14                RETURN TO CALLER

The Freemain routine is very simple.  It simply returns to the caller.

000000                                1 TXXABEND CSECT ,
                            00000     2          USING TXXABEND,R15
000000 8200 F008      00008           3          LPSW  ERRPSW
000008                                4          DS    0D
000008 00020000000BAD01               5 ERRPSW   DC    AL1(0,2,0,0),A(X'BAD01')

The Abend routine will simply load a wait state PSW.

Although the code in these routines is not very robust it now gives us everything we need to link edit the Nucleus and IPL.

[Next – Adding Some (Useful) Work To TXXDINIT]

Leave a Reply

Your email address will not be published. Required fields are marked *