ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
peek.c File Reference
#include "../../ugbc.h"

Go to the source code of this file.

Functions

Variablepeek_var (Environment *_environment, char *_location)
 Emit ASM code for PEEK(...).
Variablepeekw_var (Environment *_environment, char *_location)
Variablepeekd_var (Environment *_environment, char *_location)

Function Documentation

◆ peek_var()

Variable * peek_var ( Environment * _environment,
char * _location )

Emit ASM code for PEEK(...).

This function outputs valid code to retrieve a byte from memory, and returns it as a temporary variable. This version is valid for use where the location to be read is an expression

Parameters
_environmentCurrent calling environment
_locationExpression with the location to read from.
Returns
Variable* Temporary variable with the content of the location (1 byte).

Definition at line 130 of file peek.c.

◆ peekd_var()

Variable * peekd_var ( Environment * _environment,
char * _location )

Definition at line 274 of file peek.c.

◆ peekw_var()

Variable * peekw_var ( Environment * _environment,
char * _location )

Definition at line 203 of file peek.c.