Hi! 25-Июл-2006 21:48 [EMAIL PROTECTED] (Japheth) wrote to freedos-devel@lists.sourceforge.net:
>> QEMU has never liked CTMOUSE under FreeDOS, and possibly MS-DOS. I don't >> know why. J> when I modify emm386.asm, proc v86_monitor, so that the IF in real-mode is J> cleared for all interrupts routed to v86-mode, not just the IRQs, it works J> with CTMOUSE in qemu. Do you wish to say, that IF doesn't cleared by FD-EMM386? This is bug. Excerpt from "IA-32 Intel Architecture Software Developer's Manual, Volume 2: Instruction Set": " --------------------------------------------------------------------- INT n/INTO/INT 3 - Call to Interrupt Procedure Opcode Instruction Description CC INT 3 Interrupt 3 - trap to debugger CD ib INT imm8 Interrupt vector number specified by immediate byte CE INTO Interrupt 4 - if overflow flag is 1 Description [...] Operation [...] REAL-ADDRESS-MODE: IF DEST * 4 + 3 outside IDT limit THEN #GP; FI; IF stack not large enough for a 6-byte return information THEN #SS; FI; Push(EFLAGS[15:0]); >IF <- 0; (* Clear interrupt flag *) TF <- 0; (* Clear trap flag *) AC <- 0; (* Clear AC flag *) Push(CS); Push(IP); (* No error codes are pushed *) CS <- IDT(Descriptor(vector_number * 4), selector)); EIP <- IDT(Descriptor(vector_number * 4), offset)); (* 16-bit offset AND 0000FFFFH *) END; " Or, may be I'm wrong? " INTERRUPT-FROM-VIRTUAL-8086-MODE: (* Check segment selector and descriptor for privilege level 0 stack in current TSS *) [...] tempEFLAGS <- EFLAGS; >IF service through interrupt gate THEN IF <- 0; FI; TF <- 0; VM <- 0; RF <- 0; TempSS <- SS; TempESP <- ESP; SS:ESP <- TSS(SS0:ESP0); (* Change to level 0 stack segment *) (* Following pushes are 16 bits for 16-bit gate and 32 bits for 32-bit gates *) (* Segment selector pushes in 32-bit mode are padded to two words *) Push(GS); Push(FS); [...] " But isn't _inside_ V86 behavior of flags shouldn't be changed (in compare with real mode)? J> There might be good reasons to clear IF for IRQs only, as it is done in J> current source code. But IIRC, isn't in real-mode the IF cleared when J> entering J> *any* interrupt handler? It's just in protected mode that there exist 2 kind J> of gates, "interrupt gates" and "task gates", where only the first disables J> interrupts. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel