Lines Matching full:substr
33 if (substr($$romref, 0, 2) ne "\x55\xaa");
34 my $size = ord(substr($$romref, 2, 1)) * 512;
50 return (0) if (substr($$romref, $pos, $len) ne ("\xFF" x $len));
51 substr($$romref, $pos, $len) = $s;
59 $pci_hdr_offset = unpack('v', substr($$romref, PCI_PTR_LOC, 2));
60 $pnp_hdr_offset = unpack('v', substr($$romref, PNP_PTR_LOC, 2));
66 or substr($$romref, $pci_hdr_offset, 4) ne 'PCIR'
67 or substr($$romref, $pnp_hdr_offset, 4) ne '$PnP') {
77 $pci_vendor_id = unpack('v', substr($$romref, $pci_hdr_offset+PCI_VEND_ID_OFF, 2));
78 $pci_device_id = unpack('v', substr($$romref, $pci_hdr_offset+PCI_DEV_ID_OFF, 2));
82 substr($$romref, $pci_hdr_offset + PCI_SIZE_OFF, 2)
85 substr($$romref, $pci_hdr_offset+PCI_VEND_ID_OFF, 2)
87 substr($$romref, $pci_hdr_offset+PCI_DEV_ID_OFF, 2)
93 substr($$romref, $pnp_hdr_offset+PNP_DEVICE_OFF, 2)
95 substr($$romref, $pnp_hdr_offset+PNP_CHKSUM_OFF, 1) = "\x00";
96 my $sum = unpack('%8C*', substr($$romref, $pnp_hdr_offset,
98 substr($$romref, $pnp_hdr_offset+PNP_CHKSUM_OFF, 1) = chr(256 - $sum);
106 $undi_hdr_offset = unpack('v', substr($$romref, UNDI_PTR_LOC, 2));
110 or substr($$romref, $undi_hdr_offset, 4) ne 'UNDI') {
116 substr($$romref, $undi_hdr_offset+UNDI_CHKSUM_OFF, 1) = "\x00";
117 my $sum = unpack('%8C*', substr($$romref, $undi_hdr_offset,
119 substr($$romref, $undi_hdr_offset+UNDI_CHKSUM_OFF, 1) = chr(256 - $sum);
134 substr($$romref, 6, 1) = "\x00";
136 substr($$romref, 6, 1) = chr(256 - $sum);
159 substr($rom, 2, 1) = chr((length($rom) + 511) / 512);
191 substr($rom, 2, 1) = chr(($romsize / 512) % 256);
197 substr($rom, MINROMSIZE-2, 2) = "\x80\x80"