DOSBox-X
|
00001 /* 00002 * Copyright (C) 2002-2020 The DOSBox Team 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License along 00015 * with this program; if not, write to the Free Software Foundation, Inc., 00016 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 */ 00018 00019 #include "cpu.h" 00020 00021 00022 Bit8u * lookupRMregb[]= 00023 { 00024 ®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al, 00025 ®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl, 00026 ®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl, 00027 ®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl, 00028 ®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah, 00029 ®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch, 00030 ®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh, 00031 ®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh, 00032 00033 ®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al, 00034 ®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl, 00035 ®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl, 00036 ®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl, 00037 ®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah, 00038 ®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch, 00039 ®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh, 00040 ®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh, 00041 00042 ®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al, 00043 ®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl, 00044 ®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl, 00045 ®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl, 00046 ®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah, 00047 ®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch, 00048 ®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh, 00049 ®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh, 00050 00051 ®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al, 00052 ®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl, 00053 ®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl, 00054 ®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl, 00055 ®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah, 00056 ®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch, 00057 ®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh, 00058 ®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh 00059 }; 00060 00061 Bit16u * lookupRMregw[]={ 00062 ®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax, 00063 ®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx, 00064 ®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx, 00065 ®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx, 00066 ®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp, 00067 ®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp, 00068 ®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si, 00069 ®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di, 00070 00071 ®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax, 00072 ®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx, 00073 ®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx, 00074 ®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx, 00075 ®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp, 00076 ®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp, 00077 ®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si, 00078 ®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di, 00079 00080 ®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax, 00081 ®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx, 00082 ®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx, 00083 ®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx, 00084 ®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp, 00085 ®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp, 00086 ®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si, 00087 ®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di, 00088 00089 ®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax, 00090 ®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx, 00091 ®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx, 00092 ®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx, 00093 ®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp, 00094 ®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp, 00095 ®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si, 00096 ®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di 00097 }; 00098 00099 Bit32u * lookupRMregd[256]={ 00100 ®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax, 00101 ®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx, 00102 ®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx, 00103 ®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx, 00104 ®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp, 00105 ®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp, 00106 ®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi, 00107 ®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi, 00108 00109 ®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax, 00110 ®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx, 00111 ®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx, 00112 ®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx, 00113 ®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp, 00114 ®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp, 00115 ®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi, 00116 ®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi, 00117 00118 ®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax, 00119 ®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx, 00120 ®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx, 00121 ®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx, 00122 ®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp, 00123 ®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp, 00124 ®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi, 00125 ®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi, 00126 00127 ®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax, 00128 ®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx, 00129 ®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx, 00130 ®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx, 00131 ®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp, 00132 ®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp, 00133 ®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi, 00134 ®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi 00135 }; 00136 00137 00138 Bit8u * lookupRMEAregb[256]={ 00139 /* 12 lines of 16*0 should give nice errors when used */ 00140 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00141 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00142 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00143 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00144 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00145 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00146 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00147 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00148 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00149 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00150 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00151 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00152 ®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, 00153 ®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, 00154 ®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, 00155 ®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, 00156 ®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, 00157 ®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, 00158 ®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, 00159 ®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh 00160 }; 00161 00162 Bit16u * lookupRMEAregw[256]={ 00163 /* 12 lines of 16*0 should give nice errors when used */ 00164 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00166 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00168 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00170 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00171 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00172 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00173 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00174 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00175 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00176 ®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, 00177 ®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, 00178 ®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, 00179 ®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, 00180 ®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, 00181 ®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, 00182 ®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, 00183 ®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di 00184 }; 00185 00186 Bit32u * lookupRMEAregd[256]={ 00187 /* 12 lines of 16*0 should give nice errors when used */ 00188 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00190 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00192 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00193 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00194 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00195 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00196 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00198 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 00200 ®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, 00201 ®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, 00202 ®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, 00203 ®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, 00204 ®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, 00205 ®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, 00206 ®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, 00207 ®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi 00208 }; 00209 00210