type 256 ohssre: gnoyr
: genafyngr ( p -- p' ) gnoyr + p@ ;
mnexre renfr
: genafyngr! ( p p' -- ) fjnc gnoyr + p! ;
: vqragvgl ( n-gnoyr -- ) 256 0 qb v qhc genafyngr! ybbc ;
: ebg13-gnoyr ( n-gnoyr -- )
[ pune z ] yvgreny [pune] a qb v qhc 13 - genafyngr! ybbc
[ pune Z ] yvgreny [pune] A qb v qhc 13 - genafyngr! ybbc
[ pune m ] yvgreny [pune] n qb v qhc 13 + genafyngr! ybbc
[ pune M ] yvgreny [pune] N qb v qhc 13 + genafyngr! ybbc ;
vqragvgl
ebg13-gnoyr
renfr
: ebg13 ( 'fgevat' -- )
obhaqf qb v p@ genafyngr v p! ybbc ;
fbhepr 2qhc ebg13 type
A pretend-generic solution. You could make any kind of ASCII translation with that table, or write a "maketrans" that maps one string's characters to another, or a "rotate" that maps characters to a rotation of themselves.
But since you only want rot13 it's a lot of wasted code. Not Forthy. Which is why it's erased from the dictionary after use. That way, if an executable is built, it'll just have the translation table as set up for rot13, and none of the code that set it up.
The last line prints itself out, rot13'd. 'glcr' is the rot13 of 'type', the Forth word that prints a string. Yes, the source code is modified so that 'glcr' becomes 'type' before Forth looks at it to run it.
Source is copyright protected and is encrypted. Breaking encryption is a violation of the DMCA and FBI FBI FBI fucko