On 23-Apr-99 Alistair Riddoch wrote:
> =?ISO-8859-1?Q?Fr=E9d=E9ric_Renet?= writes:
>> > I have written a SLIP/IP/ICMP/UDP-stack that fits in 2000 bytes program
>> > and 36 bytes RAM (not KILObytes) including operating system and device
>> > drivers,
>> > that fits in a PIC 16F84.
>> > 
>> > So it isn't a problem to implement networking in limited memory.
>> > 
>> Is it possible to have a look on your code ?
> 
> I too would be very interested in looking at this code. I suspect it is in
> assembler, and very PIC specific, but interesting anyway. My understanding
> is that UDP is a very thin layer on top of IP, and does not require much
> buffering, whereas implementing TCP is altogether more difficult.

Well, I can't release the source since it is made for a proprietary project,
but I can talk about it.

I have intentionally left out TCP since it requires a lot of different states
and timeouts in each of them. The buffering and windowing is not as much
problem, since you can turn off windowing and tell the other end how much
buffers you have.

The code is written entirely in Microchip assembler. (Real men program
everything in assembler :-)
Microchip assembler is quite compact and special, but the real problem in this
project is to use 36 bytes of RAM as 1: IP-buffers 2: General data
for the whole system 3: Credit card buffer (iso track 2 alone is 40 bytes), at
the same time!
The solution is to compress card data and IP data.

Instead of using usual buffers for each layer, I decode all data on the fly.
It is easy since we have a position pointer and can make a decision as each
byte arrives.

For the disbeliever: you can see the thing on "http://www.ipsi.nu".
(and it seems that I have to install a unit so you all can ping it :-)

Not much of this technology is applicable to elks, but the point is:
much can be done with limited resources if you use your thinking organ.


-- 
Stefan Pettersson                      Voice +46-70-5933800  Kanard AB
[EMAIL PROTECTED] ([EMAIL PROTECTED])  Fax +46-221-50180     Vretberga
finger [EMAIL PROTECTED] for my public key                  S-732 96  ARBOGA

    "What a scary world it must be, for those with no UID:GID" /OZ9ABN

Reply via email to