Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

fort

Name: Anonymous 2013-01-31 9:08

i've started learning forth and i just finished my first program tell me what you think
: CHARS 0 DO DUP EMIT LOOP DROP ;
: LINE 5 0 DO 4 I - ROLL 10 * 32 + I 2 MOD 7 * 1 + CHARS LOOP CR ;
: LINES 0 DO 5 0 DO 4 PICK LOOP LINE LOOP 5 0 DO DROP LOOP ;
: SWTOP 1 1 1 0 1 1 LINES ;
: SWMTOP 0 0 1 0 1 8 LINES ;
: SWMID 1 1 1 1 1 1 LINES ;
: SWMBOT 1 0 1 0 0 8 LINES ;
: SWBOT 1 0 1 1 1 1 LINES ;
: SW PAGE SWTOP SWMTOP SWMID SWMBOT SWBOT ;
SW

Name: Anonymous 2013-01-31 9:11

Do a barrel roll!

Name: Anonymous 2013-01-31 11:08

Valid JCL

Name: Anonymous 2013-01-31 11:41

fart
pffffrrrrrttffffrrrppfff

Name: Anonymous 2013-01-31 11:55

Name: Anonymous 2013-01-31 11:58

Name: Anonymous 2013-01-31 14:54

卐卐卐卐卐卐卐卐卐卐________卐
_________卐________卐
_________卐________卐
_________卐________卐
_________卐________卐
_________卐________卐
_________卐________卐
_________卐________卐
_________卐________卐
卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐卐
卐________卐_________
卐________卐_________
卐________卐_________
卐________卐_________
卐________卐_________
卐________卐_________
卐________卐_________
卐________卐卐卐卐卐卐卐卐卐卐

Name: Anonymous 2013-01-31 16:54

this is the redpower compatible version
: CHARS 0 DO DUP EMIT LOOP DROP ;
: ?SPACE 1 = IF 32 EMIT THEN ;
: LINE ?SPACE 5 0 DO 10 * 32 + I 2 /MOD DROP 14 * 2 + CHARS LOOP CR ;
: LINES 0 DO 6 0 DO 5 PICK LOOP LINE LOOP 6 0 DO DROP LOOP ;
: SWTOP 1 1 1 0 1 0 1 LINES ;
: SWMTOP 0 0 1 0 1 1 8 LINES ;
: SWMID 1 1 1 1 1 1 1 LINES ;
: SWMBOT 1 0 1 0 0 1 8 LINES ;
: SWBOT 1 0 1 1 1 1 1 LINES ;
: SW PAGE SWTOP SWMTOP SWMID SWMBOT SWBOT ;
SW

the redpower flavor of forth doesn't come with the roll word, doesn't correctly implement the mod word and has weird errors with code that's more than one line long. also the page word gives you a space at the top-left. it's shit.

Don't change these.
Name: Email:
Entire Thread Thread List