fb: my first program for the propeller
rokicki
Posts: 1,000
With all the help from Chip on this board, I've put together my first Propeller program.
It's just a joke. Maybe you'll like it. It should run on either the demo board or the
propstick, or even a homebrew as long as you can drive a TV.
Don't read the source before you run it. The top class is called fb.
After you run it, you might try to "run" it.
Of course, very little of it is new; it's just using all the demo stuff they already ship.
Enjoy!
It's just a joke. Maybe you'll like it. It should run on either the demo board or the
propstick, or even a homebrew as long as you can drive a TV.
Don't read the source before you run it. The top class is called fb.
After you run it, you might try to "run" it.
Of course, very little of it is new; it's just using all the demo stuff they already ship.
Enjoy!
Comments
Wow! I wouldn't have believed it if I hadn't run it!
For those of you who haven't tried this, it's a fairly functional Tandy Color Computer from 1980! It comes up with a prompt and you can type in programs via keyboard and run them (using the Demo Board). It uses line numbers. I typed in this, and it ran:
10 print "x";
20 goto 10
run
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I never expected to see something like this, especially so early. Rokicki, I think you must have done this enough times on enough systems that you could do it in your sleep now. I can't think of any other explanation for how you would know WHAT to do so quickly to make a Tandy CC like this.
Please note the new efficient VGA character display I posted last night. It will free up almost half the RAM your tv_terminal is using now, plus it's WAY faster. With more memory, you could do way more.
I can't believe you even packed in an interpreter! This thread is under-viewed!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chip Gracey
Parallax, Inc.
Post Edited (Chip Gracey (Parallax)) : 5/17/2006 5:45:52 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
1+1=10
-Martin
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Martin Hebel
Southern Illinois University Carbondale - Electronic Systems Technologies
Personal Links with plenty of BASIC Stamp info
StampPlot - Graphical Data Acquisition and Control
and another minor one). Before spending too much time to extend it and fix it up I'll have to think
about where, if anywhere, it should be taken.
The interpreter is based on the TinyBasic language: if/then, goto, gosub, rem, return, print, input,
list, run, new, */+-, rnd(), and that's it. Integer variables A-Z only; no arrays, no for loops, no
multi-statement lines, no strings, no floats. The interpreter is entirely my own code, although it
follows a fairly conventional tokenized-basic design. Of course it's painfully slow being a rather
slow interpreter interpreted by SPIN (which is pretty fast)---two levels of interpretation will get
you.
Although BASIC is a somewhat evil language (line numbers!), it does provide an amazing elegant
combination of interactive read/eval/print loop, integral editing system (no full-screen editing
needed, or even a special edit "mode"), and accessible semantics. If I were putting together a
microcomputer today for young kids, I'm not sure what language I'd build in, but it's not clear
how to beat BASIC for sheer accessibility.
How long will it be before you have the cassette interface done so we can load and store programs to tape. I have a machine langauge monitor we can use for testing. In fact the cassette IO was done using a din plug? Chip, have you got the DIN cables left over from the Commodore that you can loan Rokicki.
I'll be happy to beta the cassette drivers when their ready...
Indeed, one of the things on my list of projects is to build a propeller+SecureDigital card that fits inside the CoCo so that csave/cload
(by name!) work *without* an actual attached cassette deck but otherwise the CoCo is functionally unchanged. I know this is a silly
project, but some of the best projects are.
It's too bad only the CoCo 3 has video output rather than RF output. Anyone know how to pull a standard 1v P-P video output out of
a CoCo 1 or CoCo 2, bypassing the RF?
I have at least two of those cassettes recorders but they've been in storage quie awhile. I'll check, I may have a circuit diagram for the COCO NTSC output. If I find it I'll let you know.
Oliver
······ same chip that is used in the RF module.······· I have a couple around here somewhere! I,m the Manager of the OS-9/ cocosig that is STILL
······ on what is now Delphiforums.
····· ·I took over from Marty Goodman back in 93.
····· http://forums.delphiforums.com/cocosig/messages
······ now you may find this interesting! I suddenly realized you don't have a CoCo-3(Hint) I have a spare!
····· ·Analog Devices have a new chip that will NOT do what you want unless you have a Coco-3,except you will also have S-VHS.(grin)
······ which most TV,s have now as a external input,chip is cheep and not too hard to make a usable device!
······ AD 723/4/5···· 3 different versions· PDF files @·· www.analog.com···· The 723 is the simple version The 724 has extras,and the 725 is an
······ improved version of the 724.
····· Has 16 pins SOIC ....· RGB Hsync/Vsync·· Composite· Enable· S-VHS····· +5volts· a luminance TRAP filter
···· which consists of a 47k,IN4148,9nf and a 10nf cap,and a 68 uh choke, if· PAL one justs grounds it!
···· Parts list
··
···· AD 725
····6 x 75 ohms
····6 x .1uf
··· 3 x 220uf Electro Caps
··· 2 x 10uf Electro Caps
··· 1 x 14.318180 MHz Osc
··· composite RCA jack,S-VHS socket·· Small proboard
··· cost less than $30 to make one DIY Now one can use the high end graphics as RGB ANALOG monitors are hard to come by,since the 3 has
··· Composite,one don't need that on the board.
··· Dennis
···
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
http://people.delphiforums.com/cocokiwi/Image/picture.jpg
Post Edited (cocokiwi) : 5/19/2006 2:29:37 PM GMT
Short and sweet...
Neat O!
Kinda of hard to see what you were doing without SOME comments... [noparse]:)[/noparse]
Anyway, good show!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
Also, for those interested the languages we release for the hydra that are pd will be 100% massively commented, since trying to read recursive algorithms without help is really hard -- Tom is just so good at it, he probably has this pattern memorized and that's why he didn't comment it!
Lastly,·this style of compiler/interpreter construction is well documented in The art of compiler design which is very down and dirty by the author of tinybasic, the dragon book won't show you how to do this stuff so short and elegant as tom has done in this example.
Anyway, back to the hydra project, everything is almost done,·I am working on the book right now, the last 1/3rd of it and then everything will be ready for manufacturing. The games and demo that come with it are worth their weight in gold, well worth the wait. I am looking at a 3D pole position game right now [noparse]:)[/noparse]
Andre'