initial commit
[fifth.git] / imageFile / f / 5th_demo
1 .( testgraph - simple graphic test)\r
2 : testgraph\r
3 10 40 10 40 screen FF 0 0 calccol boxf\r
4 50 80 50 80 screen 0 FF 0 calccol boxf\r
5 90 C0 10 40 screen 0 0 FF calccol boxf ;\r
6 \r
7 .( testmouse - simple mouse test)\r
8 var tmp1 var tmp2 var tmpc\r
9 : testmouse\r
10 50 tmp1 !\r
11 50 tmp2 !\r
12 until\r
13         kb@ if done then\r
14         mouse@\r
15         dup 0 = if [ FF FF FF calccol ] tmpc ! then\r
16         dup 1 = if [ 00 FF FF calccol ] tmpc ! then\r
17         dup 2 = if [ FF 00 FF calccol ] tmpc ! then\r
18             3 = if [ FF FF 00 calccol ] tmpc ! then\r
19         tmp2 @ + tmp2 ! tmp1 @ + tmp1 !\r
20         10 tmp1 @ 26F bound tmp1 !\r
21         10 tmp2 @ 1CF bound tmp2 !\r
22         tmp1 @ dup 5 + tmp2 @ dup 5 + screen tmpc @ boxf update\r
23 loop ; rh tmp1 rh tmp2 rh tmpc\r