fpc/rtl/i8086/setjumph.inc
nickysn 024ebb287e + implemented set_jmp and long_jmp on win16 via the Catch and Throw winapi
functions, which provide the same functionality, but are safe to use in all
  windows modes (e.g. they include the magic for handling jumps to discarded
  or moved code segments in real mode)

git-svn-id: trunk@31579 -
2015-09-08 16:03:50 +00:00

33 lines
949 B
PHP

{
This file is part of the Free Pascal run time library.
Copyright (c) 2013 the Free Pascal development team
SetJmp/Longjmp declarations
See the file COPYING.FPC, included in this distribution,
for details about the copyright.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
Type
jmp_buf = packed record
{$ifdef WIN16}
catch_buf: array [0..8] of SmallInt;
{$else WIN16}
// bx,si,di: Word;
bp,sp: Word;
ip: Word;
{$ifdef FPC_X86_CODE_FAR}
cs: Word;
{$endif FPC_X86_CODE_FAR}
{$endif WIN16}
end;
PJmp_buf = ^jmp_buf;
Function Setjmp (Var S : Jmp_buf) : smallint; [external name 'FPC_SETJMP'];
Procedure longjmp (Var S : Jmp_buf; value : smallint); [external name 'FPC_LONGJMP'];