| 1 |
/* |
| 2 |
* Copyright (C) 2002-2010 The DOSBox Team |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or modify |
| 5 |
* it under the terms of the GNU General Public License as published by |
| 6 |
* the Free Software Foundation; either version 2 of the License, or |
| 7 |
* (at your option) any later version. |
| 8 |
* |
| 9 |
* This program is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
* GNU General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU General Public License |
| 15 |
* along with this program; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 |
*/ |
| 18 |
|
| 19 |
#include "cpu.h" |
| 20 |
|
| 21 |
|
| 22 |
Bit8u * lookupRMregb[]= |
| 23 |
{ |
| 24 |
®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al, |
| 25 |
®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl, |
| 26 |
®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl, |
| 27 |
®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl, |
| 28 |
®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah, |
| 29 |
®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch, |
| 30 |
®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh, |
| 31 |
®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh, |
| 32 |
|
| 33 |
®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al, |
| 34 |
®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl, |
| 35 |
®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl, |
| 36 |
®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl, |
| 37 |
®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah, |
| 38 |
®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch, |
| 39 |
®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh, |
| 40 |
®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh, |
| 41 |
|
| 42 |
®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al, |
| 43 |
®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl, |
| 44 |
®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl, |
| 45 |
®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl, |
| 46 |
®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah, |
| 47 |
®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch, |
| 48 |
®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh, |
| 49 |
®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh, |
| 50 |
|
| 51 |
®_al,®_al,®_al,®_al,®_al,®_al,®_al,®_al, |
| 52 |
®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl,®_cl, |
| 53 |
®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl,®_dl, |
| 54 |
®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl,®_bl, |
| 55 |
®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah,®_ah, |
| 56 |
®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch,®_ch, |
| 57 |
®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh,®_dh, |
| 58 |
®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh,®_bh |
| 59 |
}; |
| 60 |
|
| 61 |
Bit16u * lookupRMregw[]={ |
| 62 |
®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax, |
| 63 |
®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx, |
| 64 |
®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx, |
| 65 |
®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx, |
| 66 |
®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp, |
| 67 |
®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp, |
| 68 |
®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si, |
| 69 |
®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di, |
| 70 |
|
| 71 |
®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax, |
| 72 |
®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx, |
| 73 |
®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx, |
| 74 |
®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx, |
| 75 |
®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp, |
| 76 |
®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp, |
| 77 |
®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si, |
| 78 |
®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di, |
| 79 |
|
| 80 |
®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax, |
| 81 |
®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx, |
| 82 |
®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx, |
| 83 |
®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx, |
| 84 |
®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp, |
| 85 |
®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp, |
| 86 |
®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si, |
| 87 |
®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di, |
| 88 |
|
| 89 |
®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax,®_ax, |
| 90 |
®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx,®_cx, |
| 91 |
®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx,®_dx, |
| 92 |
®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx,®_bx, |
| 93 |
®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp,®_sp, |
| 94 |
®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp,®_bp, |
| 95 |
®_si,®_si,®_si,®_si,®_si,®_si,®_si,®_si, |
| 96 |
®_di,®_di,®_di,®_di,®_di,®_di,®_di,®_di |
| 97 |
}; |
| 98 |
|
| 99 |
Bit32u * lookupRMregd[256]={ |
| 100 |
®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax, |
| 101 |
®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx, |
| 102 |
®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx, |
| 103 |
®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx, |
| 104 |
®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp, |
| 105 |
®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp, |
| 106 |
®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi, |
| 107 |
®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi, |
| 108 |
|
| 109 |
®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax, |
| 110 |
®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx, |
| 111 |
®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx, |
| 112 |
®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx, |
| 113 |
®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp, |
| 114 |
®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp, |
| 115 |
®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi, |
| 116 |
®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi, |
| 117 |
|
| 118 |
®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax, |
| 119 |
®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx, |
| 120 |
®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx, |
| 121 |
®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx, |
| 122 |
®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp, |
| 123 |
®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp, |
| 124 |
®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi, |
| 125 |
®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi, |
| 126 |
|
| 127 |
®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax,®_eax, |
| 128 |
®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx,®_ecx, |
| 129 |
®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx,®_edx, |
| 130 |
®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx,®_ebx, |
| 131 |
®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp,®_esp, |
| 132 |
®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp,®_ebp, |
| 133 |
®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi,®_esi, |
| 134 |
®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi,®_edi |
| 135 |
}; |
| 136 |
|
| 137 |
|
| 138 |
Bit8u * lookupRMEAregb[256]={ |
| 139 |
/* 12 lines of 16*0 should give nice errors when used */ |
| 140 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 141 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 142 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 143 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 144 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 145 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 146 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 147 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 148 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 149 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 150 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 151 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 152 |
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, |
| 153 |
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, |
| 154 |
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, |
| 155 |
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, |
| 156 |
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, |
| 157 |
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, |
| 158 |
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh, |
| 159 |
®_al,®_cl,®_dl,®_bl,®_ah,®_ch,®_dh,®_bh |
| 160 |
}; |
| 161 |
|
| 162 |
Bit16u * lookupRMEAregw[256]={ |
| 163 |
/* 12 lines of 16*0 should give nice errors when used */ |
| 164 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 165 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 166 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 167 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 168 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 169 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 170 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 171 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 172 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 173 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 174 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 175 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 176 |
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, |
| 177 |
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, |
| 178 |
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, |
| 179 |
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, |
| 180 |
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, |
| 181 |
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, |
| 182 |
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di, |
| 183 |
®_ax,®_cx,®_dx,®_bx,®_sp,®_bp,®_si,®_di |
| 184 |
}; |
| 185 |
|
| 186 |
Bit32u * lookupRMEAregd[256]={ |
| 187 |
/* 12 lines of 16*0 should give nice errors when used */ |
| 188 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 189 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 190 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 191 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 192 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 193 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 194 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 195 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 196 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 197 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 198 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 199 |
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
| 200 |
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, |
| 201 |
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, |
| 202 |
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, |
| 203 |
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, |
| 204 |
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, |
| 205 |
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, |
| 206 |
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi, |
| 207 |
®_eax,®_ecx,®_edx,®_ebx,®_esp,®_ebp,®_esi,®_edi |
| 208 |
}; |
| 209 |
|
| 210 |
|