| 1 | // ACME - a crossassembler for producing 6502/65c02/65816/65ce02 code. |
| 2 | // Copyright (C) 1998-2025 Marco Baye |
| 3 | // Have a look at "acme.c" for further info |
| 4 | // |
| 5 | // Platform specific stuff (in this case, for unknown OSes) |
| 6 | #ifndef platform_H |
| 7 | #define platform_H |
| 8 | |
| 9 | |
| 10 | // symbolic constants and macros |
| 11 | |
| 12 | // called once on program startup (could register exit handler, if needed) |
| 13 | #define PLATFORM_INIT platform_read_env_var() |
| 14 | |
| 15 | // directory separator for search paths |
| 16 | #define DIRECTORY_SEPARATOR '/' |
| 17 | #define ALTERNATIVE_DIR_SEP '/' // dummy |
| 18 | |
| 19 | // string containing the prefix for accessing files from the library tree |
| 20 | // (use "--libpath" cli switch or "ACME" environment variable to set this) |
| 21 | #define PLATFORM_LIBPREFIX NULL |
| 22 | #define PLATFORM_USE_ENV_VAR 1 // library access needs "ACME" environment variable |
| 23 | // if you are building an "ACME" package for a linux or bsd distribution, you |
| 24 | // could put the library files at /usr/share/acme/lib/ and use that path instead |
| 25 | // of "NULL" above. the user then only needs the "ACME" environment variable if |
| 26 | // they want to override the default path given here. |
| 27 | |
| 28 | // setting the created files' types |
| 29 | #define PLATFORM_SETFILETYPE_APPLE(a) |
| 30 | #define PLATFORM_SETFILETYPE_CBM(a) |
| 31 | #define PLATFORM_SETFILETYPE_PLAIN(a) |
| 32 | #define PLATFORM_SETFILETYPE_TEXT(a) |
| 33 | |
| 34 | // platform specific message output |
| 35 | #define PLATFORM_INFO(a) |
| 36 | #define PLATFORM_WARNING(a) |
| 37 | #define PLATFORM_ERROR(a) |
| 38 | #define PLATFORM_SERIOUS(a) |
| 39 | |
| 40 | // integer-to-character conversion |
| 41 | #define PLATFORM_UINT2CHAR(x) \ |
| 42 | do { \ |
| 43 | x ^= x >> 16; \ |
| 44 | x ^= x >> 8; \ |
| 45 | x &= 255; \ |
| 46 | } while (0) |
| 47 | |
| 48 | // output of platform-specific command line switches |
| 49 | #define PLATFORM_OPTION_HELP |
| 50 | |
| 51 | // processing of platform-specific command line switches |
| 52 | #define PLATFORM_SHORTOPTION_CODE |
| 53 | #define PLATFORM_LONGOPTION_CODE |
| 54 | |
| 55 | |
| 56 | #endif |