Corewar documentation 1.0.0
Loading...
Searching...
No Matches
instructions.c File Reference

The file containing the instructions functions. More...

Functions

void execute_instructions (champion_t *champion)
 Execute the instructions.
 
int get_int_from_address (node_t *address, int size)
 Get int from address.
 
void write_int_in_address (champion_t *champion, node_t *address, int value)
 Write int in address.
 
int read_int_in_address (node_t *address, int size)
 Read int in address.
 

Detailed Description

The file containing the instructions functions.

Function Documentation

◆ execute_instructions()

void execute_instructions ( champion_t * champion)

Execute the instructions.

Parameters
championThe champion to execute the instructions
Returns
void

◆ get_int_from_address()

int get_int_from_address ( node_t * address,
int size )

Get int from address.

Parameters
addressThe address to get the int
sizeThe size of the int
Returns
int The int

◆ read_int_in_address()

int read_int_in_address ( node_t * address,
int size )

Read int in address.

Parameters
addressThe address to read the int
sizeThe size of the int
Returns
int The int read

◆ write_int_in_address()

void write_int_in_address ( champion_t * champion,
node_t * address,
int value )

Write int in address.

Parameters
championThe champion to write the int
addressThe address to write the int
valueThe value to write