Working with Movitz using SLIME
SLIME is an Emacs extension for Common Lisp development. Included with Movitz is an extension to SLIME that facilitates Movitz development. The code for this is in movitz/ide/. If you have SLIME otherwise working, the following elisp snippet should enable the Movitz extension:
(add-to-list 'load-path "/path/to/movitz/ide/") (load-library "movitz-slime")
Much like SLIME itself, this extension consists of an elisp part and a host Common Lisp part. The Common Lisp part (in ide/ide.lisp) should be loaded automatically. If you get everything set up properly, the following steps should yield a good-to-go development environment:
1. Check out the code from CVS:
% cd /path/to % cvs -z3 -d :pserver:anonymous:anonymous@common-lisp.net:/project/movitz/cvsroot co movitz % cvs -z3 -d :pserver:anonymous:anonymous@common-lisp.net:/project/movitz/cvsroot co binary-types % cvs -z3 -d :pserver:anonymous:anonymous@common-lisp.net:/project/movitz/cvsroot co ia-x86
2. "M-x slime" starts up SLIME and your favourite Common Lisp as you usually would.
3. Change directory to where the Movitz sources are (",cd /path/to/movitz").
4. Load the Movitz system. Do (load "load").
5. Enter Movitz: (in-package movitz) or ,!p movitz.
6. Create an *image*: (create-image).
7. Dump a bootable kernel from *image*: (dump-image). The default output file is called los0-image.
8. Boot the image file created in step 7. The easiest way is to use an x86 emulator such as Bochs or QEMU, configured with the movitz image file as a floppy image and boot from that. For example, with QEMU:
% qemu -fda los0-image -boot a
You can work with the Movitz source as with any Lisp source. The commands provided by movitz-mode, such as movitz-compile-defun (M-C-x), movitz-disassemble-defun (C-c C-v), etc. manipulate the symbolic image in movitz:*image* (typically the image you last created with create-image). In order to actually run any code you compile, you have to re-dump and re-boot (i.e. repeat steps 7 and 8 above, which movitz-dump-image-and-qemu (C-c d) is supposed to do automatically).
