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 if ( variable->memoryArea ) {
58 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
59 } else {
60 vars_emit_byte( _environment, variable->realName, variable->initialValue );
61 }
62 break;
63 case VT_DOJOKA:
64 if ( variable->memoryArea ) {
65 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
66 } else {
67 outhead1("%s: times 4 db 0", variable->realName);
68 }
69 break;
70 case VT_IMAGEREF:
71 if ( variable->memoryArea ) {
72 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
73 } else {
74 outhead1("%s: times 14 db 0", variable->realName);
75 }
76 break;
77 case VT_PATH:
78 if ( variable->memoryArea ) {
79 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
80 } else {
81 outhead1("%s: times 16 db 0", variable->realName);
82 }
83 break;
84 case VT_VECTOR2:
85 if ( variable->memoryArea ) {
86 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
87 } else {
88 outhead1("%s: times 4 db 0", variable->realName);
89 }
90 break;
91 case VT_WORD:
92 case VT_SWORD:
93 case VT_POSITION:
94 case VT_ADDRESS:
95 if ( variable->memoryArea ) {
96 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
97 } else {
98 vars_emit_word( _environment, variable->realName, variable->initialValue );
99 }
100 break;
101 case VT_DWORD:
102 case VT_SDWORD:
103 if ( variable->memoryArea ) {
104 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
105 } else {
106 vars_emit_dword( _environment, variable->realName, variable->initialValue );
107 }
108 break;
109 case VT_NUMBER:
110 if ( variable->memoryArea ) {
111 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
112 } else {
113 vars_emit_number( _environment, variable->realName, variable->initialValue );
114 }
115 break;
116 case VT_FLOAT:
117 if ( variable->memoryArea ) {
118 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
119 } else {
120 outhead2("%s: dd %f", variable->realName, variable->valueFloating );
121 }
122 break;
123 case VT_STRING:
124 outhead2("%s: EQU cstring%d", variable->realName, variable->valueString->id );
125 break;
126 case VT_DSTRING:
127 if ( variable->memoryArea ) {
128 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
129 } else {
130 outhead1("%s: db 0", variable->realName);
131 }
132 break;
133 case VT_TILE:
134 case VT_TILESET:
135 case VT_MSPRITE:
136 case VT_SPRITE:
137 if ( variable->memoryArea ) {
138 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
139 } else {
140 outhead1("%s: db 0", variable->realName);
141 }
142 break;
143 case VT_TILES:
144 if ( variable->memoryArea ) {
145 outhead2("%s: EQU 0x%4.4x", variable->realName, variable->absoluteAddress);
146 } else {
147 outhead1("%s: db 0,0,0,0", variable->realName);
148 }
149 break;
150 case VT_BLIT:
151 break;
152 case VT_IMAGE:
153 case VT_IMAGES:
154 case VT_SEQUENCE:
155 case VT_MUSIC:
156 case VT_BUFFER:
157 case VT_TYPE:
158 if ( ! variable->absoluteAddress ) {
159 if ( variable->readonly ) {
160
161 } else {
162
163 }
164 if ( variable->valueBuffer ) {
165 if ( variable->printable ) {
166 char * string = malloc( variable->size + 1 );
167 memset( string, 0, variable->size + 1 );
168 memcpy( string, variable->valueBuffer, variable->size );
169 outhead2("%s: db %s", variable->realName, escape_newlines( string ) );
170 } else {
171 out1("%s: db ", variable->realName);
172 int i=0;
173 for (i=0; i<(variable->size-1); ++i ) {
174 if ( ( ( i + 1 ) % 16 ) == 0 ) {
175 outline1("0x%2.2x", (unsigned char)(variable->valueBuffer[i] & 0xff ) );
176 out0(" db ");
177 } else {
178 out1("0x%2.2x,", (unsigned char)(variable->valueBuffer[i] & 0xff ) );
179 }
180 }
181 outline1("0x%2.2x", (unsigned char)(variable->valueBuffer[(variable->size-1)] & 0xff ) );
182 }
183 } else {
184 outhead2("%s: times %d db 0", variable->realName, variable->size);
185 }
186 if ( variable->readonly ) {
187
188 } else {
189
190 }
191 } else {
192 outline2("%s = 0x%4.4x", variable->realName, variable->absoluteAddress);
193 if ( variable->valueBuffer ) {
194 if ( variable->printable ) {
195 char * string = malloc( variable->size + 1 );
196 memset( string, 0, variable->size + 1 );
197 memcpy( string, variable->valueBuffer, variable->size );
198 outline2("%scopy: db %s", variable->realName, escape_newlines( string ) );
199 } else {
200 out1("%scopy: db ", variable->realName);
201 int i=0;
202 for (i=0; i<(variable->size-1); ++i ) {
203 out1("0x%2.2x,", (unsigned char)(variable->valueBuffer[i] & 0xff ) );
204 }
205 outline1("0x%2.2x", (unsigned char)(variable->valueBuffer[(variable->size-1)] & 0xff ) );
206 }
207 }
208 }
209 break;
210 case VT_TILEMAP:
211 case VT_TARRAY: {
212 if ( variable->bankAssigned != -1 ) {
213
214 outhead4("; relocated on bank %d (at %4.4x) for %d bytes (uncompressed: %d)", variable->bankAssigned, variable->absoluteAddress, variable->size, variable->uncompressedSize );
215 if ( variable->type == VT_TARRAY ) {
216 if (VT_BITWIDTH( variable->arrayType ) == 0 ) {
218 }
219 // force +1 byte if size is odd
220 outhead2("%s: times %d db 0", variable->realName, (VT_BITWIDTH( variable->arrayType )>>3) );
221 } else {
222 if (VT_BITWIDTH( variable->type ) == 0 ) {
223 CRITICAL_DATATYPE_UNSUPPORTED( "BANKED", DATATYPE_AS_STRING[ variable->type ] );
224 }
225 // force +1 byte if size is odd
226 outhead2("%s: times %d db 0", variable->realName, (VT_BITWIDTH( variable->type )>>3) );
227 }
228
229 } else {
230
231 if ( variable->readonly ) {
232
233 } else {
234
235 }
236 if ( variable->valueBuffer ) {
237 out1("%s: db ", variable->realName);
238 int i=0;
239 for (i=0; i<(variable->size-1); ++i ) {
240 out1("0x%2.2x,", (unsigned char)(variable->valueBuffer[i] & 0xff ) );
241 }
242 outline1("0x%2.2x", (unsigned char)(variable->valueBuffer[(variable->size-1)] & 0xff ) );
243 } else if ( variable->value ) {
244
245 switch( VT_BITWIDTH( variable->arrayType ) ) {
246 case 32: {
247 out1("%s: db ", variable->realName );
248 for( int i=0; i<(variable->size/4)-1; ++i ) {
249 out4("0x%2.2x, 0x%2.2x, 0x%2.2x, 0x%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 ) );
250 }
251 out4("0x%2.2x, 0x%2.2x, 0x%2.2x, 0x%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 ) );
252 outline0("");
253 break;
254 }
255 case 16: {
256 out1("%s: db ", variable->realName );
257 for( int i=0; i<(variable->size/2)-1; ++i ) {
258 out2("0x%2.2x, 0x%2.2x,", (unsigned int)( variable->value & 0xff ), (unsigned int)( ( variable->value >> 8 ) & 0xff ) );
259 }
260 out2("0x%2.2x, 0x%2.2x", (unsigned int)( variable->value & 0xff ), (unsigned int)( ( variable->value >> 8 ) & 0xff ) );
261 outline0("");
262 break;
263 }
264 case 8:
265 outline3("%s: times %d db 0x%2.2x", variable->realName, variable->size, (unsigned char)(variable->value&0xff) );
266 break;
267 case 1:
268 outline3("%s: times %d db 0x%2.2x", variable->realName, variable->size, (unsigned char)(variable->value?0xff:0x00));
269 break;
270 }
271 } else {
272 outhead2("%s: times %d db 0", variable->realName, variable->size);
273 }
274 if ( variable->readonly ) {
275
276 } else {
277
278 }
279
280 }
281
282 break;
283 }
284 }
285
286 if( variable->type == VT_IMAGES ) {
287 if ( variable->strips ) {
288 Strip * actual = variable->strips;
289 int i = 0;
290 while( actual ) {
291 outhead2("%sstrip%d:", variable->realName, i );
292 for( int j=0; j<actual->count; ++j ) {
293 outline1( "db 0x%2.2x", actual->frames[j] );
294 }
295 actual = actual->next;
296 ++i;
297 }
298 actual = variable->strips;
299 i = 0;
300 outhead1("%sstrip:", variable->realName );
301 while( actual ) {
302 outline2("dw %sstrip%d", variable->realName, i );
303 actual = actual->next;
304 ++i;
305 }
306 }
307 }
308
309 }
310 variable = variable->next;
311 }
312
313}
314
315static void variable_cleanup_entry_bit( Environment * _environment, Variable * _first ) {
316
317 Variable * variable = _first;
318
319 int bitCount = 0;
320
321 while( variable ) {
322
323 if ( ( !variable->assigned || ( variable->assigned && !variable->temporary ) ) && !variable->imported && !variable->memoryArea ) {
324
325 if ( variable->memoryArea && _environment->debuggerLabelsFile ) {
326 fprintf( _environment->debuggerLabelsFile, "%4.4x %s\r\n", variable->absoluteAddress, variable->realName );
327 }
328
329 switch( variable->type ) {
330 case VT_BIT:
331 if ( variable->memoryArea ) {
332 // outline2("%s = 0x%4.4x", variable->realName, variable->absoluteAddress);
333 } else {
334 outhead1("%s:", variable->realName);
335 }
336 ++bitCount;
337 if ( bitCount == 8 ) {
338 outline0(" db 1");
339 }
340 break;
341 }
342
343 }
344
345 variable = variable->next;
346
347 }
348
349 if ( bitCount > 0 ) {
350 outline0(" db 1");
351 }
352
353}
354
355
365void variable_cleanup( Environment * _environment ) {
366
367 int i=0;
368
369 vars_emit_constants( _environment );
370
371 if ( _environment->dataSegment ) {
372 outhead1("DATAFIRSTSEGMENT EQU %s", _environment->dataSegment->realName );
373 if ( _environment->readDataUsed && _environment->restoreDynamic ) {
374 outhead0("DATASEGMENTNUMERIC:" );
375 DataSegment * actual = _environment->dataSegment;
376 while( actual ) {
377 if ( actual->isNumeric ) {
378 outline2( "dw 0x%4.4x, %s", actual->lineNumber, actual->realName );
379 }
380 actual = actual->next;
381 }
382 outline0( "dw 0xffff, DATAPTRE" );
383 }
384 }
385
386 if ( _environment->offsetting ) {
387 Offsetting * actual = _environment->offsetting;
388 while( actual ) {
389 out1("OFFSETS%4.4x: dw ", actual->size );
390 for( i=0; i<actual->count; ++i ) {
391 out1("0x%4.4x", i * actual->size );
392 if ( i < ( actual->count - 1 ) ) {
393 out0(",");
394 } else {
395 outline0("");
396 }
397 }
398 if ( actual->variables ) {
399 OffsettingVariable * actualVariable = actual->variables;
400 while( actualVariable ) {
401 if ( actualVariable->sequence ) {
402 outhead1("%soffsetsequence:", actualVariable->variable->realName );
403 } else {
404 outhead1("%soffsetframe:", actualVariable->variable->realName );
405 }
406 actualVariable = actualVariable->next;
407 }
408 outhead1("fs%4.4xoffsetsequence:", actual->size );
409 outhead1("fs%4.4xoffsetframe:", actual->size );
410 outline0("LD L, A" );
411 outline0("LD H, 0" );
412 outline0("ADD HL, HL" );
413 outline0("LD DE, HL" );
414 outline1("LD HL, OFFSETS%4.4x", actual->size );
415 outline0("ADD HL, DE" );
416 outline0("LD A, (HL)" );
417 outline0("LD E, A" );
418 outline0("INC HL" );
419 outline0("LD A, (HL)" );
420 outline0("LD D, A" );
421 outline0("PUSH IX" );
422 outline0("POP HL" );
423 outline0("ADD HL, DE" );
424 outline0("RET" );
425 }
426 actual = actual->next;
427 }
428
429 int values[MAX_TEMPORARY_STORAGE];
430 char * address[MAX_TEMPORARY_STORAGE];
431
432 actual = _environment->offsetting;
433 int count = 0;
434 while( actual ) {
435 values[count] = actual->size;
436 address[count] = malloc( MAX_TEMPORARY_STORAGE );
437 sprintf( address[count], "fs%4.4xoffsetframe", actual->size );
438 actual = actual->next;
439 ++count;
440 }
441
442 cpu_address_table_build( _environment, "EXECOFFSETS", values, address, count );
443
444 cpu_address_table_lookup( _environment, "EXECOFFSETS", count );
445
446 }
447
448 Constant * c = _environment->constants;
449 while( c ) {
450 if ( c->valueString ) {
451 int len = strlen( c->valueString->value );
452 out2("%s: db %d,", c->realName, len);
453 int i=0;
454 for (i=0; i<(len-1); ++i ) {
455 out1("0x%2.2x,", (unsigned char)c->valueString->value[i]);
456 }
457 outline1("0x%2.2x", (unsigned char)c->valueString->value[(len-1)]);
458 }
459 c = c->next;
460 }
461
462 for(i=0; i<BANK_TYPE_COUNT; ++i) {
463 Bank * actual = _environment->banks[i];
464 while( actual ) {
465 if ( actual->type == BT_VARIABLES ) {
466 Variable * variable = _environment->variables;
467 variable_cleanup_entry( _environment, variable );
468 variable_cleanup_entry_bit( _environment, variable );
469 } else if ( actual->type == BT_TEMPORARY ) {
470 if ( _environment->bitmaskNeeded ) {
471 outhead0("BITMASK: db 0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80");
472 outhead0("BITMASKN: db 0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f");
473 }
474 if ( _environment->deployed.dstring ) {
475 outhead1("max_free_string EQU 0x%4.4x", _environment->dstring.space == 0 ? DSTRING_DEFAULT_SPACE : _environment->dstring.space );
476 }
477
478 for( int j=0; j< (_environment->currentProcedure+1); ++j ) {
479 Variable * variable = _environment->tempVariables[j];
480 variable_cleanup_entry( _environment, variable );
481 variable_cleanup_entry_bit( _environment, variable );
482 }
483
484 Variable * variable = _environment->tempResidentVariables;
485
486 variable_cleanup_entry( _environment, variable );
487 variable_cleanup_entry_bit( _environment, variable );
488
489 } else {
490
491 }
492 actual = actual->next;
493 }
494 }
495
496 generate_cgoto_address_table( _environment );
497
498 variable_on_memory_init( _environment, 1 );
499
500 buffered_push_output( _environment );
501
502 outline0("ORG 0x100");
503 outline0("JMP CODESTART");
504
505 // outhead0("SECTION code_user");
506 // outhead0("ORG 0x8000");
507 // outhead0("SECTION data_user");
508 // outhead0("ORG 0x7030");
509 // outhead0("SECTION code_user");
510
511 // // DB 0AAh,055h ;Cartridge present: Colecovision logo
512 // // outline0("DEFB 0xaa, 0x55");
513 // // ;DB 055h,0AAh ;Cartridge present: skip logo, Colecovision logo
514 // outline0("DEFB 0x55, 0xaa");
515 // // DW 0000 ;Pointer to the sprite name table
516 // outline0("DEFW 0x0000");
517 // // DW 0000 ;Pointer to the sprite order table
518 // outline0("DEFW 0x0000");
519 // // DW 0000 ;Pointer to the working buffer for WR_SPR_NM_TBL
520 // outline0("DEFW 0x0000");
521 // // DW CONTROLLER_BUFFER ;Pointer to the hand controller input areas
522 // outline0("DEFW CONTROLLER_BUFFER");
523 // // DW START ;Entry point to the user program
524 // outline0("DEFW CODESTART");
525
526 deploy_inplace_preferred( startup, src_hw_pccga_startup_asm);
527 // deploy_inplace_preferred( startup2, src_hw_pccga_startup2_asm);
528 // deploy_inplace_preferred( sn76489startup, src_hw_sn76489z_startup_asm );
529 deploy_inplace_preferred( cgastartup, src_hw_cga_startup_asm);
530
531 buffered_prepend_output( _environment );
532
533 DataSegment * dataSegment = _environment->dataSegment;
534 while( dataSegment ) {
535 int i=0;
536 if ( dataSegment->data ) {
537 out1("%s: db ", dataSegment->realName );
538 } else {
539 outhead1("%s ", dataSegment->realName );
540 }
541 DataDataSegment * dataDataSegment = dataSegment->data;
542 while( dataDataSegment ) {
543 if ( dataSegment->type ) {
544 if ( dataDataSegment->type == VT_STRING || dataDataSegment->type == VT_DSTRING ) {
545 out1("0x%2.2x,", (unsigned char)(dataDataSegment->size) );
546 out1("\"%s\"", dataDataSegment->data );
547 } else {
548 for( i=0; i<(dataDataSegment->size-1); ++i ) {
549 out1("0x%2.2x,", (unsigned char)(dataDataSegment->data[i]&0xff) );
550 }
551 out1("0x%2.2x", (unsigned char)(dataDataSegment->data[i]&0xff) );
552 }
553 } else {
554 if ( dataDataSegment->type == VT_STRING || dataDataSegment->type == VT_DSTRING ) {
555 out1("0x%2.2x,", (unsigned char)(dataDataSegment->type) );
556 out1("0x%2.2x,", (unsigned char)(dataDataSegment->size) );
557 out1("\"%s\"", dataDataSegment->data );
558 } else {
559 out1("0x%2.2x,", (unsigned char)(dataDataSegment->type) );
560 for( i=0; i<(dataDataSegment->size-1); ++i ) {
561 out1("0x%2.2x,", (unsigned char)(dataDataSegment->data[i]&0xff) );
562 }
563 out1("0x%2.2x", (unsigned char)(dataDataSegment->data[i]&0xff) );
564 }
565 }
566 dataDataSegment = dataDataSegment->next;
567 if ( dataDataSegment ) {
568 out0(",");
569 }
570 }
571 outline0("");
572 dataSegment = dataSegment->next;
573 }
574
575 if ( _environment->dataNeeded || _environment->dataSegment || _environment->deployed.read_data_unsafe ) {
576 outhead0("DATAPTRE:");
577 }
578
579 StaticString * staticStrings = _environment->strings;
580 while( staticStrings ) {
581 outline3("cstring%d: db %d, %s", staticStrings->id, (int)strlen(staticStrings->value), escape_newlines( staticStrings->value ) );
582 staticStrings = staticStrings->next;
583 }
584
585 if ( _environment->descriptors ) {
586 outhead0("UDCCHAR:" );
587 int i=0,j=0;
588 for(i=_environment->descriptors->first;i<(_environment->descriptors->first+_environment->descriptors->count);++i) {
589 outline1("; 0x%2.2x ", i);
590 out0(" db " );
591 for(j=0;j<7;++j) {
592 out1("0x%2.2x,", ((unsigned char)_environment->descriptors->data[i].data[j]) );
593 }
594 outline1("0x%2.2x", ((unsigned char)_environment->descriptors->data[i].data[j]) );
595 }
596 } else {
597 outhead0("UDCCHAR EQU $E000");
598 }
599
600}
void vars_emit_constants(Environment *_environment)
Definition _vars.c:58
void cpu_address_table_build(Environment *_environment, char *_table, int *_values, char *_address[], int _count)
Definition 6309.c:7344
void cpu_address_table_lookup(Environment *_environment, char *_table, int _count)
Definition 6309.c:7353
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 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
Offsetting * offsetting
Definition ugbc.h:2937
Bank * banks[BANK_TYPE_COUNT]
Definition ugbc.h:2514
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
struct _Strip * next
Definition ugbc.h:969
int count
Definition ugbc.h:967
int frames[MAX_FRAMES_PER_STRIP]
Definition ugbc.h:966
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
double valueFloating
Definition ugbc.h:1046
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
VariableType type
Definition ugbc.h:988
int readonly
Definition ugbc.h:1195
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 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
struct _Strip Strip
#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]