summaryrefslogtreecommitdiff
path: root/avr
diff options
context:
space:
mode:
authorLeo C2016-06-01 21:19:47 +0200
committerLeo C2016-06-01 21:19:47 +0200
commit2b3aff48bde947894e51da5f95c3ffe0e60cabac (patch)
treee40e8656fb8d4e427c78a5932a5324a98607c668 /avr
parent9461ecf31e8c701160059af2836337f79fc837b3 (diff)
downloadz180-stamp-2b3aff48bde947894e51da5f95c3ffe0e60cabac.zip
loadcpm3(): set environment variable 'cpm3_scb' with base of scb (physical address)
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;
}