diff --git a/PLASMA/src/makefile b/PLASMA/src/makefile index 2a455aeb..dc99e08f 100755 --- a/PLASMA/src/makefile +++ b/PLASMA/src/makefile @@ -22,10 +22,10 @@ TXTTYPE = .TXT #SYSTYPE = \#ff0000 #TXTTYPE = \#040000 -all: $(PLASM) $(PLVM) $(PLVM02) $(CMD) TESTLIB +all: $(PLASM) $(PLVM) $(PLVM02) $(CMD) TESTLIB ROD.REL clean: - -rm *.o *~ *.a *.SYM *.SYS *.BIN TESTLIB $(PLASM) $(PLVM) + -rm *.o *~ *.a *.SYM *.SYS *.REL TESTLIB $(PLASM) $(PLVM) $(PLASM): $(OBJS) $(INCS) cc $(OBJS) -o $(PLASM) @@ -54,11 +54,14 @@ test: test.pla TESTLIB $(PLVM) $(PLASM) debug: test.pla TESTLIB $(PLVM) $(PLASM) ./$(PLASM) -AM < test.pla > test.a - acme --setpc 4096 -o TEST.BIN test.a - ./$(PLVM) -s TEST.BIN MAIN + acme --setpc 4096 -o TEST.REL test.a + ./$(PLVM) -s TEST.REL MAIN hello: hello.pla $(PLVM) $(PLASM) ./$(PLASM) -AM < hello.pla > hello.a - acme --setpc 4096 -o HELLO.BIN hello.a - ./$(PLVM) HELLO.BIN + acme --setpc 4096 -o HELLO.REL hello.a + ./$(PLVM) HELLO.REL +ROD.REL: rod.pla $(PLVM) $(PLASM) + ./$(PLASM) -AM < rod.pla > rod.a + acme --setpc 4096 -o ROD.REL rod.a diff --git a/PLASMA/src/rod.pla b/PLASMA/src/rod.pla new file mode 100644 index 00000000..e54412c3 --- /dev/null +++ b/PLASMA/src/rod.pla @@ -0,0 +1,84 @@ +import STDLIB + predef romcall, puts +end +const speaker=$C030 +const showgraphics=$C050 +const showtext=$C051 +const showfull=$C052 +const showmix=$C053 +const TRUE=$FFFF +const FALSE=$0000 +const showpage1=$C054 +const showpage2=$C055 +const showlores=$C056 +const showhires=$C057 +const keyboard=$C000 +const keystrobe=$C010 +const hgr1=$2000 +const hgr2=$4000 +const page1=0 +const page2=1 +byte exitmsg[] = "PRESS ANY KEY TO EXIT.\n" +byte goodbye[] = "THAT'S ALL FOLKS!\n" +byte i, j, k, w, fmi, fmk, color + +def textmode + romcall(0, 0, 0, 0, $FB39) +end +def home + romcall(0, 0, 0, 0, $FC58) +end +def gotoxy(x, y) + ^($24) = x + romcall(y, 0, 0, 0, $FB5B) +end +def grmode + romcall(0, 0, 0, 0, $FB40) + ^showlores +end +def grcolor(color) + romcall(color, 0, 0, 0, $F864) +end +def grplot(x, y) + romcall(y, 0, x, 0, $F800) +end +def colors + while TRUE + for w = 3 to 50 + for i = 1 to 19 + for j = 0 to 19 + k = i + j + color = (j * 3) / (i + 3) + i * w / 12 + fmi = 40 - i + fmk = 40 - k + romcall(color, 0, 0, 0, $F864) ;grcolor(color); + romcall(k, 0, i, 0, $F800) ;grplot(i, k); + romcall(i, 0, k, 0, $F800) ;grplot(k, i); + romcall(fmk, 0, fmi, 0, $F800) ;grplot(fmi, fmk); + romcall(fmi, 0, fmk, 0, $F800) ;grplot(fmk, fmi); + romcall(fmi, 0, k, 0, $F800) ;grplot(k, fmi); + romcall(k, 0, fmi, 0, $F800) ;grplot(fmi, k); + romcall(fmk, 0, i, 0, $F800) ;grplot(i, fmk); + romcall(i, 0, fmk, 0, $F800) ;grplot(fmk, i); + if ^keyboard >= 128 + ^keystrobe + return + fin + next + next + next + loop +end + + +grmode() +gotoxy(10,22) +puts(@exitmsg) +colors() +textmode() +home() +puts(@goodbye) +while ^keyboard < 128 +loop +^keystrobe +done \ No newline at end of file