Article View: comp.lang.pascal.borland
Article #313386+ opcodes - Part 1(?)
From: Robert AH Prins
Date: Fri, 30 Apr 1999 00:00
Date: Fri, 30 Apr 1999 00:00
78 lines
3167 bytes
3167 bytes
Using 386+ opcodes in asm ... end blocks is a PITA, so for those 1/2/4 byte
opcodes that I use regularly, I have set up constants. They allow me to use
them in a more readable
asm
dd instruction_constant
end
fashion.
Below is a list of the ones I've used sofar, maybe others can contribute
more, I would especially be interested in MMX opcodes, as TD is a bit to old
to create these.
const
pushad = $6066;
popad = $6166;
segfs = $64;
seggs = $65;
fs386 = $6664;
gs386 = $6665;
r386 = $66;
a386 = $67;
cwde = $9866;
cdq = $9966;
movsd = $a566;
cmpsd = $a766;
stosd = $ab66;
lodsd = $ad66;
scasd = $af66;
ax_2_fs = $e08e;
ax_2_gs = $e88e;
movzx_eax_al = $c0b60f66; {$c0be0f66 for MOVSX}
^ ^ ^ ^
+---------------+ +------------+
movzx_eax_cl = movzx_eax_al + $1000000;
movzx_eax_dl = movzx_eax_al + $2000000;
movzx_eax_bl = movzx_eax_al + $3000000;
movzx_eax_ah = movzx_eax_al + $4000000;
movzx_eax_ch = movzx_eax_al + $5000000;
movzx_eax_dh = movzx_eax_al + $6000000;
movzx_eax_bh = movzx_eax_al + $7000000;
movzx_ecx_al = $c8b60f66; -+- + same as above for other registers
movzx_edx_al = $d0b60f66; |
movzx_ebx_al = $d8b60f66; |
movzx_esp_al = $e0b60f66; |
movzx_ebp_al = $e8b60f66; |
movzx_esi_al = $f0b60f66; |
movzx_edi_al = $f8b60f66; -+
movzx_eax_ax = $c0b70f66; {$c0bf0f66 for MOVSX}
^ ^ ^ ^
+---------------+ +------------+
movzx_eax_cx = movzx_eax_ax + $1000000;
movzx_eax_dx = movzx_eax_ax + $2000000;
movzx_eax_bx = movzx_eax_ax + $3000000;
movzx_eax_sp = movzx_eax_ax + $4000000;
movzx_eax_bp = movzx_eax_ax + $5000000;
movzx_eax_si = movzx_eax_ax + $6000000;
movzx_eax_di = movzx_eax_ax + $7000000;
movzx_ecx_ax = $c8b70f66; -+- + same as above for other registers
movzx_edx_ax = $d0b70f66; |
movzx_ebx_ax = $d8b70f66; |
movzx_esp_ax = $e0b70f66; |
movzx_ebp_ax = $e8b70f66; |
movzx_esi_ax = $f0b70f66; |
movzx_edi_ax = $f8b70f66; -+
Robert
--
Robert AH Prins
prinsra@williscorroon.com
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<7gctck$7j3$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111659,dfe8b7c4065d87fb,start X-Google-Attributes: gid111659,public X-Google-Thread: 108ebd,dfe8b7c4065d87fb,start X-Google-Attributes: gid108ebd,public From: Robert AH Prins <prinsra@williscorroon.com> Subject: 386+ opcodes - Part 1(?) Date: 1999/04/30 Message-ID: <7gctck$7j3$1@nnrp1.dejanews.com> X-Deja-AN: 472827977 X-Http-Proxy: 1.0 x17.dejanews.com:80 (Squid/1.1.22) for client 193.130.234.1 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Apr 30 18:39:16 1999 GMT Newsgroups: comp.lang.pascal.borland,borland.public.turbopascal X-Http-User-Agent: Mozilla/4.05 [en] (WinNT; I)