10.07.2015 Views

LISP I Programmer's Manual - Software Preservation Group

LISP I Programmer's Manual - Software Preservation Group

LISP I Programmer's Manual - Software Preservation Group

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

00007) Storage for the program variable MIG0010) Temporary s torageG0011) Temporary storageThe arguments x and y are stored in the AC and MQand the answer is in the AC at exit.at entry,The subroutine for equal[a;b] expects its two arguments inthe AC and MQ and comes back with either zero (false) or one(true) in the AC.The resulting <strong>LISP</strong>-SAP program is listed below exactly asthe compiler gives it on the output sheet, except for explanatorycomments to the right of the instructions.FUNCTION APPLY (F, L, A) HAS BEEN ENTERED, ARGUMENTS. .COMPILE(((LABEL~MEMLIS, (LAMBDA, (x,Y), (FROG, (Ml), (sETQ,M~,Y),M~, (COND,((WLL,M~),(~TuRN,F)),((EQUAL, (cAR,M~),x),(R~X'URN,T))), (SET&,M19 (cDR,M~)>,(G0$~2))))))(MEMLIS,BSS, 0)( ,SXD,GOOOl,4) save index register 4( , STO, G0002) store x( , STQ, GOO03 ) store y( , CLA, GO003 )( , STOP GO007 ) set MI = y( ~ 0 0 0 60) , ~ ~ ~ ~ location M2( ,CLA,@OO07)( , TNZ , GO008 ) to ~0008 if null[Ml] = F, or( , CLA, $ZERO) return with AC = F if null[MI] = T( , TRA, G0005)(GOOO~,BSS, 0)( , LXD, G0007,4)( 9CLA9094)( 9PAX9094)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!