A TCP/IP Stack and Web Server In BASIC
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.
NetRange: 169.254.0.0 - 169.254.255.255
is one of those "non-routable private IP address spaces".
RTFRFC
No it booted right into the basic interpreter of the BIOS
I could care less, but not without a lobotomy
What days? CAMMOROMU 64 days. When you switched the power on to Commodore C64 all you got was the basic interpreter.
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.
A lot of microcontrollers can be programmed in Basic-like languages. It's easy to write basic interpreters/compilers because of the limited features of the language. Remember that "pure" basic doesn't have a subroutine concept at all (besides the very limited GOSUB), and no local variables. Commercial PLC systems have been using Basic as the "high-level"-language of choice for ages. Though they are now more and more moving to IEC-61131-compatible languages like ST ("structured text") and graphical languages.
I'm not sure now if the 6502 was only inwardly 8 bits, but outwardly 4. But I know it ran at a little over 1 Mhz, so with a comparatively huge interpreted basic program running on it, I can see why it's slow.
It's the chuncking through those data statements at the end that helps really beats up performance. Defining all those as strings at the beginning will ameliorate that problem.
You don't need any copyright notice. You always own the rights to your original work no matter what.
Actually, Parallax was doing this since what... 1992? They got TCP/IP stack for their BasicStamps too. But of course, their stuff runs a bit faster than 1MHz... :)
How can someone's bad memory-musings be modded informative? A simple Google will reveal the 6502 is indeed an 8 bit CPU with an 8 bit bus. Sheesh.
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.
One line blog. I hear that they're called Twitters now.
Ooh, moderator points! Five more idjits go to Minus One Hell!
Delendae sunt RIAA, MPAA et Windoze
150 Opening BINARY mode data connection for slashdot.sig (129323052 bytes).
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.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Friends don't let friends enable ecmascript.
Somebody needs to attend the Vintage Computer Festival! 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.
Stupid people will be persecuted to the fullest extent allowed by law.
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-
Is that why all loops in any language in any source code seem to use i and j?
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....
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!