Embryo Data String Functions
Retrieves the length of the string starting at the given cell. More...
Functions | |
EAPI void | embryo_data_string_get (Embryo_Program *ep, Embryo_Cell *str_cell, char *dst) |
Copies the string starting at the given cell to the given buffer. | |
EAPI void | embryo_data_string_set (Embryo_Program *ep, const char *src, Embryo_Cell *str_cell) |
Copies string in the given buffer into the virtual machine memory starting at the given cell. | |
EAPI Embryo_Cell * | embryo_data_address_get (Embryo_Program *ep, Embryo_Cell addr) |
Retreives a pointer to the address in the virtual machine given by the given cell. | |
Detailed Description
Retrieves the length of the string starting at the given cell.
- Parameters
-
ep The program the cell is part of. str_cell Pointer to the first cell of the string.
- Returns
- The length of the string.
0
is returned if there is an error.
Functions that operate on strings in the memory of a virtual machine.
Function Documentation
◆ embryo_data_address_get()
EAPI Embryo_Cell * embryo_data_address_get | ( | Embryo_Program * | ep, |
Embryo_Cell | addr ) |
Retreives a pointer to the address in the virtual machine given by the given cell.
- Parameters
-
ep The program whose virtual machine address is being queried. addr The given cell.
- Returns
- A pointer to the cell at the given address.
Referenced by embryo_program_run().
◆ embryo_data_string_get()
EAPI void embryo_data_string_get | ( | Embryo_Program * | ep, |
Embryo_Cell * | str_cell, | ||
char * | dst ) |
Copies the string starting at the given cell to the given buffer.
- Parameters
-
ep The program the cell is part of. str_cell Pointer to the first cell of the string. dst The given buffer.
◆ embryo_data_string_set()
EAPI void embryo_data_string_set | ( | Embryo_Program * | ep, |
const char * | src, | ||
Embryo_Cell * | str_cell ) |
Copies string in the given buffer into the virtual machine memory starting at the given cell.
- Parameters
-
ep The program the cell is part of. src The given buffer. str_cell Pointer to the first cell to copy the string to.
Referenced by embryo_program_run().