title COPY HUNKS QUICKLY (the quick brown hunk) ;The function COPY-HUNK takes a hunk as an argument, and returns an EQUAL ;hunk, using BLT to copy the elements of the hunk quickly. .FASL .insrt SYS:FASDFS verprt CPYHNK .sxeval (DEFPROP CPYHNK 14 VERSION) .entry COPY-HUNK SUBR 002 retry: skott a,HNK ;Is it really a hunk? jrst nothnk ; Not really a hunk, give an error movei t,(tt) ;Flush left half (leaving HUNKn in rh) subi t,.atom HUNK2 ;get log of size of hunk movei tt,2 lsh tt,(t) movei b,(a) ;Save past the cons pushj p,alhunk ;CONS the right hunk movei tt,(a) ;BLT to the new hunk hrli tt,(b) ;from the old one xct blttab(t) ;perform the right blt retok: popj p, ;and return nothnk: jumpe a,retok ;Equal time for () wta [NOT A HUNK -- COPY-HUNK!] jrst retry ;If continued, A should have new value blttab: blt tt,(a) blt tt,1(a) blt tt,3(a) blt tt,7(a) blt tt,17(a) blt tt,37(a) blt tt,77(a) blt tt,177(a) blt tt,377(a) blt tt,777(a) .lose ;Hunk 1024??? fasend