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
\ Combine Multiple PCI headers with overlapping FCodes.
\ Updated Wed, 14 Jun 2006 at 12:04 PDT by David L. Paktor
\ We already have a source with overlapping FCodes in two FCode blocks
\ We just have to wrap it in multiple PCI headers.
\ Also, we have to make sure to define NoCrash as a command-line symbol
\ While we're at it, let's also create another switchable behavior:
\ If the command-line symbol RangeTwo is defined, it should have
\ a value in the form of a hex number (We'll tace care of the "hex")
\ which will, in a roundabout way, become the starting FCode for
\ the second loading of the common Source.
\ We'll save the symbol in a roundabout manner that will test whether
\ a particular means can be used to preserve the current FCode
\ assignment counter across PCI blocks, especially when there is
\ an fcode-reset associated with the end of a PCI block.
\ Oh, and... We'll control whether the fcode-reset is called by another
\ command-line symbol: If NoReset is defined, we will bypass
\ issuing the fcode-reset command. (We expect we'll be making it
\ automatic and implicit at the end of a PCI block, but we're still
\ testing the premise...)
tokenizer[
h# f2a7 \ Bogus Rev-Level
SET-REV-LEVEL
not-last-image
h# 1fed \ Vendor
h# 9009 \ Bogus Device ID
h# 20109 \ Bogus Class Code
pci-header
]tokenizer
fload TooManyFCodes.fth
[ifdef] RangeTwo
f[
[DEFINED] RangeTwo constant SecondRangeFCode
]f
[endif]
\ Try it once before and once after...
[ifndef] NoReset fcode-reset [else] #message" Not resetting..." [endif]
pci-header-end [ifndef] NoReset fcode-reset [endif]
tokenizer[
h# ea57 \ Bogus Rev-Level
SET-REV-LEVEL
last-image
h# deaf \ Vendor
h# 9021 \ Bogus Device ID
h# 10902 \ Bogus Class Code
pci-header
]tokenizer
[ifdef] RangeTwo
f[
SecondRangeFCode next-fcode
]f
[endif]
fload TooManyFCodes.fth
pci-header-end [ifndef] NoReset fcode-reset [endif]