The Absolute Loader is very similar to our CARD80 program. It begins with the first IPL record containing a PSW and two CCW’s. The address to use for the Loader is specified with the equate for the symbol CLA (Card Loader Address). Here we set it to 8K but it could be changed to something else as long as it does not overlap the memory used by the object deck we are loading.
CLA EQU 1024*8 LOCATION TO LOAD THE LOADER * * PSW * IPLPSW DC X'00' I/O & EXT Interrupts Disabled DC X'00' Key=0; BC; EXT INT Disabled; SUP DC X'0000' DC X'00' PROG Interrupts Disabled DC AL3(CLA+80) Initial Execution Address * CCW1 DC X'02' Read Card DC AL3(CLA+0) Data Address DC X'60' CC+SLI DC X'00' DC AL2(80) Length * CCW2 DC X'028 TIC DC AL3(CLA+0) Next CCW Address DC X'00' DC X'00' DC AL2(0) Length
The second card contains three CCW’s to read three cards into memory.
* CCW3 DC X'02' Read Card DC AL3(CLA+80) Data Address DC X'60' CC+SLI DC X'00' DC AL2(80) Length * CCW4 DC X'02' Read Card DC AL3(CLA+160) Data Address DC X'60' CC+SLI DC X'00' DC AL2(80) Length * CCW5 DC X'02' Read Card DC AL3(CLA+240) Data Address DC X'20' SLI DC X'00' DC AL2(80) Length *
The next three cards contain our executable program. As before we establish a base register and then we get the address of the IPL device (card reader) and save in R3. We get the address of our input buffer and store it in our Read CCW.
Now we begin our processing loop by issuing a SIO to read a card. We wait for the I/O to complete and then check for successful status. If the I/O operation does not complete successfully we load a Wait State PSW and halt execution.
Next we check the contents of the card we just read. If it is an object deck it should have a X’02’ in column one. Next we check to see what type of record it is. For SYM, ESD and RLD records we simply ignore it and read the next card.
When we read a TXT record we get the target data address contained in the TXT record and the data length. This tells us how many bytes of data to copy and where to copy it to. We copy the data using an executed MVC instruction. We can then loop back and process the next card.
When we read an END card we simply issue a LPSW to load the new PSW from location zero. It is the responsibility of the program we just loaded to include a new PSW at location zero.
We use the program-within-a-program technique to punch our loader deck to the card punch unit.
[Next – Testing The Absolute Loader]