Article View: comp.lang.pascal.borland
Article #298Re: Another compiler patch
From: Robert AH Prins
Date: Wed, 19 May 1999 00:00
Date: Wed, 19 May 1999 00:00
83 lines
3783 bytes
3783 bytes
In article <373EFB4B.79B169B4@ls3.cs.uni-dortmund.de>,
kokoll00@marvin.cs.uni-dortmund.de wrote:
> Robert AH Prins wrote:
> >
> > 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.
> When you don't have any problem in running DOS on a 350 MHz PII (I do
> the same, by the way), then you might want to take a look at some
> screenshots taken from my DOS GUI (actually, something like Windows
> 3.x). Check out the website at
> http://ls3-www.cs.uni-dortmund.de/~koll/DW
> Be careful, the page is about to move to http://www.deskwork.de
They look very impressive!
BTW, in addition to my earlier post, FNENI (Enable interrupts, an
obsolete 8086 instruction) has the same hash-key as RDTSC, so instead of
sacrificing the stand-alone AAM, you can use FNENI. Replace the text,
and change the four bytes following it into "00 01 0F 31". It seamlessly
enables RDTSC.
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:
<7huq1j$9pk$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> <7hjl6r$t0r$1@nnrp1.deja.com> <373EFB4B.79B169B4@ls3.cs.uni-dortmund.de>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/19 Message-ID: <7huq1j$9pk$1@nnrp1.deja.com> X-Deja-AN: 479662012 References: <7hf1u6$i72$1@nnrp1.deja.com> <373CA7E2.52A4@lmic.state.mn.us> <7hjl6r$t0r$1@nnrp1.deja.com> <373EFB4B.79B169B4@ls3.cs.uni-dortmund.de> X-Http-Proxy: 1.0 x39.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: Wed May 19 16:48: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)