mirror of
https://github.com/AppleCommander/AppleCommander.git
synced 2025-02-27 02:31:23 +00:00
Added set3ByteValue - used for ProDOS disks.
This commit is contained in:
parent
ac4f1cde3d
commit
752b4b124d
@ -76,6 +76,15 @@ public class AppleUtil {
|
|||||||
+ getUnsignedByte(buffer[offset+2])*65536;
|
+ 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.
|
* Extract out an unsigned byte as an int.
|
||||||
* All Java bytes are signed; need to convert to an int
|
* All Java bytes are signed; need to convert to an int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user