43static void read_data_safe(
Environment * _environment,
char * _variable ) {
49 char typeMismatchDuringReadLabel[
MAX_TEMPORARY_STORAGE]; sprintf( typeMismatchDuringReadLabel,
"%stm", label );
65#if defined(__c64reu__)
78#if defined(__c64reu__)
87#if defined(__c64reu__)
98#if defined(__c64reu__)
110#if defined(__c64reu__)
120#if defined(__c64reu__)
131 switch( variable->
type ) {
136#if defined(__c64reu__)
145#if defined(__c64reu__)
157 read_data_safe( _environment, data->name );
169 cpu_jump( _environment, doneReadLabel );
171 cpu_label( _environment, typeMismatchDuringReadLabel );
186 cpu_jump( _environment, doneReadLabel );
188 cpu_label( _environment, dwordReadLabel );
193#if defined(__c64reu__)
205 cpu_jump( _environment, completeReadLabel );
207 cpu_label( _environment, wordReadLabel );
212#if defined(__c64reu__)
222 cpu_jump( _environment, completeReadLabel );
224 cpu_label( _environment, byteReadLabel );
229#if defined(__c64reu__)
238 cpu_jump( _environment, completeReadLabel );
240 cpu_label( _environment, stringReadLabel );
244#if defined(__c64reu__)
253#if defined(__c64reu__)
259 cpu_jump( _environment, doneReadLabel );
261 cpu_label( _environment, completeReadLabel );
265 cpu_label( _environment, doneReadLabel );
269static void read_data_unsafe_common(
Environment * _environment,
char * _variable ) {
353 read_data_safe( _environment, _variable );
355 read_data_unsafe_common( _environment, _variable );
void cpu_move_32bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_dsfree(Environment *_environment, char *_index)
void cpu_math_add_16bit_with_8bit(Environment *_environment, char *_source, char *_destination, char *_other)
void cpu_mem_move(Environment *_environment, char *_source, char *_destination, char *_size)
void cpu_addressof_16bit(Environment *_environment, char *_source, char *_destination)
void cpu_label(Environment *_environment, char *_label)
void cpu_move_16bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_dsalloc(Environment *_environment, char *_size, char *_index)
void cpu_jump(Environment *_environment, char *_label)
void cpu_move_8bit_indirect2(Environment *_environment, char *_value, char *_source)
void cpu_inc_16bit(Environment *_environment, char *_variable)
void cpu_compare_16bit(Environment *_environment, char *_source, char *_destination, char *_other, int _positive)
CPU 6309: emit code to compare two 16 bit values
void cpu_dsdescriptor(Environment *_environment, char *_index, char *_address, char *_size)
void cpu_compare_and_branch_8bit_const(Environment *_environment, char *_source, int _destination, char *_label, int _positive)
CPU 6309: emit code to compare two 8 bit values and jump if they are equal/different
Variable * variable_retrieve(Environment *_environment, char *_name)
int variable_exists(Environment *_environment, char *_name)
Variable * variable_move(Environment *_environment, char *_source, char *_destination)
Store the value of a variable inside another variable by converting it.
Variable * variable_define(Environment *_environment, char *_name, VariableType _type, int _value)
Define a variable for the program.
Variable * variable_temporary(Environment *_environment, VariableType _type, char *_meaning)
Define a temporary variable.
void variable_move_type(Environment *_environment, char *_type, char *_field, char *_value)
void read_data_unsafe(Environment *_environment, char *_variable)
void bank_read_vars_direct_size(Environment *_environment, char *_bank, char *_address1, char *_address2, int _size)
void bank_read_vars(Environment *_environment, char *_bank, char *_address1, char *_address2, char *_size)
Emit ASM code for instruction BANK READ ....
void read_data(Environment *_environment, char *_variable, int _safe)
Emit code for READ instruction.
VariableType defaultVariableType
#define CRITICAL_READ_DATA_TYPE_NOT_SUPPORTED(v, t)
#define MAX_TEMPORARY_STORAGE
struct _Variable Variable
Structure of a single variable.
struct _Environment Environment
Structure of compilation environment.
enum _VariableType VariableType
Type of variables.
char DATATYPE_AS_STRING[][16]