🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.borland
Article #299

Another compiler patch

#299
From: Robert AH Prins
Date: Thu, 13 May 1999 00:00
40 lines
2330 bytes
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! **********




Of course, if you are prepared to change the entire builtin BASM hash
table, you can actually add RDTSC (and some others) as a valid mnemonic
by throwing out one (or more) of the five virtually obsolete (anyone
still writing code for a 8088/8086/80286?) FPU instructions, F(N)DISI,
F(N)ENI & FSETPM.

Reactions invited...

Robert
--
Robert AH Prins
prinsra@williscorroon.com

PS: Verzeihung fuer die x-post in die Englische Sprache, aber die
Mehrheit der Leser hat wahrscheinlich zufiel Muhe mit Deutsch...


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
Technical Details
Message-ID: <7hf1u6$i72$1@nnrp1.deja.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111659,e340f54864d66569,start
X-Google-Attributes: gid111659,public
X-Google-Thread: 1006de,e340f54864d66569,start
X-Google-Attributes: gid1006de,public
X-Google-Thread: 108ebd,e340f54864d66569,start
X-Google-Attributes: gid108ebd,public
From: Robert AH Prins <prinsra@williscorroon.com>
Subject: Another compiler patch
Date: 1999/05/13
Message-ID: <7hf1u6$i72$1@nnrp1.deja.com>
X-Deja-AN: 477467840
X-Http-Proxy: 1.0 x28.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: Thu May 13 17:25:34 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)