very theoritical question about headers

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
cborn
Well known member
Posts: 267
Joined: Tue Oct 06, 2020 7:45 pm

very theoritical question about headers

Post by cborn »

Hello any reader,

I red the site
https://www.tutorialspoint.com/cprogram ... _files.htm
and
https://en.cppreference.com/w/c/header
and
https://en.wikipedia.org/wiki/Wide_character

On zx and others 8bit characters are the standard and thus the 'wide char' is special.
In theory this 'wide char' can be cut out and set in another header file. maybe/probably thats even done in reality.
Does it make sence to totaly break down a standard header into sun-headers and compile a new standard header for the VERY small devices like a 2k ACE ,ZX80 or an 16k ZX81 or 16k Spectrum?

the "standard" then pobably would look like an include file with sub-headers
//#include "widechr.h"
or with an if statement
probably the compiler and the compiler writer both will get slowly insane by all different combinations.... but with only 2k you even CANT have a full header.
it would be a "broken-header" or a "breader"
its a simplistic thought, i know.
does it make sence? or was this the first thing they did back in 1978 ???
Cheers
cborn
Well known member
Posts: 267
Joined: Tue Oct 06, 2020 7:45 pm

Re: very theoritical question about headers

Post by cborn »

Well, i was half correct, or 10%
https://stackoverflow.com/questions/200 ... table-file
Nothing gets copied (..) If that included file contains function or data definitions (not just declarations), then these DO become part of your object file.
Its only needed if the compiler itself has only 16 kb to work with like a C-compiler ON a zx 16k or ace jumior.
so i got my answer and maybe in 10years i will try it.
cheers
Post Reply