DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦31b9d6856⟧ TextFile

    Length: 3072 (0xc00)
    Types: TextFile
    Names: »movestri1tx«

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦80900d603⟧ »giprocfile« 
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦80900d603⟧ »giprocfile« 
            └─⟦this⟧ 

TextFile



;       movestri1_tx          * page 1   27 09 77,  9.41;  

;  move_string_1
;  *************

if listing.yes
char 10 12 10

move_string_1 = set 1

move_string_1 = algol

external integer procedure move_string_1
______________________________________
_            ( ra, ix, str );  
value              ix;  
real array     ra;  
integer            ix;  
string                 str;  

<*
The procedure moves a text_string str to ra char after
char with the standart alphabeth except for space (=32) and
underlined (=95), whitch are taken as skipped chars.

movesting1          ( return value, integer ) The number of real
_                   array elements used. Negative if ra is 
_                   filled up, - then is the last char not a zero.
ra                  ( return value, real array ) the moved text
_                   placed in element ix and on. If the last char in
_                   the last element is used movesting1 is negative.
ix                  ( call value, integer value ) See above.
str                 ( call value, string ). text string terminated
_                   by a null chararter.

No alarm_exits.

progr: K. Engsager 31 mar 1977

*>

begin
  real from, to;  
  integer skift, last_skift, tegn, i, j, got, f_max, t_max;  

  i := ix;  
  last_skift := 48;  
  system( 3 ) array_bounds :( t_max, ra );  
  f_max := t_max - i + 1;  
  f_max := ( f_max + 1 ) // 2 - 1 + f_max;  

  got := -1;  
  for f_max := f_max + 1 while got < 0 do
  begin
    array from_ar( 1 : f_max );  

    got := move_string( from_ar, 1, str );  

    if got > 0 then
    begin

\f



comment movestri1_tx          * page 2   27 09 77,  9.41
0 1 2 3 4 5 6 7 8 9 ;  

      for j:= 1 step 1 until f_max do
      begin

        from:= from_ar( j );  

        for skift:= -40 step 8 until 0 do
        begin

          tegn := from shift skift extract 8;  

          if tegn <> 0 then
          begin

            if tegn <> 95  and  tegn <> 32 then
            begin
              to := ( to shift 8 ) add tegn;  
              if last_skift<>8 then last_skift:= lastskift-8 else
              begin
                ra(i) := to;  
                last_skift := 48;  
                if i <> t_max then i:= i + 1 else
                begin
                  skift:= 0;  
                  j:= f_max;  
                  ix := ix - tmax - 1;  
                end;  
              end;  
            end;  

          end
          else
          begin
            ix := 1 + i - ix;  
            skift := 0;  
            j := fmax;  
          end;  
        end;  
      end;  

      if ix > 0 then ra(i) := to shift last_skift;  

      move_string_1 := ix;  

    end movestring ok;  

  end from_ar;  

end;  

end;  

if warning.yes
( mode 0.yes
message move_string_1 not ok
lookup move_string_1)
▶EOF◀