0
$\begingroup$

I never recall any problem making FOR loops in BASIC to 10000 on old IBM PC computers, but how does it work at the machine level when the number in the data register is (presumably) limited to a number from 0-255?

[Edit: I can speculate that the processors had special instructions to use more than one word, but I never recall hearing such techniques.]

$\endgroup$
5
  • 1
    $\begingroup$ (The Intel 8088 wasn't an 8-bit processor. It was as much of a 16-bit processor as the "original iAPX 86", but de/multiplexing the data bus on chip, allowing a) retrofit into legacy hardware/designs, say 8085-based b) going cheap on RAM.) When required data range exceeds a single machine word, the usual approach is to use multiple machine words. Support for this was common before transistors were commercially viable. $\endgroup$
    – greybeard
    Commented Aug 28, 2021 at 7:22
  • $\begingroup$ @greybeard: Really? It only had 8-bit instructions, as far as I can recall. What was the 286, then? $\endgroup$
    – theDoctor
    Commented Aug 29, 2021 at 0:49
  • $\begingroup$ (Which part of my comment are you taunting substantiation for using Really?) Following the success of the '74 2nd iteration register CPU 8080, development of the 8800 was started in '75, a stack machine with support for capabilities - including overhead, and no way not to use and take the (performance) hit for it. Development took its sweet six years, $int_el$ started a 16-bit evolution of the '76 8085, the 8086 the same year, introducing it in '78. The '79 8088 employs an identical execution unit. $\endgroup$
    – greybeard
    Commented Aug 29, 2021 at 9:39
  • $\begingroup$ @greybeard: I was "taunting substantiation" only for the claim of being 16-bits internally. That's cool. I'm going to believe you, but I kinda wish I had some old books from that era. The other question I can't resolve is how those early chips did nested function calls. A call stack on chip (limiting nested function calls) or a separate, indefinite call stack in RAM.... $\endgroup$
    – theDoctor
    Commented Sep 4, 2021 at 1:36
  • 1
    $\begingroup$ (I looked up taunting minutes after posting that comment - I thought it meant something like mockingly elicit. Oh, well.) how those early chips did nested function calls You are aware there had been several "generations" of computer designs preceding integrated circuits, let alone single chip CPUs? While RAM still seems definite in contemporary hardware, support ranged from no explicit support for subroutines or stacks (e.g. SC/MP) to single instruction selective register save/restore (VAX) or stack windows (SPARC) in single chip implementations of later designs. $\endgroup$
    – greybeard
    Commented Sep 4, 2021 at 5:30

1 Answer 1

2
$\begingroup$

The obvious answer is also the correct one here -- if the number of bits in a register or memory architecture is smaller than the number of bits needed for a particular data type, then the data type is represented using more than one register or memory unit.

This isn't really unique to 8-bit computing. On 32-bit architectures if you use a 64-bit or 128-bit long, it will be physically a sequence of 2 or 4 blocks, respectively.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.