6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 6:47 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Feb 07, 2022 1:51 am 
Offline
User avatar

Joined: Thu Mar 11, 2004 7:42 am
Posts: 362
Back in the day, I ordered a disk from one of the Apple II public domain distributors. On side 1 is 1978 6502 FIG-Forth. On side 2 is a Forth tutorial which contains this all-time gem:
Code:
SCR # 95
 0 FRAME #86 THE FORTH COMMANDMENTS                               
 1  1. I AM THY 'WORD', THOU SHALT SEPARATE ME BY SPACES.         
 2  2. THOU SHALT NOT TAKE NAMED VARIABLES AND CONSTANTS IN VAIN. 
 3  3. REMEMBER TO KEEP HOLY THY NESTING STRUCTURE, NESTING       
 4     COMPLETELY ONE INTO THE OTHER.                             
 5  4. HONOR THY 'IF' WITH A 'THEN'.                               
 6  5. THOU SHALT NOT KILL THY STACK, BY TAKING OFF MORE THAN THOU
 7     PUT ON.                                                     
 8  6. THOU SHALT NOT COMMIT ADULTERATED ERRORS, BY USING COMPILING
 9     WORDS OUTSIDE A DEFINITION.                                 
10  7. THOU SHALT NOT STEAL AN UNTESTED ROUTINE INTO A LOOP.       
11  8. THOU SHALT NOT BEAR FALSE WITNESS, BY USING A 'WORD' BEFORE
12     IT IS DEFINED.                                             
13  9. THOU SHALT COVET 'BEGIN...UNTIL' AND 'LOOP' TO EXECUTE AT   
14     LEAST ONCE.                                                 
15 10. THOU SHALT COVET A SCREEN WITH 'FLUSH'. 'GO' SPREAD WORD.   

And the translation:
Code:
SCR # 96
 0 FRAME #87 SUMMARY OF FORTH RULES                               
 1                                                                 
 2  1. ALL FORTH WORDS MUST BE SEPARATED BY AT LEAST ONE SPACE.   
 3  2. ALL WORDS MUST BE DEFINED BEFORE THEY CAN BE USED.         
 4  3. COMPILING WORDS MUST NEVER BY USED OUTSIDE A DEFINITION.   
 5  4. 'IF' MUST BE BALANCED BY A 'THEN'.                         
 6  5. WHEN USING THE STACK, REMEMBER LIFO (LAST IN FIRST OUT).   
 7  6. WHEN 'NEST'ING, YOU MUST NEST EACH STRUCTURE COMPLETELY     
 8     WITHIN AN OUTER STRUCTURE.                                 
 9  7. NEVER PUT AN UNTESTED ROUTINE INTO A 'LOOP'.               
10  8. USE 'VARIABLES' & 'CONSTANTS' WITH CARE.                   
11  9. REMEMBER THAT ALL 'BEGIN...UNTIL' & 'LOOP' STRUCTURES       
12     EXECUTE AT LEAST ONCE.                                     
13 10. REMEMBER TO SAVE YOUR SCREEN WITH A 'FLUSH'.               
14                                                                 
15     LET'S 'GO' WRITE A PROGRAM!                                 


Top
 Profile  
Reply with quote  
PostPosted: Tue Jan 31, 2023 11:44 pm 
Offline

Joined: Mon Jan 09, 2023 9:33 pm
Posts: 23
Those are serious


Top
 Profile  
Reply with quote  
PostPosted: Wed Feb 01, 2023 6:43 pm 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 660
Location: Potsdam, DE
I have a vague memory of FigForth having one of its error messages as 'An obscure error of the fifth kind has occurred' but with nothing in the code actually calling it... but it's been a long long time.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: