Rev 1022 | Rev 1063 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1022 | Rev 1043 | ||
|---|---|---|---|
| Line 26... | Line 26... | ||
| 26 | fullAddr = (lineAddrHigh * 65536) + lineAddr; |
26 | fullAddr = (lineAddrHigh * 65536) + lineAddr; |
| 27 | 27 | ||
| 28 | switch(lineCode) |
28 | switch(lineCode) |
| 29 | { |
29 | { |
| 30 | case 0: |
30 | case 0: |
| 31 |
|
31 | //this.myHexLength +=lineDataCount; //(this does now work since it does not count "holes" in hexfile) |
| 32 | if ((fullAddr + lineDataCount - 1) > this.myAddrUpper) this.myAddrUpper = fullAddr + lineDataCount - 1; |
32 | if ((fullAddr + lineDataCount - 1) > this.myAddrUpper) this.myAddrUpper = fullAddr + lineDataCount - 1; |
| 33 | if (lineCode == 0 && fullAddr < this.myAddrLower) this.myAddrLower = fullAddr; |
33 | if (lineCode == 0 && fullAddr < this.myAddrLower) this.myAddrLower = fullAddr; |
| 34 | for (var j = 0; j < lineDataCount; j++) { |
34 | for (var j = 0; j < lineDataCount; j++) { |
| 35 | this.myHexData[fullAddr] = hex2uint(hexLines[n].substr(j * 2 + 9, 2)); |
35 | this.myHexData[fullAddr] = hex2uint(hexLines[n].substr(j * 2 + 9, 2)); |
| 36 | //this.myHexData[fullAddr] &= 255; |
36 | //this.myHexData[fullAddr] &= 255; |
| Line 46... | Line 46... | ||
| 46 | this.myValid = true; |
46 | this.myValid = true; |
| 47 | break; |
47 | break; |
| 48 | 48 | ||
| 49 | } |
49 | } |
| 50 | } |
50 | } |
| - | 51 | this.myHexLength = this.myAddrUpper - this.myAddrLower; |
|
| 51 | } |
52 | } |
| 52 | } |
53 | } |
| 53 | 54 | ||
| 54 | IntelHex.prototype.myHexData = null; |
55 | IntelHex.prototype.myHexData = null; |
| 55 | IntelHex.prototype.myHexLength = null; |
56 | IntelHex.prototype.myHexLength = null; |