mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-06-08 15:29:41 +00:00
bubble_gr: add tale test code
This commit is contained in:
parent
f6cf762bf7
commit
4273768c76
|
@ -5,7 +5,7 @@ TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||||
LINKER_SCRIPTS = ../../../linker_scripts
|
LINKER_SCRIPTS = ../../../linker_scripts
|
||||||
EMPTY_DISK = ../../../empty_disk
|
EMPTY_DISK = ../../../empty_disk
|
||||||
|
|
||||||
all: bubble_gr.dsk
|
all: bubble_gr.dsk make_table
|
||||||
|
|
||||||
bubble_gr.dsk: HELLO BUBBLE_GR
|
bubble_gr.dsk: HELLO BUBBLE_GR
|
||||||
cp $(EMPTY_DISK)/empty.dsk bubble_gr.dsk
|
cp $(EMPTY_DISK)/empty.dsk bubble_gr.dsk
|
||||||
|
@ -27,6 +27,14 @@ bubble_gr.o: bubble_gr.s
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
|
make_table: make_table.o
|
||||||
|
$(CC) $(LFLAGS) -o make_table make_table.o
|
||||||
|
|
||||||
|
make_table.o: make_table.c
|
||||||
|
$(CC) $(CFLAGS) -c make_table.c
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *~ *.o *.lst HELLO BUBBLE_GR
|
rm -f *~ *.o *.lst HELLO BUBBLE_GR
|
||||||
|
|
||||||
|
|
53
graphics/gr/bubble_universe/make_table.c
Normal file
53
graphics/gr/bubble_universe/make_table.c
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
|
int x;
|
||||||
|
|
||||||
|
unsigned char values[256];
|
||||||
|
|
||||||
|
//
|
||||||
|
// ldy #0 ; 2
|
||||||
|
//xloop:
|
||||||
|
// ldx #15 ; 2
|
||||||
|
//loop:
|
||||||
|
// tya ; 1
|
||||||
|
// sec ; 1
|
||||||
|
// sbc #$11 ; 2
|
||||||
|
|
||||||
|
// cpx #15 ; 2
|
||||||
|
// bne skip2 ; 2
|
||||||
|
// and #$f0 ; 2
|
||||||
|
// clc ; 1
|
||||||
|
// adc #$10 ; 2
|
||||||
|
|
||||||
|
// skip2:
|
||||||
|
|
||||||
|
// cpy #16 ; 2
|
||||||
|
// bcs skip ; 2
|
||||||
|
// and #$f ; 2
|
||||||
|
|
||||||
|
|
||||||
|
// skip:
|
||||||
|
// sta table,Y ; 3
|
||||||
|
// iny ; 1
|
||||||
|
// beq done ; 2
|
||||||
|
// dex ; 1
|
||||||
|
// bmi xloop ; 2
|
||||||
|
// bpl loop ; 2
|
||||||
|
//done:
|
||||||
|
|
||||||
|
for(x=0;x<256;x++) {
|
||||||
|
values[x]=x-0x11;
|
||||||
|
if (x%16==0) values[x]=(values[x]&0xf0)+0x10;
|
||||||
|
if (x<16) values[x]&=0xf;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(x=0;x<256;x++) {
|
||||||
|
if (x%16==0) printf("\n");
|
||||||
|
printf("$%02X ",values[x]);
|
||||||
|
}
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user