|
Post by Jeff Ledger on Feb 11, 2005 23:16:54 GMT -5
DTV goes to familyl math night!
My (hacked) DTV will be making a unique appearance at the local grade school. I've been asked to create a math program. (story problems) that the students can answer for a entry in a drawing. (from the local bookstore) -- Thought I'd bring my DTV, hooked to a good sized television.
Anyone have any ideas for reward code (in basic, please!) for giving the correct answer??
Jeff
|
|
|
Post by Six on Feb 12, 2005 13:58:22 GMT -5
How about this...
lda #$00 sta $d020 sta $d021 loop: inc $d200 jmp loop
:)
10 poke 53280,0:poke 53281,0 20 poke 53311,1 30 i = 1 40 poke 53760,i:i=i+1:if i=256 then i=0 50 goto 40
|
|
|
Post by Jeff Ledger on Feb 15, 2005 10:18:48 GMT -5
Six,
I'm curious why you didn't us a FOR-NEXT loop in your BASIC example?
Jeff
|
|
|
Post by Six on Feb 15, 2005 16:18:55 GMT -5
>I'm curious why you didn't us a FOR-NEXT loop in your BASIC example?
Ok, can do. Now with two-color-range goodness.
10 pO53280,0:pO53281,1:pO53311,1 20 fO i = 1 to 255 30 pO53760,i:pO53761,255-i:next i 40 gO20
Sorry about the inefficient code, BASIC's not my native tongue. I coded in BASIC for about a year before I figured out enough ASM to do what I needed to do, and haven't really looked back. :P
|
|