3
$Id: asm.scm,v 1.3 1999/01/02 06:06:43 cph Exp $
5
Copyright (c) 1989-1999 Massachusetts Institute of Technology
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or (at
10
your option) any later version.
12
This program is distributed in the hope that it will be useful, but
13
WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
General Public License for more details.
17
You should have received a copy of the GNU General Public License
18
along with this program; if not, write to the Free Software
19
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22
;;;; Source (lap) assembler
24
(declare (usual-integrations))
26
;; To be loaded in (compiler top-level)
28
;;; Example of `lap->code' usage:
31
;; defines bar to be a procedure that adds 1 to its argument
32
;; with no type or range checks.
37
(or b (& ,(* (microcode-type 'compiled-entry) 4)) (@a 7))
38
(mov l (@a+ 7) (@ao 6 8))
39
(and b (& #x3) (@a 7))
46
(mov l (d 0) (@ao 6 8))
47
(and b (& #x3) (@a 7))
51
(define (lap->code label lap)
55
(set! *entry-label* label)
56
(set! *current-label-number* 0)
57
(set! *next-constant* 0)
58
(set! *interned-constants* '())
59
(set! *interned-variables* '())
60
(set! *interned-assignments* '())
61
(set! *interned-uuo-links* '())
62
(set! *block-label* (generate-label))
63
(set! *external-labels* '())
64
(set! *ic-procedure-headers* '())
b'\\ No newline at end of file'