ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
_var.c
Go to the documentation of this file.
1/*****************************************************************************
2 * ugBASIC - an isomorphic BASIC language compiler for retrocomputers *
3 *****************************************************************************
4 * Copyright 2021-2026 Marco Spedaletti (asimov@mclink.it)
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *----------------------------------------------------------------------------
18 * Concesso in licenza secondo i termini della Licenza Apache, versione 2.0
19 * (la "Licenza"); è proibito usare questo file se non in conformità alla
20 * Licenza. Una copia della Licenza è disponibile all'indirizzo:
21 *
22 * http://www.apache.org/licenses/LICENSE-2.0
23 *
24 * Se non richiesto dalla legislazione vigente o concordato per iscritto,
25 * il software distribuito nei termini della Licenza è distribuito
26 * "COSÌ COM'È", SENZA GARANZIE O CONDIZIONI DI ALCUN TIPO, esplicite o
27 * implicite. Consultare la Licenza per il testo specifico che regola le
28 * autorizzazioni e le limitazioni previste dalla medesima.
29 ****************************************************************************/
30
31/****************************************************************************
32 * INCLUDE SECTION
33 ****************************************************************************/
34
35#include "../../ugbc.h"
36
37/****************************************************************************
38 * CODE SECTION
39 ****************************************************************************/
40
41extern char BANK_TYPE_AS_STRING[][16];
42extern char DATATYPE_AS_STRING[][16];
43
44static void variable_cleanup_entry( Environment * _environment, Variable * _first ) {
45
46 Variable * variable = _first;
47
48 while( variable ) {
49
50 if ( ( !variable->assigned || ( variable->assigned && !variable->temporary ) ) ) {
51 switch( variable->type ) {
52 case VT_CHAR:
53 case VT_BYTE:
54 case VT_SBYTE:
55 case VT_COLOR:
56 case VT_THREAD:
57 vars_emit_byte( _environment, variable->realName, variable->initialValue);
58 break;
59 case VT_DOJOKA:
60 outline1("%s: defs 4", variable->realName);
61 break;
62 case VT_IMAGEREF:
63 outline1("%s: defs 14", variable->realName);
64 break;
65 case VT_PATH:
66 outline1("%s: defs 16", variable->realName);
67 break;
68 case VT_VECTOR2:
69 outline1("%s: defs 4", variable->realName);
70 break;
71 case VT_WORD:
72 case VT_SWORD:
73 case VT_POSITION:
74 case VT_ADDRESS:
75 vars_emit_word( _environment, variable->realName, variable->initialValue);
76 break;
77 case VT_DWORD:
78 case VT_SDWORD:
79 vars_emit_dword( _environment, variable->realName, variable->initialValue);
80 break;
81 case VT_NUMBER:
82 vars_emit_number( _environment, variable->realName, variable->initialValue);
83 break;
84 case VT_FLOAT:
85 if ( variable->memoryArea ) {
86 outline2("%s: EQU $%4.4x", variable->realName, variable->absoluteAddress);
87 } else {
88 outline2("%s: defs %d", variable->realName, 1 << VT_FLOAT_NORMALIZED_POW2_WIDTH( variable->arrayPrecision) );
89 }
90 break;
91 case VT_STRING:
92 outline2("%s = cstring%d", variable->realName, variable->valueString->id );
93 break;
94 case VT_DSTRING:
95 outline1("%s: db 0", variable->realName);
96 break;
97 case VT_MSPRITE:
98 case VT_SPRITE:
99 outline1("%s: db 0", variable->realName);
100 break;
101 case VT_TILE:
102 outline1("%s: db 0", variable->realName);
103 break;
104 case VT_TILESET:
105 outline1("%s: db 0", variable->realName);
106 break;
107 case VT_TILES:
108 outline1("%s: db 0,0,0,0", variable->realName);
109 break;
110 case VT_BLIT:
111 break;
112 case VT_IMAGE:
113 case VT_IMAGES:
114 case VT_SEQUENCE:
115 case VT_MUSIC:
116 case VT_BUFFER:
117 case VT_TYPE:
118 if ( variable->bankAssigned != -1 ) {
119 outhead2("; relocated on bank %d (at %4.4x)", variable->bankAssigned, variable->absoluteAddress );
120 outhead1("%s: db $0", variable->realName );
121 } else {
122 if ( ! variable->absoluteAddress ) {
123 if ( variable->valueBuffer ) {
124 if ( variable->printable ) {
125 char * string = malloc( variable->size + 1 );
126 memset( string, 0, variable->size + 1 );
127 memcpy( string, variable->valueBuffer, variable->size );
128 outline2("%s: db %s", variable->realName, escape_newlines( string ) );
129 } else {
130 out1("%s: db ", variable->realName);
131 int i=0;
132 for (i=0; i<(variable->size-1); ++i ) {
133 if ( ( (i+1) % 16 ) == 0 ) {
134 outline1("%d", variable->valueBuffer[i]);
135 out0(" db ");
136 } else {
137 out1("%d,", variable->valueBuffer[i]);
138 }
139 }
140 outline1("%d", variable->valueBuffer[(variable->size-1)]);
141 }
142 } else {
143 outline2("%s: defs %d", variable->realName, variable->size);
144 }
145 } else {
146 outline2("%s = $%4.4x", variable->realName, variable->absoluteAddress);
147 if ( variable->valueBuffer ) {
148 if ( variable->printable ) {
149 char * string = malloc( variable->size + 1 );
150 memset( string, 0, variable->size + 1 );
151 memcpy( string, variable->valueBuffer, variable->size );
152 outline2("%scopy: db %s", variable->realName, escape_newlines( string ) );
153 } else {
154 out1("%scopy: db ", variable->realName);
155 int i=0;
156 for (i=0; i<(variable->size-1); ++i ) {
157 out1("%d,", variable->valueBuffer[i]);
158 }
159 outline1("%d", variable->valueBuffer[(variable->size-1)]);
160 }
161 }
162 }
163 }
164 break;
165 case VT_TILEMAP:
166 case VT_TARRAY: {
167 if ( variable->bankAssigned != -1 ) {
168 outhead4("; relocated on bank %d (at %4.4x) for %d bytes (uncompressed: %d)", variable->bankAssigned, variable->absoluteAddress, variable->size, variable->uncompressedSize );
169 if ( variable->type == VT_TARRAY ) {
170 if (VT_BITWIDTH( variable->arrayType ) == 0 ) {
172 }
173 // force +1 byte if size is odd
174 outhead2("%s: defs %d, $00", variable->realName, (VT_BITWIDTH( variable->arrayType )>>3) );
175 } else {
176 if (VT_BITWIDTH( variable->type ) == 0 ) {
177 CRITICAL_DATATYPE_UNSUPPORTED( "BANKED", DATATYPE_AS_STRING[ variable->type ] );
178 }
179 // force +1 byte if size is odd
180 outhead2("%s: defs %d, $00", variable->realName, (VT_BITWIDTH( variable->type )>>3) );
181 }
182 } else {
183 if ( variable->valueBuffer ) {
184 out1("%s: db ", variable->realName);
185 int i=0;
186 for (i=0; i<(variable->size-1); ++i ) {
187 out1("%d,", variable->valueBuffer[i]);
188 }
189 outline1("%d", variable->valueBuffer[(variable->size-1)]);
190 } else if ( variable->value ) {
191
192 switch( VT_BITWIDTH( variable->arrayType ) ) {
193 case 32: {
194 out1("%s: db ", variable->realName );
195 for( int i=0; i<(variable->size/4)-1; ++i ) {
196 out4("$%2.2x, $%2.2x, $%2.2x, $%2.2x, ", (unsigned int)( variable->value & 0xff ), (unsigned int)( ( variable->value >> 8 ) & 0xff ), (unsigned int)( ( variable->value >> 16 ) & 0xff ), (unsigned int)( ( variable->value >> 24 ) & 0xff ) );
197 }
198 out4("$%2.2x, $%2.2x, $%2.2x, $%2.2x", (unsigned int)( variable->value & 0xff ), (unsigned int)( ( variable->value >> 8 ) & 0xff ), (unsigned int)( ( variable->value >> 16 ) & 0xff ), (unsigned int)( ( variable->value >> 24 ) & 0xff ) );
199 outline0("");
200 break;
201 }
202 case 16: {
203 out1("%s: db ", variable->realName );
204 for( int i=0; i<(variable->size/2)-1; ++i ) {
205 out2("$%2.2x, $%2.2x,", (unsigned int)( variable->value & 0xff ), (unsigned int)( ( variable->value >> 8 ) & 0xff ) );
206 }
207 out2("$%2.2x, $%2.2x", (unsigned int)( variable->value & 0xff ), (unsigned int)( ( variable->value >> 8 ) & 0xff ) );
208 outline0("");
209 break;
210 }
211 case 8:
212 outline3("%s: defs %d, $%2.2x", variable->realName, variable->size, (unsigned char)(variable->value&0xff) );
213 break;
214 case 1:
215 outline3("%s: defs %d, $%2.2x", variable->realName, variable->size, (unsigned char)(variable->value?0xff:0x00));
216 break;
217 }
218
219 } else {
220 outline2("%s: defs %d", variable->realName, variable->size);
221 }
222 }
223
224 break;
225 }
226 }
227
228 if( variable->type == VT_IMAGES ) {
229 if ( variable->strips ) {
230 vars_emit_strips( _environment, variable->realName, variable->strips );
231 }
232 }
233
234 }
235 variable = variable->next;
236 }
237
238}
239
240static void variable_cleanup_entry_bit( Environment * _environment, Variable * _first ) {
241
242 Variable * variable = _first;
243
244 int bitCount = 0;
245
246 // outhead0("section data_user");
247 while( variable ) {
248
249 if ( ( !variable->assigned || ( variable->assigned && !variable->temporary ) ) && !variable->imported && !variable->memoryArea ) {
250
251 if ( variable->memoryArea && _environment->debuggerLabelsFile ) {
252 fprintf( _environment->debuggerLabelsFile, "%4.4x %s\r\n", variable->absoluteAddress, variable->realName );
253 }
254
255 switch( variable->type ) {
256 case VT_BIT:
257 if ( variable->memoryArea ) {
258 // outline2("%s = $%4.4x", variable->realName, variable->absoluteAddress);
259 } else {
260 outline1("%s:", variable->realName);
261 }
262 ++bitCount;
263 if ( bitCount == 8 ) {
264 outline0(" defs 1");
265 }
266 break;
267 }
268
269 }
270
271 variable = variable->next;
272
273 }
274
275 if ( bitCount > 0 ) {
276 outline0(" defs 1");
277 }
278 // outhead0("section code_user");
279
280}
281
291void variable_cleanup( Environment * _environment ) {
292
293 int i=0;
294
295 vars_emit_constants( _environment );
296
297 if ( _environment->dataSegment ) {
298 outhead1("DATAFIRSTSEGMENT EQU %s", _environment->dataSegment->realName );
299 if ( _environment->readDataUsed && _environment->restoreDynamic ) {
300 outhead0("DATASEGMENTNUMERIC:" );
301 DataSegment * actual = _environment->dataSegment;
302 while( actual ) {
303 if ( actual->isNumeric ) {
304 outline2( "dw $%4.4x, %s", actual->lineNumber, actual->realName );
305 }
306 actual = actual->next;
307 }
308 outline0( "dw $ffff, DATAPTRE" );
309 }
310 }
311
312 if ( _environment->offsetting ) {
313 Offsetting * actual = _environment->offsetting;
314 while( actual ) {
315 out1("OFFSETS%4.4x: dw ", actual->size );
316 for( i=0; i<actual->count; ++i ) {
317 out1("$%4.4x", i * actual->size );
318 if ( i < ( actual->count - 1 ) ) {
319 out0(",");
320 } else {
321 outline0("");
322 }
323 }
324 if ( actual->variables ) {
325 OffsettingVariable * actualVariable = actual->variables;
326 while( actualVariable ) {
327 if ( actualVariable->sequence ) {
328 outhead1("%soffsetsequence:", actualVariable->variable->realName );
329 } else {
330 outhead1("%soffsetframe:", actualVariable->variable->realName );
331 }
332 actualVariable = actualVariable->next;
333 }
334 outhead1("fs%4.4xoffsetsequence:", actual->size );
335 outhead1("fs%4.4xoffsetframe:", actual->size );
336 outline0("LD L, A" );
337 outline0("LD H, 0" );
338 outline0("ADD HL, HL" );
339 outline0("LD DE, HL" );
340 outline1("LD HL, OFFSETS%4.4x", actual->size );
341 outline0("ADD HL, DE" );
342 outline0("LD A, (HL)" );
343 outline0("LD E, A" );
344 outline0("INC HL" );
345 outline0("LD A, (HL)" );
346 outline0("LD D, A" );
347 outline0("PUSH IX" );
348 outline0("POP HL" );
349 outline0("ADD HL, DE" );
350 outline0("RET" );
351 }
352 actual = actual->next;
353 }
354
355 int values[MAX_TEMPORARY_STORAGE];
356 char * address[MAX_TEMPORARY_STORAGE];
357
358 actual = _environment->offsetting;
359 int count = 0;
360 while( actual ) {
361 values[count] = actual->size;
362 address[count] = malloc( MAX_TEMPORARY_STORAGE );
363 sprintf( address[count], "fs%4.4xoffsetframe", actual->size );
364 actual = actual->next;
365 ++count;
366 }
367
368 cpu_address_table_build( _environment, "EXECOFFSETS", values, address, count );
369
370 cpu_address_table_lookup( _environment, "EXECOFFSETS", count );
371
372 }
373
374 Constant * c = _environment->constants;
375 while( c ) {
376 if ( c->valueString ) {
377 int len = strlen( c->valueString->value );
378 out2("%s: db %d,", c->realName, len);
379 int i=0;
380 for (i=0; i<(len-1); ++i ) {
381 out1("$%2.2x,", (unsigned char)c->valueString->value[i]);
382 }
383 outline1("$%2.2x", (unsigned char)c->valueString->value[(len-1)]);
384 }
385 c = c->next;
386 }
387
388 generate_cgoto_address_table( _environment );
389
390 banks_generate( _environment );
391
392 deploy_inplace_preferred( vars,src_hw_zx_vars_asm);
393
394 for(i=0; i<BANK_TYPE_COUNT; ++i) {
395 Bank * actual = _environment->banks[i];
396 while( actual ) {
397 if ( actual->type == BT_VARIABLES ) {
398 // TODO: zx: management of banks' variables
399 // outhead1("section %s", actual->name);
400 // outline1("org $%4.4x", actual->address);
401 Variable * variable = _environment->variables;
402
403 variable_cleanup_entry( _environment, variable );
404 variable_cleanup_entry_bit( _environment, variable );
405
406 } else if ( actual->type == BT_TEMPORARY ) {
407 // TODO: zx: management of banks' variables
408 // outhead1("section %s", actual->name);
409 // outline1("org $%4.4x", actual->address);
410
411 for( int j=0; j< (_environment->currentProcedure+1); ++j ) {
412 Variable * variable = _environment->tempVariables[j];
413 variable_cleanup_entry( _environment, variable );
414 variable_cleanup_entry_bit( _environment, variable );
415 }
416
417 Variable * variable = _environment->tempResidentVariables;
418
419 variable_cleanup_entry( _environment, variable );
420 variable_cleanup_entry_bit( _environment, variable );
421
422 } else {
423
424 }
425 actual = actual->next;
426 }
427 }
428
429 variable_on_memory_init( _environment, 1 );
430
431 DataSegment * dataSegment = _environment->dataSegment;
432 while( dataSegment ) {
433 int i=0;
434 if ( dataSegment->data ) {
435 out1("%s: db ", dataSegment->realName );
436 } else {
437 outhead1("%s: ", dataSegment->realName );
438 }
439 DataDataSegment * dataDataSegment = dataSegment->data;
440 while( dataDataSegment ) {
441 if ( dataSegment->type ) {
442 if ( dataDataSegment->type == VT_STRING || dataDataSegment->type == VT_DSTRING ) {
443 out1("$%2.2x,", (unsigned char)(dataDataSegment->size) );
444 out1("\"%s\"", dataDataSegment->data );
445 } else {
446 for( i=0; i<(dataDataSegment->size-1); ++i ) {
447 out1("$%2.2x,", (unsigned char)(dataDataSegment->data[i]&0xff) );
448 }
449 out1("$%2.2x", (unsigned char)(dataDataSegment->data[i]&0xff) );
450 }
451 } else {
452 if ( dataDataSegment->type == VT_STRING || dataDataSegment->type == VT_DSTRING ) {
453 out1("$%2.2x,", (unsigned char)(dataDataSegment->type) );
454 out1("$%2.2x,", (unsigned char)(dataDataSegment->size) );
455 out1("\"%s\"", dataDataSegment->data );
456 } else {
457 out1("$%2.2x,", (unsigned char)(dataDataSegment->type) );
458 for( i=0; i<(dataDataSegment->size-1); ++i ) {
459 out1("$%2.2x,", (unsigned char)(dataDataSegment->data[i]&0xff) );
460 }
461 out1("$%2.2x", (unsigned char)(dataDataSegment->data[i]&0xff) );
462 }
463 }
464 dataDataSegment = dataDataSegment->next;
465 if ( dataDataSegment ) {
466 out0(",");
467 }
468 }
469 outline0("");
470 dataSegment = dataSegment->next;
471 }
472
473 if ( _environment->dataNeeded || _environment->dataSegment || _environment->deployed.read_data_unsafe ) {
474 outhead0("DATAPTRE:");
475 }
476
477 StaticString * staticStrings = _environment->strings;
478 while( staticStrings ) {
479 outline3("cstring%d: db %d, %s", staticStrings->id, (int)strlen(staticStrings->value), escape_newlines( staticStrings->value ) );
480 staticStrings = staticStrings->next;
481 }
482
483 for( i=0; i<MAX_RESIDENT_SHAREDS; ++i ) {
484 if ( _environment->maxExpansionBankSize[i] ) {
485 outhead2("BANKWINDOW%2.2x: defs %d", i, _environment->maxExpansionBankSize[i]);
486 outhead1("BANKWINDOWID%2.2x: db $FF, $FF", i );
487 }
488 }
489
490 if ( _environment->bitmaskNeeded ) {
491 outhead0("BITMASK: defm $01,$02,$04,$08,$10,$20,$40,$80");
492 outhead0("BITMASKN: defm $fe,$fd,$fb,$f7,$ef,$df,$bf,$7f");
493 }
494 if ( _environment->deployed.dstring ) {
495 outhead1("max_free_string = $%4.4x", _environment->dstring.space == 0 ? DSTRING_DEFAULT_SPACE : _environment->dstring.space );
496 }
497
498 if ( _environment->descriptors ) {
499 outhead0("UDCCHAR:" );
500 int i=0,j=0;
501 for(i=_environment->descriptors->first;i<(_environment->descriptors->first+_environment->descriptors->count);++i) {
502 outline1("; $%2.2x ", i);
503 out0("DEFB " );
504 for(j=0;j<7;++j) {
505 out1("$%2.2x,", ((unsigned char)_environment->descriptors->data[i].data[j]) );
506 }
507 outline1("$%2.2x", ((unsigned char)_environment->descriptors->data[i].data[j]) );
508 }
509 }
510
511 buffered_push_output( _environment );
512
513 outhead0("ORG 32768");
514 outhead0("CODESTART:");
515 outline1("LD SP, $%4.4x", _environment->stackStartAddress);
516 outline0("CALL ZXSTARTUP");
517 cpu_call( _environment, "VARINIT" );
518 outline0("CALL PROTOTHREADINIT" );
519 outline0("CALL ZXSTARTUP2" );
520
521 buffered_prepend_output( _environment );
522
523}
void vars_emit_constants(Environment *_environment)
Definition _vars.c:58
void vars_emit_strips(Environment *_environment, char *_name, Strip *_strips)
Definition _vars.c:118
void cpu_address_table_build(Environment *_environment, char *_table, int *_values, char *_address[], int _count)
Definition 6309.c:7344
void cpu_call(Environment *_environment, char *_label)
Definition 6309.c:3755
void cpu_address_table_lookup(Environment *_environment, char *_table, int _count)
Definition 6309.c:7353
#define VT_FLOAT_NORMALIZED_POW2_WIDTH(p)
Definition 6309.h:50
void vars_emit_word(Environment *_environment, char *_name, int _value)
Definition _vars.c:92
void vars_emit_dword(Environment *_environment, char *_name, int _value)
Definition _vars.c:100
void vars_emit_number(Environment *_environment, char *_name, int _value)
Definition _vars.c:108
void vars_emit_byte(Environment *_environment, char *_name, int _value)
Definition _vars.c:84
void buffered_prepend_output(Environment *_environment)
char * escape_newlines(char *_string)
void buffered_push_output(Environment *_environment)
void variable_cleanup(Environment *_environment)
Emit source and configuration lines for variables.
Definition _var.c:559
char BANK_TYPE_AS_STRING[][16]
Description of BANK TYPE, in readable format.
#define DSTRING_DEFAULT_SPACE
Definition atari.h:152
void banks_generate(Environment *_environment)
Definition _banks.c:45
void generate_cgoto_address_table(Environment *_environment)
Definition _var.c:122
void variable_on_memory_init(Environment *_environment, int _imported_too)
Definition _var.c:41
struct _Bank * next
Definition ugbc.h:185
BankType type
Definition ugbc.h:162
StaticString * valueString
Definition ugbc.h:820
struct _Constant * next
Definition ugbc.h:832
char * realName
Definition ugbc.h:803
int space
Definition ugbc.h:1970
struct _DataDataSegment * next
Definition ugbc.h:2181
char * data
Definition ugbc.h:2178
VariableType type
Definition ugbc.h:2175
struct _DataSegment * next
Definition ugbc.h:2198
DataDataSegment * data
Definition ugbc.h:2196
int lineNumber
Definition ugbc.h:2193
VariableType type
Definition ugbc.h:2187
int isNumeric
Definition ugbc.h:2189
char * realName
Definition ugbc.h:2192
int read_data_unsafe
Definition ugbc.h:1923
int dstring
Definition ugbc.h:1789
Variable * tempResidentVariables
Definition ugbc.h:2595
int stackStartAddress
Definition ugbc.h:3296
Offsetting * offsetting
Definition ugbc.h:2937
Bank * banks[BANK_TYPE_COUNT]
Definition ugbc.h:2514
int maxExpansionBankSize[MAX_RESIDENT_SHAREDS]
Definition ugbc.h:3010
Variable * tempVariables[MAX_PROCEDURES]
Definition ugbc.h:2606
DataSegment * dataSegment
Definition ugbc.h:2568
FILE * debuggerLabelsFile
Definition ugbc.h:3319
StaticString * strings
Definition ugbc.h:2641
int restoreDynamic
Definition ugbc.h:2573
int bitmaskNeeded
Definition ugbc.h:2659
int currentProcedure
Definition ugbc.h:2601
DString dstring
Definition ugbc.h:2405
Variable * variables
Definition ugbc.h:2616
int dataNeeded
Definition ugbc.h:2557
Constant * constants
Definition ugbc.h:2611
TileDescriptors * descriptors
Definition ugbc.h:2939
int readDataUsed
Definition ugbc.h:2578
Deployed deployed
Definition ugbc.h:2921
int size
Definition ugbc.h:892
struct _Offsetting * next
Definition ugbc.h:905
int count
Definition ugbc.h:897
OffsettingVariable * variables
Definition ugbc.h:902
struct _Variable * variable
Definition ugbc.h:880
struct _OffsettingVariable * next
Definition ugbc.h:883
char * value
Definition ugbc.h:337
struct _StaticString * next
Definition ugbc.h:342
char data[8]
Definition ugbc.h:2141
TileData data[512]
Definition ugbc.h:2153
int bankAssigned
Definition ugbc.h:1172
unsigned char * valueBuffer
Definition ugbc.h:1061
int printable
Definition ugbc.h:1097
Strip * strips
Definition ugbc.h:1215
StaticString * valueString
Definition ugbc.h:1041
int assigned
Definition ugbc.h:1020
struct _Variable * next
Definition ugbc.h:1225
int initialValue
Definition ugbc.h:1030
int size
Definition ugbc.h:1077
int absoluteAddress
Definition ugbc.h:1092
FloatTypePrecision arrayPrecision
Definition ugbc.h:1128
VariableType type
Definition ugbc.h:988
MemoryArea * memoryArea
Definition ugbc.h:1107
int uncompressedSize
Definition ugbc.h:1082
int value
Definition ugbc.h:1025
int imported
Definition ugbc.h:1014
VariableType arrayType
Definition ugbc.h:1125
int temporary
Definition ugbc.h:996
char * realName
Definition ugbc.h:982
void * malloc(YYSIZE_T)
#define out4(s, a, b, c, d)
Definition ugbc.h:4263
#define deploy_inplace_preferred(s, e)
Definition ugbc.h:4313
#define BANK_TYPE_COUNT
Maximum number of bank types.
Definition ugbc.h:145
#define MAX_TEMPORARY_STORAGE
Definition ugbc.h:563
struct _Offsetting Offsetting
#define MAX_RESIDENT_SHAREDS
Definition ugbc.h:572
#define outline3(s, a, b, c)
Definition ugbc.h:4255
struct _Variable Variable
Structure of a single variable.
#define outline2(s, a, b)
Definition ugbc.h:4254
struct _Environment Environment
Structure of compilation environment.
@ VT_THREAD
Definition ugbc.h:492
@ VT_DOJOKA
Definition ugbc.h:534
@ VT_TILE
Definition ugbc.h:504
@ VT_FLOAT
Definition ugbc.h:522
@ VT_BLIT
Definition ugbc.h:519
@ VT_TARRAY
Definition ugbc.h:480
@ VT_WORD
Definition ugbc.h:455
@ VT_POSITION
Definition ugbc.h:468
@ VT_NUMBER
Definition ugbc.h:549
@ VT_SDWORD
Definition ugbc.h:462
@ VT_MSPRITE
Definition ugbc.h:531
@ VT_STRING
Definition ugbc.h:474
@ VT_TILEMAP
Definition ugbc.h:525
@ VT_TILES
Definition ugbc.h:507
@ VT_SWORD
Definition ugbc.h:457
@ VT_BYTE
Definition ugbc.h:450
@ VT_DWORD
Definition ugbc.h:460
@ VT_BIT
Definition ugbc.h:528
@ VT_IMAGEREF
Definition ugbc.h:537
@ VT_VECTOR2
Definition ugbc.h:543
@ VT_CHAR
Definition ugbc.h:498
@ VT_BUFFER
Definition ugbc.h:477
@ VT_SPRITE
Definition ugbc.h:501
@ VT_SBYTE
Definition ugbc.h:452
@ VT_IMAGES
Definition ugbc.h:495
@ VT_MUSIC
Definition ugbc.h:516
@ VT_TYPE
Definition ugbc.h:546
@ VT_ADDRESS
Definition ugbc.h:465
@ VT_COLOR
Definition ugbc.h:471
@ VT_TILESET
Definition ugbc.h:510
@ VT_DSTRING
Definition ugbc.h:483
@ VT_PATH
Definition ugbc.h:540
@ VT_IMAGE
Definition ugbc.h:489
@ VT_SEQUENCE
Definition ugbc.h:513
struct _OffsettingVariable OffsettingVariable
#define outhead0(s)
Definition ugbc.h:4246
#define outhead4(s, a, b, c, d)
Definition ugbc.h:4250
#define out0(s)
Definition ugbc.h:4259
struct _Constant Constant
Structure of a single constant.
@ BT_VARIABLES
Definition ugbc.h:126
@ BT_TEMPORARY
Definition ugbc.h:129
#define out2(s, a, b)
Definition ugbc.h:4261
#define outline0(s)
Definition ugbc.h:4252
struct _StaticString StaticString
Structure of a single (static) string.
#define outhead2(s, a, b)
Definition ugbc.h:4248
#define CRITICAL_DATATYPE_UNSUPPORTED(k, v)
Definition ugbc.h:3447
struct _DataDataSegment DataDataSegment
#define out1(s, a)
Definition ugbc.h:4260
#define outline1(s, a)
Definition ugbc.h:4253
struct _DataSegment DataSegment
#define VT_BITWIDTH(t)
Definition ugbc.h:595
struct _Bank Bank
Structure of a single bank.
#define outhead1(s, a)
Definition ugbc.h:4247
char DATATYPE_AS_STRING[][16]