Applesoft BASIC Webserver

Background

I got an Uthernet II ethernet card for my Apple IIe a while ago. While teaching ECE435 (Network Engineering) I realized it would be a perfect time to start a network related project.

The Uthernet comes with some sample Assembly Language code, but I was being lazy, so why not try to do the same in BASIC.

The Uthernet II has a W5100 chip in it that can do much of TCP/IP in hardware, including up to 4 open sockets (although you can still operate it in raw ethernet mode and do more work yourself). So most of the hard work is done in hardware.


Demo Video

Yes, there's a typo, meant to say 140k disk not 160k. I'm too lazy to re-render the video to fix it.


Hardware Setup


Source Code

All source code is available. You can find it on github mixed in with my other apple2 projects:
https://github.com/deater/dos33fsprogs
in the ethernet directory.

Here is the BASIC file and the disk image, although they won't work in an emulator, you really have to have an Apple II with Uthernet card.

Theory of Operation


Features

Limitations

Other Notes


Build Log

16 December 2016
Wrote some 6502 machine language code to speed up transmit. While not pure BASIC, it makes a huge difference.

It is disabled currently as I didn't have a chance to test it well before heading home for the weekend.

for comparison, a 4kb copy in BASIC using peek/poke takes 38s where in 6502 assembly it takes less than 1s.

14 December 2016
Have the webserver mostly working! Video posted.

7 December 2016
BASIC code sent a page that firefox was able to display.

1 December 2016
Wrote a Linux/C simple webserver to use as a reference.

23 November 2016
I got ping working! Was almost trivially easy as the W5100 does all of the hard work. Here's the code on the Apple II:


Here's the arp/ping happening from the remote machine:


A picture of the Uthernet board inside my Apple IIe platinum. Also visible is a super-serial card and a CFFA3000 disk.



Other Apple2 Projects
Back to vmwprod page