Accessing BIOS area

I tried accessing BIOS memory with the following code:

public static void main(String[] args) throws Exception {
final ResourceManager rm = (ResourceManager) InitialNaming.lookup(ResourceManager.NAME);
final ResourceOwner owner = new SimpleResourceOwner("System Area");
final Address ptr = Address.valueOf(0x00400);
final long size = 0x000ff;
MemoryResource systemRegion = rm.claimMemoryResource(owner, ptr, size, ResourceManager.MEMMODE_NORMAL);
for(int i = 0; i < 16; i++) {
System.out.println(systemRegion.getByte(i));
}
systemRegion.release();
}

I got a softbytecode exception. Is this expected behaviour? If so, what is the correct way of accessing BIOS. Thanks.

What exactly is a SoftByte exception?

Hi:

What exactly is a softbyte exception ?
What situations warrant throwing this exception ?

thanks
Dev.

q&a

The softbytecode class is used by the VM, in this case to throw nullpointer exceptions.
So it is not a seperate exception.

q&a

What exception did you get?

About the bios, there is a bios device, but it need heavy refactoring, so there is no real preferred method at the moment, but there will be.

Stack trace

(excuse me while I truncate the stack trace a bit since I've got to manually type it)

NPE at address 00109AB4 (EAX 00000400 EBX 000000FF ECX 0AFBAB98 EDX FFFFFFFF ESI FFFFFFFF EDI 016DD2B8 ESP 0AC4C05C EIP 00109AB4 CR2 00000400 EFLAGS 00013206)
Trace(10): SoftByteCodes!systemException (311)
MemoryResourceImpl!getByte (108)
SystemAreaTest!main (19)