Assembly vs BASIC
From Maze
(Difference between revisions)
| Line 15: | Line 15: | ||
10 Print is a "native" BASIC program, which is just to say that it was originally written in BASIC for the C64, and not first rendered in assembly and later reimplemented. For that reason, no canonical assembly program exists. As with literary translation or artistic adaptation, there are multiple ways to recast a computer program from one language into another, even on a relatively simple system like the C64, and even with a relatively simple program like 10 Print. The following rendition was authored by Ian Bogost, Stephane Hockenhull, and Nick Montfort, in the context of the demo scene event @party in July 2010. | 10 Print is a "native" BASIC program, which is just to say that it was originally written in BASIC for the C64, and not first rendered in assembly and later reimplemented. For that reason, no canonical assembly program exists. As with literary translation or artistic adaptation, there are multiple ways to recast a computer program from one language into another, even on a relatively simple system like the C64, and even with a relatively simple program like 10 Print. The following rendition was authored by Ian Bogost, Stephane Hockenhull, and Nick Montfort, in the context of the demo scene event @party in July 2010. | ||
| − | <code> | + | <pre> |
| − | \t\t*= $1000 ; starting memory location<br> | + | *= $1000 ; starting memory location<br> |
lda #$80 ; set this value in...<br> | lda #$80 ; set this value in...<br> | ||
sta $d40f ; ... the noise speed hi SID register<br> | sta $d40f ; ... the noise speed hi SID register<br> | ||
| Line 26: | Line 26: | ||
jsr $ffd2 ; output character via kernal routine | jsr $ffd2 ; output character via kernal routine | ||
bne loop ; repeat | bne loop ; repeat | ||
| − | </code> | + | </pre> |
[Note: a complete, line-by-line explication of this program is needed, but I've omitted it for the time being, since such an act is really just an exercise and won't require much thinking to do, just time.] | [Note: a complete, line-by-line explication of this program is needed, but I've omitted it for the time being, since such an act is really just an exercise and won't require much thinking to do, just time.] | ||
