Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c    |    Meh, in C you gotta define EVERYTHING    |    243,242 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 242,254 of 243,242    |
|    Philipp Klaus Krause to All    |
|    Re: _BitInt(N)    |
|    30 Nov 25 10:51:38    |
      From: pkk@spth.de              Am 30.11.25 um 10:05 schrieb Michael S:       >       > The list of supported targets on SDCC front page:       > * Intel MCS51 based microprocessors              OK, that one is plain 8-bit.              > * Maxim (formerly Dallas) DS80C390 variants              I'm not really familiar with this one. One one hand it is an MCS-51       derivative, and the instructions mostly operate on 8-bit data, but it       also AFAIK has a flat 24-bit address space.              > * Freescale (formerly Motorola) HC08 based              8-bit, I'd say.              > * Zilog Z80 based MCUs              This one gets complicated. The original Z80 had a 4-bit ALU, but is       widely considered 8-bit, and I'd agree. It has an 8-bit data bus, a       16-bit address bus. Most instructions operate on 8-bit data, but there       are some that operate on 16 bits. But SDCC supports many "Z80 based"       MCUs. Some are clearly as 8-bit as the Z80, or even more so. But some       have quite rich 16-bit instructions, such as the TLCS-90. The eZ80 even       has 24-bit registers and quite some instructions that operate on 24-bit       data (when in ADL mode - in Z80 mode they operate on 16-bit data       instead). The Rabbits up to 3000A also have quite good support for       working with 16-bit data.              > * Padauk (pdk14, pdk15)              The Padauk µC have an 8-bit wide RAM. Depending on the variant, the       program and const data is stored in a PROM or flash that is 14 or 15       bits wide.              > * STMicroelectronics STM8              Most instructions operate on 8-bit, a few operate on 16 bits. The RAM is       connected to the CPU via an 8-bit data bus. The flash is connected to       the CPU via a 32-bit data bus (and in some cases alignment affects       timing when reading data or instructions from that flash).              > * MOS 6502 and WDC 65C02              I think these are quite clearly 8 bit.              > Work is in progress:       > * Rabbit 4000, 5000, 6000              These are Z80 derivatives. But they also have quite some instructions       that operate on 16 or 32 bits. Their data bus can be configured to 8 or       16 bits.              > * Padauk pdk13              Has a 13 bits wide PROM, otherwise similar to the pdk14/pdk15 above.              > and the f8 and f8l              8-bit or mixed 8/16 bit.              > Unmaintained:       > * Microchip PIC16 and PIC18              Probably 8 bit.              > I know nothing about Rabbit and Padauk. The rest of architectures in       > the list are '8-bit processors'.              While I also often use that term, it is not entirely clear where the       line should be drawn. Many '8-bit processors' could reasonably be       considered 8/16 bit, 16 bit, 24 bit, 32 bit, or combinations thereof       instead. But all SDCC targets can in some way address 8-bit bytes.              Though for the pdk13, pdk14, pdk15 this means just ignoring the upper       5/6/7 bits when reading data from PROM/flash - maybe for pdk15, it would       make sense to have some optimization for const _BitInt(N) (N <= 15)       directly into that PROM/flash, as long as the address is never taken. If       SDCC gets pdk16 support, it would probably emulate 8-bit addressing for       the 16-bit PROM/flash.              > Now, if you ask me, I don't understand why Waldek Hebisch considers       > difference between 8-bit and [byte-addressable] 16-bit targets       > important. As far as size of relevant C types goes, they look the same:       > char - 8 bits       > int - 16 bit       > long - 32 bits       > There is possibly difference in the size of 'short', but I don't       > understand why it matters.              If int is 16 bits, shorts is 16 bits, too.              Philipp              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca