  PROCEDURE [INLINE] dfp$set_entry_assignment
    (    entry_assignment: integer;
     VAR queue_assignment_string {input, output} : string ( * <= 255));

    CONST
      swap_successful = 0;

    VAR
      actual_word: string (8),
      char_index_in_word: integer,
      found_word: string (8),
      found_word_starting_char: integer,
      p_test: ^string (8),
      result: 0 .. 2,
      swap_in_word: string (8),
      word_index: integer;


  /swap_in_assignment/
    REPEAT
      found_word_starting_char := ((entry_assignment - 1) DIV 8) * 8 + 1;
      #SPOIL (queue_assignment_string);
      osp$fetch_locked_string (queue_assignment_string
            (found_word_starting_char, 8), found_word);
      #SPOIL (queue_assignment_string);
      swap_in_word := found_word;
      word_index := (entry_assignment MOD 8);
      IF word_index = 0 THEN
        word_index := 8;
      IFEND;
      found_word (word_index) := dfc$free_entry_char;
      swap_in_word (word_index) := dfc$assigned_entry_char;
      #SPOIL (queue_assignment_string);
      { Required due to cybil bug.
      p_test := ^queue_assignment_string (found_word_starting_char, 8);
      #COMPARE_SWAP (p_test^, found_word, swap_in_word, actual_word, result);
      #SPOIL (queue_assignment_string);
    UNTIL result = swap_successful;
  PROCEND dfp$set_entry_assignment;
?? PUSH (LISTEXT := ON) ??
*copyc dft$entry_type
*copyc osp$fetch_locked_string
?? POP ??
