Hi!

I'm writing some 68k modules, for disassembly, assembly, reading 
instructions, analysing instructions, etc.

The package I'm stuck on is supposed to read a 16bit instruction, and then 
break it down into an array, with each element seperated.

So far, I'm trying to read 16bits, at an offset specified by the user, but 
for some reason, all I get is more white spaces infront of the first 16bits in 
the file.

open SOURCE, "$File" or
    die "Cannot open $File\n";

binmode SOURCE;

read SOURCE, $Instr, 2, $Offset;

return $Instr;

I find that if I read from the first byte, I get the first two bytes in my 
file, but if I read from the 5, I just get three white spaces, and then the 
first two bytes.

Can anybody help?

Thanks,

Lewis AS Bassett

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to