pine_read32
Read a 32-bit unsigned value from emulated memory at a 4-byte aligned address.
Instructions
Read an unsigned 32-bit little-endian value from emulated memory. Address should be 4-byte aligned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Memory address (4-byte aligned) |
Implementation Reference
- src/tools.ts:55-63 (registration)Registration of the 'pine_read32' tool as a Tool definition in the TOOLS array, including its name, description, and input JSON schema (requires an integer 'address' property with 4-byte alignment).
{ name: "pine_read32", description: "Read an unsigned 32-bit little-endian value from emulated memory. Address should be 4-byte aligned.", inputSchema: { type: "object", required: ["address"], properties: { address: { type: "integer", description: "Memory address (4-byte aligned)" } }, }, }, - src/tools.ts:208-208 (handler)Handler case in the CallToolRequestSchema switch statement: calls pine.read32(addr()) and returns the result formatted as hex and decimal.
case "pine_read32": return ok(`${addrHex(addr())}: ${fmtHex(await pine.read32(addr()))}`); - src/pine.ts:225-229 (helper)The PineClient.read32() method that implements the low-level PINE protocol Read32 operation: sends opcode 0x02 with a 4-byte LE address argument and reads back a 32-bit unsigned LE value from the reply buffer.
async read32(addr: number): Promise<number> { const args = Buffer.alloc(4); args.writeUInt32LE(addr, 0); const r = await this.call(Op.Read32, args); return r.readUInt32LE(0); } - src/pine.ts:28-28 (schema)Definition of the Read32 opcode constant (0x02) used in the PINE wire protocol.
Read32: 0x02,