A TCP/IP Stack and Web Server In BASIC 251
A writes "Back in the day, a BASIC interpreter was standard on every home computer system and everyone had to know at least a little BASIC to be able to use their computer. But who would have thought that you could write some serious networking code in BASIC over 20 years later? Just a few days ago, Lee Davison released the BASIC source code for his 6502-based Ethernet web server. The web server runs under his EhBASIC interpreter on the 1 MHz 6502 CPU and is able to blast out web pages at an amazing speed of 20-35 seconds per page!" Sure, it's not really practical, but I give it cool points.
Re:Down in three seconds flat (Score:5, Informative)
is one of those "non-routable private IP address spaces".
RTFRFC
Re:What? (Score:1, Informative)
Re:What? (Score:1, Informative)
But already in 1984 was introduced SHARP MZ-821 that only had assembler monitor. You had to load Basic if you didn't want to write Assembly programs.
Cammoromu C64 was bad because the build in Basic hogged memory of course. With Sharp you had all the 64 kilobytes to yourself.
Not really that uncommon (Score:2, Informative)
Re:Slow (Score:0, Informative)
data statements (Score:5, Informative)
Re:Source code has no copyright notice (Score:2, Informative)
Not new (Score:4, Informative)
Re:Slow (Score:1, Informative)
Re:Oh good... (Score:2, Informative)
They were slow and limited, but playing with them and extending them was a great way to learn. After those came the Small C compilers--never looked back.
R *this* FRFC. (Score:5, Informative)
Re:Looks more like assembler to me... (Score:5, Informative)
Re:Looks more like assembler to me... (Score:3, Informative)
Obviously you aren't an old-school BASIC guy. That's how it worked. If you wanted to do anything fast, you wound up rolling a bunch of machine language inside a BASIC control loop.
Re:Cowabunga! Nope! (Score:3, Informative)
Somebody needs to attend the Vintage Computer Festival [vintage.org]! The TRS-80 Model I, II, III, 4, et al used the Z-80, not the 6502. Unless you mean the Color Computer, which (iirc) used the 6809. There was another one (Model 6000?) that used the 68000, iirc. But no 6502's.
Why so "impossible"? (Score:2, Informative)
Okay, I recognize the value of doing this (as a hobbyist myself). The fortitude required to accomplish such a feat is noteworthy. However, I have noticed a strange trend in these kinds of posts on Slashdot. Why do so many people respond with comments like, "I didn't know it could be done!"?.
Technically, all of these languages are mathematically reducible to Turing machines. Thus, they are all *technically* able to perform the same tasks (ok, sure, you might have to extend your interpreter/compiler to handle things like syscalls, but hey, it's within the scope of reasonability). We could effectively use any programming language to produce any program. If the first web server is written in C, then by mathematical extension, we know that it could also be written in Perl, Forth, Fortran, and even BASIC. The difference is just that it might be a royal pain.
I don't mean to denigrate the work this guy did -- in fact I'm amazed that he did it. But I'm not amazed *that it's possible*.
What should elicit such responses? If the guy wrote a web server in HTML (a markup language). That is theoretically impossible. There are all kinds of languages that are not reducible to Turing machines -- make a web server using nothing but regular expressions and *I'll* say "Wow, I didn't know that was possible!"
-Josh O-
Re:Looks more like assembler to me... (Score:3, Informative)
No, it's because in early Fortran compilers integer variables were letters from I to N (because they are INteger, see?).
So, in Fortran you would start a loop using the first available integer variable, i, and then j, k and so on.
How that was carried on to other languages is a mystery....
Re:Looks more like assembler to me... (Score:5, Informative)
Also, there were user-defined one-line functions with parameters, which could even be recursive, as in: DEF FNX(P1,P2)=Y where X is the function name, P1 and P2 are parameters and Y is an expression. No argument there!