Lines Matching refs:M

90 	memset(&M, 0, sizeof(M));  in BE_init()
96 M.mem_base = malloc(memSize); in BE_init()
98 if (M.mem_base == NULL){ in BE_init()
102 M.mem_size = memSize; in BE_init()
110 M.x86.debug = debugFlags; in BE_init()
150 memcpy((u8 *) M.mem_base, info->LowMem, sizeof(info->LowMem)); in BE_setVGA()
172 memcpy(info->LowMem, (u8 *) M.mem_base, sizeof(info->LowMem)); in BE_getVGA()
197 return (void *)(M.mem_base + addr); in BE_mapRealPointer()
221 return (void *)(M.mem_base + ((u32) * rseg << 4) + *roff); in BE_getVESABuf()
230 free(M.mem_base); in BE_exit()
249 M.x86.R_EAX = regs->e.eax; in BE_callRealMode()
250 M.x86.R_EBX = regs->e.ebx; in BE_callRealMode()
251 M.x86.R_ECX = regs->e.ecx; in BE_callRealMode()
252 M.x86.R_EDX = regs->e.edx; in BE_callRealMode()
253 M.x86.R_ESI = regs->e.esi; in BE_callRealMode()
254 M.x86.R_EDI = regs->e.edi; in BE_callRealMode()
255 M.x86.R_DS = sregs->ds; in BE_callRealMode()
256 M.x86.R_ES = sregs->es; in BE_callRealMode()
257 M.x86.R_FS = sregs->fs; in BE_callRealMode()
258 M.x86.R_GS = sregs->gs; in BE_callRealMode()
260 ((u8 *) M.mem_base)[0x4000] = 0x9A; in BE_callRealMode()
261 ((u8 *) M.mem_base)[0x4001] = (u8) off; in BE_callRealMode()
262 ((u8 *) M.mem_base)[0x4002] = (u8) (off >> 8); in BE_callRealMode()
263 ((u8 *) M.mem_base)[0x4003] = (u8) seg; in BE_callRealMode()
264 ((u8 *) M.mem_base)[0x4004] = (u8) (seg >> 8); in BE_callRealMode()
265 ((u8 *) M.mem_base)[0x4005] = 0xF1; /* Illegal op-code */ in BE_callRealMode()
266 M.x86.R_CS = SEG(0x04000); in BE_callRealMode()
267 M.x86.R_IP = OFF(0x04000); in BE_callRealMode()
269 M.x86.R_SS = SEG(M.mem_size - 2); in BE_callRealMode()
270 M.x86.R_SP = OFF(M.mem_size - 2) + 2; in BE_callRealMode()
274 regs->e.cflag = M.x86.R_EFLG & F_CF; in BE_callRealMode()
275 regs->e.eax = M.x86.R_EAX; in BE_callRealMode()
276 regs->e.ebx = M.x86.R_EBX; in BE_callRealMode()
277 regs->e.ecx = M.x86.R_ECX; in BE_callRealMode()
278 regs->e.edx = M.x86.R_EDX; in BE_callRealMode()
279 regs->e.esi = M.x86.R_ESI; in BE_callRealMode()
280 regs->e.edi = M.x86.R_EDI; in BE_callRealMode()
281 sregs->ds = M.x86.R_DS; in BE_callRealMode()
282 sregs->es = M.x86.R_ES; in BE_callRealMode()
283 sregs->fs = M.x86.R_FS; in BE_callRealMode()
284 sregs->gs = M.x86.R_GS; in BE_callRealMode()
300 M.x86.R_EAX = in->e.eax; in BE_int86()
301 M.x86.R_EBX = in->e.ebx; in BE_int86()
302 M.x86.R_ECX = in->e.ecx; in BE_int86()
303 M.x86.R_EDX = in->e.edx; in BE_int86()
304 M.x86.R_ESI = in->e.esi; in BE_int86()
305 M.x86.R_EDI = in->e.edi; in BE_int86()
306 ((u8 *) M.mem_base)[0x4000] = 0xCD; in BE_int86()
307 ((u8 *) M.mem_base)[0x4001] = (u8) intno; in BE_int86()
308 ((u8 *) M.mem_base)[0x4002] = 0xF1; in BE_int86()
309 M.x86.R_CS = SEG(0x04000); in BE_int86()
310 M.x86.R_IP = OFF(0x04000); in BE_int86()
312 M.x86.R_SS = SEG(M.mem_size - 1); in BE_int86()
313 M.x86.R_SP = OFF(M.mem_size - 1) - 1; in BE_int86()
316 out->e.cflag = M.x86.R_EFLG & F_CF; in BE_int86()
317 out->e.eax = M.x86.R_EAX; in BE_int86()
318 out->e.ebx = M.x86.R_EBX; in BE_int86()
319 out->e.ecx = M.x86.R_ECX; in BE_int86()
320 out->e.edx = M.x86.R_EDX; in BE_int86()
321 out->e.esi = M.x86.R_ESI; in BE_int86()
322 out->e.edi = M.x86.R_EDI; in BE_int86()
340 M.x86.R_EAX = in->e.eax; in BE_int86x()
341 M.x86.R_EBX = in->e.ebx; in BE_int86x()
342 M.x86.R_ECX = in->e.ecx; in BE_int86x()
343 M.x86.R_EDX = in->e.edx; in BE_int86x()
344 M.x86.R_ESI = in->e.esi; in BE_int86x()
345 M.x86.R_EDI = in->e.edi; in BE_int86x()
346 M.x86.R_DS = sregs->ds; in BE_int86x()
347 M.x86.R_ES = sregs->es; in BE_int86x()
348 M.x86.R_FS = sregs->fs; in BE_int86x()
349 M.x86.R_GS = sregs->gs; in BE_int86x()
350 ((u8 *) M.mem_base)[0x4000] = 0xCD; in BE_int86x()
351 ((u8 *) M.mem_base)[0x4001] = (u8) intno; in BE_int86x()
352 ((u8 *) M.mem_base)[0x4002] = 0xF1; in BE_int86x()
353 M.x86.R_CS = SEG(0x04000); in BE_int86x()
354 M.x86.R_IP = OFF(0x04000); in BE_int86x()
356 M.x86.R_SS = SEG(M.mem_size - 1); in BE_int86x()
357 M.x86.R_SP = OFF(M.mem_size - 1) - 1; in BE_int86x()
360 out->e.cflag = M.x86.R_EFLG & F_CF; in BE_int86x()
361 out->e.eax = M.x86.R_EAX; in BE_int86x()
362 out->e.ebx = M.x86.R_EBX; in BE_int86x()
363 out->e.ecx = M.x86.R_ECX; in BE_int86x()
364 out->e.edx = M.x86.R_EDX; in BE_int86x()
365 out->e.esi = M.x86.R_ESI; in BE_int86x()
366 out->e.edi = M.x86.R_EDI; in BE_int86x()
367 sregs->ds = M.x86.R_DS; in BE_int86x()
368 sregs->es = M.x86.R_ES; in BE_int86x()
369 sregs->fs = M.x86.R_FS; in BE_int86x()
370 sregs->gs = M.x86.R_GS; in BE_int86x()