May 24, 2009 by jaoswald
Hans Hübner has been at it again, and has developed code to allow a Teensy AVR development board to adapt a Symbolics keyboard to USB.
I ordered a Teensy board of my own, and was hoping to develop a small adapter to avoid cutting up my keyboard cable, but Teensy does not work with my old Mac OS X 10.4 system.
Posted in Keyboard, Lisp Machine, Symbolics | Leave a Comment »
May 6, 2008 by jaoswald
Mostly to support my own development on multiple computers, I’ve moved my Common Lisp port of COMFY-6502 to github. I chose the name cl-comfy-6502 for the repository, although the “cl” prefix is a bit ugly.
The current snapshot of COMFY-6502.
Tags: 6502, COMFY, COMFY-6502, Common Lisp, git, github
Posted in COMFY, Lisp | Leave a Comment »
April 17, 2008 by jaoswald
After trying for a while to install Linux on my old Palm Tungsten E and failing, because of hardware issues (perhaps explaining why I replaced it with an E2 way back, although my memory is dim on that), I bought an LN2410SBC from LittleChips.com.
Read the rest of this entry »
Tags: ARM, LN2410SBC
Posted in ARM | Leave a Comment »
March 5, 2008 by jaoswald
Thanks to François-René Rideau (fare) for organizing last night’s inaugural Monthly Boston Lisp Meeting (Note: future meetings will apparently happen on the fourth Monday of the month.)
I’m surprised I haven’t seen reports on Planet Lisp yet, but I had an enjoyable time. I certainly didn’t meet everyone there, but did get to meet nyef (who showed off some of his fearless adventuring into bare-metal Lisp) and Brad Parker, got to see Kent Pitman in person, and a few other notables, as well as numerous ITA Lispers. Discussion was wide-ranging (I heard only a fraction of the multiple conversations going on), and some of the most interesting stuff to me was discussion about the background of Dylan and Lispers at Apple in the 1990s.
There was at least one person taking pictures; I’m sure they’ll pop up somewhere in the blogosphere.
Looking forward to more great meetings in the future!
Tags: Boston Lisp, Boston Lisp Meeting, Lisp
Posted in Lisp | Leave a Comment »
March 5, 2008 by jaoswald
Even though it is hardly a finished product, I’ve posted a snapshot of my current CL conversion of COMFY-6502 Not that I expect a huge pent-up demand for the code, but it might be slightly more interesting than the output examples. Thanks to Henry Baker for allowing the release.
The page also contains a link to the TODO file describing my next steps. (Most immediately, my attempt to include JMP elision was messy enough to convince me I need a different class to represent opcodes+arguments as a unit.)
Tags: 6502, assembler, COMFY, Common Lisp, Lisp
Posted in Lisp | Leave a Comment »
February 11, 2008 by jaoswald
After all the work to write a post showing off COMFY-6502’s ability to reproduce the Red Book tone routine, I made a slight mistake in translation. The code I presented differed ever-so-slightly from the Red Book routine in the case where the Y-register reached zero.
Read the rest of this entry »
Tags: 6502, COMFY, Red book tone routine
Posted in Apple II, Lisp | Leave a Comment »
February 5, 2008 by jaoswald
As I’ve mentioned before, I’ve become intrigued by Baker’s COMFY assembler, and have been working on porting it to Common Lisp, and making it a bit more powerful in the link stage.
One metric to judge the success of this kind of “medium-level” language is how well it compiles compared to hand-written assembler code. For the 6502, there are a few examples of code created by wizards like Steve Wozniak, which you can find copies of around the web, the largest being the Apple II monitor, the Integer Basic interpreter, and some medium-sized ones like the Apple II 6502 step/trace, the mini-assembler, the floating-point “Wozpack,” and the Sweet-16 virtual machine.
This kind of code has a lot of quirks that make it hard to straight-forwardly translate: lots of shared “tail code”, branches known by the programmer to always be taken (to save a precious extra byte consumed by an unconditional JMP), and the classic “fake RTS trick”, pushing a return address picked from a table onto the stack, then using an RTS instead of a zero-page indirect JMP. Common in Woz’s code is a further shortening of the code by arranging the destination addresses to all be in the same 256-byte page, so the high-order byte is a constant. Some of these ideas will likely be possible with intelligent macros, combined with address labels and computation on those labels. I’m puzzling a bit over how to optimize the “same page” condition: whether to include a “link-time assert”, which will issue an error if the code is emitted so as to cross a page, or an even more intelligent “link-time computation” which, given the current available memory space, can choose a location that meets the constraints.
Read the rest of this entry »
Tags: 6502, COMFY assembler, Red book tone routine
Posted in Apple II, Lisp | Leave a Comment »
December 18, 2007 by jaoswald
I don’t know what this says about Lispers’ attitudes toward automated testing, or toward the RT test framework, but the commonly-distributed versions of the RT test framework did not pass their own self-tests.
The apparent cause is that the introduction of a hash-table and tail-pointer in rt.lisp to efficiently find tests by name and insert new tests at the end of the test list were not matched by the updating of the rt-test.lisp to consistently construct the miniature mock-up test suite. This diff for rt-test.lisp, introduces code to dynamically rebind those variables. The patch, in addition to one putting the self-tests into a separate package, has been applied to the HEAD of the CVS repository for GNU CLISP. Note that changing the package changes the names of the tests themselves, which requires editing the expected output in the tests.
Note how powerful and convenient the dynamic binding feature of Lisp (optional, as it should be, in Common Lisp) can be: while running the individual tests, the test procedure can effortlessly construct a sandbox in which to test out the features of the test suite, without destroying the suite of tests that is being sequenced through, and automatically restoring the state of the outer test suite as each test completes, even if the inner test throws an unexpected error—all with essentially no special effort on the part of the original programmer (except, as we see, to identify all of the state that needs to be shadowed.)
Tags: Lisp, Regression Test, RT
Posted in Lisp | Leave a Comment »