[movitz-cvs] CVS movitz

ffjeld ffjeld at common-lisp.net
Sun Dec 16 08:57:19 UTC 2007

Update of /project/movitz/cvsroot/movitz
In directory clnet:/tmp/cvs-serv19475

Added Files:
Log Message:
New assembler, not completed.

--- /project/movitz/cvsroot/movitz/asm.lisp	2007/12/16 08:57:19	NONE
+++ /project/movitz/cvsroot/movitz/asm.lisp	2007/12/16 08:57:19	1.1
;;;;    Copyright (C) 2007 Frode V. Fjeld
;;;; Description:   Assembly syntax etc.
;;;; Author:        Frode Vatvedt Fjeld <frodef at acm.org>
;;;; Distribution:  See the accompanying file COPYING.
;;;; $Id: asm.lisp,v 1.1 2007/12/16 08:57:19 ffjeld Exp $

(defpackage asm
  (:use :common-lisp)
  (:export #:symbol-reference-p

(in-package asm)

(deftype symbol-reference ()
  '(cons (eql quote) (cons symbol null)))

(defun symbol-reference-p (expr)
  (typep expr 'symbol-reference))

(defun symbol-reference-symbol (expr)
  (check-type expr symbol-reference)
  (second expr))

(deftype immediate-operand ()
  '(or integer symbol-reference))

(defun immediate-p (expr)
  (typep expr 'immediate-operand))

(deftype register-operand ()

(defun register-p (operand)
  (typep operand 'register-operand))

(deftype indirect-operand ()

(defun indirect-operand-p (operand)
  (consp operand))

(define-condition unresolved-symbol ()
    :initarg :symbol
    :reader unresolved-symbol))
  (:report (lambda (c s)
	     (format s "Unresolved symbol ~S." (unresolved-symbol c)))))

More information about the Movitz-cvs mailing list