Hash :
acf5213f
Author :
Date :
2006-10-14T20:31:53
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
\ Modified Command-line-defined conditional test.
\ Using it to create anomalies for the detokenizer...
\ Updated Wed, 29 Jun 2005 at 13:43 by David L. Paktor
\
\ Symbol moogoo is either defined true (-1) or false (0), or is absent
[ifndef] moogoo
f[
.( Y'gotta define MooGoo on the command-line.)
." "!"
." X
a line." ." Another on the line."
." "t(Lower-case will be okay, too)"
f]
#message Use -D moogoo=true or -D moogoo=false
[message] or even -D moogoo=-1 or -D moogoo=0
[#message]
[else]
tokenizer[
h# feeb \ Bogus Rev-Level
SET-REV-LEVEL
not-last-image
h# 1fad \ Vendor
h# c0ed \ Bogus Device ID
h# 90210 \ Bogus Class Code
pci-header
]tokenizer
fcode-version2
f[
[defined] moogoo
f]
fload TokConstCondTst02.fth
fcode-end
tokenizer[
reset-symbols
]tokenizer
fcode-version2
f[
[defined] moogoo 0=
f]
fload TokConstCondTst02.fth
." De-tokenize THIS, wise-guy!"n"
tokenizer[
0 emit-byte \ Fake a premature end0
6 emit-byte \ Just to be confusing!
h# 77 emit-byte
]tokenizer
fcode-end
pci-header-end
tokenizer[
h# 2a55 \ Bogus Rev-Level
SET-REV-LEVEL
last-image
h# 5afe \ Vendor
h# 1991 \ Bogus Device ID
h# 10203 \ Bogus Class Code
pci-header
]tokenizer
fcode-version2
tokenizer[ reset-symbols true ]tokenizer
fload TokConstCondTst02.fth
tokenizer[
\ Fake Fcode-Block header in the middle of things...
h# f1 emit-byte \ Fake start-byte
8 emit-byte \ Fake format
h# 21 emit-byte \ Fake checksum
h# 95 emit-byte
0 emit-byte \ Fake length
0 emit-byte
0 emit-byte
h# 12 emit-byte
reset-symbols
false
]tokenizer
reset-symbols
fload TokConstCondTst02.fth
fcode-end
pci-header-end
[then]