diff --git a/src/z80/main.c b/src/z80/main.c index c0b2450..ef20082 100644 --- a/src/z80/main.c +++ b/src/z80/main.c @@ -76,20 +76,22 @@ static char _z80n_defaultRules[] = { #include "peeph-z80.rul" #include "peeph-z80n.rul" }; Z80_OPTS z80_opts; static OPTION _z80_options[] = { {0, OPTION_CALLEE_SAVES_BC, &z80_opts.calleeSavesBC, "Force a called function to always save BC"}, {0, OPTION_PORTMODE, NULL, "Determine PORT I/O mode (z80/z180)"}, + {0, OPTION_BO, NULL, " use code bank "}, + {0, OPTION_BA, NULL, " use data bank "}, {0, OPTION_ASM, NULL, "Define assembler name (rgbds/asxxxx/isas/z80asm/gas)"}, {0, OPTION_CODE_SEG, &options.code_seg, " use this name for the code segment", CLAT_STRING}, {0, OPTION_CONST_SEG, &options.const_seg, " use this name for the const segment", CLAT_STRING}, {0, OPTION_DATA_SEG, &options.data_seg, " use this name for the data segment", CLAT_STRING}, {0, OPTION_NO_STD_CRT0, &options.no_std_crt0, "For the z80/gbz80 do not link default crt0.rel"}, {0, OPTION_RESERVE_IY, &z80_opts.reserveIY, "Do not use IY (incompatible with --fomit-frame-pointer)"}, {0, OPTION_OLDRALLOC, &options.oldralloc, "Use old register allocator (deprecated)"}, {0, OPTION_FRAMEPOINTER, &z80_opts.noOmitFramePtr, "Do not omit frame pointer"}, {0, OPTION_EMIT_EXTERNS, NULL, "Emit externs list in generated asm"}, {0, OPTION_LEGACY_BANKING, &z80_opts.legacyBanking, "Use legacy method to call banked functions"}, @@ -570,21 +572,21 @@ _gbz80_rgblink (void) exit (1); } Safe_free (buffer); } static bool _parseOptions (int *pargc, char **argv, int *i) { if (argv[*i][0] == '-') { - if (IS_GB) + if (IS_GB || IS_Z80) { if (!strncmp (argv[*i], OPTION_BO, sizeof (OPTION_BO) - 1)) { /* ROM bank */ int bank = getIntArg (OPTION_BO, argv, i, *pargc); struct dbuf_s buffer; dbuf_init (&buffer, 16); if (_G.asmType == ASM_TYPE_RGBDS) {