extern size_t __fastcall__ strlen(const char *);
#define EMAGIC 0x4C /* Header of executable (JMP) */
-#define EMAGIC_2 0x18 /* CLC BCC foo */
+#define EMAGIC_2 0x38 /* SEC BCS foo */
+/* We use SEC BCS not CLC BCC because CLC is 0x18 which is the Z80 JR header
+ so the two would be identical - not good! */
+
+
/* High byte is saved, low byte is a mystery so take worst case. Also allow
a bit less as C stack is not return stack */
#define brk_limit() ((udata.u_syscall_sp | 0xFF) - 384)
/* Z80 binaries start with a JP */
#define EMAGIC 0xc3 /* Header of executable */
+#define EMAGIC_2 0x18 /* JR */
/* Allow a minimum of 512 bytes gap between stack and top of allocations */
#define brk_limit() (udata.u_syscall_sp - 512)