1 " ***********************************************************
  2 " *                                                         *
  3 " * Copyright, (C) Honeywell Bull Inc., 1988                *
  4 " *                                                         *
  5 " * Copyright, (C) Honeywell Information Systems Inc., 1982 *
  6 " *                                                         *
  7 " * Copyright (c) 1972 by Massachusetts Institute of        *
  8 " * Technology and Honeywell Information Systems, Inc.      *
  9 " *                                                         *
 10 " ***********************************************************
 11           name      glpl_               GE-list-processing-language.
 12 "         an adaptation of flpl and mlpl to the ge-645 to be used
 13 "         with the fortran compiler, especially for the eplbsa
 14 "         assembler.          j.w.poduska, november 1965.
 15 
 16 
 17 " Last modified on 11/12/72 at 01:07:44 by R F Mabee.
 18 " Modified on 11 November 1972 by R F Mabee to fix short return and bb reference for followon.
 19 "         by RHG on 26 Sept 1970 to combine storage_control_ back in
 20 "         by RHG on 2 Sept 1970 for new listing package
 21 "         by RHG on 28 August 1970 at 1420 to make ersblk do nothing
 22 "         by NA on June 28, 1970 at 2022
 23 
 24 
 25           equ       nextf,64
 26           equ       first_free,65
 27           equ       lavlth,261120       length of free storage segment
 28 
 29           temp      t(2)
 30 
 31 
 32           entry     crh
 33 crh:
 34           ldq       ap|2,*
 35           ldq       <eb_data_>|[lavptr],*ql
 36           anq       =o777777,dl
 37           stq       ap|4,*
 38           short_return                  " short return as there is no save at entries
 39 
 40 
 41           entry     clh
 42 clh:
 43           ldq       ap|2,*
 44           ldq       <eb_data_>|[lavptr],*ql
 45           qrl       18
 46           stq       ap|4,*
 47           short_return
 48 
 49 
 50           entry     cllh
 51 cllh:
 52           ldq       ap|2,*
 53           eppbp     <eb_data_>|[lavptr],*
 54           ldq       bp|0,ql
 55           ldq       bp|0,qu
 56           qrl       18
 57           stq       ap|4,*
 58           short_return
 59 
 60 
 61 "         routines for storing and modifying link-words.
 62 
 63           entry     storl               store left half.
 64 storl:    lxl1      ap|2,*              get the offset into the free storage segment
 65           lxl0      ap|4,*              get the word to be stored
 66           stx0      <eb_data_>|[lavptr],*1 store it
 67           short_return                  and return
 68 
 69 
 70           entry     storr               store right half.
 71 storr:    lxl1      ap|2,*              get the offset into the free storage segment
 72           lxl0      ap|4,*              get the word to be stored
 73           sxl0      <eb_data_>|[lavptr],*1 store it in the right half
 74           short_return                  and return
 75 
 76 
 77           entry     slwrd               store total link word.
 78 slwrd:
 79           lxl7      ap|2,*              get word pointer,
 80           lda       ap|4,*              get left half,
 81           ldq       ap|6,*              get right half,
 82           qlr       18                  and position word in ac.
 83           llr       18                  ..
 84           sta       <eb_data_>|[lavptr],*7
 85           short_return                  and return to caller.
 86 
 87 
 88           entry     glwrd               construct link word and return.
 89 glwrd:
 90           lda       ap|4,*              get right half,
 91           ldq       ap|2,*              and left half,
 92           alr       18                  and form word in mq.
 93           llr       18                  ..
 94           stq       ap|6,*              return in the third argument
 95           short_return                  and return lword to caller.
 96 
 97 
 98 "         routines for reading total words
 99 
100 
101           entry     cwrd                read contents of total word.
102 cwrd:
103           ldq       ap|2,*              get word pointer,
104           ldq       <eb_data_>|[lavptr],*ql
105           stq       ap|4,*
106           short_return                  and return to caller.
107 
108 
109 "         routines for manipulating blocks of information.
110 
111 
112           entry     genlas              generate the free storage list.
113 genlas:
114           lda       first_free,dl       get the address of the first word in the scratch segment
115           eppbp     <eb_data_>|[lavptr],*
116           sta       bp|nextf            store it in the uninit pointer
117           short_return                  and return
118 
119 
120           entry     setblk              get a block of free storage.
121 setblk:   eppbp     <eb_data_>|[lavptr],*
122           epbpbb    bp|0                " Should turn into epbpbb on 645F, harmless here.
123           ldq       bp|nextf            get next free location
124           stq       ap|6,*              return it
125           eppbp     bp|0,ql             reset bp to point to the new block
126           adq       ap|4,*              add the number of words requested
127           stq       bb|nextf            save the new next free
128           cmpq      lavlth,dl           check for overflowing scratch segment
129           tpl       <prnter_>|[no_storage] complain if overflow
130           ldq       ap|4,*              get the count again
131           qls       2                   multiply by 2
132           eppap     ap|2,*              ap -> data words
133           mlr       (pr,rl),(pr,rl)     move the data
134           desc9a    ap|0,ql
135           desc9a    bp|0,ql
136           short_return
137           short_return                  and return if done
138 
139           end