; Main microcode for file searcher ; last edited July 31, 1980 5:52 PM ; Copyright Xerox Corporation 1979, 1980 #ALTOCONSTS23.MU; ; Constants and R registers $4000 $4000; (has other names in CONSTANTS) $AC0 $R3; $AC1 $R2; $AC3 $R0; $newL $R40; the M register $addr $R3; (=AC0) memory address $char $R14; Save odd character $phase $R15; phase number, even/odd swap flag in bit 4 (for skip char.s) $-K+1 $R16; number of char.s for match !7,10,Reset,Match,FetchEven,feSwap,FetchOdd,foSwap,Skip,Record; entries to microcode !13,4,ci0,ci1,ci2,ci3; RWREG work area !20,1,START; return to Nova emulator !37,1,trap; trapped instructions !1600,1,adisp; character dispatch ; Returns to Nova emulator START: SWMODE; :START; trap: SWMODE; :trap; ; Main loop entries. Different for even/odd character !7,1,fex; FetchEven: MAR _ L _ addr+1; fe1: addr _ L; L _ phase+1, IR _ phase; phase _ L; fex: L _ MD; Override IR_ dispatch char _ L LCY 8; SINK _ char, BUS, TASK; dispatch on left char char _ L, :adisp; foSwap: MAR _ L _ addr+1, :fe1; FetchOdd with even/odd swapped !7,1,fox; FetchOdd: L _ phase+1, IR _ phase; fo1: SINK _ char, BUS, TASK; dispatch on right char fox: phase _ L, :adisp; Override IR_ dispatch feSwap: L _ phase+1, IR _ phase, :fo1; FetchEven with even/odd swapped ; Register a match. L=ctr # which was zero Match: AC1 _ L; L _ phase, TASK; AC3 _ L, :START; ; Record boundary -- not implemented yet ;Record: ; Skip character !1,2,ske,sko; Skip: T _ phase-1, BUSODD; Undo phase increment L _ 4000 XOR T, IDISP, :ske; Invert swap bit ske: phase _ L, :FetchOdd; even phase & now swapped, or opposite sko: phase _ L, :FetchEven; odd phase & now swapped, or opposite