{LispCADR.mc cal: 18-Dec-84 10:12:24 } { SUBROUTINE: takes VA of CONS cell, returns CAR and CDR of cell Rx has lo bits of VA of cell TT has hi bits of VA of cell L3 used for return thru CADRret trashes Q, L0, L1, rhRx, rhTT trashes uRx, uhiVA, UQSave returns: TT has hi bits of CDR of cell Rx has lo bits of CDR of cell uCARlo has lo bits of CAR of cell uCARhi has hi bits of CAR of cell will ufnX if VA not type list will pagefault {NoFixes} if cell page faults } CADR: uRx _ Rx, c1;{uRx _ lo bits of cell VA} Ybus _ TT or Rx, NZeroBr, c2; rhRx _ crhTypeTable, BRANCH[lccellnil, $], c3; MAR _ Rx _ [Rx, TT + 0], c1;{byte merge} Rx _ Rx LRot8, c2; Rx _ Rx RShift1, getTypemsBit, c3; MAR _ [rhRx, Rx + 0], L1 _ L1.NoFixes, c1;{type table fetch} Rx _ ListType, c2; Rx _ MD xor Rx, L0 _ L0.RedoCADR, c3; Ybus _ Rx - 1, PgCarryBr, c1;{test if tos is type list} rhTT _ TT LRot0, BRANCH[$, lcnotlist], c2; TT _ uRx, c3;{lo bits of cell VA} lcmapagain: Map _ [rhTT, TT], c1; uRx _ TT, c2;{uRx _ lo bits of cell VA} rhRx _ Rx _ MD, XRefBr, c3; BRANCH[lcremap, $], c1, at[L0.RedoCADR, 10, RxMapFixCaller]; Q _ rhTT, c2; uhiVA _ Q, c3;{uhiVA _ hi bits of cell VA} MAR _ Q _ [rhRx, TT + 0], c1; UQSave _ Q, c2;{UQSave _ low 16 bits cell RA} rhTT _ TT _ MD, c3;{high 16 bits cell contents} MAR _ [rhRx, Q + 1], c1; Rx _ TT LRot8, CANCELBR[$, 2], c2;{low 8 bits of Rx are cell cdrcode} Q _ MD, c3;{low 16 bits cell contents} Ybus _ Rx - 1, PgCarryBr, c1;{test if cdrcode = 0 : indirect} BRANCH[lcindir, lcdir], c2; lcindir: TT _ Q, GOTO[lcmapagain], c3; lcdir: uCARlo _ Q, c3; Q _ rhTT, c1; uCARhi _ Q, c2; Xbus _ Rx LRot0, XLDisp, c3;{test 200'b bit of cdrcode} Rx _ LShift1 (Rx and 07F), BRANCH[lcsmallcdrcode, lcbigcdrcode, 1], c1; {cdr code >= 200'b} lcbigcdrcode: Ybus _ Rx, ZeroBr, c2;{test for cdrcode nil} TT _ uRx, BRANCH[$, lccdrnil], c3;{low 16 bits cell VA} MAR _ TT _ [TT, Rx + 0], c1;{byte merge} Rx _ TT, L3Disp, c2;{lo bits of CDR} TT _ uhiVA, RET[CADRret], c3;{hi bits of CDR} {cdr code < 200'b} lcsmallcdrcode: , c2; TT _ UQSave, c3;{low 16 bits cell RA} MAR _ TT _ [TT, Rx + 0], c1;{byte merge} Rx _ TT, c2; , c3; MAR _ [rhRx, Rx + 0], L2 _ 3, c1;{fetch contents of cdrcoded cell} , c2; TT _ MD, c3;{hi bits of CDR} MAR _ [rhRx, Rx + 1], c1; TT _ TT and 0FF, L3Disp, CANCELBR[$, 2], c2; Rx _ MD, RET[CADRret], c3;{lo bits of CDR} lccellnil: TT _ 0, uCARlo _ 0, c1; Rx _ 0, uCARhi _ 0, L3Disp, c2; RET[CADRret], c3; lccdrnil: Rx _ 0, c1; TT _ 0, L3Disp, c2; RET[CADRret], c3; lcremap: GOTO[RLxMapFix], c2; lcnotlist: GOTO[ufnX1], c3; { E N D }