conversionunit.pas
来自「自动打印dos产生的文本文件 自动打印dos产生的文本文件」· PAS 代码 · 共 36 行
PAS
36 行
{ Many will recall a series of messages that I posted a few weeks
ago regarding the Implementation of XLAT in BAsm.
I have revisited it With the idea of using it not For filtering
but just For up- and low-casing Pascal Strings. I came With a
pure Assembler Function With a loop of only 4 instructions (TXlat
in Unit TXLATU.PAS). The acCompanying Program TXLATE1.PAS shows
examples on how to use TXlat both For up- or low-casing a String.
The intriguing finding was that when I bench-marked it against
other Assembler Upcasing routines posted in this echo or against
the one in Hax 144 in PC-Techniques (Vol.3, No.6, Feb 1993, p.40)
TXlat got to be 20-30% faster! if anyone is interested I could
upload the benchmarking routines.
So, here is my question: could this possibly be the fastest
routine For String conversion in Turbo Pascal?
Please note that XLAT has special requirements respect to the
location of the source and destination buffers as well as the
translation table. Turbo Pascal memory model places global
Variables in the data segment wh local Variables are located in
the stack segment. The code in TXlat requires that both the table
and the source buffer be located in the data segment.
Another point of interest is that a Pascal String Variabe (Table) is
used as the 256-Byte long table required by XLAT.
-Jose- (1:163/513.3)
============================================================================}
Unit ConversionUnit;
{谀哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪哪?}
{3Unit TXlatU.PAS by Jos
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?