diff --git a/src/system/boot/platform/atari_m68k/atari_memory_map.h b/src/system/boot/platform/atari_m68k/atari_memory_map.h index 36f7e64960..b8b9000ac9 100644 --- a/src/system/boot/platform/atari_m68k/atari_memory_map.h +++ b/src/system/boot/platform/atari_m68k/atari_memory_map.h @@ -23,6 +23,7 @@ /* how we will use it */ //#define ATARI_ZBEOS_STACK_BASE 0x00040000 #define ATARI_ZBEOS_STACK_BASE 0x00060000 +#define ATARI_ZBEOS_STACK_END 0x00080000 #define ATARI_ZBEOS_BASE 0x00080000 /* from .prg shell.S will copy itself there */ #endif /* ATARI_MEMORY_MAP_H */ diff --git a/src/system/boot/platform/atari_m68k/console.cpp b/src/system/boot/platform/atari_m68k/console.cpp index fc8bcf0689..b9e219ef29 100644 --- a/src/system/boot/platform/atari_m68k/console.cpp +++ b/src/system/boot/platform/atari_m68k/console.cpp @@ -79,6 +79,8 @@ ConsoleHandle::WriteAt(void */*cookie*/, off_t /*pos*/, const void *buffer, // be nice to our audience and replace single "\n" with "\r\n" for (i = 0; i < bufferSize; i++) { + if (string[i] == '\0') + break; if (string[i] == '\n') Bconout(fHandle, '\r'); Bconout(fHandle, string[i]); diff --git a/src/system/boot/platform/atari_m68k/shell.S b/src/system/boot/platform/atari_m68k/shell.S index be3b861e4a..22581066d2 100644 --- a/src/system/boot/platform/atari_m68k/shell.S +++ b/src/system/boot/platform/atari_m68k/shell.S @@ -131,7 +131,7 @@ floppy_done: lea h4,%a0 bsr puts // setup stack - move.l #ATARI_ZBEOS_STACK_BASE,%sp + move.l #ATARI_ZBEOS_STACK_END,%sp lea h5,%a0 bsr puts move.l #0,%d0 @@ -226,6 +226,9 @@ prg_start: // disable interrupts //or.w #0x0700,%sr + // setup stack + move.l #ATARI_ZBEOS_STACK_END,%sp + lea h5,%a0 bsr puts lea _bs_entry,%a0 diff --git a/src/system/kernel/arch/m68k/arch_elf.cpp b/src/system/kernel/arch/m68k/arch_elf.cpp index a63c406e47..1c40f92df1 100644 --- a/src/system/kernel/arch/m68k/arch_elf.cpp +++ b/src/system/kernel/arch/m68k/arch_elf.cpp @@ -84,7 +84,7 @@ arch_elf_relocate_rel(struct elf_image_info *image, const char *sym_prepend, struct elf_image_info *resolve_image, struct Elf32_Rel *rel, int rel_len) #endif { - // there are no rel entries in PPC elf + // there are no rel entries in M68K elf return B_NO_ERROR; }