From 1b2fd71fc643bc23119cf61ed045b5a163f9ff8e Mon Sep 17 00:00:00 2001 From: Vince Weaver Date: Sun, 27 May 2018 18:45:07 -0400 Subject: [PATCH] entropy: getting closer to working --- two-liners/Makefile | 6 ++- two-liners/entropy.bas | 7 ++++ two-liners/entropy.s | 90 ++++++++++++++++++++++++++++++++++++++++-- 3 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 two-liners/entropy.bas diff --git a/two-liners/Makefile b/two-liners/Makefile index fa22e2b6..1c0125d1 100644 --- a/two-liners/Makefile +++ b/two-liners/Makefile @@ -5,8 +5,9 @@ TOKENIZE = ../asoft_basic-utils/tokenize_asoft all: entropy.dsk -entropy.dsk: ENTROPY +entropy.dsk: ENTROPY ENTROPY.BAS $(DOS33) -y entropy.dsk BSAVE -a 0x0C00 ENTROPY + $(DOS33) -y entropy.dsk SAVE A ENTROPY.BAS ENTROPY: entropy.o ld65 -o ENTROPY entropy.o -C ../linker_scripts/apple2_c00.inc @@ -14,5 +15,8 @@ ENTROPY: entropy.o entropy.o: entropy.s ca65 -o entropy.o entropy.s -l entropy.lst +ENTROPY.BAS: entropy.bas + $(TOKENIZE) < entropy.bas > ENTROPY.BAS + clean: rm -f *~ *.o *.lst ENTROPY diff --git a/two-liners/entropy.bas b/two-liners/entropy.bas new file mode 100644 index 00000000..c95cd5c3 --- /dev/null +++ b/two-liners/entropy.bas @@ -0,0 +1,7 @@ +' Entropy +' by Dave McKellar of Toronto +' Two-line BASIC program +' From Beagle Brother's Apple Mechanic Disk + +1 ROT=0:FOR I=1 TO 15:READ A,B:POKE A,B:NEXT:DATA 232,252,233,29,7676,1,7678,4,7679,0,7680,18,7681,63,7682,36,7683,36,7684,45,7685,45,7686,54,7687,54,7688,63,7689,0 +2 FOR I=1 TO 99:HGR2:FOR E=.08 TO .15 STEP .01:FOR Y=4 TO 189 STEP 6:FOR X=4 TO 278 STEP 6:SCALE=(RND(1)< E)*RND(1)*E*20+1:XDRAW 1 AT X,Y:NEXT:NEXT:NEXT:NEXT diff --git a/two-liners/entropy.s b/two-liners/entropy.s index b351a4fd..2c3936ba 100644 --- a/two-liners/entropy.s +++ b/two-liners/entropy.s @@ -13,26 +13,62 @@ ; SCALE=(RND(1)TEN + lda #TEN + lda #