<?xml version="1.0" encoding="UTF-8"?><!-- MAGEC is a trademark of Al Lee & Associates, Inc. © 2026 Al Lee & Associates, Inc. All rights reserved. All programs, scripts, diagrams, and documentation are copyright protected. -->
<flowchart title="Maint Functions- -Mode Determination">
<settings theme="bold" exportWidth="600" grid="true" logo="ALA_Logo_gray.png"/>
  <nodes>
    <node id="D0" type="title" label="Maint Functions- -Mode Determination">
  <position x="340" y="10"/>
  
  
  
  
</node>
    <node id="D1" type="decision" label="TWA-MSK-ID = THIS-PGMS-MSK?" width="200" height="70">
  <position x="340" y="80"/>
  
  
  
  
</node>
    <node id="D1nt" type="elbow">
      <position x="90" y="80"/>
    </node>
    <node id="D2" type="decision" label="SEE-FUNCTION?" width="200" height="70">
  <position x="340" y="220"/>
  
  
  
  
</node>
    <node id="D2nt" type="elbow" label="">
      <position x="90" y="220"/>
    </node>
    <node id="D3" type="decision" label="DUP-FUNCTION?" width="200" height="70">
  <position x="340" y="360"/>
  
  
  
  
</node>
    <node id="D34both" type="elbow" label="">
      <position x="525" y="430"/>
    </node>
    <node id="D34" type="aside" label="DUP  to- -Same Key?">
      <position x="600" y="430"/>
    </node>
    <node id="D4" type="decision" label="SKEY = TWA-LAST-KEY?" width="200" height="70">
  <position x="340" y="500"/>
  
  
  
  
</node>
    <node id="D5" type="decision" label="SFUNCT = TWA-LAST-FUNCT?" width="200" height="70">
  <position x="340" y="640"/>
  
  
  
  
</node>
    <node id="D5nt" type="elbow">
      <position x="90" y="640"/>
    </node>
    <node id="A1" type="end" label="ASK OPERATOR TO GIVE NEW KEY" width="180">
  <position x="600" y="1060"/>
  
  
  
  
</node>
    <node id="D6" type="decision" label="CHG- or DEL-FUNCTION?" width="200" height="70">
  <position x="340" y="780"/>
  
  
  
  
</node>
    <node id="D6nt" type="elbow">
      <position x="90" y="780"/>
    </node>
    <node id="D7" type="decision" label="TWA-LAST-FUNCT was SEE-FUNCTION?" width="200" height="80"><position x="340" y="920"/></node>
    <node id="D7nt" type="elbow">
      <position x="90" y="920"/>
    </node>
    <node id="T1" type="end" label="NEW-TRANSACTION-MODE" width="180">
  <position x="90" y="1060"/>
  <narrative>Most evaluation paths resolve to NEW-TRANSACTION-MODE unless a continuation condition (CHG/DEL + SEE context) is satisfied.</narrative>
  
  
  
</node>
    <node id="T2" type="end" label="CONTINUATION-MODE" width="180">
  <position x="340" y="1060"/>
  <narrative>Reached only when the CHG/DEL-FUNCTION and prior SEE-FUNCTION context conditions are both satisfied.</narrative>
  
  
  
</node>
  </nodes>
  <edges>
    <!-- Primary validation chain -->
    <edge from="D1" to="D2" label="YES"/>
    <edge from="D1" to="D1nt" label="NO"/>
    <edge from="D1nt" to="T1"/>
    <edge from="D2" to="D2nt" label="YES"/>
    <edge from="D2" to="D3" label="NO"/>
    <edge from="D3" to="D34both" label="YES"/>
    <edge from="D3" to="D4" label="NO"/>
    <edge from="D34" to="A1" label="❌"/>
    <edge from="D4" to="D34both" label="YES"/>
    <edge from="D34both" to="D34"/>
    <edge from="D5" to="D5nt" label="NO"/>
    <edge from="D5nt" to="T1"/>
    <!-- Key change / continuation branch -->
    <edge from="D4" to="D5" label="NO"/>
    <edge from="D5" to="D6" label="YES"/>
    <edge from="D6" to="D7" label="YES"/>
    <edge from="D6" to="D6nt" label="NO"/>
    <edge from="D7" to="T2" label="YES"/>
    <edge from="D7" to="D7nt" label="NO"/>
  </edges>
</flowchart>