mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-01-12 10:31:25 +00:00
Added set3ByteValue - used for ProDOS disks.
This commit is contained in:
parent
ac4f1cde3d
commit
752b4b124d
@ -74,7 +74,16 @@ public class AppleUtil {
|
||||
return getUnsignedByte(buffer[offset])
|
||||
+ getUnsignedByte(buffer[offset+1])*256
|
||||
+ getUnsignedByte(buffer[offset+2])*65536;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of a 3 byte value.
|
||||
*/
|
||||
public static void set3ByteValue(byte[] buffer, int offset, int value) {
|
||||
buffer[offset] = (byte) (value & 0x0000ff);
|
||||
buffer[offset+1] = (byte)((value & 0x00ff00) >> 8);
|
||||
buffer[offset+2] = (byte)((value & 0xff0000) >> 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract out an unsigned byte as an int.
|
||||
|
Loading…
x
Reference in New Issue
Block a user