Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff /home/luke/Downloads/fastdosbox/fastdosbox-1.6/src/cpu/callback.cpp /home/luke/Downloads/db/dosbox-0.74/src/cpu/callback.cpp
- 18a19
- > /* $Id: callback.cpp,v 1.42 2009-08-23 17:24:54 c2woody Exp $ */
- 48c49
- < return i;
- ---
- > return i;
- 59c60
- <
- ---
- >
- 67c68
- < reg_eip=CB_SOFFSET+call_idle*CB_SIZE;
- ---
- > reg_eip=call_idle*CB_SIZE;
- 72c73
- < if (!CPU_CycleAutoAdjust && CPU_Cycles>0)
- ---
- > if (!CPU_CycleAutoAdjust && CPU_Cycles>0)
- 111,114c112,115
- < Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
- < if (val) tempf |= FLAG_ZF;
- < else tempf &= ~FLAG_ZF;
- < mem_writew(SegPhys(ss)+reg_sp+4,tempf);
- ---
- > Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
- > if (val) tempf |= FLAG_ZF;
- > else tempf &= ~FLAG_ZF;
- > mem_writew(SegPhys(ss)+reg_sp+4,tempf);
- 118,121c119,122
- < Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
- < if (val) tempf |= FLAG_CF;
- < else tempf &= ~FLAG_CF;
- < mem_writew(SegPhys(ss)+reg_sp+4,tempf);
- ---
- > Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
- > if (val) tempf |= FLAG_CF;
- > else tempf &= ~FLAG_CF;
- > mem_writew(SegPhys(ss)+reg_sp+4,tempf);
- 125,128c126,129
- < Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
- < if (val) tempf |= FLAG_IF;
- < else tempf &= ~FLAG_IF;
- < mem_writew(SegPhys(ss)+reg_sp+4,tempf);
- ---
- > Bit16u tempf = mem_readw(SegPhys(ss)+reg_sp+4);
- > if (val) tempf |= FLAG_IF;
- > else tempf &= ~FLAG_IF;
- > mem_writew(SegPhys(ss)+reg_sp+4,tempf);
- 145c146
- < if (callback>=CB_MAX)
- ---
- > if (callback>=CB_MAX)
- 221d221
- < phys_writeb(physAddress+0x00,(Bit8u)0xFB); //STI
- 223,225c223,225
- < phys_writeb(physAddress+0x01,(Bit8u)0xFE); //GRP 4
- < phys_writeb(physAddress+0x02,(Bit8u)0x38); //Extra Callback instruction
- < phys_writew(physAddress+0x03,(Bit16u)callback); //The immediate word
- ---
- > phys_writeb(physAddress+0x00,(Bit8u)0xFE); //GRP 4
- > phys_writeb(physAddress+0x01,(Bit8u)0x38); //Extra Callback instruction
- > phys_writew(physAddress+0x02,(Bit16u)callback); //The immediate word
- 228,235c228,236
- < phys_writeb(physAddress+0x01,(Bit8u)0x1e); // push ds
- < phys_writeb(physAddress+0x02,(Bit8u)0x50); // push ax
- < phys_writeb(physAddress+0x03,(Bit8u)0x52); // push dx
- < phys_writew(physAddress+0x04,(Bit16u)0x1ccd); // int 1c
- < phys_writeb(physAddress+0x06,(Bit8u)0xfa); // cli
- < phys_writew(physAddress+0x07,(Bit16u)0x20b0); // mov al, 0x20
- < phys_writew(physAddress+0x09,(Bit16u)0x20e6); // out 0x20, al
- < phys_writeb(physAddress+0x0b,(Bit8u)0x5a); // pop dx
- ---
- > phys_writeb(physAddress+0x00,(Bit8u)0x50); // push ax
- > phys_writeb(physAddress+0x01,(Bit8u)0x52); // push dx
- > phys_writeb(physAddress+0x02,(Bit8u)0x1e); // push ds
- > phys_writew(physAddress+0x03,(Bit16u)0x1ccd); // int 1c
- > phys_writeb(physAddress+0x05,(Bit8u)0xfa); // cli
- > phys_writeb(physAddress+0x06,(Bit8u)0x1f); // pop ds
- > phys_writeb(physAddress+0x07,(Bit8u)0x5a); // pop dx
- > phys_writew(physAddress+0x08,(Bit16u)0x20b0); // mov al, 0x20
- > phys_writew(physAddress+0x0a,(Bit16u)0x20e6); // out 0x20, al
- 237,239c238,239
- < phys_writeb(physAddress+0x0d,(Bit8u)0x1f); // pop ds
- < phys_writeb(physAddress+0x0e,(Bit8u)0xcf); //An IRET Instruction
- < return (use_cb?0x13:0x0f);
- ---
- > phys_writeb(physAddress+0x0d,(Bit8u)0xcf); //An IRET Instruction
- > return (use_cb?0x12:0x0e);
- 354,363c354,359
- < phys_writeb(physAddress+0x00,(Bit8u)0x50); // push ax
- < phys_writeb(physAddress+0x01,(Bit8u)0x53); // push bx
- < phys_writew(physAddress+0x02,(Bit16u)0x0eb4); // mov ah, 0x0e
- < phys_writeb(physAddress+0x04,(Bit8u)0xbb); // mov bx,
- < phys_writew(physAddress+0x05,(Bit16u)0x0007); // 0x0007
- < phys_writew(physAddress+0x07,(Bit16u)0x10cd); // int 10
- < phys_writeb(physAddress+0x09,(Bit8u)0x5b); // pop bx
- < phys_writeb(physAddress+0x0a,(Bit8u)0x58); // pop ax
- < phys_writeb(physAddress+0x0b,(Bit8u)0xcf); //An IRET Instruction
- < return (use_cb?0x10:0x0c);
- ---
- > phys_writeb(physAddress+0x00,(Bit8u)0x50); // push ax
- > phys_writew(physAddress+0x01,(Bit16u)0x0eb4); // mov ah, 0x0e
- > phys_writew(physAddress+0x03,(Bit16u)0x10cd); // int 10
- > phys_writeb(physAddress+0x05,(Bit8u)0x58); // pop ax
- > phys_writeb(physAddress+0x06,(Bit8u)0xcf); //An IRET Instruction
- > return (use_cb?0x0b:0x07);
- 437,448c433
- < case CB_INT13:
- < phys_writeb(physAddress+0x00,(Bit8u)0xFB); //STI
- < if (use_cb) {
- < phys_writeb(physAddress+0x01,(Bit8u)0xFE); //GRP 4
- < phys_writeb(physAddress+0x02,(Bit8u)0x38); //Extra Callback instruction
- < phys_writew(physAddress+0x03,(Bit16u)callback); //The immediate word
- < physAddress+=4;
- < }
- < phys_writeb(physAddress+0x01,(Bit8u)0xCF); //An IRET Instruction
- < phys_writew(physAddress+0x02,(Bit16u)0x0ECD); // int 0e
- < phys_writeb(physAddress+0x04,(Bit8u)0xCF); //An IRET Instruction
- < return (use_cb?9:5);
- ---
- >
- 474c459
- < for (Bitu i = 0;i < CB_SIZE;i++) {
- ---
- > for (Bitu i = 0;i < 16;i++) {
- 479c464
- < void CALLBACK_HandlerObject::Uninstall(){
- ---
- > CALLBACK_HandlerObject::~CALLBACK_HandlerObject(){
- 486c471
- < } else
- ---
- > } else
- 498,502d482
- < installed=false;
- < }
- <
- < CALLBACK_HandlerObject::~CALLBACK_HandlerObject(){
- < Uninstall();
- 511c491
- < } else E_Exit("Callback handler object already installed");
- ---
- > } else E_Exit("Allready installed");
- 519c499
- < } else E_Exit("Callback handler object already installed");
- ---
- > } else E_Exit("Allready installed");
- 529c509
- < } else E_Exit("Callback handler object already installed");
- ---
- > } else E_Exit("Allready installed");
- 568c548
- <
- ---
- >
Advertisement
Add Comment
Please, Sign In to add comment