1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.zmpp.base;
24
25 /***
26 * This interface defines an abstract read access to a region of memory.
27 *
28 * @author Wei-ju Wu
29 * @version 1.0
30 */
31 public interface MemoryReadAccess {
32
33 /***
34 * Reads the unsigned 32 bit word at the specified address.
35 *
36 * @param address the address
37 * @return the 32 bit unsigned value as long
38 */
39 long readUnsigned32(int address);
40
41 /***
42 * Reads the unsigned 16 bit word at the specified address.
43 *
44 * @param address the address
45 * @return the 16 bit unsigned value as int
46 */
47 int readUnsignedShort(int address);
48
49 /***
50 * Returns the signed 16 bit word at the specified address.
51 *
52 * @param address the address
53 * @return the 16 bit signed value
54 */
55 short readShort(int address);
56
57 /***
58 * Returns the unsigned 8 bit value at the specified address.
59 *
60 * @param address the address
61 * @return the 8 bit unsigned value
62 */
63 short readUnsignedByte(int address);
64
65 /***
66 * Returns the signed 8 bit value at specified address.
67 *
68 * @param address the byte address
69 * @return the 8 bit signed value
70 */
71 byte readByte(int address);
72 }