To: <mjd-perl-peek+@plover.com>
Subject: PeekPoke
Date: Sun, 25 Dec 2005 07:52:29 -0800

Running XP Home Edition on a P4, this doesn't work.
What's wrong? Thanks. 

use PeekPoke qw(peek poke);
my $Address;
for($Address = 0; $Address < 10; $Address++)
{
 my $Val = peek($Address);
 print "$Address => $Val\n";
}



Subject: Re: PeekPoke 
Date: Sun, 25 Dec 2005 14:30:56 -0500
From: Mark Jason Dominus <mjd@plover.com>


> Running XP Home Edition on a P4, this doesn't work.
> What's wrong?

I don't know.  What did it do that you didn't like?

To: "'Mark Jason Dominus'" <mjd@plover.com>
Subject: RE: PeekPoke 
Date: Sun, 25 Dec 2005 15:03:12 -0800

Current test code is:

use PeekPoke qw(peek poke);
my $Val = peek(1);
print " => $Val\n";
print "All Done\n";



Result is this:

Perl Command Line Interpreter

Perl Command Line Interpreter has encountered a
problem and needs to close. We are sorry for the
inconvenience.

Blah blah ...

Please tell Microsoft about this problem.

Blah blah ...



Entering the debugger gives:

Unhandled exception in perl.exe (PEEKPOKE.DLL): 0xC0000005: Access
Violation.

Excerpt from assembly:
003310C1   call        00331534
003310C6   mov         eax,dword ptr [eax]
003310C8   pop         ecx
003310C9   test        byte ptr [eax+15h],20h
003310CD   je          003310F3
003310CF   call        00331558
003310D4   push        eax
003310D5   call        00331534
003310DA   mov         eax,dword ptr [eax]
003310DC   mov         edi,dword ptr [eax+0Ch]
003310DF   call        00331558
003310E4   push        eax
003310E5   call        0033152E
003310EA   mov         eax,dword ptr [eax]
003310EC   pop         ecx
003310ED   pop         ecx
003310EE   mov         edi,dword ptr [eax+edi*4]
003310F1   jmp         00331101
003310F3   call        00331558
003310F8   push        eax
003310F9   call        00331528
003310FE   pop         ecx
003310FF   mov         edi,eax
00331101   mov         ebp,dword ptr [ebx]	<<<<============ error at
this point
00331103   call        00331558
00331108   push        eax
00331109   call        00331546
0033110E   mov         eax,dword ptr [eax]
00331110   pop         ecx
00331111   push        ebp

Subject: Re: PeekPoke 
Date: Sun, 25 Dec 2005 21:47:53 -0500
From: Mark Jason Dominus <mjd@plover.com>


> Perl Command Line Interpreter has encountered a
> problem and needs to close. We are sorry for the
> inconvenience.

That's what I would expect that program to do.  It looks to me as
though both the program and that module are working properly.

