Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: bc819
  • Order by date
  1. bc819

    Perl and ParPort and window XP

    Hi, Does anyone know how to use the parport with perl on a windows XP machine? I'd like to use a perl script to drive couple parallel port pins. Thanks.
  2. bc819

    how to read consective lines from a file

    Thanks, guys. I tried vjcyrano's srcript and it does what I want. I didn't try the other 2 yet.
  3. bc819

    how to read consective lines from a file

    I'd like to read several consective lines from a file. Could someone show me how to do it. I know i can put several foreach loops, but it is very clumsy. Thanks. Here what i did: open (FILE, "t") || die "can't open t.num: $!"; # create an array of the the file content @input = <FILE>; # close...
  4. bc819

    intel hex record

    problem fixed: added a line: $chksum =~ s/ /0/g; before append it to $str
  5. bc819

    intel hex record

    help... $chksum = sprintf("%2x",$chksum); works fine when chksum is greater than 0x0f. If it's less than 0x10, the leading 0 does not show up in the string, only a space and the digit is appended at the end of the string. Any idea how to correct this problem? Thanks
  6. bc819

    intel hex record

    rharsh, please take a look at my mod on your code, I used the xor to compute 2's complement. Thanks again for your effort. my $str = '1000F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F10'; my $check = substr($str,length($str)-2,2, ""); #Strip Checksum my $sum; $sum += $_ for unpack('C*', pack("H*"...
  7. bc819

    intel hex record

    &two_comp('00') should return (00). rharsh, thanks for the srcipt.
  8. bc819

    intel hex record

    Thanks, KevinADC. However, the script i'm looking for is not that complicated. All I need is to convert 2 char in the string to hex and then add them all up, then negate the number and add 1 to it. Take the LSB and put it back to the end of the string. That is it. I'm reading the Perl Cookbook...
  9. bc819

    intel hex record

    Does anyone know how to write a perl script to do a checksum calculation of an intel hex record? The intel hex record format is: :BBAAAATTDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDCC where BB = 2 digit byte count AAAA = 4 digit hex address TT = 2 digit hex record type DD = 2 digit hex data byte CC = 2...

Part and Inventory Search

Back
Top