+TheBF Posted January 26, 2019 Author Share Posted January 26, 2019 Rosetta Code Clock I noticed nobody in the Forth community put up an entry in Rosetta code for a clock so I took some pieces from CAMEL99 Forth and created one. It uses the big letter printing demo, plus the .TIME from the ELAPSED program. I put in the caveat that the code requires an interrupt driven timer with a 1/60 second interval. It makes a pretty good timer to just wait for the byte at >8379 to change. I had to include a small pattern description table, because the code might be run on another machine than the TI-99. The one neat thing about the code is I use M+ , which takes 2 ,16 bit integers and adds them to create a 32 bit result. With this I can keep track of 4.1 billion seconds or so on the clock. Here is the code: http://www.rosettacode.org/wiki/Draw_a_clock#Forth 1 Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.