!pr0
68000 "Color Pattern"...............................Bob Urschel
                                            Valparaiso, Indiana

I have had my QWERTY Q68 board for about 2 weeks now.  In my opinion this seems to be an excellent product and also a very inexpensive way to learn about the MC68000 MPU.

As an exercise I rewrote an Integer BASIC program called "ROD'S COLOR PATTERN" found in my red Apple II Reference Manual (1978).  I am sending you two versions of my program.  the first version does the calculation for the LORES screen base addresses.  The second version looks up the base addresses in a table, consequently running slightly faster than the first version.  The second version runs (as close as I can tell) about 50 times faster than the Integer BASIC program.

[  We're printing only the first version, since the GBASCALC routine is more interesting than a table lookup.  QD 14 will include both version... Bill  ]

After the 68000 source code has been assembled, I BRUN a very short 6502 program which consists of the following code:

!lm+10
       .OR $1080
       JSR $30B    TURN ON THE Q68 BOARD
HERE   JMP HERE    DON'T DO ANYTHING
!lm-10

This keeps the 6502 busy while the 68000 is doing all the work.


Here's a listing of ROD'S COLOR PATTERN in Integer BASIC:

!lm+5
10 GR
20 FOR W = 3 T0 50
30 FOR I = 1 TO 19
40 FOR J = 0 TO 19
50 K = I+J
60 COLOR = J*3 / (I+3) + I*W/12
70 PLOT I,K: PLOT K,I: PLOT 40-I,40-K: PLOT 40-K,40-I
80 PLOT K,40-I: PLOT 40-I,K: PLOT I,40-K: PLOT 40-K,I
90 NEXT J: NEXT I: NEXT W
100 GOTO 20
!lm-5
