/*
- * (C) Copyright 2015 Leo C. <erbl259-lmu@yahoo.de>
+ * (C) Copyright 2015,2016 Leo C. <erbl259-lmu@yahoo.de>
*
* SPDX-License-Identifier: GPL-2.0
*/
*/
#include "common.h"
-#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <stdbool.h>
#include "command.h"
#include "env.h"
#include "ff.h"
+#include "eval_arg.h"
#include "con-utils.h"
#include "z80-if.h"
#include "debug.h"
CONFIG_CPM3_BANKED_BASE);
if (argc > 3)
- banked_base = strtoul(argv[3], NULL, 16);
+ banked_base = eval_arg(argv[3], NULL);
if (argc > 2)
- common_base = strtoul(argv[2], NULL, 16);
+ common_base = eval_arg(argv[2], NULL);
- fname = getenv_char(PSTR(ENV_CPM3_SYSFILE));
+ fname = getenv_str(PSTR(ENV_CPM3_SYSFILE));
if (argc > 1) {
fname = argv[1];
}
common_base = (uint16_t) buffer[0] + (buffer[1] << 8);
setenv_hex(PSTR(ENV_CPM3_COMMON_BASE), common_base);
}
+
+ setenv_hex(PSTR(ENV_CPM3_SCB), mem_top - ((res_len - (6 - 1)) << 8) + common_base);
+
/* Main System Load */
/* Load Common Portion of System */