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,487 of 243,242    |
|    David Brown to BGB    |
|    Re: 8 bit cpu    |
|    19 Dec 25 09:49:47    |
      From: david.brown@hesbynett.no              On 18/12/2025 23:30, BGB wrote:       > On 12/18/2025 12:20 PM, Rosario19 wrote:       >> 8 bit cpu for access memory other than 0..255 location has need at       >> last one 16 bit register and 16 bits operations, so i think that even       >> a 8 bit cpu has to have int in C language as 16 bits       >       > There are no "true" 8 bit systems in this sense, as pretty much every       > existing 8-bit CPU has had support for 16-bit operations in some way,       > though often by using register pairs.              That is, at best, an exaggerated interpretation.              >       > So, in this sense, it makes more sense to call them 8/16 instead, as the       > exact line between 8-bit machines and 16-bit machines is often a little       > fuzzy (and both tend to look basically similar as far as C is concerned;       > for the machines big enough to where running C on them is viable).       >       >       >       > One could then ask, what would a minimal 8-bitter look like.       > Might make sense to go with fixed-length 16-bit instructions.       > Likely 8x8b registers;       > ...       >       > Say:       > AL, AH       > BL, BH       > CL, CH       > SP, LR       >       > If you want a 16-bit ADD, you do two:       > ADD, ADC       >              There are lots of 8-bit processors with /far/ fewer registers than that.              The 6502, had :               A = 8-bit accumulator        X = 8-bit index register        Y = 8-bit index register               S = 8-bit stack pointer        P = 8-bit flag register        PC = 16-bit program counter              Access to the zero page was fast - access to memory beyond that was done       (IIRC) with a 16-bit base address stored in the zero page memory, added       to an 8-bit index register. There were no 16-bit registers, no register       pairs (though I think some 6502 variants could use an XY pair for       addressing), no 16-bit operations.              A microcontroller I used on a lot of projects was the COP8. It had one       8-bit register "A", and a 16-bit PC. Access to wider memory was via paging.                     Devices with only 8-bit program counters were typically only for very       niche uses where cost was absolutely critical - there's not a lot you       can do with 256 bytes (or perhaps 256 16-bit words) of program space.       But there were plenty of 8-bit microcontrollers where the PC was not       really 16-bit, but was more of an 8-bit "PC_lo" register combined with a       paging register (which might have been a fair bit smaller than 8-bit).       Code flow would wrap within a page rather than moving seamlessly on to       the next page. (Of course all such systems were Harvard architectures       with completely separate code and data.)                     And at one time, 4-bit microcontrollers were the dominant architecture       in terms of the number of devices made and sold. These usually had a       way to combine two registers to get 8-bit address registers.              --- 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