;;; -*- Mode:LISP; Package:SI; Base:8; Readtable:CL -*-

;Support functions mostly for cross compiler.  These are to be compiled with the Hardebeck compiler.

(defun *plus (a1 a2) (+ a1 a2))
(defun *times (a1 a2) (* a1 a2))
(defun *dif (a1 a2) (- a1 a2))
(defun *quo (a1 a2) (truncate a1 a2))
(defun %div (a1 a2) (/ a1 a2))
(defun *logior (a1 a2) (lisp:logior a1 a2))
(defun *logand (a1 a2) (lisp:logand a1 a2))
(defun *logxor (a1 a2) (lisp:logxor a1 a2))
(defun *min (a1 a2) (li:min-2 a1 a2))
(defun *max (a1 a2) (li:max-2 a1 a2))

(defun li:%pointer (a1) (hw:32+ (hw:ldb a1 vinc:%%pointer (hw:unboxed-constant 0)) 0))

(defun assq (x alist)
  (do ((p alist (cdr alist)))
      ((null p))
    (if (eq x (caar p))
	(return (car p)))))