Article View: comp.lang.pascal.borland
Article #304Re: Another compiler patch
From: Robert AH Prins
Date: Sat, 15 May 1999 00:00
Date: Sat, 15 May 1999 00:00
53 lines
2698 bytes
2698 bytes
In article <373CA7E2.52A4@lmic.state.mn.us>,
Pete Olson <pete@lmic.state.mn.us> wrote:
> 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;
As yet, it is, but this is only a first observation resulting from my
work in progress, disassembling TP6' TPC.EXE (to be followed by BPC.EXE)
Getting it in a state where it can be reassembled, it might allow me to
actually modify the builtin assembler, and/or add specific 386+
optimizations to the generated code.
NB: Don't tell me I should be using FPC/GNU/P32/V-Pascal/TMT, I use
Pascal only for hobby purposes and have no problem in running DOS on a
350 MHz PII.
Robert
--
Robert AH Prins
prinsra@williscorroon.com
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
Technical Details
Message-ID:
<7hjl6r$t0r$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7hf1u6$i72$1@nnrp1.deja.com> <373CA7E2.52A4@lmic.state.mn.us>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111659,e340f54864d66569 X-Google-Attributes: gid111659,public X-Google-Thread: 1006de,e340f54864d66569 X-Google-Attributes: gid1006de,public X-Google-Thread: 108ebd,e340f54864d66569 X-Google-Attributes: gid108ebd,public From: Robert AH Prins <prinsra@williscorroon.com> Subject: Re: Another compiler patch Date: 1999/05/15 Message-ID: <7hjl6r$t0r$1@nnrp1.deja.com> X-Deja-AN: 478126113 References: <7hf1u6$i72$1@nnrp1.deja.com> <373CA7E2.52A4@lmic.state.mn.us> X-Http-Proxy: 1.0 x36.deja.com:80 (Squid/1.1.22) for client 193.130.234.1 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Sat May 15 11:18:52 1999 GMT Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal,de.comp.lang.pascal.misc X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I)