Skip to content
agreppin edited this page Sep 29, 2021 · 3 revisions

REPL Print

PrintObject()

Does print an ATOM or a CONS, that is a string or an S-expression. The kDot " . " string separator is now replaced by a single character in order to save 5 bytes.

The object is passed in the ax register as it's the output of Eval().

The code to test if it's an ATOM is shorter when using ax (and this is the case for many x86 instructions).

test $1,%al		# 2 bytes
test $1,%di		# more bytes
Clone this wiki locally