Hi Blaz.
On Sat, 1 May 1999, Blaz Antonic wrote:
>> This is my try to generate a VII data file from DOS.
>> It doesn't work currently. Perhaps anybody can tell me why.
> pointers: array[0 .. 255] of longint absolute $0000:$0000;
> vector: byte;
> begin
> for vector := 0 to 255 do
> writeln('Vector ', vector, ' pointing to ',
> pointers[vector] shr 16, ':', pointers[vector] and $FFFF);
> end.
> This should compile in BP7 and i guess it works. You might want
> to add some dec2hex function (i don't have its source in my
> head, it's easy to write) to get nice looking ($xxxx:$xxxx)
> pairs.
> Redirect program's output to file (program > file) if you want
> your list stored in file.
Based on the above, I suggest the following:
===8<=== CUT ===>8===
program vectable(output);
var vector : array[0 .. 255] of longint absolute $0000:$0000;
N : byte;
procedure hex2( X : byte );
const HEX : string[16] = "0123456789ABCDEF";
begin
write( hex[(X shr 4)+1], hex[(X and 15)+1] );
end;
procedure hex4( X : word );
begin
hex2(X shr 8);
hex2(X and $FF);
end;
begin
for N := 0 to 255 do begin
write( 'Vector ', N, ' pointing to ' );
hex4( vector[N] shr 16 );
write( ':' );
hex4( vector[N] and $FFFF );
writeln
end.
===8<=== CUT ===>8===
Best wishes from Riley.
+----------------------------------------------------------------------+
| There is something frustrating about the quality and speed of Linux |
| development, ie., the quality is too high and the speed is too high, |
| in other words, I can implement this XXXX feature, but I bet someone |
| else has already done so and is just about to release their patch. |
+----------------------------------------------------------------------+
* ftp://ftp.MemAlpha.cx/pub/rhw/Linux
* http://www.MemAlpha.cx/kernel.versions.html