ugBASIC 1.18
An isomorphic BASIC language compiler for retrocomputers
Loading...
Searching...
No Matches
_build.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 OUTPUT_FILE_TYPE_AS_STRING[][16];
42
43void generate_bin( Environment * _environment ) {
44
45 char exeFileName[8*MAX_TEMPORARY_STORAGE];
46 char commandLine[8*MAX_TEMPORARY_STORAGE];
47 char executableName[MAX_TEMPORARY_STORAGE];
48 char listingFileName[MAX_TEMPORARY_STORAGE];
49 char binaryName[MAX_TEMPORARY_STORAGE];
50
51 BUILD_SAFE_REMOVE( _environment, _environment->exeFileName );
52
53 strcopy( exeFileName, _environment->exeFileName );
54
55 strcopy( binaryName, _environment->exeFileName );
56 char * p = strstr( binaryName, ".dsk" );
57 if ( p ) {
58 strcopy( p, ".bin" );
59 }
60 strcopy( _environment->exeFileName, binaryName );
61
62 BUILD_TOOLCHAIN_ASM6809_GET_EXECUTABLE( _environment, executableName );
63
64 BUILD_TOOLCHAIN_ASM6809_GET_LISTING_FILE( _environment, listingFileName );
65
66 BUILD_TOOLCHAIN_ASM6809EXEC( _environment, "-C", 0x2A00, executableName, listingFileName );
67
68 if ( _environment->listingFileName ) {
69
70 if ( _environment->profileFileName && _environment->profileCycles ) {
71 if ( _environment->executerFileName ) {
72 sprintf(executableName, "%s", _environment->executerFileName );
73 } else if( access( "run6809.exe", F_OK ) == 0 ) {
74 sprintf(executableName, "%s", "run6809.exe" );
75 } else {
76 sprintf(executableName, "%s", "run6809" );
77 }
78
79 sprintf( commandLine, "\"%s\" -i \"%s\" -R 2800 -C -l 0 \"%s\" -p \"%s\" %d",
80 executableName,
81 _environment->listingFileName,
82 _environment->exeFileName,
83 _environment->profileFileName,
84 _environment->profileCycles ? _environment->profileCycles : 1000000
85 );
86
87 if ( system_call( _environment, commandLine ) ) {
88 printf("The profiling of assembly program failed.\n\n");
89 return;
90 };
91
92 }
93
94 }
95
96 strcopy( _environment->exeFileName, exeFileName );
97
98}
99
100void generate_dsk( Environment * _environment ) {
101
102 // Let's cut the executable file into multiple segments.
103 // The name of the binary is equal to the disk file name,
104 // but with a different extension.
105 char originalBinaryFile[MAX_TEMPORARY_STORAGE];
106 strcopy( originalBinaryFile, _environment->exeFileName );
107 char * p = strstr( originalBinaryFile, ".dsk" );
108 if ( p ) {
109 strcopy( p, ".bin" );
110 }
111
112 // Calculate the effective size.
113 FILE * fh = fopen( originalBinaryFile, "rb" );
114 int executableBinaryFileSize = 0;
115 if ( fh ) {
116 fseek( fh, 0, SEEK_END );
117 executableBinaryFileSize = ftell( fh );
118 fclose( fh );
119 } else {
120 CRITICAL_BUILD_CANNOT_READ_EXECUTABLE_FOR_DSK( _environment->exeFileName, originalBinaryFile );
121 }
122
123 // The LOADM command is able to read a limited size of binary file.
124 // So we are going to split the original file as follows:
125 // | $2a00 ............. $4d00 ... $4e00 ........ $xx00 .....
126 // +---------------------+---------+---------+....+---------+
127 // | PROGRAM.EXE | P01.DAT | P02.DAT |....| P0n.DAT |
128 // +---------------------+---------+---------+....+---------+
129 //
130
131 executableBinaryFileSize -= 5;
132 char * originalBinaryFileContent = malloc( executableBinaryFileSize );
133 fh = fopen( originalBinaryFile, "rb" );
134 (void)!fread( originalBinaryFileContent, 1, 5, fh);
135 (void)!fread( originalBinaryFileContent, 1, executableBinaryFileSize, fh);
136 fclose( fh );
137
138 int programExeSize = 0x4d00 - _environment->program.startingAddress;
139 if ( executableBinaryFileSize < programExeSize ) {
140 programExeSize = executableBinaryFileSize;
141 }
142 char * programExe = malloc( programExeSize );
143 memcpy( programExe, originalBinaryFileContent, programExeSize );
144 executableBinaryFileSize -= programExeSize;
145
146 char * programDats[MAX_TEMPORARY_STORAGE];
147 int programDatsSize[MAX_TEMPORARY_STORAGE];
148 int programDataCount = 0;
149
150 int blockSize = 0x2000;
151 if ( executableBinaryFileSize ) {
152 char * originalBinaryFileContentPtr = originalBinaryFileContent + programExeSize;
153 while( executableBinaryFileSize ) {
154 if ( blockSize > executableBinaryFileSize ) {
155 blockSize = executableBinaryFileSize;
156 executableBinaryFileSize = blockSize;
157 }
158 programDats[programDataCount] = malloc( blockSize );
159 programDatsSize[programDataCount] = blockSize;
160 memcpy( programDats[programDataCount], originalBinaryFileContentPtr, blockSize );
161 executableBinaryFileSize -= blockSize;
162 originalBinaryFileContentPtr += blockSize;
163 ++programDataCount;
164 }
165 }
166
167 blockSize = 0x2000;
168
169 char temporaryPath[MAX_TEMPORARY_STORAGE];
170 strcopy( temporaryPath, _environment->temporaryPath );
171 strcat( temporaryPath, " " );
172 temporaryPath[strlen(temporaryPath)-1] = PATH_SEPARATOR;
173
174 char outputFileName[MAX_TEMPORARY_STORAGE*2];
175
176 // Now we are going to write down the effective files, that must
177 // have the LOADM format, as follows:
178 //
179 // +------------+--------------....--------------+---------------+
180 // | PREAMBLE | DATA | POSTAMBLE |
181 // +------------+--------------....--------------+---------------+
182 // |00|LEN |LOAD| .............................. |FF|00|00| EXEC |
183 // +------------+--------------....--------------+---------------+
184 //
185
186 sprintf( outputFileName, "%sprogram.exe", temporaryPath);
187 fh = fopen( outputFileName, "wb" );
188 fputc( 0x00, fh );
189 fputc( programExeSize >> 8, fh );
190 fputc( programExeSize & 0xff, fh );
191 fputc( _environment->program.startingAddress >> 8, fh );
192 fputc( _environment->program.startingAddress & 0xff, fh );
193 fwrite( programExe, 1, programExeSize, fh );
194 fputc( 0xff, fh );
195 fputc( 0x00, fh );
196 fputc( 0x00, fh );
197 fputc( _environment->program.startingAddress >> 8, fh );
198 fputc( _environment->program.startingAddress & 0xff, fh );
199 fclose( fh );
200
201 if ( programDataCount ) {
202 for( int i=0; i<programDataCount; ++i ) {
203
204 // The dat files will be loaded to a fixed position,
205 // because they will be copied under ROM bank
206 // using the LOADER.BAS.
207 //
208 // +------------+--------------....--------------+--------------+
209 // | PREAMBLE | DATA | POSTAMBLE |
210 // +------------+--------------....--------------+--------------+
211 // |00|LEN |3000| .............................. |FF|00|00|00|00|
212 // +------------+--------------....--------------+--------------+
213
214 sprintf( outputFileName, "%sprogram.%03d", temporaryPath, i);
215 fh = fopen( outputFileName, "wb" );
216 fputc( 0x00, fh );
217 fputc( programDatsSize[i] >> 8, fh );
218 fputc( programDatsSize[i] & 0xff, fh );
219 fputc( 0x2a, fh );
220 fputc( 0x00, fh );
221 fwrite( programDats[i], 1, programDatsSize[i], fh );
222 fputc( 0xff, fh );
223 fputc( 0x00, fh );
224 fputc( 0x00, fh );
225 fputc( 0x00, fh );
226 fputc( 0x00, fh );
227 fclose( fh );
228
229 }
230 }
231
232 // Now we are going to create the BASIC loader.
233
234 char basFileName[MAX_TEMPORARY_STORAGE];
235
236 sprintf( basFileName, "%sloader.bas", temporaryPath);
237 fh = fopen( basFileName, "wb" );
238 fprintf( fh, "1 REM ugBASIC loader\n" );
239 fprintf( fh, "2 REM --[ PROLOGUE ]--\n" );
240 fprintf( fh, "3 DATA 26, 80, 52, 16, 52, 6,142, 14\n");
241 fprintf( fh, "4 DATA 0,191, 0, 31, 31, 65, 16,206\n");
242 fprintf( fh, "5 DATA 15, 0, 16,255, 0, 33,198,255\n");
243 fprintf( fh, "6 DATA 166,133,167,229, 90, 38,249, 53\n");
244 fprintf( fh, "7 DATA 6, 53, 16, 28,159, 57, 26, 80\n");
245 fprintf( fh, "8 DATA 206, 16, 0,142, 42, 0, 16,142\n");
246 fprintf( fh, "9 DATA 42, 0,183,255,223,166,128,167\n");
247 fprintf( fh, "10DATA 160, 51, 95, 17,131, 0, 0, 38\n");
248 fprintf( fh, "11DATA 244,183,255,222, 28,159, 57, 26\n");
249 fprintf( fh, "12DATA 80,206, 16, 0,142, 42, 0, 16\n");
250 fprintf( fh, "13DATA 142,192, 0,183,255,223,134, 0\n");
251 fprintf( fh, "14DATA 183,255,166,166,128,167,160, 51\n");
252 fprintf( fh, "15DATA 95, 17,131, 0, 0, 38,244,134\n");
253 fprintf( fh, "16DATA 62,183,255,166,183,255,222, 28\n");
254 fprintf( fh, "17DATA 159, 57, 0\n" );
255 fprintf( fh, "18FORA=&HE00 TO &HE71:READX:POKEA,X:NEXTA\n" );
256 fprintf( fh, "19REM --[ MAIN ]--\n" );
257 fprintf( fh, "20CLEAR 999: EXEC &HE00: PRINT \"LOADING, PLEASE WAIT\";\n" );
258
259 int lineNr = 21;
260
261 Bank * bank = _environment->expansionBanks;
262 while( bank ) {
263 int bankSize = bank->space - bank->remains;
264 if ( bankSize ) {
265 char line[MAX_TEMPORARY_STORAGE];
266
267 if ( bankSize > blockSize ) {
268 fprintf( fh, "%dLOADM\"BANK0.%03d\":PRINT\".\";\n", lineNr, bank->id);
269 ++lineNr;
270
271 fprintf( fh, "%dPOKE &HE51, &HC0: POKE &HE57, %d: EXEC &HE47\n", lineNr, bank->id);
272 ++lineNr;
273
274 fprintf( fh, "%dLOADM\"BANK1.%03d\":PRINT\".\";\n", lineNr, bank->id);
275 ++lineNr;
276
277 fprintf( fh, "%dPOKE &HE51, &HD0: EXEC &HE47\n", lineNr);
278 ++lineNr;
279
280 } else {
281 fprintf( fh, "%dEXEC &HE46: LOADM\"BANK0.%03d\":PRINT\".\";\n", lineNr, bank->id);
282 ++lineNr;
283
284 fprintf( fh, "%dPOKE &HE51, &HC0: POKE &HE57, %d: EXEC &HE47\n", lineNr, bank->id);
285 ++lineNr;
286
287 }
288
289 }
290 bank = bank->next;
291 }
292
293 for( int i=0; i<programDataCount; ++i ) {
294 fprintf( fh, "%dLOADM\"PROGRAM.%03d\":?\".\";\n", lineNr, i);
295 ++lineNr;
296 int address = 0x4d + i*32;
297 int sizeHi = ( programDatsSize[i] >> 8 ) & 0xff;
298 int sizeLo = ( programDatsSize[i] ) & 0xff;
299 fprintf( fh, "%dPOKE3632,%d:POKE3625,%d:POKE3626,%d:EXEC3620\n", lineNr, address, sizeHi, sizeLo );
300 ++lineNr;
301 }
302 fprintf( fh, "90PRINT \"...\";: LOADM\"PROGRAM.EXE\": PRINT \"...\": EXEC\n" );
303 fclose( fh );
304
305 char binaryName[MAX_TEMPORARY_STORAGE];
306
307 char executableName[MAX_TEMPORARY_STORAGE];
308 BUILD_TOOLCHAIN_DECB_GET_EXECUTABLE( _environment, executableName );
309
310 strcopy( binaryName, _environment->exeFileName );
311 Storage * storage = _environment->storage;
312 char buffer[MAX_TEMPORARY_STORAGE];
313 if ( storage ) {
314 char filemask[MAX_TEMPORARY_STORAGE];
315 strcopy( filemask, _environment->exeFileName );
316 char * basePath = find_last_path_separator( filemask );
317 if ( basePath ) {
318 ++basePath;
319 *basePath = 0;
320 if ( storage->fileName ) {
321 strcat( basePath, storage->fileName );
322 } else {
323 strcat( basePath, "disk%d.dsk" );
324 }
325 } else {
326 if ( storage->fileName ) {
327 strcopy( filemask, storage->fileName );
328 } else {
329 strcopy( filemask, "disk%d.dsk" );
330 }
331 }
332 sprintf( buffer, filemask, 0 );
333 if ( !strstr( buffer, ".dsk" ) ) {
334 strcat( buffer, ".dsk" );
335 }
336 _environment->exeFileName = strdup( buffer );
337 } else {
338 strcopy( binaryName, _environment->exeFileName );
339 char * p = strstr( binaryName, ".bin" );
340 if ( p ) {
341 strcopy( p, ".dsk" );
342 }
343 _environment->exeFileName = strdup( binaryName );
344 }
345
346 char commandLine[8*MAX_TEMPORARY_STORAGE];
347 remove( _environment->exeFileName );
348 sprintf( commandLine, "\"%s\" dskini \"%s\"", executableName, _environment->exeFileName );
349 if ( system_call( _environment, commandLine ) ) {
350 printf("The compilation of assembly program failed.\n\n");
351 printf("Please use option '-I' to install chain tool.\n\n");
352 };
353
354 sprintf( commandLine, "\"%s\" copy -0 -t \"%s\" \"%s,LOADER.BAS\"",
355 executableName,
356 basFileName,
357 _environment->exeFileName );
358 if ( system_call( _environment, commandLine ) ) {
359 printf("The compilation of assembly program failed.\n\n");
360 printf("Please use option '-I' to install chain tool.\n\n");
361 };
362
363 remove( basFileName );
364
365 sprintf( commandLine, "\"%s\" copy -2 \"%sprogram.exe\" \"%s,PROGRAM.EXE\"",
366 executableName,
367 temporaryPath,
368 _environment->exeFileName );
369 if ( system_call( _environment, commandLine ) ) {
370 printf("The compilation of assembly program failed.\n\n");
371 printf("Please use option '-I' to install chain tool.\n\n");
372 };
373
374 if ( programDataCount ) {
375 for( int i=0; i<programDataCount; ++i ) {
376 sprintf( commandLine, "\"%s\" copy -2 \"%sprogram.%03d\" \"%s,PROGRAM.%03d\"",
377 executableName,
378 temporaryPath,
379 i,
380 _environment->exeFileName,
381 i );
382 if ( system_call( _environment, commandLine ) ) {
383 printf("The compilation of assembly program failed.\n\n");
384 printf("Please use option '-I' to install chain tool.\n\n");
385 };
386 }
387 }
388
389 if ( _environment->outputGeneratedFiles ) {
390 printf( "%s\n", _environment->exeFileName );
391 }
392
393 if ( !storage ) {
394
395 } else {
396 strcopy( buffer, _environment->exeFileName );
397 int i=0;
398 while( storage ) {
399 FileStorage * fileStorage = storage->files;
400 while( fileStorage ) {
401 int size;
402 char * buffer;
403
404 if ( fileStorage->content && fileStorage->size ) {
405 size = fileStorage->size + 2;
406 buffer = malloc( size );
407 memset( buffer, 0, size );
408 memcpy( buffer, fileStorage->content, fileStorage->size );
409 } else {
410 FILE * file = fopen( fileStorage->sourceName, "rb" );
411 if ( !file ) {
413 }
414 fseek( file, 0, SEEK_END );
415 size = ftell( file );
416 fseek( file, 0, SEEK_SET );
417 buffer = malloc( size + 2 );
418 memset( buffer, 0, size + 2 );
419 (void)!fread( buffer, size, 1, file );
420 fclose( file );
421 }
422 char dataFilename[MAX_TEMPORARY_STORAGE];
423 sprintf( dataFilename, "%s%s", temporaryPath, fileStorage->targetName );
424 FILE * fileOut = fopen( dataFilename, "wb" );
425 if ( fileOut ) {
426 fwrite( buffer, 1, size, fileOut );
427 fclose(fileOut );
428 }
429 sprintf( commandLine, "\"%s\" copy -1 -b \"%s\" \"%s,%s\"",
430 executableName,
431 dataFilename,
432 _environment->exeFileName,
433 fileStorage->targetName );
434 if ( system_call( _environment, commandLine ) ) {
435 printf("The compilation of assembly program failed.\n\n");
436 printf("Please use option '-I' to install chain tool.\n\n");
437 };
438
439 remove( dataFilename );
440 fileStorage = fileStorage->next;
441 }
442
443 storage = storage->next;
444 ++i;
445
446 if ( storage ) {
447
448 char filemask[MAX_TEMPORARY_STORAGE];
449 strcopy( filemask, _environment->exeFileName );
450 char * basePath = find_last_path_separator( filemask );
451 if ( basePath ) {
452 ++basePath;
453 *basePath = 0;
454 if ( storage->fileName ) {
455 strcat( basePath, storage->fileName );
456 } else {
457 strcat( basePath, "disk%d.dsk" );
458 }
459 } else {
460 if ( storage->fileName ) {
461 strcopy( filemask, storage->fileName );
462 } else {
463 strcopy( filemask, "disk%d.dsk" );
464 }
465 }
466 sprintf( buffer, filemask, i );
467 if ( !strstr( buffer, ".dsk" ) ) {
468 strcat( buffer, ".dsk" );
469 }
470 remove( buffer );
471 sprintf( commandLine, "\"%s\" dskini \"%s\"", executableName, buffer );
472 if ( system_call( _environment, commandLine ) ) {
473 printf("The compilation of assembly program failed.\n\n");
474 printf("Please use option '-I' to install chain tool.\n\n");
475 };
476 if ( _environment->outputGeneratedFiles ) {
477 printf( "%s\n", buffer );
478 }
479 }
480
481 }
482
483 }
484
485 bank = _environment->expansionBanks;
486 while( bank ) {
487 int bankSize = bank->space - bank->remains;
488 if ( bankSize > 0 ) {
489 int effectiveSize = blockSize > bankSize ? bankSize : blockSize;
490 char bankFileName[MAX_TEMPORARY_STORAGE];
491 sprintf( bankFileName, "%sbank0.%03d", temporaryPath, bank->id );
492 fh = fopen( bankFileName, "wb" );
493 fputc( 0, fh );
494 fputc( (unsigned char) ( ( effectiveSize >> 8 ) & 0xff ), fh );
495 fputc( (unsigned char) ( ( effectiveSize ) & 0xff ), fh );
496 fputc( 0x2a, fh );
497 fputc( 0x00, fh );
498 fwrite( &bank->data[0], 1, effectiveSize, fh );
499 fputc( 0xff, fh );
500 fputc( 0x00, fh );
501 fputc( 0x00, fh );
502 fputc( 0x2a, fh );
503 fputc( 0x00, fh );
504 fputc( 0x00, fh );
505 fclose( fh );
506
507 sprintf( commandLine, "\"%s\" copy -2 \"%sbank0.%03d\" \"%s,BANK0.%03d\"",
508 executableName,
509 temporaryPath,
510 bank->id,
511 _environment->exeFileName,
512 bank->id );
513 if ( system_call( _environment, commandLine ) ) {
514 printf("The compilation of assembly program failed.\n\n");
515 printf("Please use option '-I' to install chain tool.\n\n");
516 exit(0);
517 };
518
519 if ( bankSize > blockSize ) {
520 effectiveSize = bankSize - blockSize;
521 sprintf( bankFileName, "%sbank1.%03d", temporaryPath, bank->id );
522 fh = fopen( bankFileName, "wb" );
523 fputc( 0, fh );
524 fputc( (unsigned char) ( ( effectiveSize >> 8 ) & 0xff ), fh );
525 fputc( (unsigned char) ( ( effectiveSize ) & 0xff ), fh );
526 fputc( 0x2a, fh );
527 fputc( 0x00, fh );
528 fwrite( &bank->data[blockSize], 1, bankSize - blockSize, fh );
529 fputc( 0xff, fh );
530 fputc( 0x00, fh );
531 fputc( 0x00, fh );
532 fputc( 0x2a, fh );
533 fputc( 0x00, fh );
534 fputc( 0x00, fh );
535 fclose( fh );
536 sprintf( commandLine, "\"%s\" copy -2 \"%sbank1.%03d\" \"%s,BANK1.%03d\"",
537 executableName,
538 temporaryPath,
539 bank->id,
540 _environment->exeFileName,
541 bank->id );
542 if ( system_call( _environment, commandLine ) ) {
543 printf("The compilation of assembly program failed.\n\n");
544 printf("Please use option '-I' to install chain tool.\n\n");
545 exit(0);
546 };
547
548 }
549
550 }
551
552 bank = bank->next;
553
554 }
555
556 remove( originalBinaryFile );
557
558}
559
560void target_linkage( Environment * _environment ) {
561
562 switch( _environment->outputFileType ) {
564 generate_bin( _environment );
565 break;
567 generate_bin( _environment );
568 generate_dsk( _environment );
569 break;
570 default:
572 }
573
574}
575
576void target_cleanup( Environment * _environment ) {
577
578 remove( _environment->asmFileName );
579
580 if ( _environment->analysis && _environment->listingFileName ) {
581 target_analysis( _environment );
582 }
583
584}
int system_call(Environment *_environment, char *_commandline)
Call an external executable.
char * find_last_path_separator(char *_path)
void target_linkage(Environment *_environment)
Convert C64's assembly to executable.
Definition _build.c:327
void target_cleanup(Environment *_environment)
Definition _build.c:343
void target_analysis(Environment *_environment)
Definition _cleanup.c:68
int size
Definition _optimizer.c:678
void generate_dsk(Environment *_environment)
Definition _build.c:100
void generate_bin(Environment *_environment)
Definition _build.c:43
int remains
Definition ugbc.h:171
int id
Definition ugbc.h:153
struct _Bank * next
Definition ugbc.h:185
char * data
Definition ugbc.h:177
int space
Definition ugbc.h:168
Storage * storage
Definition ugbc.h:2526
char * listingFileName
Definition ugbc.h:2305
char * temporaryPath
Definition ugbc.h:2360
int analysis
Definition ugbc.h:2365
char * executerFileName
Definition ugbc.h:2315
Program program
Definition ugbc.h:3179
OutputFileType outputFileType
Definition ugbc.h:2452
Bank * expansionBanks
Definition ugbc.h:3005
int outputGeneratedFiles
Definition ugbc.h:3173
char * profileFileName
Definition ugbc.h:2310
char * asmFileName
Definition ugbc.h:2285
int profileCycles
Definition ugbc.h:2375
char * exeFileName
Definition ugbc.h:2290
char * targetName
Definition ugbc.h:201
int size
Definition ugbc.h:204
char * sourceName
Definition ugbc.h:198
char * content
Definition ugbc.h:210
struct _FileStorage * next
Definition ugbc.h:213
int startingAddress
Definition ugbc.h:2217
FileStorage * files
Definition ugbc.h:232
char * fileName
Definition ugbc.h:229
struct _Storage * next
Definition ugbc.h:235
void * malloc(YYSIZE_T)
#define BUILD_TOOLCHAIN_ASM6809_GET_LISTING_FILE(_environment, listingFileName)
Definition ugbc.h:4872
@ OUTPUT_FILE_TYPE_DSK
Definition ugbc.h:267
@ OUTPUT_FILE_TYPE_BIN
Definition ugbc.h:258
#define BUILD_SAFE_REMOVE(_environment, filename)
Definition ugbc.h:4748
#define MAX_TEMPORARY_STORAGE
Definition ugbc.h:563
#define PATH_SEPARATOR
Definition ugbc.h:69
#define CRITICAL_DLOAD_MISSING_FILE(f)
Definition ugbc.h:3578
#define BUILD_TOOLCHAIN_ASM6809EXEC(_environment, flag, startingAddress, executableName, listingFileName)
Definition ugbc.h:4880
#define CRITICAL_BUILD_CANNOT_READ_EXECUTABLE_FOR_DSK(d, f)
Definition ugbc.h:3868
struct _Environment Environment
Structure of compilation environment.
#define BUILD_TOOLCHAIN_DECB_GET_EXECUTABLE(_environment, executableName)
Definition ugbc.h:4894
struct _Storage Storage
Structure of a single storage.
struct _FileStorage FileStorage
Structure of a single file inside a storage.
#define BUILD_TOOLCHAIN_ASM6809_GET_EXECUTABLE(_environment, executableName)
Definition ugbc.h:4855
struct _Bank Bank
Structure of a single bank.
#define CRITICAL_UNSUPPORTED_OUTPUT_FILE_TYPE(t)
Definition ugbc.h:3537
char OUTPUT_FILE_TYPE_AS_STRING[][16]
char * strcopy(char *_dest, char *_source)