Ignore:
Timestamp:
02/28/04 18:40:42 (19 years ago)
Author:
piso
Message:

%LDB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/ldb.lisp

    r3723 r6041  
    11;;; ldb.lisp
    22;;;
    3 ;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: ldb.lisp,v 1.2 2003-09-12 14:16:44 piso Exp $
     3;;; Copyright (C) 2003-2004 Peter Graves
     4;;; $Id: ldb.lisp,v 1.3 2004-02-28 18:40:08 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    1818;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
    1919
     20(in-package "SYSTEM")
     21
    2022(defun byte (size position)
    2123  (cons size position))
     
    2628(defun byte-position (bytespec)
    2729  (cdr bytespec))
     30
     31;; For the LDB compiler macro.
     32(defun %ldb (size position integer)
     33  (logand (ash integer (- position))
     34    (1- (ash 1 size))))
    2835
    2936(defun ldb (bytespec integer)
Note: See TracChangeset for help on using the changeset viewer.