MEGA65 FORUM

TCP/IP API:s for BASIC and assembler?

append delete exocytosis

Guys - I couldn't be more excited about the Mega 65, and I hope to eventually be able to welcome it as a full-fledged member of my home network!

That being said, do you plan to extend the built-in BASIC with a proper TCP/IP API? From an assembler point of view, how are you supposed to communicate with the Ethernet port?

Reply RSS

Replies

append delete #1. Deft

This will be handled by what we call the Kickstart - think of it as a BIOS connecting the hardware to the software. At some point you will be able to access the network interface from both Basic (using Peeks and Pokes) and of course Assembler.

append delete #2. gardners

Hello,

We are also thinking about making the TCP/IP stack available as a device number, so you can just open a socket using OPEN, so perhaps you might do something like:

OPEN1,20,0,"203.19.107.1:80"
PRINT #1,"GET / HTTP/1.0" + CHR$(13)

etc...

Anyway, this is not implemented at the moment, but it is in our list of things we hope to do.

Paul.

append delete #3. exocytosis

Deft - sounds great! I can't wait to see the API documentation!

Paul - that concept is a lot like the AmiTCP-implementation of the "TCP:" (software) device for AmigaOS. In a nutshell, opening an I/O stream to "TCP:adress/port" allows for easy network communication in shell scripts and other "lighter" development environments. What the TCP: device does not have, however, is a timeout-option. Perhaps that's something to consider for the M65?

append delete #4. LoveMega65

I can hardly wait to be using peeking and poking? Do you seriously promise we will be using peeking and poking to access the Ethernet side of the hardware? I do hope so! Would it be complicated peeking and poking and long line of syntax coding to access the Ethernet? Would love that! :D

append delete #5. exocytosis

Deft/Paul - just reviewing what I said about a timeout option and the code example, I would like to emphasize how useful it would be to have the network I/O engine actually track connection requests and let them (eventually) fail if the host doesn't respond. While Paul's example assumes that the web server on 203.19.107.1 picks up the call, the harsh reality may turn out to be completely different.

Hence, it would be nice if the BASIC I/O for network connections would provide a third argument, perhaps something like this:

<IP-address>[:port-number][/timeout-in-seconds]

The adjusted example code would probably look something similar to this:

OPEN1,20,0,"203.19.107.1:80/15"
IF ST=0 THEN PRINT #1,"GET / HTTP/1.0" + CHR$(13) ELSE PRINT "NETWORK ERROR"

#6. Mat

This post was deleted by its owner

append delete #7. gardners

Regarding timeouts, it is too early to say how we will implement such things, but we certainly recognise the value of such a feature.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Deft, gardners, MARCOM