% Section 2.1, Ex.8 % Author Andrey Dubinchak kachnibud@gmail.com % Beta-test version % % Each term has the two-octabyte form % % +----+----+----+----+----+----+----+----+ % |TAG |SUIT|RANK|PILE| TITLE | % +----+----+----+----+----+----+----+----+ % | NEXT | % +----+----+----+----+----+----+----+----+ % % TOP IS $0 N IS $1 X IS $2 TAG IS 0 NEXT IS 8 LOC Data_Segment+#100 GREG @ Card1 OCTA #01010A2031302043 OCTA #0000000000000000 LOC Data_Segment+#380 GREG @ Card2 OCTA #0004032020332053 OCTA #2000000000000100 LOC Data_Segment+#240 GREG @ Card3 OCTA #0002022020322044 OCTA #2000000000000380 LOC #100 Main LDA TOP,Card3 SET N,0 B1 SET X,TOP BZ X,Done B2 1H ADD N,N,1 B3 LDO X,X,NEXT PBNZ X,1B Done TRAP 0,Halt,0