Skip to content

Immediate memory opcodes #318

@chancehudson

Description

@chancehudson

I saw that the addi instruction was added in a recent commit. Is there any interest in adding read_memi and write_memi instructions? My rationale is, I pretty frequently need to read/write single values to non-sequential, constant, memory indices.

read_memi + n: push value at memory index n onto the stack
write_memi + n: pop the top value of the stack and store it at memory index n

n is the memory index. The value being read/written is on the stack. This is beneficial in cases of static memory layouts.

Have you considered such an opcode when writing tasm-lib? Would adding such an instruction add significant overhead to the proving complexity?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions