Post Reply 
FORTH for the SHARP PC-E500 (S)
11-04-2021, 05:48 PM (This post was last modified: 11-04-2021 06:19 PM by Klaus Overhage.)
Post: #43
RE: FORTH for the SHARP PC-E500 (S)
It's a round thing: an extensive programming language including a detailed manual (65 pages are printed out). Thank you for that Rob, I'm thrilled. Now there are floating point numbers, so Forth go ahead and draw a sine curve in the display.
   
Code:
\ SIN-DEMO.FTH
.( Loading SIN-DEMO... )
ANEW _SIN-DEMO_

3.141592654e FCONSTANT PI

: fdx        \ step size in radians 
 4e PI F* 240e F/ ;

: sin-demo
PAGE
240 0 DO
I               \ x of pixle-coordinate
I S>F fdx F*    \ x in radians
FSIN 1e F+      \ y between 0 and  2
15.5e F*        \ y between 0 and 31
FROUND F>S
GPOINT
LOOP ;

sin-demo
From Forth500 with INCLUDE COM: loaded and started. (I previously set the PC-E500 to RAD in BASIC mode with Shift-DRG.)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
FORTH for the SHARP PC-E500 (S) - Helix - 09-06-2021, 11:41 PM
RE: FORTH for the SHARP PC-E500 (S) - dmh - 10-02-2022, 02:29 PM
RE: FORTH for the SHARP PC-E500 (S) - dmh - 10-04-2022, 12:46 PM
RE: FORTH for the SHARP PC-E500 (S) - dmh - 10-04-2022, 10:55 PM
RE: FORTH for the SHARP PC-E500 (S) - Klaus Overhage - 11-04-2021 05:48 PM



User(s) browsing this thread: 1 Guest(s)