MCPcopy Create free account
hub / github.com/badvision/jace / fillBanks

Method fillBanks

src/main/java/jace/core/PagedMemory.java:131–142  ·  view source on GitHub ↗
(PagedMemory source)

Source from the content-addressed store, hash-verified

129 }
130
131 public void fillBanks(PagedMemory source) {
132 byte[][] sourceMemory = source.getMemory();
133 int sourceBase = source.type.getBaseAddress() >> 8;
134 int thisBase = type.getBaseAddress() >> 8;
135 int start = Math.max(sourceBase, thisBase);
136 int sourceEnd = sourceBase + source.getMemory().length;
137 int thisEnd = thisBase + getMemory().length;
138 int end = Math.min(sourceEnd, thisEnd);
139 for (int i = start; i < end; i++) {
140 set(i - thisBase, sourceMemory[i - sourceBase]);
141 }
142 }
143}

Callers 2

Calls 3

getMemoryMethod · 0.95
setMethod · 0.95
getBaseAddressMethod · 0.80

Tested by

no test coverage detected