mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-10-31 10:13:35 +00:00
ethernet: it pings at least
This commit is contained in:
parent
1004701ad5
commit
794e8bb654
23
ethernet/setup.bas
Normal file
23
ethernet/setup.bas
Normal file
@ -0,0 +1,23 @@
|
||||
1 REM *** Setup UTHERNET II - W5100
|
||||
2 REM *** Assumes slot 5 ($C0D0)
|
||||
10 REM *** Init W5100
|
||||
12 POKE 49364,128 : REM RESET W5100
|
||||
14 POKE 49364,3 : REM AUTOINCREMENT
|
||||
20 REM *** Setup MAC Address
|
||||
21 REM *** 41:50:50:4c:45:32
|
||||
22 POKE 49365,0:POKE 49366,9
|
||||
23 POKE 49367,65
|
||||
23 POKE 49367,80
|
||||
23 POKE 49367,80
|
||||
23 POKE 49367,76
|
||||
23 POKE 49367,69
|
||||
23 POKE 49367,50
|
||||
30 REM *** Setup IP Address
|
||||
31 REM *** 192.168.8.15
|
||||
32 POKE 49366,15
|
||||
33 POKE 43367,192
|
||||
34 POKE 43367,168
|
||||
35 POKE 43367,8
|
||||
36 POKE 43367,15
|
||||
40 PRINT "UTHERNET II READY: 192.168.8.15"
|
||||
|
39
ethernet/webserver.bas
Normal file
39
ethernet/webserver.bas
Normal file
@ -0,0 +1,39 @@
|
||||
1 REM *** Setup UTHERNET II - W5100
|
||||
2 REM *** Assumes slot 5 ($C0D0)
|
||||
10 REM *** Init W5100
|
||||
12 POKE 49364,128 : REM RESET W5100
|
||||
14 POKE 49364,3 : REM AUTOINCREMENT
|
||||
20 REM *** Setup MAC Address
|
||||
21 REM *** 41:50:50:4c:45:32
|
||||
22 POKE 49365,0:POKE 49366,9
|
||||
23 POKE 49367,65
|
||||
23 POKE 49367,80
|
||||
23 POKE 49367,80
|
||||
23 POKE 49367,76
|
||||
23 POKE 49367,69
|
||||
23 POKE 49367,50
|
||||
30 REM *** Setup IP Address
|
||||
31 REM *** 192.168.8.15
|
||||
32 POKE 49366,15
|
||||
33 POKE 43367,192
|
||||
34 POKE 43367,168
|
||||
35 POKE 43367,8
|
||||
36 POKE 43367,15
|
||||
40 PRINT "UTHERNET II READY: 192.168.8.15"
|
||||
100 *** Setup Socket
|
||||
105 POKE 43365,0:POKE 43366,26: REM RX MEMSIZE
|
||||
110 POKE 43367,3: REM 8kB RX buffer
|
||||
115 POKE 43367,3: REM 8kB TX buffer
|
||||
|
||||
START:
|
||||
/* sets TCP mode */
|
||||
Sn_MR = 0x01;
|
||||
/* sets source port number */
|
||||
Sn_PORT = source_port;
|
||||
/* sets OPEN command */
|
||||
Sn_CR = OPEN;
|
||||
if (Sn_SR != SOCK_INIT) Sn_CR = CLOSE; goto START;
|
||||
}
|
||||
{
|
||||
If (Sn_SR == SOCK_ESTABLISHED) goto ESTABLISHED stage;
|
||||
|
Loading…
Reference in New Issue
Block a user