| |
Matrix in 27 Bytes [2007] |
Credits :
Download :
Look for downloads on external sites:
Pokefinder.org
User Comment Submitted by Zyron on 21 February 2008
Clever, but where's the music? :) | User Comment Submitted by Marauder/GSS on 12 November 2007
@oswald: no it's really 27 bytes (25 bytes code + 2 bytes for start-address?)
**edit: sorry Oswald, did misunderstand your post... hehe
quite tricky that little one.
* = $02eb
lda #$fd
ldy #$02
jsr $ab1e ; print out text at $02fd
ldx #$c0 ; set illegal errornumber (only allowed from 0-30)
stx $d020
stx $d021
jmp ($ab73) ; jump to $a43d, which prints out error-msg, X=errornumber
.byte $1e,$93,$11,$11,11,$eb,$02
The last two bytes overrides the vector for BASIC Input Line and points to the start of the program at $02eb.
So that's the reason why it autostarts after loading. First it prints out the text at $02fd (clr-screen, etc.) and then calls a function to print out an errormessage with an "illegal parameter" $c0 in x-register. I think only 0-30 is allowed. So first the "?" is printed (remember all errormsg starts with "?";) and then it tries to print out the errormessge. Due to the illegal parameter in x-register it reads the string for the error-message from screen then ($22/$23 points to $0490) and will never return from that function because the string doesn't contain an end-byte $00 to terminate the string...
not sure if all is correct, just had a quick peek... hehe
...magic! I love it! :)
| User Comment Submitted by assiduous on 12 November 2007 User Comment Submitted by Oswald on 12 November 2007
jammer :D well the roms are so tight that there was only 4 bytes left, so the easter egg is rrby iirc (robert russel bob yannes) | User Comment Submitted by Oswald on 12 November 2007
yeah, sizecoding was never my cup of tea :P | User Comment Submitted by Jammer on 12 November 2007
isn't it an easter egg from cbm? :D at least it does look like (apart from colours :P) | User Comment Submitted by Scout on 12 November 2007
@Oswald: nope...you forgot to add a BASIC header or some nifty trick to auto-run it after loading =P | User Comment Submitted by Oswald on 12 November 2007
now why does it need 27 bytes ?
lda #0 2
sta d021 5
sta d020 8
lda #5 10
sta 640 (?) 13
jsr scrclear 16
ldx rom,y 19
lda #"?" 21
sta screen+q,x 24
jsr scrollup 27
jmp back 30
oops some ninja skills there, my fist try is already 30 bytes =)
| User Comment Submitted by Wisdom on 12 November 2007
|
|
|
| Search CSDb |
| Navigate | |
|
| Detailed Info | |
|
| Fun Stuff | |
· Goofs · Hidden Parts · Trivia
|
|
| Forum | |
|
| Support CSDb | |
|
| |
|