Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 18
    I think most machines didn’t translate BASIC to assembly; they just interpreted it. Commented Mar 29, 2022 at 22:54
  • 18
    The premise is false. BASIC on most micros was not compiled, and therefore there is no 'machine code' (nor 'assembly code') to save. Turning an intepretive system into a compiler system is not a 'small modification;'. Commented Mar 30, 2022 at 2:36
  • 4
    If it was possible to intercept and send the machine-code being sent to the CPU, -- Why do that? The "machine code being sent to the CPU" is the code of the BASIC interrpreter, which you already have in the ROM. Commented Mar 30, 2022 at 2:39
  • No, on several levels. It would require that the home computer would in addition to Basic interpreter, also to have a Basic compiler. Commented Mar 30, 2022 at 11:12
  • The line between interpretation and compilation is blurry. For Basic on an 8-bit micro, the native arithmetic (8-bit integer) doesn't match the language's arithmetic (floating point), so machine code would be either impossibly complicated or a series of library function calls with few other instructions. ECD Basic compiled to "threaded code", which was essentially just addresses of operators. A tiny "interpreter" picked these up and branched to them in sequence (more efficient than subroutine linkage). The threaded code was effectively the machine language of a virtual machine. Commented Mar 30, 2022 at 16:37