home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
progjrn
/
pj_6_3.arc
/
LISTING3
< prev
next >
Wrap
Text File
|
1988-04-05
|
678b
|
31 lines
Listing 3 from "A CASE of the Jumps" by Tom Swan. Copyright 1988
by Tom Swan. No commercial use of this code without express
permission of the author.
program case2;
var i : integer;
table : array[ 0 .. 3 ] of word;
procedure jump( index : word );
inline( $5B/ $D1/ $E3/ $FF/ $97/ table );
procedure proc0; begin writeln(0) end;
procedure proc1; begin writeln(1) end;
procedure proc2; begin writeln(2) end;
procedure proc3; begin writeln(3) end;
begin
table[ 0 ] := ofs( proc0 );
table[ 1 ] := ofs( proc1 );
table[ 2 ] := ofs( proc2 );
table[ 3 ] := ofs( proc3 );
for i := 0 to 3 do
jump( i )
end.
Listing 3