Search found 6 matches

by Char
Mon Jul 14, 2008 5:56 am
Forum: Issues with 1.8
Topic: Build error on x86_64
Replies: 0
Views: 6873

Build error on x86_64

On AMD64, the long type is 64-bit, not 32, so sccz80 seems to generate huge numbers sometimes and fails to build the libs. This is not the only error, only the first. But by patching it, all the others went away too. libsrc/fcntl/z88/stat.c: #define JD0101970 2440588 time_t doepoch(long days, long s...
by Char
Sun May 18, 2008 4:29 pm
Forum: Bug reports
Topic: Optimizer may generate wrong code when calling a __CALLEE__ function
Replies: 1
Views: 5010

Optimizer may generate wrong code when calling a __CALLEE__ function

Hi, It seems the optimizer replaces sequences of the form call XXX / ret with a simple JP XXX. This works great, except when the called function is __CALLEE__, because it expects to find the return address on top of the stack. Example: extern int __CALLEE__ test11(int i, int j); void test1(void) { t...
by Char
Fri May 16, 2008 8:23 am
Forum: Bug reports
Topic: Crash on a CP/M clone
Replies: 3
Views: 7198

I'm returning with more info after digging the net, and with a question :) (BTW, if you don't see this as a bug, please move it to misc or somewhere more appropriate) First, the question. As I said, I'm not using real CP/M, but a Z80 implementation backwards compatible with it and with MSX-DOS too (...
by Char
Fri May 09, 2008 6:25 am
Forum: Bug reports
Topic: cannot link assert
Replies: 1
Views: 5859

cannot link assert

Compiling w/o -DNDEBUG and using assert generates a link error because in the libs assert.c generates an assert.o but the function is called l_assert. I changed the filename, Makefile and *.lst files and it seems to work.
by Char
Tue Apr 29, 2008 10:58 am
Forum: Bug reports
Topic: Crash on a CP/M clone
Replies: 3
Views: 7198

System calls are CALL 5, and at address 5 there is a JP. The address at location 6 is the JP operand, and that is the first byte of the resident portion of CP/M, so anything up to there can be used as heap. I first found out about this from the MS-DOS documentation; when describing the PSP format, t...
by Char
Sat Apr 26, 2008 8:03 am
Forum: Bug reports
Topic: Crash on a CP/M clone
Replies: 3
Views: 7198

Crash on a CP/M clone

Hi, I have a CP/M clone that starts the user program with SP set to an internal (quite small) stack and expects the program to move the stack into TPA. In normal cases, TPA as read from offset 6 is 0xe106, and SP is set to 0xe180, so doing anything non-trivial will overwrite the jump at 0xe106 and c...