Let AddressSpace do segment selector assignment in NeLoader

This commit is contained in:
caheckman 2019-08-26 10:55:12 -04:00
parent 017537be35
commit b0d90cf36f
5 changed files with 60 additions and 35 deletions

View file

@ -69,7 +69,8 @@ public class ProtectedAddressSpace extends SegmentedAddressSpace {
@Override
public int getNextOpenSegment(Address addr) {
int res = getDefaultSegmentFromFlat(addr.getOffset());
res += 1;
// Advance the selector by 8, accounting for the descriptor table bit and the privilege level bits
res = (res + 8) & 0xfff8;
return res;
}
}