Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
CAR and CDR
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===704 macros=== The 704 [[assembly language|assembler]] [[macro (programming)|macro]] for <code>car</code> was:<ref name="assm" /><ref name="acm" /><ref name="MIT704"/> <syntaxhighlight lang="asm"> LXD JLOC 4 # C( Decrement of JLOC ) β C( C ) # Loads the Decrement of location JLOC into Index Register C CLA 0,4 # C( 0 - C( C ) ) β C( AC ) # The AC register receives the start address of the list PAX 0,4 # C( Address of AC ) β C( C ) # Loads the Address of AC into Index Register C PXD 0,4 # C( C ) β C( Decrement of AC ) # Clears AC and loads Index Register C into the Decrement of AC </syntaxhighlight> The 704 assembler macro for <code>cdr</code> was:<ref name="assm">Portions from NILS' LISP PAGES- [https://archive.today/20041021220505/http://t3x.dyndns.org/LISP/QA/carcdr.html http://t3x.dyndns.org/LISP/QA/carcdr.html]</ref><ref name="acm">MIT AI Lab Memo 6 [https://web.archive.org/web/20170706114352/ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-006.pdf https://web.archive.org/web/20170706114352/ftp://publications.ai.mit.edu/ai-publications/pdf/AIM-006.pdf]</ref><ref name="MIT704">CODING for the MIT-IBM 704 COMPUTER [http://bitsavers.informatik.uni-stuttgart.de/pdf/mit/computer_center/Coding_for_the_MIT-IBM_704_Computer_Oct57.pdf http://bitsavers.informatik.uni-stuttgart.de/pdf/mit/computer_center/Coding_for_the_MIT-IBM_704_Computer_Oct57.pdf]</ref> <syntaxhighlight lang="asm"> LXD JLOC 4 # C( Decrement of JLOC ) β C( C ) # Loads the Decrement of location JLOC into Index Register C CLA 0,4 # C( 0 - C( C ) ) β C( AC ) # The AC register receives the start address of the list PDX 0,4 # C( Decrement of AC ) β C( C ) # Loads the Decrement of AC into Index Register C PXD 0,4 # C( C ) β C( Decrement of AC ) # Clears AC and loads Index Register C into the Decrement of AC </syntaxhighlight> A machine word could be reassembled by ''cons'', which took four arguments (''a'',''d'',''p'',''t''). The prefix and tag parts were dropped in the early stages of Lisp's design, leaving CAR, CDR, and a two-argument CONS.<ref name=mccarthy />
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)