<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>BrassTacks (wpc) &#187; Apple II</title>
	<atom:link href="http://jaoswald.wordpress.com/category/apple-ii/feed/" rel="self" type="application/rss+xml" />
	<link>http://jaoswald.wordpress.com</link>
	<description>Joe Oswald's Project/Hacking Blog</description>
	<lastBuildDate>Sun, 24 May 2009 10:05:10 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='jaoswald.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/d5ae876fdc1b0765e1953f0b65b7c674?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>BrassTacks (wpc) &#187; Apple II</title>
		<link>http://jaoswald.wordpress.com</link>
	</image>
			<item>
		<title>COMFY-6502: a slight correction</title>
		<link>http://jaoswald.wordpress.com/2008/02/11/comfy-6502-a-slight-correction/</link>
		<comments>http://jaoswald.wordpress.com/2008/02/11/comfy-6502-a-slight-correction/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 01:57:48 +0000</pubDate>
		<dc:creator>jaoswald</dc:creator>
				<category><![CDATA[Apple II]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[6502]]></category>
		<category><![CDATA[COMFY]]></category>
		<category><![CDATA[Red book tone routine]]></category>

		<guid isPermaLink="false">http://jaoswald.wordpress.com/?p=62</guid>
		<description><![CDATA[After all the work to write a post showing off COMFY-6502&#8217;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.

In the original, when the Y-register reaches zero, the DEX is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=62&subd=jaoswald&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>After all the work to write a post showing off COMFY-6502&#8217;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.<br />
<span id="more-62"></span><br />
In the original, when the Y-register reaches zero, the DEX is still executed. In the code I posted, the expiring &#8220;duration tick&#8221; skips a count on the pitch. A minor error, but one I should own up to.</p>
<p>Here&#8217;s a better effort. COMPILE-SYMBOLIC contains a MACROLET defining MODULE as a call to COMFY-6502:COMPILE.</p>
<pre class="brush: jscript;">
(compile-symbolic
  (equ speaker #xc030)
  (equ duration 1)
  (equ pitch 0)
  (module
   (comfy-6502:loop
      ;; repeat until some clause loses: actually, only exit is
      ;; through return, so each clause should be ensured of winning.
    (LDX pitch)
    (LDA speaker)
    (not
     (comfy-6502:loop  ;; repeat until whap time
     DEY
     (not (seq zero? (DEC duration) zero? return))
     (seq DEX (not zero?)))))))
</pre>
<p>resulting in </p>
<pre class="brush: jscript;">
(; reload-pitch
 (LDX :ZERO-PAGE) (:ZERO-PAGE 0)
 (LDA :ABSOLUTE) (:ABSOLUTE 49200)
 ; spin
 (DEY)
 (BNE) (:BRANCH 6) ; not-duration-tick
 (DEC :ZERO-PAGE) (:ZERO-PAGE 1)
 (BNE) (:BRANCH 2)
 (RTS)
 ; not-duration-tick
 (DEX)
 (BEQ) (:BRANCH 4) ; goto-reload-pitch
 (JMP :ABSOLUTE) (:LONG-BRANCH -12) ; spin
 ; goto-reload-pitch
 (JMP :ABSOLUTE) (:LONG-BRANCH -20) ; reload-pitch
)
</pre>
<p>For fun, I tried to get the code to emit the RTS at the very end, as in the original.</p>
<pre class="brush: jscript;">
(compile-symbolic
  (equ speaker #xc030)
  (equ duration 1)
  (equ pitch 0)
  (module
    (alt (loop (seq (LDX pitch) (LDA speaker))
            (not (while
                    (seq DEY (not (seq zero? (seq (DEC duration) zero?)))
                    (seq DEX (not zero?)))))
          RTS)))
</pre>
<pre class="brush: jscript;">
(; reload
  (LDX :ZERO-PAGE) (:ZERO-PAGE 0)
  (LDA :ABSOLUTE) (:ABSOLUTE 49200)
  ; spin
  (DEY)
  (BNE) (:BRANCH 5) ; not-duration
  ; duration-tick
  (DEC :ZERO-PAGE) (:ZERO-PAGE 1)
  (BEQ) (:BRANCH 10) ; exit
  ; not-duration
  (DEX)
  (BEQ) (:BRANCH 4) ; goto-reload
  ; goto-spin
  (JMP :ABSOLUTE) (:LONG-BRANCH -11)
  ; goto-reload
  (JMP :ABSOLUTE) (:LONG-BRANCH -19) ; reload
 ; exit
  (RTS))
</pre>
<p>&#8220;Loop tightening&#8221; could change (BEQ) (:BRANCH 4) to (BEQ) (:BRANCH -14); the (JMP :ABSOLUTE) (:LONG-BRANCH -19) is then never used, and could be omitted, changing (BEQ) (:BRANCH 10) to (BEQ) (:BRANCH 7).</p>
<p>&#8220;Loop compaction&#8221; could potentially recognize (BEQ) (:BRANCH -14) (JMP :ABSOLUTE) (:LONG-BRANCH -11), where no other instruction references the JMP, could be converted to (BEQ) (:BRANCH -14) (BNE) (:BRANCH -11), shortening the (BEQ) (:BRANCH 7) one byte more to (BNE) (:BRANCH 6).</p>
<p>Note some interesting equivalents I should probably implement as COMFY macros.</p>
<p>(if A B C) where C is do-nothing-but-win is (not (seq A (not B)). If A wins, B is executed to determine the result of the form. If A loses, the if wins. I will probably call this (when A B).</p>
<p>(if A B C) where B is a do-nothing-but-win is (alt A C), where alt is the &#8220;dual&#8221; of seq. (alt A B C &#8230;) == (not (seq (not A) (not B) (not C) &#8230;). For the two-argument case, I would call this (unless A B). </p>
<p>The one twist I can think of is to add an &#8220;implied SEQ&#8221; to these forms. (when A B C &#8230;) would be (when A (seq B C &#8230;)). (unless A B C &#8230;) would be (unless A (seq B C &#8230;)).</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaoswald.wordpress.com/62/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaoswald.wordpress.com/62/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaoswald.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaoswald.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaoswald.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaoswald.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaoswald.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaoswald.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaoswald.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaoswald.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaoswald.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaoswald.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=62&subd=jaoswald&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jaoswald.wordpress.com/2008/02/11/comfy-6502-a-slight-correction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc96790cf4a20cdf00826fe746ff31ee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jaoswald</media:title>
		</media:content>
	</item>
		<item>
		<title>COMFY-6502: work in progress</title>
		<link>http://jaoswald.wordpress.com/2008/02/05/comfy-6502-work-in-progress/</link>
		<comments>http://jaoswald.wordpress.com/2008/02/05/comfy-6502-work-in-progress/#comments</comments>
		<pubDate>Tue, 05 Feb 2008 00:49:23 +0000</pubDate>
		<dc:creator>jaoswald</dc:creator>
				<category><![CDATA[Apple II]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[6502]]></category>
		<category><![CDATA[COMFY assembler]]></category>
		<category><![CDATA[Red book tone routine]]></category>

		<guid isPermaLink="false">http://jaoswald.wordpress.com/?p=61</guid>
		<description><![CDATA[As I&#8217;ve mentioned before, I&#8217;ve become intrigued by Baker&#8217;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 &#8220;medium-level&#8221; language is how well it compiles compared to hand-written assembler code. For the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=61&subd=jaoswald&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As I&#8217;ve mentioned before, I&#8217;ve become intrigued by Baker&#8217;s COMFY assembler, and have been working on porting it to Common Lisp, and making it a bit more powerful in the link stage.</p>
<p>One metric to judge the success of this kind of &#8220;medium-level&#8221; 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 &#8220;Wozpack,&#8221; and the Sweet-16 virtual machine.</p>
<p>This kind of code has a lot of quirks that make it hard to straight-forwardly translate: lots of shared &#8220;tail code&#8221;, branches known by the programmer to always be taken (to save a precious extra byte consumed by an unconditional JMP), and the classic &#8220;fake RTS trick&#8221;, 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&#8217;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&#8217;m puzzling a bit over how to optimize the &#8220;same page&#8221; condition: whether to include a &#8220;link-time assert&#8221;, which will issue an error if the code is emitted so as to cross a page, or an even more intelligent &#8220;link-time computation&#8221; which, given the current available memory space, can choose a location that meets the constraints.<br />
<span id="more-61"></span><br />
That&#8217;s all still in development. The first test case I used was the classic &#8220;Red Book&#8221; tone routine.</p>
<pre class="brush: jscript;">
;; the original
;; location 00: pitch
;; location 01: duration
0002-  AD 30 C0   LDA  $C030 ; whap speaker
0005-  88         DEY
0006-  D0 04      BNE  $000C
0008-  C6 01      DEC  $01   ; y reaches 0: a duration tick
000A-  F0 08      BEQ  $0014 ; duration exhausted when reaches 0
000C-  CA         DEX        ; x counts time to &quot;whap&quot;
000D-  D0 F6      BNE  $0005
000F-  A6 00      LDX  $00   ; x reached 0, reload pitch
0011-  4C 02 00   JMP  $0002 ; and whap
0014-  60         RTS</pre>
<p>A few comments:</p>
<ol>
<li>Locating the code in zero-page needlessly wastes valuable zero-page locations. The code is easily relocatable to other locations.</li>
<li>X counts from the &#8220;pitch value&#8221; down to 0 at a fixed rate, &#8220;whapping&#8221; the speaker each time it reaches zero.</li>
<li>Y cycles around continuously at basically the same rate; each time it reaches zero, one tick is subtracted from the duration value. When duration reaches zero, the routine returns.</li>
<li>This classic tone routine has the important feature that duration is absolute, and not dependent on pitch</li>
<li>Y is uninitialized, which presumably causes a slight jitter in the duration, unless BASIC ensures Y=0. Likewise, X in the first pitch countdown is uninitialized.</li>
<li>duration is destroyed by the routine, but pitch is not.</li>
</ol>
<p>Here is my transcription to COMFY-6502. I have translated the &#8220;I&#8221;, &#8220;J&#8221;, and abbreviated &#8220;L&#8221;, &#8220;LI&#8221;, etc. opcodes for this example, but not yet changed Baker&#8217;s code to accept them.</p>
<pre class="brush: jscript;">
(let ((comfy-6502::*symbol-table* (make-hash-table)))
  (equ speaker #xc030)
  (equ duration 1)
  (equ pitch 0)
  (comfy-6502-tests::compile-code
     (comfy-6502:loop
       ;; repeat until some clause loses: actually, only exit is
       ;; through return, so each clause should be ensured of winning.
        (LDX pitch)
        (LDA speaker)
        (not (comfy-6502:loop  ;; repeat until whap time; &quot;whap&quot; time is when a clause loses; NOT wins, outer loop continues
                 DEY
                 (if =0? ; has Y reached zero?
                     (not (seq (DEC duration) ; Y has reached zero, duration ticks down
                               =0?       ; if duration has not reached zero, SEQ fails, NOT wins, IF wins, inner loop continues
                               RTS)) ; duration reached zero, return
                     (seq DEX ~=0?))))))) ; Y not zero, count down pitch. If X has reached zero, SEQ loses, IF loses, inner loop exits</pre>
<p>To understand the code, the basic COMFY principles must be understood.</p>
<ol>
<li>Conditional tests (such as &#8220;=0?&#8221;, corresponding to a BEQ or BNE), &#8220;win&#8221; if they are true, &#8220;lose&#8221; if they are false.</li>
<li>Ordinary machine operations (such as LDA, DEX, RTS) always &#8220;win&#8221;</li>
<li>SEQ sequentially each enclosed form, until one &#8220;loses&#8221;, in which case SEQ &#8220;loses&#8221;, or until they all &#8220;win&#8221;, in which case SEQ &#8220;wins.&#8221;</li>
<li>LOOP executes each enclosed form, until one &#8220;loses&#8221;, in which case LOOP &#8220;loses&#8221;, continuing at the top of the loop if every form &#8220;wins.&#8221; (I have introduced an &#8220;implied&#8221; seq to Baker&#8217;s ELisp implementation.) It is SEQ stuck on potentially endless repeat.</li>
<li>NOT executes the single enclosed form, but changes &#8220;win&#8221; into &#8220;lose&#8221; and vice-versa. This is useful to keep a nested &#8220;loss&#8221; from terminating all the enclosing forms.</li>
<li>(IF test win-form lose-form) executes TEST. If TEST &#8220;wins&#8221;, WIN-FORM is executed, and its win/lose result is passed out as the result of the IF. If TEST &#8220;loses&#8221;, LOSE-FORM is executed, and its win/lose result is passed out as the result of the IF.</li>
</ol>
<p>Note that I have chosen to initialize X on the first pass through the loop. That makes the code somewhat clearer, and I think is better style.</p>
<p>So what code does COMFY (as of today) generate for this? Behold.</p>
<pre class="brush: jscript;">
(; reload-pitch
 (LDX :ZERO-PAGE) (:ZERO-PAGE 0)
 (LDA :ABSOLUTE) (:ABSOLUTE 49200)
; spin
 (DEY)
 (BEQ) (:BRANCH 6) ; duration-tick
 (DEX)
 (BNE) (:BRANCH 8 ) ; goto spin
 (BEQ) (:BRANCH 9) ; goto reload-pitch
; duration-tick
 (DEC :ZERO-PAGE) (:ZERO-PAGE 1)
 (BNE) (:BRANCH 2) ; goto-spin
 (RTS)
; goto spin
 (JMP :ABSOLUTE) (:LONG-BRANCH -14)
; goto reload-pitch
 (JMP :ABSOLUTE) (:LONG-BRANCH -22))</pre>
<p>This is a symbolic &#8220;intermediate&#8221; form, not yet relocated and linked. Some keys for interpretation.</p>
<ol>
<li>(BEQ), (JMP :ABSOLUTE) etc. represent one-byte opcodes, with the specified addressing mode (redundant in the case of branch instructions, which have only the branch-relative mode).</li>
<li>(:ZERO-PAGE 0) is a single-byte, value 0, tagged to indicate that it represents a reference to zero-page location 0, and is not just a immediate argument of value zero.</li>
<li>(:ABSOLUTE 49200) is a two-byte reference to the address #xC030, which will be emitted in the usual 6502 low-byte first as #x30 and #xC0.</li>
<li>(:BRANCH n) represents a short branch. It is one byte long. Note that the destination counts relative to the BRANCH byte, not relative to the next instruction, as the 6502 branch values do. (The relocater corrects for this when converting to 6502 code bytes.)</li>
<li>(:LONG-BRANCH n) is a long branch. It is two bytes long. JMP is absolute in the 6502; the relocated will deposit the absolute address by adding this value to the location of the first byte of this pair.</li>
</ol>
<p>I have added this intermediate form because Baker&#8217;s Elisp goes directly to bytes in a fixed memory area, starting from high addresses. My goal is for a high level &#8220;COMFY module&#8221; macro to result in an intermediate form that knows its length in bytes, what zero page locations it uses, and what internal entry points it exports. Otherwise, it is relocatable by the linker. I would also like the feature that the zero-page references are symbolic (e.g. (:ZERO-PAGE duration)), in which case the linker would allocate a byte in zero-page, and all modules referring to &#8220;duration&#8221; would refer to that address. Even nicer would be the ability to do math, for instance (:ZERO-PAGE (+ duration 1)), or to emit (:ABSOLUTE (- tone-entry 1)) to encode the module entry point in the &#8220;off-by-one&#8221; method used by the &#8220;fake RTS&#8221; trick. Similarly, one could have elements such as (:BYTE (HIGH tone-entry)), representing the high-order byte of the tone-entry address, and allowing arbitrary link-time math.</p>
<p>As for the code itself, it has <strike>the same</strike> similar semantics as the Red book routine.[UPDATE: but not quite. See more recent post for correction.] It has a somewhat minor change in that the DEY is followed by a BNE in the original code (taken 255 out of 256 times), and by a BEQ in the COMFY version (taken only 1 out of 256 times). Any difference in the execution time will, of course, change the pitch emitted. More serious is the fact that COMFY, as coded, is biased toward forward conditional branches. The two JMP instructions after the RTS are reached only through branches that could reach their destination directly. COMFY compiles, as I mentioned, from the last instruction toward the first. Forward branches are trivially resolved, but backward branches don&#8217;t know their destination, in particular, whether the destination is a short branch away or not. The backward JMPs are created by the code for LOOP, which first emits a &#8220;placeholder&#8221; absolute jump, compiles the loop forms, including branches that might land on that jump, then patches the JMP destination to point to the first form of the LOOP.</p>
<p>That suggests that LOOP might be enhanced to include a &#8220;loop-tightening&#8221; phase which examines the body of the loop for forward branches (:BRANCH x) to jumps (:LONG-BRANCH y), and if x+y+1 is within range of a short branch, replaces it. (The +1 is for the JMP opcode itself.) The result would be</p>
<pre class="brush: jscript;">
(; reload pitch
 (LDX :ZERO-PAGE) (:ZERO-PAGE 0)
 (LDA :ABSOLUTE) (:ABSOLUTE #XC030)
; spin
 (DEY)
 (BEQ) (:BRANCH 6) ; duration-tick
 (DEX)
 (BNE) (:BRANCH -5) ; spin
 (BEQ) (:BRANCH -12) ; reload-pitch
; duration-tick
 (DEC :ZERO-PAGE) (:ZERO-PAGE 1)
 (BNE) (:BRANCH -11) ; spin
 (RTS)
 (JMP :ABSOLUTE) (:LONG-BRANCH -14)
 (JMP :ABSOLUTE) (:LONG-BRANCH -22))</pre>
<p>The two JMPs are now unused. This is a special case, because RTS is itself a jump. Because LOOP knows that it freshly emitted the JMP, no external code can properly reference it. If all the branches to it have been patched, and the last instruction cannot reach it, the JMP itself can be omitted.Assuming I can convince COMFY to be smart enough to omit the (proven) redundant JMPs, we are ready for comparison. Let&#8217;s re-write the original code to match the explicit X initialization, and use COMFY&#8217;s discovery that moving the LDX to the front of the loop means the absolute JMP $0002 in the original can be replaced by a BEQ.</p>
<pre class="brush: jscript;">
reload-pitch LDX PITCH
             LDA $CO30
spin         DEY
             BNE not-tick ; actually, takes branch more often
; duration-tick
             DEC duration
             BEQ return
not-tick     DEX
             BNE spin
             BEQ reload-pitch ; save a byte compared to original JMP
return       RTS</pre>
<p>COMFY, with the yet-to-be-implemented loop tightening has made the code one byte shorter, and relocatable.As mentioned before, COMFY has luckily or unluckily chosen the branch after DEY to be taken infrequently, while the author of the tone routine chose it to be taken frequently. We cannot know whether the author de-optimized to reach a lower pitch range. If so, to match the timing more closely, I can reverse the sense of the IF, causing it to emit a BNE. In this case, the hypothetical loop-tightening can eliminate one JMP, but not the other.</p>
<pre class="brush: jscript;">
(; reload-pitch
 (LDX :ZERO-PAGE) (:ZERO-PAGE 0)
 (LDA :ABSOLUTE) (:ABSOLUTE 49200)
; spin
 (DEY)
 (BNE) (:BRANCH 6) ; not-duration
 (DEC :ZERO-PAGE) (:ZERO-PAGE 1)
 (BNE) (:BRANCH -6) ; spin
 (RTS)
; not-duration
 (DEX)
 (BEQ) (:BRANCH -15) ; reload-pitch
; goto-spin
 (JMP :ABSOLUTE) (:LONG-BRANCH -12)</pre>
<p>We see this simple change affected the DEY test, but also affected the DEX test, biasing it to be taken less frequently.  Perhaps an annotation could added to the COMFY language to indicate &#8220;please prefer (or expect?) this test to win/lose.&#8221; This would disrupt the tight recursive elegance of the GENBRC routine, but it might prove handy in modern architectures with their branch-prediction tendencies. It is also not so simple to change the test after DEC (:ZERO-PAGE 1) to BEQ to the RTS. That would require moving the RTS to be emitted at the end, i.e. compiled by COMFY first. I&#8217;m more interested in implementing the loop-tightening logic than attacking that brain-teaser right now.The moral may be that COMFY (plus yet-to-be-implemented optimization passes) can emit code very much in the ballpark of humans, at least for these toy examples. For cycle-level timing, however, I might follow the lead of Sassy and allow for the human to code branches and jumps explicitly. (Sassy&#8217;s example &#8220;boot sector&#8221; code actually avoids pretty much all the COMFY primitives; however, the documentation also seems to suggest that loop tightening and similar optimizations have been implemented there.) And I have yet to successfully translate Woz&#8217;s code into COMFY, probably because I have to understand it first.(Note to self: AVOID the tempting WordPress &#8220;code&#8221; button. Use the <a href="http://faq.wordpress.com/2007/09/03/how-do-i-post-source-code/" title="How do I post sourcecode" target="_blank">sourcecode tag</a>, although it supports neither assembler nor Lisp.)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaoswald.wordpress.com/61/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaoswald.wordpress.com/61/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaoswald.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaoswald.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaoswald.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaoswald.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaoswald.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaoswald.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaoswald.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaoswald.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaoswald.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaoswald.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=61&subd=jaoswald&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jaoswald.wordpress.com/2008/02/05/comfy-6502-work-in-progress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc96790cf4a20cdf00826fe746ff31ee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jaoswald</media:title>
		</media:content>
	</item>
		<item>
		<title>Another interesting mid-level assembler</title>
		<link>http://jaoswald.wordpress.com/2007/12/17/another-interesting-mid-level-assembler/</link>
		<comments>http://jaoswald.wordpress.com/2007/12/17/another-interesting-mid-level-assembler/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 14:03:17 +0000</pubDate>
		<dc:creator>jaoswald</dc:creator>
				<category><![CDATA[Apple II]]></category>
		<category><![CDATA[PIC]]></category>
		<category><![CDATA[6502]]></category>
		<category><![CDATA[PIC0 assembler]]></category>
		<category><![CDATA[SPL assembler]]></category>

		<guid isPermaLink="false">http://jaoswald.wordpress.com/2007/12/17/another-interesting-mid-level-assembler/</guid>
		<description><![CDATA[While I&#8217;m still digesting COMFY in my &#8220;ample spare time,&#8221; a post on comp.sys.apple2 mentioned some assemblers from &#8220;Ron&#8221; having a similar flavor: SPL for the 6502 and PIC0 for PIC 10F2xx microcontrollers. They are apparently implemented in Python, and inspired by Forth. They emit assembler.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=59&subd=jaoswald&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>While I&#8217;m still digesting COMFY in my &#8220;ample spare time,&#8221; a <a href="http://groups.google.com/group/comp.sys.apple2/msg/a3eadb2e419930dd?" title="Announcement of SPL on comp.sys.apple2" target="_blank">post on comp.sys.apple2 mentioned some assemblers from &#8220;Ron&#8221; having a similar flavor</a>: <a href="http://home.comcast.net/~oneelkruns/" title="SPL assembler for the 6502, PIC0 assembler for PIC" target="_blank">SPL for the 6502 and PIC0 for PIC 10F2xx microcontrollers</a>. They are apparently implemented in Python, and inspired by Forth. They emit assembler.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaoswald.wordpress.com/59/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaoswald.wordpress.com/59/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaoswald.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaoswald.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaoswald.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaoswald.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaoswald.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaoswald.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaoswald.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaoswald.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaoswald.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaoswald.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=59&subd=jaoswald&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jaoswald.wordpress.com/2007/12/17/another-interesting-mid-level-assembler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc96790cf4a20cdf00826fe746ff31ee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jaoswald</media:title>
		</media:content>
	</item>
		<item>
		<title>Baker&#8217;s COMFY: a few notes</title>
		<link>http://jaoswald.wordpress.com/2007/11/03/bakers-comfy-a-few-notes/</link>
		<comments>http://jaoswald.wordpress.com/2007/11/03/bakers-comfy-a-few-notes/#comments</comments>
		<pubDate>Sat, 03 Nov 2007 21:22:57 +0000</pubDate>
		<dc:creator>jaoswald</dc:creator>
				<category><![CDATA[Apple II]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[6502]]></category>
		<category><![CDATA[COMFY]]></category>

		<guid isPermaLink="false">http://jaoswald.wordpress.com/2007/11/03/bakers-comfy-a-few-notes/</guid>
		<description><![CDATA[I&#8217;ve been working a bit with Baker&#8217;s COMFY-6502 code; a few notes of what I have learned so far.
First, a couple of tiny bugs in the genbrc; the code miscounts the size of the branch instructions, meaning that (- l 2) should be a (+ l 2) and so on. I found it handy to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=55&subd=jaoswald&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve been working a bit with Baker&#8217;s COMFY-6502 code; a few notes of what I have learned so far.</p>
<p>First, a couple of tiny bugs in the genbrc; the code miscounts the size of the branch instructions, meaning that (- l 2) should be a (+ l 2) and so on. I found it handy to enumerate each clause of the cond. Each clause handles a particular case, such as when the &#8220;lose&#8221; continuation can be reached by a short branch instruction, while the &#8220;win&#8221; continuation is far enough away to require an absolute jump.</p>
<p>Second, genbrc, genbr, and compile all provide the address of the resulting &#8220;continuation&#8221; as the return value. This is perhaps clear when one traces out all the recursion, but it isn&#8217;t explicitly mentioned. One interesting case is genbrc when the &#8220;win&#8221; and &#8220;lose&#8221; branch destinations are the same: one could simply emit an unconditional branch to that destination, and return the address of that branch but actually returning the destination works just as well. (In the emit routine, if the continuation does not happen to be the next instruction, the unconditional branch is, after all, emitted, moving the continuation to the front of the instruction stream, ready for the non-branching instruction to be emitted just in front of it.)</p>
<p>As for &#8220;upgrades&#8221; to the package, I have been focused up to this point on moving the knowledge of 6502 opcodes and addressing modes from magic decimal numbers to symbolic processing. Instead of simply emitting a decimal opcode, I have been changing the code to emit symbolic opcodes, such as (ADC ABSOLUTE), with routines to reduce these symbolic forms to the appropriate opcode, including checking for invalid opcodes. Baker&#8217;s original code will happily emit opcodes with addressing modes not supported by the chip. Currently, the compiler emits these symbolic codes into the code vector, awaiting a processing step to convert them to the decimal equivalent. Ideally, one would detect invalid addressing modes in the compilation stage, not the post-processing stage.</p>
<p>Some other changes I am contemplating are allowing for symbolic jump destinations, so that object code can be relocated and external labels could be used to relax the restrictions of the current scheme, which requires manually sequencing compilation and storing of addresses.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaoswald.wordpress.com/55/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaoswald.wordpress.com/55/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaoswald.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaoswald.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaoswald.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaoswald.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaoswald.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaoswald.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaoswald.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaoswald.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaoswald.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaoswald.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=55&subd=jaoswald&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jaoswald.wordpress.com/2007/11/03/bakers-comfy-a-few-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc96790cf4a20cdf00826fe746ff31ee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jaoswald</media:title>
		</media:content>
	</item>
		<item>
		<title>Baker&#8217;s COMFY for the PIC?</title>
		<link>http://jaoswald.wordpress.com/2007/09/24/bakers-comfy-for-the-pic/</link>
		<comments>http://jaoswald.wordpress.com/2007/09/24/bakers-comfy-for-the-pic/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 23:25:25 +0000</pubDate>
		<dc:creator>jaoswald</dc:creator>
				<category><![CDATA[Apple II]]></category>
		<category><![CDATA[Lisp]]></category>
		<category><![CDATA[PIC]]></category>

		<guid isPermaLink="false">http://jaoswald.wordpress.com/2007/09/24/bakers-comfy-for-the-pic/</guid>
		<description><![CDATA[I encountered Henry G. Baker&#8217;s COMFY compiler a couple years ago. (Baker&#8217;s site contains a text article, a TeX format article, and an Emacs Lisp implementation. The ACM published the two articles COMFY theory and COMFY-65) COMFY is not a very high-level language, in the conventional sense, but is an attempt to provide a clean [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=49&subd=jaoswald&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I encountered Henry G. Baker&#8217;s COMFY compiler a couple years ago. (<a href="http://home.pipeline.com/~hbaker1/" title="Henry Baker Research Paper Archive" target="_blank">Baker&#8217;s site</a> contains a <a href="http://home.pipeline.com/~hbaker1/sigplannotices/COMFY.TXT" title="COMFY.txt" target="_blank">text article</a>, a <a href="http://home.pipeline.com/~hbaker1/sigplannotices/column04.tex.gz" title="COMFY.tex.gz" target="_blank">TeX format article,</a> and an <a href="http://home.pipeline.com/~hbaker1/sigplannotices/CFYCMP1.LSP" title="CFYCMP1.LSP" target="_blank">Emacs Lisp implementation</a>. The ACM published the two articles <a href="http://doi.acm.org/10.1145/261353.261356" title="COMFY---A comfortable set of control primitives for machine language programming" target="_blank">COMFY theory</a> and <a href="http://doi.acm.org/10.1145/270941.270947" title="The COMFY 6502 Compiler" target="_blank">COMFY-65</a>) COMFY is not a very high-level language, in the conventional sense, but is an attempt to provide a clean but simple set of control structures on top of conventional machine code. Baker calls it &#8216;medium-level.&#8217;</p>
<p>The resulting compiler is very small; its main task in life is to automate the generation of branch instructions, which is one of the tedious parts of tightly optimizing assembly programs.  Yet it allows as well for arbitrary Lisp-style macros.</p>
<p>I found the concept intriguing, but I found the article and the compiler code itself rather obscure. Part of the obscurity is the unconventional names for the 6502 operations, unconventional notation for the addressing modes, and decimal numbers for opcodes (because Emacs Lisp does not accept other radixes). Another is that the implementation is lean-and-mean, emitting code bytes directly into a destination vector&#8212;the only output to look at is a vector filled with decimal numbers. The manipulations on the 6502 opcodes take advantage of the low-level bit patterns without explanation. Finally, it uses the term &#8216;continuation&#8217;, which, no matter how many times I think I understand it, scares me, probably because it introduces a highly abstract term into an area like assembly programming which is relentlessly concrete.</p>
<p>I&#8217;ve been learning about it by going through the code, restructuring a bit as I go. I&#8217;m beginning to be impressed by the subtlety of the code.  One thing that is just dawning on me is that the return values of the code-emitting functions is as important as the side-effect. (To those of you chuckling, you see how far I have yet to go.) Lisp can hide that from you when it &#8220;looks imperative.&#8221;</p>
<p>My longer term goal is to see if the same technique can be fruitful even within the more restrictive limits of the PIC. In order to get there, I&#8217;m going to have to gain confidence that I understand the formal concept of the &#8216;win&#8217; and &#8216;lose&#8217; continuations, which means, I think, having to come up with legible examples that compile to 6502 code, and use that to firm up my understanding of the compiler. Finally, I&#8217;ll try to code the &#8216;genbrc&#8217; routine for PIC branches.</p>
<p>For the &#8220;legible examples&#8221; part, I think I will try to break the lean-and-mean single-pass direct-to-binary compiler into a &#8220;compile to a vector or list with symbolic 6502 mnemonics&#8221; followed by a very simple 6502 assembly pass. A similar enhancement might accumulate a relocation table to allow more flexible linking. (I&#8217;m still not used to the idea that the code is emitted starting in high memory and working down.) I&#8217;ve begun abstracting out the addressing mode bit manipulations, and probably will add error-checking to make sure invalid opcodes are not generated by mistake.</p>
<p>One thing that I think that will have to go in the PIC version is the shallow binding mentioned in the TeX column, but not in the text version; without a stack, I&#8217;m not sure where to save anything. I&#8217;m also just a bit worried that the PIC has so many idiosyncracies (e.g., register pages controlled by special flags, instead of a uniform zero-page) that even a medium-level language doesn&#8217;t help much.</p>
<p>(I should mention in passing Frode Vatvedt Fjeld&#8217;s <a href="http://www.cs.uit.no/~frodef/sw/picl.lisp" title="Frodef's PIC instruction generation" target="_blank">nifty little Lisp code</a> to generate PIC instructions from the bit chart.)</p>
<p>[UPDATE: I should also mention a <a href="http://www.call-with-current-continuation.org/eggs/sassy.html" title="sassy x86 assembler" target="_blank">COMFY-based assember for x86, implemented in Scheme, called `Sassy'</a>, although I have never tried to use it.]</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaoswald.wordpress.com/49/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaoswald.wordpress.com/49/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaoswald.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaoswald.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaoswald.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaoswald.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaoswald.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaoswald.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaoswald.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaoswald.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaoswald.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaoswald.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=49&subd=jaoswald&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jaoswald.wordpress.com/2007/09/24/bakers-comfy-for-the-pic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc96790cf4a20cdf00826fe746ff31ee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jaoswald</media:title>
		</media:content>
	</item>
		<item>
		<title>Apple II Disk Transfer</title>
		<link>http://jaoswald.wordpress.com/2006/07/25/apple-ii-disk-transfer/</link>
		<comments>http://jaoswald.wordpress.com/2006/07/25/apple-ii-disk-transfer/#comments</comments>
		<pubDate>Tue, 25 Jul 2006 15:11:09 +0000</pubDate>
		<dc:creator>jaoswald</dc:creator>
				<category><![CDATA[Apple II]]></category>

		<guid isPermaLink="false">http://jaoswald.wordpress.com/2006/07/25/apple-ii-disk-transfer/</guid>
		<description><![CDATA[It seems that others have also had the desire to upgrade the ADT (Apple Disk Transfer) tool to work with disks other than the Disk II 5-1/4 inch floppy format under DOS 3.3.
ADTPro is a ProDOS-based version of ADT. It should presumably work with all block devices recognized by ProDOS. I e-mailed some code to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=20&subd=jaoswald&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It seems that others have also had the desire to upgrade the ADT (Apple Disk Transfer) tool to work with disks other than the Disk II 5-1/4 inch floppy format under DOS 3.3.</p>
<p><a title="ADTPro" href="http://adtpro.sourceforge.net/">ADTPro</a> is a ProDOS-based version of ADT. It should presumably work with all block devices recognized by ProDOS. I e-mailed some code to David Schmidt which allowed ADT to work with the ordinary IIgs serial ports; direct access to the Z8530 chip might allow for faster transfers; that&#8217;s a potential project.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaoswald.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaoswald.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaoswald.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaoswald.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaoswald.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaoswald.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaoswald.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaoswald.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaoswald.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaoswald.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaoswald.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaoswald.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=20&subd=jaoswald&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jaoswald.wordpress.com/2006/07/25/apple-ii-disk-transfer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc96790cf4a20cdf00826fe746ff31ee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jaoswald</media:title>
		</media:content>
	</item>
		<item>
		<title>What is this about</title>
		<link>http://jaoswald.wordpress.com/2006/01/29/what-is-this-about/</link>
		<comments>http://jaoswald.wordpress.com/2006/01/29/what-is-this-about/#comments</comments>
		<pubDate>Mon, 30 Jan 2006 01:39:27 +0000</pubDate>
		<dc:creator>jaoswald</dc:creator>
				<category><![CDATA[Apple II]]></category>
		<category><![CDATA[Lisp Machine]]></category>
		<category><![CDATA[chaosnet]]></category>

		<guid isPermaLink="false">http://jaoswald.wordpress.com/2006/01/29/what-is-this-about/</guid>
		<description><![CDATA[This blog is a simple experiment for now, to understand what is available for a &#8220;scratchpad on the Web.&#8221;
I have a picture which is something more like a lab notebook for my various hacking projects. The requirements are roughly

access from various places where hacking might happen; an idea for a project can happen at work, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=4&subd=jaoswald&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>This blog is a simple experiment for now, to understand what is available for a &#8220;scratchpad on the Web.&#8221;</p>
<p>I have a picture which is something more like a lab notebook for my various hacking projects. The requirements are roughly</p>
<ul>
<li>access from various places where hacking might happen; an idea for a project can happen at work, but I don&#8217;t want my personal laptop with me at all times.</li>
<li>some kind of permanence, as suits a lab notebook. Various things this might mean:<br />
<blockquote>
<ul>
<li>version control with timestamping</li>
<li>no revisions allowed at all (this seems extreme: one wants to separate a polished presentation view from the underlying archival lab notebook. One can revise slides for a talk without altering the historical record of the lab notebook)</li>
<li>ability to archive into a big .tgz for burning to disk as necessary</li>
</ul>
</blockquote>
</li>
<li>flexible project documentation<br />
<blockquote>
<ul>
<li>easy way to archive associated files; diffs, error messages, screen shots, sketches, links, data sheets downloaded for the web.</li>
<li>perhaps I need to wait for my copy of Kanare&#8217;s <a href="http://www.oup.com/us/catalog/general/subject/Chemistry/AnalyticalChemistry/?view=usa&amp;ci=0841209332">Writing the Laboratory Notebook</a> (<a href="http://lispmeister.com/blog/books/writing-the-laboratory-notebook.html">as seen on Lispmeister</a>) to arrive to understand what should be required here.</li>
</ul>
</blockquote>
</li>
</ul>
<p>Some projects to comment on here</p>
<ul>
<li>work on <a title="CADR emulator" href="http://www.unlambda.com/">CADR emulator</a> and <a title="MIT Lisp Machine code" href="http://www.unlambda.com/mit/index.html">MIT-released Lisp machine code</a><br />
<blockquote>
<ul>
<li>make it work on Mac OS X/PPC for my laptop</li>
<li>make <a title="CHAOS" href="http://voltaire.nfshost.com/code/wordpress/wp-admin/../blog/?page_id=3">Chaos</a> emulation work on Mac OS X</li>
<li>fix some Y2K-type issues, site configuration</li>
<li>create Chaos layer in OpenMCL or more portable Common Lisp, to develop gateways to things like</li>
<blockquote>
<ul>
<li>AIM/Jabber</li>
<li>regular e-mail</li>
<li>other retro people running Chaos emulation</li>
<li>support versioning file system semantics (e.g. blah.type~version~) on a UNIX FILE host.</li>
<li>build a world from the MIT-provided code, alllowing bootstrap</li>
</ul>
</blockquote>
</ul>
</blockquote>
</li>
<li>Apple II file transfer (extend ADT = Apple Disk Transfer) to include 140k, 800k ProDOS and Macintosh HFS floppy formats</li>
<li>Possibly, an Apple II compatible USB peripheral interface, to allow easy transfers to a Mac/PC with USB connection</li>
<li>Mac OS X support for foot-pedal shift &amp; mouse-click operations</li>
</ul>
<p>Interesting that Netscape 7 on Windows gives me little editing widgets on my post that Safari on Mac OS 10.4 didn&#8217;t give me (as I recall.) Perhaps I should check, try to add that capability.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/jaoswald.wordpress.com/4/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/jaoswald.wordpress.com/4/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jaoswald.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jaoswald.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jaoswald.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jaoswald.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jaoswald.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jaoswald.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jaoswald.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jaoswald.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jaoswald.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jaoswald.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jaoswald.wordpress.com&blog=969343&post=4&subd=jaoswald&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://jaoswald.wordpress.com/2006/01/29/what-is-this-about/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fc96790cf4a20cdf00826fe746ff31ee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">jaoswald</media:title>
		</media:content>
	</item>
	</channel>
</rss>