stephen_usher wrote: ↑Sun Jan 24, 2021 4:58 pm
It looks like all tests and arithmetic, even on pointers, is 16 bit only, and unsigned arithmetic seems to be sort of signed. That's rather broken.
Its not really broken. Its just that typeof(size_t) in this compiler is unsigned int (16bit). You have the same problem when using ancient DOS-compilers, when the pointers are also 16bit only. There you would not even be able to use far pointers for that, only Borland-C with _huge pointers will work.
Pure C is far too GUI for me
As already mentioned, there are also command line versions of the compiler, assembler and linker. There is even a commandline-tool that i wrote some time ago that can process a project-file, if you don't like make. https://github.com/th-otto/pcmake
Yep, no errors now, and it runs, but I don't get any output, which I did originally.
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
The alternative to testing the whether the address is below the end of the cartridge port address range is to use a counter and test if that's less than the total, e.g.
....
unsigned long i;
....
for (i = 0; i < 0x20000L ; i++)
printf("0x%02x\t", addr++);
....
Intro retro computers since before they were retro...
ZX81->Spectrum->Memotech MTX->Sinclair QL->520STM->BBC Micro->TT030->PCs & Sun Workstations.
Added code to the MiNT kernel (still there the last time I checked) + put together MiNTOS.
Collection now with added Macs, Amigas, Suns and Acorns.