Lars Brinkhoff
Lars Brinkhoff
`SP@` and `RP@` aren't standardized. But they do exist in many Forths, so there are expectations on how they should work. My x86 target does use `push %esp`. (Also 68000,...
Yes, I was thinking as `@` as an atomic operations. My assembler versions don't touch the stack pointer. But now that I look more closely, my C `@` does update...
I made a tentative fix in the [`fix-undef` branch](https://github.com/larsbrinkhoff/lbForth/tree/fix-undef).
I agree that `: sp@ sp @ ;` looks cute, but I'd like to stick with the Forth philosophy: keep it simple. Exactly what is more simple may be a...
I see now there are more cases of undefined behaviour. There are warnings that dereferencing type-punned pointers will break aliasing rules. I guess I have been too liberal casting pointers.
This runs in 1.4 seconds in the current x86 target, and seconds and 2.5 seconds in gforth-fast. ``` 100000000 constant loops : test begin ?dup if 1 - else exit...
> Is there currently a high level way to call system calls? No, there isn't. Yes, it would be nice to have. Note that there's a difference between system calls...
The Windows port does some contortions to call the kernel32 APIs. I think the same method applies to all dlls?
That should be a bug. I probably used the Linux io.fth for the Windows port but forgot about write-file. I don't know why that passes the tests!
Thanks for checking. The C target works, but what I'd like to do is writing the target Mach-O file image from Forth, like how the Linux target writes an ELF...