unit debug;

interface

var
    debug_tmp:longint;
    debug_single:single;

procedure beep;
procedure dump_stack(name:string);


implementation

uses crt;

procedure beep;
begin
 sound(300); delay(200); nosound;
end;

procedure dump_stack(name:string);
var fw1:file;
i,size,from:word;
begin
size:=16384;
asm
mov ax, ss
mov from, ax
end;
FileMode:=2; {open file read only}
Assign(fw1, name);
Rewrite(fw1,1);
Reset(fw1, 1);
for i:=0 to size-1 do BlockWrite(fw1, mem[from:i], 1);
Close(fw1);
end;



end.