[Coco] TCP/IP Programming in Commodore BASIC
Jonno Downes
jonnosan at gmail.com
Mon Nov 8 05:40:04 EST 2010
Gene Heskett <gene.heskett at ...> writes:
>
> Where did they find the memory? A fully protocol compliant tcp/ip stack on
> a 16 bit amiga was just shy of 50k. For the coco, maybe could be squeezed
> to 45k but that would take very careful hand optimization & still couldn't
> begin to keep up with a 10Base-T half duplex channel.
>
Kipper BASIC & BASIC on Bails are both built on top of the ip65 network stack -
http://ip65.sourceforge.net/
The minimalist version of the stack (ARP & UDP only) fits into a bit under 8KB
code (which can be ROM) with a little under 4KB RAM for variables (of which the
majority is a single 1500 byte input frame, where inbound ethernet packets are
written to, and another 1500 byte output frame, where outbound ethernet frames
are built up).
On top of that base, DHCP, DNS, TFTP & TCP add another 6KB or so of code. The
code isn't really optimised, although I took some short cuts which mean it is
not strictly RFC compliant. It dos seems to inter-operate with whatever stacks
I've tested it with. Short cuts include
- DNS requires a DNS server that supports recursive lookups
- DHCP leases are not renewed
- TCP window sizes are ignored
- IP fragmentation is not supported
- only a single TCP session is allowed
- ICMP 'unreachable' messages are ignored
I don't know much at all about 6809, but looking at its register set I would
think it would be a lot more efficient than 6502 code, which only has a single
8-bit accumulator and clunky 8-bit index registers.
More information about the Coco
mailing list