In article <01beadab$95c3c2c0$b8531fc4@lexlines>,
MW de Jager <mwdeja...@hotmail.com> wrote:
Quote
>I have recently purchased a Pentium II Celeron. I am running Windows 95
>with 32Mb of RAM on a Novell Network.
>For some reason, none of the sof{*word*53}e I write in Borland Pascal 6 or 7,
>will run on this machine. I get a Runtime Error 200, at an address that
>can't be found. The program would not even start executing.
>What am I doing wrong?
You are posting without reading first.
Use this before the CRT:
Unit Fdelay; { Use this before CRT }
interface
const dfix:word=1; { call delay() dfix times }
implementation
{$ifdef msdos}
uses dos;
procedure oldints; assembler; { "variables" in the code segment }
asm dd 0,0 end;
Procedure error;
begin
runerror(200);
End;
Procedure Int0; assembler;
asm
cmp cx,55 { If CX<>55 we are at some other point }
je @ok
sti
call error
@ok:
shr dx,1 { divide dx:ax by 2 }
rcr ax,1
shl Dfix,1 { multiply Dfix by 2 }
iret { return to the DIV (286+) }
end;
{ Int21h handler removes the int0 handler (as well as itself) from the
memory when CtrlBreak vector is set by CRT right after calculating
the delay counter. Note DS does NOT point to the data segment when
this is called }
Procedure Int21h; assembler;
asm
cmp ax,$251B
jne @old { Not setint 1Bh? }
push es; push si; push di
mov si,offset oldints
xor di,di
mov es,di
cld
segcs; movsw
segcs; movsw { restore int 0 }
mov di,$21*4
segcs; movsw { restore int 21h }
segcs; movsw
pop di; pop si; pop es
@old: jmp dword ptr cs:[oldints+4]
end;
type tr=record int0,int21:pointer; End;
pr=^tr;
begin
GetIntVec(0,pr(@oldints)^.int0);
GetIntVec($21,pr(@oldints)^.int21);
SetIntVec(0,@int0);
SetIntVec($21,@int21h);
{$endif}
end.
Osmo