Article View: comp.lang.asm370
Article #388Re: SAVE area offset zero
From: Werner Icking
Date: Tue, 21 Aug 1990 10:46
Date: Tue, 21 Aug 1990 10:46
49 lines
2632 bytes
2632 bytes
TROTH@RICEVM1.RICE.EDU (Rick Troth) writes:
> In the save area ... registers 14 thru 12 are placed at offset 12,
>which means R14 goes to +12, R15 goes to +16, R0 goes to +20, R1 goes to +24,
>and so on. Offset 4 points to the next SAVE area, right? And offset 8 to
>the previous SAVE area, right?
> So what does offset zero refer to? If you say "R13 goes there",
>I won't shoot you. Pointing to itself would provide validity checking,
>but is that what offset zero does? If not, then what?
We - a group of people programming 360-code in the late 60-th and beginning
70-th - used offset zero for the length of the save area when writing re-
enterable programms. The first 18 words of the save area were used for
the length, the chaining and registers 12 to 14, the remainder for the variables
of the programme. With this layout a supervisor programm was able to remove
a programme and all its data from memory by cutting the save area chain in
reverse order and releasing the memory as stated by the length field.
A typical programm entry was like this:
USING *,15
B BEGIN
DC AL1(..),C'name copyright date etc.' .. means length of this
BEGIN STM 14,12,12(13)
LA 0,DSA#
GETMAIN ... allocate memory for the new save area
ST 0,0(,1) note the length
MVC 4(4,1),4(13) propagate forward pointer
ST 13,8(,1) set the backward pointer
ST 1,4(,13) set new forward pointer
LR 13,1 activate the new save area
...
DSA DSECT
DS 18F standard register save area
TEMP8 DS D DW work area
...
DSA# EQU *-DSA
In reality all this was "hidden" in macros and subroutines. E.g. the GETMAIN
was in a subroutine, doing a conditional GETMAIN, returning to the caller
of the programme (not the subroutine!) a return code of -4 if the GETMAIN
was not successful, ...
--
Werner Icking icking@gmdzi.gmd.de (+49 2241) 14-2443
Gesellschaft fuer Mathematik und Datenverarbeitung mbH (GMD)
Schloss Birlinghoven, P.O.Box 1240, D-5205 Sankt Augustin 1, FRGermany
Technical Details
Message-ID:
<3229@gmdzi.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!bloom-beacon!eru!luth!sunic!mcsun!unido!gmdzi!ickingReferences:
<9008210102.AA18329@ucbvax.Berkeley.EDU>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!bloom-beacon!eru!luth!sunic!mcsun!unido!gmdzi!icking From: icking@gmdzi.UUCP (Werner Icking) Newsgroups: comp.lang.asm370 Subject: Re: SAVE area offset zero Message-ID: <3229@gmdzi.UUCP> Date: 21 Aug 90 10:46:06 GMT References: <9008210102.AA18329@ucbvax.Berkeley.EDU> Distribution: inet Organization: GMD, Sankt Augustin, F. R. Germany Lines: 49