MCPcopy Create free account
hub / github.com/GamerHack/GamerHack.github.io / write64

Function write64

g2all/900/module/rw.js:126–140  ·  view source on GitHub ↗
(u8_view, offset, value)

Source from the content-addressed store, hash-verified

124}
125
126export function write64(u8_view, offset, value) {
127 if (!(value instanceof Int)) {
128 throw TypeError('write64 value must be an Int');
129 }
130
131 let low = value.lo;
132 let high = value.hi;
133
134 for (let i = 0; i < 4; i++) {
135 u8_view[offset + i] = (low >>> i*8) & 0xff;
136 }
137 for (let i = 0; i < 4; i++) {
138 u8_view[offset + 4 + i] = (high >>> i*8) & 0xff;
139 }
140}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected