Commit ad6ef57d authored by Frode Vatvedt Fjeld's avatar Frode Vatvedt Fjeld

Mostly minor tweaks to the movitz-image structures.. ie. some naming

changes etc.
parent 4e16e3ef
......@@ -9,7 +9,7 @@
;;;; Created at: Sun Oct 22 00:22:43 2000
;;;; Distribution: See the accompanying file COPYING.
;;;;
;;;; $Id: image.lisp,v 1.60 2004/08/01 00:37:22 ffjeld Exp $
;;;; $Id: image.lisp,v 1.61 2004/08/04 12:58:45 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -324,14 +324,6 @@
:map-binary-write 'movitz-intern-code-vector
:map-binary-read-delayed 'movitz-word-code-vector
:binary-tag :primitive-function)
;;; (malloc-buffer
;;; :binary-type lu32
;;; :initform 0)
(default-interrupt-trampoline
:map-binary-write 'movitz-intern-code-vector
:binary-tag :primitive-function
:map-binary-read-delayed 'movitz-word-code-vector
:binary-type code-vector-word)
(classes ; A vector of class meta-objects.
:initform nil ; The first element is the map of corresponding names
:binary-type word
......@@ -355,12 +347,19 @@
(movitz-read-and-intern (funcall 'muerte::movitz-find-class x)
'word))
:map-binary-read-delayed 'movitz-word)
(interrupt-handlers
(exception-handlers
:binary-type word
:map-binary-write 'movitz-intern
:map-binary-read-delayed 'movitz-word
:initarg :interrupt-handlers
:accessor movitz-run-time-context-interrupt-handlers)
:initarg :exception-handlers
:accessor movitz-run-time-context-exception-handlers)
(exception-handler-tails
:binary-type word
:initform nil
:map-binary-write 'movitz-read-and-intern
:map-binary-read-delayed 'movitz-word
:initarg :exception-handler-tails
:accessor movitz-run-time-context-exception-handler-tails)
(interrupt-descriptor-table
:binary-type word
:accessor movitz-run-time-context-interrupt-descriptor-table
......@@ -538,7 +537,7 @@
:t-symbol (movitz-read 't)
:null-symbol *movitz-nil*))
(defclass image ()
(defclass movitz-image ()
((ds-segment-base
:initform #x100000
:accessor image-ds-segment-base)
......@@ -546,7 +545,7 @@
:initform #x100000
:accessor image-cs-segment-base)))
(defclass symbolic-image (image)
(defclass symbolic-image (movitz-image)
((object-hash
:accessor image-object-hash) ; object => address
(address-hash
......@@ -861,7 +860,7 @@ a cons is an offset (the car) from some other code-vector (the cdr)."
(setf (movitz-symbol-value (movitz-read 'muerte:*build-number*))
(1+ *bootblock-build*))
(let ((handler (movitz-env-symbol-function 'muerte::interrupt-default-handler)))
(setf (movitz-run-time-context-interrupt-handlers (image-run-time-context *image*))
(setf (movitz-run-time-context-exception-handlers (image-run-time-context *image*))
(movitz-read (make-array 256 :initial-element handler))))
(let ((load-address (image-start-address *image*)))
(setf (image-cons-pointer *image*) (- load-address
......@@ -964,7 +963,7 @@ a cons is an offset (the car) from some other code-vector (the cdr)."
(assert (file-position stream 512) () ; leave room for bootblock.
"Couldn't set file-position for ~W." (pathname stream))
(let* ((stack-vector (make-instance 'movitz-basic-vector
:num-elements #x1ffe
:num-elements #x2ffe
:fill-pointer 0
:symbolic-data nil
:element-type :u32))
......@@ -1587,6 +1586,7 @@ this image will not be Multiboot compatible."
(movitz-fixnum
(movitz-fixnum-value expr))
(movitz-std-instance expr)
(movitz-struct expr)
(movitz-heap-object
(or (image-movitz-to-lisp-object *image* expr)
(error "Unknown Movitz object: ~S" expr)))))
......
......@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
;;;; Created at: Fri Aug 24 11:39:37 2001
;;;;
;;;; $Id: procfs-image.lisp,v 1.12 2004/07/28 10:00:40 ffjeld Exp $
;;;; $Id: procfs-image.lisp,v 1.13 2004/07/29 00:00:59 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -195,15 +195,16 @@
(typecase movitz-name
(null
(write-string "?")
(let* ((r (stack-frame-return-address stack-frame))
(eax (get-word (+ (* 4 (interrupt-frame-index :eax)) stack-frame)))
(let* ((eax (get-word (+ (* 4 (interrupt-frame-index :eax)) stack-frame)))
(ecx (get-word (+ (* 4 (interrupt-frame-index :ecx)) stack-frame)))
(edx (get-word (+ (* 4 (interrupt-frame-index :edx)) stack-frame)))
(edi (get-word (+ (* 4 (interrupt-frame-index :edi)) stack-frame)))
(eip (get-word (+ (* 4 (interrupt-frame-index :eip)) stack-frame)))
(esi (get-word (+ (* 4 (interrupt-frame-index :esi)) stack-frame)))
(exception (get-word (+ (* 4 (interrupt-frame-index :exception)) stack-frame))))
(when r (format t "#x~X (ret #x~X {EAX: #x~X, ECX: #x~X, EDI: #x~X, EIP: #x~X, exception ~D})"
stack-frame
r eax ecx edi eip exception))))
(format t "#x~X {EAX: #x~X, ECX: #x~X, EDX: #x~X, EDI: #x~X, ESI: #x~X, EIP: #x~X, exception ~D}"
stack-frame
eax ecx edx edi esi eip exception)))
(movitz-symbol
(let ((name (movitz-print movitz-name)))
(when print-frames
......
......@@ -10,7 +10,7 @@
;;;; Author: Frode Vatvedt Fjeld <frodef@acm.org>
;;;; Created at: Mon Aug 27 14:46:50 2001
;;;;
;;;; $Id: stream-image.lisp,v 1.9 2004/07/23 15:34:36 ffjeld Exp $
;;;; $Id: stream-image.lisp,v 1.10 2004/07/28 10:00:59 ffjeld Exp $
;;;;
;;;;------------------------------------------------------------------
......@@ -18,7 +18,7 @@
(in-package movitz)
(defclass stream-image (image)
(defclass stream-image (movitz-image)
((stream
:reader image-stream
:initarg :stream)
......@@ -36,7 +36,10 @@
(progn
(format *query-io* "~&Please enter the stream-images NIL value: ")
(read *query-io*)))
:reader image-nil-word)))
:reader image-nil-word)
(nil-object
:initform (make-movitz-nil)
:reader image-nil-object)))
(defmethod image-register32 ((image stream-image) register-name)
(declare (ignorable image) (ignore register-name))
......@@ -64,14 +67,7 @@
(:character
(make-instance 'movitz-character :char (code-char (ldb (byte 8 8) word))))
(:null
#+ignore
(assert (= (- word (tag :null)) (image-run-time-context-address image)) (word)
"The word #x~8,'0X has NIL tag but isn't NIL." word)
(setf (image-stream-position image) 0 #+ignore (- word (tag :null)))
(let ((object (read-binary 'movitz-run-time-context (image-stream image))))
(setf (movitz-heap-object-word (movitz-run-time-context-null-symbol object))
word)
object))
(image-nil-object image))
(:symbol
;; (warn "loading new symbol at ~S" word)
(setf (image-stream-position image)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment