summaryrefslogtreecommitdiff
path: root/avr
diff options
context:
space:
mode:
Diffstat (limited to 'avr')
-rw-r--r--avr/cmd_loadcpm3.c3
-rw-r--r--avr/main.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/avr/cmd_loadcpm3.c b/avr/cmd_loadcpm3.c
index f24ee19..6b2f62f 100644
--- a/avr/cmd_loadcpm3.c
+++ b/avr/cmd_loadcpm3.c
@@ -143,6 +143,9 @@ command_ret_t do_loadcpm3(cmd_tbl_t *cmdtp, int flag, int argc, char * const arg
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 */
diff --git a/avr/main.c b/avr/main.c
index 7796a36..423b48a 100644
--- a/avr/main.c
+++ b/avr/main.c
@@ -31,7 +31,7 @@ uint8_t mcusr __attribute__ ((section (".noinit")));
__attribute__ ((naked)) __attribute__ ((section (".init3")))
void preset_ram (void)
{
- for (uint8_t *p = RAMSTART; p <= (uint8_t *) RAMEND; p++)
+ for (uint8_t *p = (uint8_t *) RAMSTART; p <= (uint8_t *) RAMEND; p++)
*p = 0xdd;
}