| 1 | //cxx . . $ `<file>/src/asm/cpu.h`/ |
| 2 | // ACME - a crossassembler for producing 6502/65c02/65816 code. |
| 3 | // Copyright (C) 1998-2006 Marco Baye |
| 4 | // Have a look at "acme.c" for further info |
| 5 | // |
| 6 | // CPU stuff |
| 7 | #ifndef cpu_H |
| 8 | #define cpu_Hcxx . . $ `src/asm/cpu.h:8:9`! |
| 9 | |
| 10 | #include "config.h"cxx . . $ `<file>/src/asm/config.h`/ |
| 11 | |
| 12 | |
| 13 | // CPU type structure definition |
| 14 | struct cpu_tcxx . . $ cpu_t# { |
| 15 | // This function is not allowed to change GlobalDynaBuf |
| 16 | // because that's where the mnemonic is stored! |
| 17 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! (*keyword_is_mnemoniccxx . . $ cpu_t#keyword_is_mnemonic.)(int); |
| 18 | boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`!* long_regscxx . . $ cpu_t#long_regs.; // pointer to array of bool: |
| 19 | #define LONGREG_IDX_Acxx . . $ `src/asm/cpu.h:19:9`! 0 // array index for "long accu" bool |
| 20 | #define LONGREG_IDX_Rcxx . . $ `src/asm/cpu.h:20:9`! 1 // array index for "long index regs" bool |
| 21 | int flagscxx . . $ cpu_t#flags.; |
| 22 | char default_align_valuecxx . . $ cpu_t#default_align_value.; |
| 23 | }; |
| 24 | #define CPUFLAG_INDJMPBUGGYcxx . . $ `src/asm/cpu.h:24:9`! (1u << 0) |
| 25 | |
| 26 | |
| 27 | // Variables |
| 28 | extern struct cpu_tcxx . . $ cpu_t# *CPU_nowcxx . . $ CPU_now.;// Struct of current CPU type (default 6502) |
| 29 | extern result_int_tcxx . . $ result_int_t# CPU_pccxx . . $ CPU_pc.; // Current program counter (pseudo value) |
| 30 | extern int CPU_2addcxx . . $ CPU_2add.; // add to PC after statement |
| 31 | |
| 32 | |
| 33 | // Prototypes |
| 34 | |
| 35 | // create cpu type tree (is done early) |
| 36 | extern void CPUtype_initcxx . . $ CPUtype_init(49f6e7a06ebc5aa8).(void); |
| 37 | // register pseudo opcodes (done later) |
| 38 | extern void CPU_initcxx . . $ CPU_init(49f6e7a06ebc5aa8).(void); |
| 39 | // Set default values for pass |
| 40 | extern void CPU_passinitcxx . . $ CPU_passinit(39d502d8bb4d749b).(struct cpu_tcxx . . $ cpu_t#* cpu_type); |
| 41 | // set program counter to defined value |
| 42 | extern void CPU_set_pccxx . . $ CPU_set_pc(1624ee8275b10bda).(intval_tcxx . . $ intval_t# new_pc); |
| 43 | // Try to find CPU type held in DynaBuf. Returns whether succeeded. |
| 44 | extern boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! CPU_find_cpu_structcxx . . $ CPU_find_cpu_struct(b31f53e4fd6a1681).(struct cpu_tcxx . . $ cpu_t#** target); |
| 45 | // return whether offset assembly is active |
| 46 | extern boolcxx . . $ `<external>/13015445228558014418/stdbool.h:36:9`! CPU_uses_pseudo_pccxx . . $ CPU_uses_pseudo_pc(c9857a73d68e59ba).(void); |
| 47 | |
| 48 | #endif |