   (void) env;
   object *obj = first(args);
   pfun_t pfun = pstreamfun(cdr(args));
-  char temp = Flags;
-  clrflag(PRINTREADABLY);
-  printobject(obj, pfun);
-  Flags = temp;
+  prin1object(obj, pfun);
   return obj;
 }
 


// Helper functions

boolean consp (object *x) {
  if (x == NULL) return false;
  unsigned int type = x->type;
  return type >= PAIR || type == ZERO;
}

boolean atom (object *x) {
  if (x == NULL) return true;
  unsigned int type = x->type;
  return type < PAIR && type != ZERO;
}

boolean listp (object *x) {
  if (x == NULL) return true;
  unsigned int type = x->type;
  return type >= PAIR || type == ZERO;
}

boolean improperp (object *x) {
  if (x == NULL) return false;
  unsigned int type = x->type;
  return type < PAIR && type != ZERO;
}

int toradix40 (char ch) {
  if (ch == 0) return 0;
  if (ch >= '0' && ch <= '9') return ch-'0'+30;
  ch = ch | 0x20;
  if (ch >= 'a' && ch <= 'z') return ch-'a'+1;
  return -1; // Invalid

const char string155[] PROGMEM = "edit";
const char string156[] PROGMEM = "pprint";
const char string157[] PROGMEM = "pprintall";
const char string158[] PROGMEM = "format";
const char string159[] PROGMEM = "require";
const char string160[] PROGMEM = "list-library";

// Third parameter is no. of arguments; 1st hex digit is min, 2nd hex digit is max, 0xF is unlimited
const tbl_entry_t lookup_table[] PROGMEM = {
  { string0, NULL, 0x00 },
  { string1, NULL, 0x00 },
  { string2, NULL, 0x00 },
  { string3, NULL, 0x00 },
  { string4, NULL, 0x00 },
  { string5, NULL, 0x0F },
  { string6, NULL, 0x0F },
  { string7, NULL, 0x0F },
  { string8, NULL, 0x0F },
  { string9, NULL, 0x00 },
  { string10, sp_quote, 0x11 },
  { string11, sp_defun, 0x2F },
  { string12, sp_defvar, 0x12 },
  { string13, sp_setq, 0x2F },
  { string14, sp_loop, 0x0F },
  { string15, sp_return, 0x0F },
  { string16, sp_push, 0x22 },
  { string17, sp_pop, 0x11 },
  { string18, sp_incf, 0x12 },
  { string19, sp_decf, 0x12 },
  { string20, sp_setf, 0x2F },
  { string21, sp_dolist, 0x1F },
  { string22, sp_dotimes, 0x1F },
  { string23, sp_trace, 0x01 },
  { string24, sp_untrace, 0x01 },
  { string25, sp_formillis, 0x1F },
  { string26, sp_withserial, 0x1F },
  { string27, sp_withi2c, 0x1F },
  { string28, sp_withspi, 0x1F },
  { string29, sp_withsdcard, 0x2F },
  { string30, NULL, 0x00 },
  { string31, tf_progn, 0x0F },
  { string32, tf_if, 0x23 },
  { string33, tf_cond, 0x0F },
  { string34, tf_when, 0x1F },
  { string35, tf_unless, 0x1F },
  { string36, tf_case, 0x1F },
  { string37, tf_and, 0x0F },
  { string38, tf_or, 0x0F },
  { string39, NULL, 0x00 },
  { string40, fn_not, 0x11 },
  { string41, fn_not, 0x11 },
  { string42, fn_cons, 0x22 },
  { string43, fn_atom, 0x11 },
  { string44, fn_listp, 0x11 },
  { string45, fn_consp, 0x11 },
  { string46, fn_symbolp, 0x11 },
  { string47, fn_streamp, 0x11 },
  { string48, fn_eq, 0x22 },
  { string49, fn_car, 0x11 },
  { string50, fn_car, 0x11 },
  { string51, fn_cdr, 0x11 },
  { string52, fn_cdr, 0x11 },
  { string53, fn_caar, 0x11 },
  { string54, fn_cadr, 0x11 },
  { string55, fn_cadr, 0x11 },
  { string56, fn_cdar, 0x11 },
  { string57, fn_cddr, 0x11 },
  { string58, fn_caaar, 0x11 },
  { string59, fn_caadr, 0x11 },
  { string60, fn_cadar, 0x11 },
  { string61, fn_caddr, 0x11 },
  { string62, fn_caddr, 0x11 },
  { string63, fn_cdaar, 0x11 },
  { string64, fn_cdadr, 0x11 },
  { string65, fn_cddar, 0x11 },
  { string66, fn_cdddr, 0x11 },
  { string67, fn_length, 0x11 },
  { string68, fn_list, 0x0F },
  { string69, fn_reverse, 0x11 },
  { string70, fn_nth, 0x22 },
  { string71, fn_assoc, 0x22 },
  { string72, fn_member, 0x22 },
  { string73, fn_apply, 0x2F },
  { string74, fn_funcall, 0x1F },
  { string75, fn_append, 0x0F },
  { string76, fn_mapc, 0x2F },
  { string77, fn_mapcar, 0x2F },
  { string78, fn_mapcan, 0x2F },
  { string79, fn_add, 0x0F },
  { string80, fn_subtract, 0x1F },
  { string81, fn_multiply, 0x0F },
  { string82, fn_divide, 0x2F },
  { string83, fn_divide, 0x12 },
  { string84, fn_mod, 0x22 },
  { string85, fn_oneplus, 0x11 },
  { string86, fn_oneminus, 0x11 },
  { string87, fn_abs, 0x11 },
  { string88, fn_random, 0x11 },
  { string89, fn_maxfn, 0x1F },
  { string90, fn_minfn, 0x1F },
  { string91, fn_noteq, 0x1F },
  { string92, fn_numeq, 0x1F },
  { string93, fn_less, 0x1F },
  { string94, fn_lesseq, 0x1F },
  { string95, fn_greater, 0x1F },
  { string96, fn_greatereq, 0x1F },
  { string97, fn_plusp, 0x11 },
  { string98, fn_minusp, 0x11 },
  { string99, fn_zerop, 0x11 },
  { string100, fn_oddp, 0x11 },
  { string101, fn_evenp, 0x11 },
  { string102, fn_integerp, 0x11 },
  { string103, fn_numberp, 0x11 },
  { string104, fn_char, 0x22 },
  { string105, fn_charcode, 0x11 },
  { string106, fn_codechar, 0x11 },
  { string107, fn_characterp, 0x11 },
  { string108, fn_stringp, 0x11 },
  { string109, fn_stringeq, 0x22 },
  { string110, fn_stringless, 0x22 },
  { string111, fn_stringgreater, 0x22 },
  { string112, fn_sort, 0x22 },
  { string113, fn_stringfn, 0x11 },
  { string114, fn_concatenate, 0x1F },
  { string115, fn_subseq, 0x23 },
  { string116, fn_readfromstring, 0x11 },
  { string117, fn_princtostring, 0x11 },
  { string118, fn_prin1tostring, 0x11 },
  { string119, fn_logand, 0x0F },
  { string120, fn_logior, 0x0F },
  { string121, fn_logxor, 0x0F },
  { string122, fn_lognot, 0x11 },
  { string123, fn_ash, 0x22 },
  { string124, fn_logbitp, 0x22 },
  { string125, fn_eval, 0x11 },
  { string126, fn_globals, 0x00 },
  { string127, fn_locals, 0x00 },
  { string128, fn_makunbound, 0x11 },
  { string129, fn_break, 0x00 },
  { string130, fn_read, 0x01 },
  { string131, fn_prin1, 0x12 },
  { string132, fn_print, 0x12 },
  { string133, fn_princ, 0x12 },
  { string134, fn_terpri, 0x01 },
  { string135, fn_readbyte, 0x02 },
  { string136, fn_readline, 0x01 },
  { string137, fn_writebyte, 0x12 },
  { string138, fn_writestring, 0x12 },
  { string139, fn_writeline, 0x12 },
  { string140, fn_restarti2c, 0x12 },
  { string141, fn_gc, 0x00 },
  { string142, fn_room, 0x00 },
  { string143, fn_saveimage, 0x01 },
  { string144, fn_loadimage, 0x01 },
  { string145, fn_cls, 0x00 },
  { string146, fn_pinmode, 0x22 },
  { string147, fn_digitalread, 0x11 },
  { string148, fn_digitalwrite, 0x22 },
  { string149, fn_analogread, 0x11 },
  { string150, fn_analogwrite, 0x22 },
  { string151, fn_delay, 0x11 },
  { string152, fn_millis, 0x00 },
  { string153, fn_sleep, 0x11 },
  { string154, fn_note, 0x03 },
  { string155, fn_edit, 0x11 },
  { string156, fn_pprint, 0x12 },
  { string157, fn_pprintall, 0x01 },
  { string158, fn_format, 0x2F },
  { string159, fn_require, 0x11 },
  { string160, fn_listlibrary, 0x00 },
};

// Table lookup functions
