MCPcopy Index your code
hub / github.com/Moddable-OpenSource/moddable / generateSegment

Method generateSegment

tools/mchex.js:98–103  ·  view source on GitHub ↗
(addr)

Source from the content-addressed store, hash-verified

96 }
97
98 generateSegment(addr) {
99 this.currentSegment = (addr & 0xffff0000);
100 let out = ":02000002" + ("0000" + (this.currentSegment>>4).toString(16)).slice(-4);
101 let chk = this.hexChecksum(out);
102 return (out + chk).toUpperCase();
103 }
104
105 run() {
106 const source = new Uint8Array(this.readFileBuffer(this.sourcePath));

Callers 1

runMethod · 0.80

Calls 3

hexChecksumMethod · 0.80
sliceMethod · 0.65
toStringMethod · 0.45

Tested by

no test coverage detected