Re: HD driver
Frode Vatvedt Fjeld <[email protected]> Tue, 20 Apr 2004 00:46:41 +0200
| Newsgroups | gmane.lisp.movitz.devel |
|---|---|
| Message-ID | <[email protected]> |
Peter Minten <[email protected]> writes: > Ok, you asked for it :-). I wrote a little IDE driver for ATA-1 > compatible LBA capable disks (AFAIK Bochs disks are of that type), > it's at > 'http://www.il.fontys.nl/~silvernerd/harddisk.lisp'. Currently async > read and write of 1-256 sectors in one go is implemented. Great, it's nice to see someone accept a challenge :-) > The code does not compile due to a strange error about a variable > (data) not being defined. [..] > I know that using with-slots on a structure is not exactly common > (though as I understand the HyperSpec it's legal) so I tried > replacing it with let for a moment to see if the error was in the > with-slots. Let gave the same result: symbol 'data' undefined. When > I removed data from the code altogether it started complaining about > offset. The problem was simply that there was no with-slots macro in Movitz, so the compiler tried to compile it as a function call, which should explain the behavior you saw. I have added a with-slots macro now. Also, I have re-worked defstructs quite a bit, so that slot-value (and therefore with-slots) will actually work with structs. So I believe your code should compile fine now. I would however suggest to prefer defclass over defstruct in this case, and in general. > Furthermore on my box there is a problem with binary-types: [..] > > On CMUCL 18e, custom core. > Binary-types and Movitz version: CVS 17-apr-2004. > > Slime error message: > > Execution of a form compiled with errors: > (DEFMETHOD MAKE-LOAD-FORM > ((BINARY-TYPES::OBJECT BINARY-TYPES::RECORD-SLOT) &OPTIONAL > BINARY-TYPES::ENVIRONMENT) > (DECLARE (IGNORE BINARY-TYPES::ENVIRONMENT)) > (WITH-SLOTS > (BINARY-TYPES::NAME TYPE BINARY-TYPES::MAP-WRITE > BINARY-TYPES::MAP-READ BINARY-TYPES::MAP-READ-DELAYED > BINARY-TYPES::HIDDEN-READ-SLOT) > BINARY-TYPES::OBJECT > `(BINARY-TYPES::MAKE-RECORD-SLOT :NAME > ',BINARY-TYPES::NAME > :TYPE > ',TYPE > :MAP-WRITE > ,BINARY-TYPES::MAP-WRITE > :MAP-READ > ,BINARY-TYPES::MAP-READ > :MAP-READ-DELAYED > ,BINARY-TYPES::MAP-READ-DELAYED > :HIDDEN-READ-SLOT > ',BINARY-TYPES::HIDDEN-READ-SLOT))) > [Condition of type KERNEL:SIMPLE-PROGRAM-ERROR] > > The error disappears when I abort and do (load "load") again. I don't know what this is. When does it occur? During the first (load "load")? -- Frode Vatvedt Fjeld