[Coco] CoCo and the Internet

William Mikrut wmikrut72 at gmail.com
Mon Feb 9 16:38:07 EST 2015


I meant to send this to the whole list for anyone who is interested....


I was able to get my emulator talking to an off machine server program from
Vcc.
Albeit at a low level mode... it still works!

Attached is a server.php -- which is basically a very simple (taken from
the PHP documentation) port listener that listens on port 9000.  Nothing
special.

After that I issue the following DW Command from the UI:

dw port open 1 192.168.2.100:9000   (<-- Where my server.php is listening)
Now I have a link!

Now I load and run the basic program in write.txt and volia!
The characters appear in my server program!

Of course, this is an extremely simple example and is only one way at this
time.
I just wanted to see if I could make the outside world hear the CoCo -- and
it did!
-------------- next part --------------
100 'OPEN PORT 1 FOR COMM
110 POKE &HFF42, &HC4
120 POKE &HFF42, 1
130 POKE &HFF42, &H29
140 GOSUB 1000

150 'WRITE 'WMIKRUT*' TO THE PORT
155 '* Terminates the connection and closes the port.
160 FOR X = 1 TO 8
170 READ A
180 POKE &HFF42, &H81
190 POKE &HFF42, A
200 NEXT X
210 GOSUB 1000

210 'CLOSE PORT 1 FOR COMM
220 POKE &HFF42, &HC4
230 POKE &HFF42, 1
240 POKE &HFF42, &H2A
250 GOSUB 1000

999 END

1000 'READ/CLEAR SERVER RESPONSE DATA
1005 A=PEEK(&HFF41)
1010 IF A=0 THEN GOTO 1030
1015 PRINT PEEK(&HFF42);
1020 GOTO 1005
1030 PRINT ""
1040 RETURN

9999 DATA 87,77,73,75,82,85,84

-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.php
Type: application/x-httpd-php
Size: 1129 bytes
Desc: not available
URL: <https://pairlist5.pair.net/pipermail/coco/attachments/20150209/ea219ae7/attachment.php>


More information about the Coco mailing list