Article View: comp.lang.pascal.borland
Article #303Re: Another compiler patch
From: Pete Olson
Date: Fri, 14 May 1999 00:00
Date: Fri, 14 May 1999 00:00
28 lines
1752 bytes
1752 bytes
Robert AH Prins wrote:
>
> Hi all,
>
> As you may remember, I once posted a message that told you that the
> builtin assembler in TP6 and BP7 allows the use of AAM & AAD with an
> operand, ie AAD 16 will result in "D4h 10h" being generated. If you are
> willing to sacrifice a little compatibility, and are prepared to always
> code AAD 10 & AAM 10, you can use the plain AAD and AAM instructions to
> encode two more useful two-byte (non-operand!) instructions, and one
> that seems to come to mind to me is RDTSC, (OF 31). To make the patch,
> open a backup of your compiler in your favourite hex-editor, search for
> AAD/AAM and then for "D4 0A" (if AAM) or "D5 0A" (if AAM) closely
> following them and replace these two bytes with your favorite two-byte
> Pentium (P2/P3) opcode bytes.
>
> I tested it on TP6, and it works!! (Which is very, very useful!)
>
> ********** YOU MUST NOT CHANGE THE ACTUAL MNEMONIC! **********
This seems like an awful lot of work. Why not just
asm
db $0f,$31 {rdtsc}
end;
Pete
Technical Details
Message-ID:
<373CA7E2.52A4@lmic.state.mn.us>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7hf1u6$i72$1@nnrp1.deja.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108ebd,e340f54864d66569 X-Google-Attributes: gid108ebd,public X-Google-Thread: 111659,e340f54864d66569 X-Google-Attributes: gid111659,public X-Google-Thread: 1006de,e340f54864d66569 X-Google-Attributes: gid1006de,public From: Pete Olson <pete@lmic.state.mn.us> Subject: Re: Another compiler patch Date: 1999/05/14 Message-ID: <373CA7E2.52A4@lmic.state.mn.us> X-Deja-AN: 477980547 Content-Transfer-Encoding: 7bit References: <7hf1u6$i72$1@nnrp1.deja.com> Organization: LMIC Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal,de.comp.lang.pascal.misc