+extern uint8_t ao_lisp_pool[AO_LISP_POOL];
+extern uint16_t ao_lisp_top;
+
+#define AO_LISP_OOM 0x01
+#define AO_LISP_DIVIDE_BY_ZERO 0x02
+#define AO_LISP_INVALID 0x04
+
+extern uint8_t ao_lisp_exception;
+
+typedef uint16_t ao_poly;
+
+static inline int
+ao_lisp_is_const(ao_poly poly) {
+ return poly & AO_LISP_CONST;
+}
+
+static inline void *
+ao_lisp_ref(ao_poly poly) {
+ if (poly == AO_LISP_NIL)
+ return NULL;
+ if (poly & AO_LISP_CONST)
+ return (void *) ((ao_lisp_const - 4) + (poly & AO_LISP_REF_MASK));
+ else
+ return (void *) ((ao_lisp_pool - 4) + (poly & AO_LISP_REF_MASK));