mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-04-05 03:37:43 +00:00
Check for RETURN() inside FOR()
This commit is contained in:
parent
7fc9c946ce
commit
31a716062e
Binary file not shown.
39
src/lisp/rod.lisp
Normal file
39
src/lisp/rod.lisp
Normal file
@ -0,0 +1,39 @@
|
||||
;
|
||||
; Rod's Colors
|
||||
;
|
||||
(define (rod (lambda () (prog
|
||||
(i j k w fmi fmk clr) ; local vars
|
||||
|
||||
(gr t)
|
||||
(gotoxy 11 1)
|
||||
(print "Press any key to exit.")
|
||||
loop (for w 3 1 (< w 51) ; for w = 3 to 50
|
||||
(for i 1 1 (< i 20) ; for i = 1 to 19
|
||||
(for j 0 1 (< j 20) ; for j = 0 to 19
|
||||
(= k (+ i j)) ; k = i + j
|
||||
(= clr (+ (/ (* j 3) (+ i 3)) (/ (* i w) 12)))
|
||||
; clr = (j * 3) / (i + 3) + i * w / 12
|
||||
(= fmi (- 40 i)) ; fmi = 40 - i
|
||||
(= fmk (- 40 k)) ; fmk = 40 - k
|
||||
(color clr) ; conio:grcolor(clr)
|
||||
(plot i k) ; conio:grplot(i, k)
|
||||
(plot k i) ; conio:grplot(k, i)
|
||||
(plot fmi fmk) ; conio:grplot(fmi, fmk)
|
||||
(plot fmk fmi) ; conio:grplot(fmk, fmi)
|
||||
(plot k fmi) ; conio:grplot(k, fmi)
|
||||
(plot fmi k) ; conio:grplot(fmi, k)
|
||||
(plot i fmk) ; conio:grplot(i, fmk)
|
||||
(plot fmk i) ; conio:grplot(fmk, i)
|
||||
(if (keypressed?) (return (and (readkey) (gr f))))
|
||||
; if conio:keypressed()
|
||||
; conio:getkey()
|
||||
; return
|
||||
; fin
|
||||
) ; next
|
||||
) ; next
|
||||
) ; next
|
||||
(go loop) ; loop
|
||||
)))) ; end
|
||||
|
||||
(rod)
|
||||
"That's all, folks!"
|
@ -1543,6 +1543,7 @@ def natv_for(symptr, expr)
|
||||
//
|
||||
sweep_stack[sweep_stack_top - 1] = eval_expr(expr=>car)
|
||||
expr = expr=>cdr
|
||||
if prog_return; return pop_sweep_stack; fin // Check for RETURN()
|
||||
loop
|
||||
load32(@idxval) // Update index value
|
||||
add32(@stepval)
|
||||
|
@ -34,3 +34,4 @@ cat lisp/minmax.lisp | ./ac.jar -ptx DRAWL.po lisp/MINMAX.LISP TXT
|
||||
cat lisp/prog.lisp | ./ac.jar -ptx DRAWL.po lisp/PROG.LISP TXT
|
||||
cat lisp/lores.lisp | ./ac.jar -ptx DRAWL.po lisp/LORES.LISP TXT
|
||||
cat lisp/defun.lisp | ./ac.jar -ptx DRAWL.po lisp/DEFUN.LISP TXT
|
||||
cat lisp/rod.lisp | ./ac.jar -ptx DRAWL.po lisp/ROD.LISP TXT
|
||||
|
@ -190,6 +190,7 @@ cp lisp/minmax.lisp prodos/bld/lisp/MINMAX.LISP.TXT
|
||||
cp lisp/prog.lisp prodos/bld/lisp/PROG.LISP.TXT
|
||||
cp lisp/lores.lisp prodos/bld/lisp/LORES.LISP.TXT
|
||||
cp lisp/defun.lisp prodos/bld/lisp/DEFUN.LISP.TXT
|
||||
cp lisp/rod.lisp prodos/bld/lisp/ROD.LISP.TXT
|
||||
|
||||
#mkdir prodos/bld/examples
|
||||
#cp samplesrc/examples/ex.1.pla prodos/bld/examples/EX.1.PLA.TXT
|
||||
|
Loading…
x
Reference in New Issue
Block a user