4 ms·
I've never heard of the original BASIC being compiled in any way, JIT or otherwise. Far as I know, the most it did was tokenize keywords into one or two bytes,
by chuckadams 3y ago
I've never heard of the original BASIC being compiled in any way, JIT or otherwise. Far as I know, the most it did was tokenize keywords into one or two bytes, something every other BASIC interpreter took up as a matter of course.
- Jtsummers 3y agohttp://dtss.dartmouth.edu/scans/BASIC/BASIC%20Compiler.pdf http://dtss.dartmouth.edu/scans/BASIC/BASIC%20Compiler.pdf Dartmouth BASIC was compiled.
- amelius 3y agoCompiled can mean many things. For instance it can mean that only the parsing is done at compile time, leaving the rest for runtime.
- deleted 3y ago[deleted]
- Jtsummers 3y agoUnless I've misread the code (and it is 134 pages of assembly with comments so I'll admit that's possible). The first 68 pages are the compilation process and a bunch of constants and things. That completes execution before RUN begins. RUN executes the compiled program by, on page 73, jumping to address P (07724) which is where the compilation routine has built out the object program. At that point execution is inside the object program unless there's an interrupt or a subroutine calls to one of the built-in subroutines. I don't think this compiler is just a pre-processing activity.
- JohnFen 3y agoI always thought that was called "pseudocompiled" or "semicompiled".
- musicale 3y agoWhich is in fact the original BASIC. +1 for linking to a scan of the compiler source (and object!) code (note the 20 bit instruction words for the 1964 GE-235?)
- reaperducer 3y agoI've never heard of the original BASIC being compiled in any way, JIT or otherwise. Far as I know, the most it did was tokenize keywords into one or two bytes, something every other BASIC interpreter took up as a matter of course. There were dozens and dozens of BASIC compilers available, for all kinds of platforms from Commodore 64's to mainframes. Microsoft BASIC Compiler for IBM: https://archive.org/details/stx_Microsoft_BASIC_Compiler_Fundamentals_version_2.00 https://archive.org/details/stx_Microsoft_BASIC_Compiler_Fun... Convergent BASIC Compiler for the Burroughs B20: https://archive.org/details/bitsavers_convergent0BASICCompilerR4.0Apr85_6378172 https://archive.org/details/bitsavers_convergent0BASICCompil... BASIC compiler for Burroughs mainframes: https://archive.org/details/bitsavers_burroughsS00InternalMemosBook322125280CBASICCompil_890489 https://archive.org/details/bitsavers_burroughsS00InternalMe...
- pjmlp 3y agoThat was how 8 bit home computers worked. Dartmouth BASIC always compiled the code before execution, just like Lisp. > Several versions were produced at Dartmouth, implemented by undergraduate students and operating as a compile and go system. https://en.m.wikipedia.org/wiki/Dartmouth_BASIC https://en.m.wikipedia.org/wiki/Dartmouth_BASIC The historical video also mentions this at some point. https://www.dartmouth.edu/basicfifty/basic.html https://www.dartmouth.edu/basicfifty/basic.html
- chuckadams 3y agoHaving grown up in the 8-bit era with Apple IIs and C64s and various weird Z80 boxen, I can tell you for sure BASIC did not normally get compiled on those platforms. Tokenized, yes, but nothing more than that. Dartmouth had more to work with even in the 60's so it doesn't surprise me they wrote a static compiler for it, though it's still news to me.
- pjmlp 3y agoApparently people can't read, as I explicitly mentioned 8 bit home computers were the ones responsible for people thinking BASIC was originally interpreted.