mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
initial import of openbios--main--1.0--patch-26
git-svn-id: svn://coreboot.org/openbios/openbios-devel@1 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
36
forth/testsuite/fract.fs
Normal file
36
forth/testsuite/fract.fs
Normal file
@@ -0,0 +1,36 @@
|
||||
\ tag: forth fractal example
|
||||
\
|
||||
\ Copyright (C) 2002, 2003 Volker Poplawski <volker@poplawski.de>
|
||||
\ Stefan Reinauer
|
||||
|
||||
\ This example even fits in a signature ;-)
|
||||
|
||||
\ hex 4666 dup negate do i 4000 dup 2* negate do 2a 0 dup 2dup 1e 0 do
|
||||
\ 2swap * d >>a 4 pick + -rot - j + dup dup * e >>a rot dup dup * e >>a
|
||||
\ rot swap 2dup + 10000 > if 3drop 2drop 20 0 dup 2dup leave then loop
|
||||
\ 2drop 2drop type 268 +loop cr drop 5de +loop
|
||||
|
||||
|
||||
: fract
|
||||
4666 dup negate
|
||||
do
|
||||
i 4000 dup 2* negate
|
||||
do
|
||||
2a 0 dup 2dup 1e 0
|
||||
do
|
||||
2swap * d >>a 4 pick +
|
||||
-rot - j +
|
||||
dup dup * e >>a rot
|
||||
dup dup * e >>a rot
|
||||
swap
|
||||
2dup + 10000 > if
|
||||
3drop 2drop 20 0 dup 2dup leave
|
||||
then
|
||||
loop
|
||||
2drop 2drop
|
||||
emit
|
||||
268 +loop
|
||||
cr drop
|
||||
5de +loop
|
||||
;
|
||||
|
||||
Reference in New Issue
Block a user