CMNT This instruction returns the number of items in a list CMNT Input: É ¥ list/É CMNT Output: É ¥ length/list/É LITO 1 É ¥ 1/list/É PRIM Stack/Pop to aux É/1 ¥ list/É LCAL loop É/length ¥ list/É PRIM Stack/Push from aux É ¥ length/list/É LDEF loop CMNT Input: É/length ¥ list/É CMNT Output: É/length ¥ list/É PRIM List/Test for leaf É/length ¥ rslt/list/É BRFL branch if not a leaf PRIM List/Remove É/length ¥ list'/head/É LCAL loop É/length' ¥ list'/head/É PRIM List/Add É/length' ¥ list/É PRIM Stack/Push from aux É ¥ length'/list/É PRIM Ordinal/Increment É ¥ length'+1/list/É PRIM Stack/Pop to aux É/length'+1 ¥ list/É BRTR EDEF