FAQ  •  Register  •  Login

Spectranet

<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Jan 21, 2014 7:05 am

Spectranet

Be nice if you could get the compiler to work with the spectranet.

  Code:
 10 %open #4,"file","r"
 20 %oneof 100
 30 INPUT #4,a$
 40 PRINT a$
 50 GO TO 30
100 %close #4


will not work as it sees the % as an illegal character.
I'm always on the chat or facebook.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Tue Jan 21, 2014 8:19 am

Re: Spectranet

Very good idea, Ardencrest! :!:
However, %open and the like are used to extend Sinclair BASIC.
A more simple Idea will be implement them as functions (and even use ASM). Something like:

  Code:
10 DIM handle as Integer;
20 handle = SNetOpen("file", "r"): REM handle is the channel, like #4, but the routine returns its own
30 IF handle = -1 THEN GOTO 3000: END IF: REM Error if -1
35 SNetOneof(100): REM Don't know what it does
40 SNetInput(handle, a$): REM another way could be a$ = SNetRead(handle)
50 PRINT a$
60 GO TO 40
...
100 SNetClose(handle)

I could implement these if you want, but don't own a spectranet.
Do you know if there's an emulator which supports spectranet?
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Jan 21, 2014 8:54 am

Re: Spectranet

FUSE but you have to load it up

http://spectrum.alioth.net/doc/index.ph ... ROM_images

http://sourceforge.net/p/fuse-emulator/ ... tranet.txt (a how to)

When you get it working make a snapshot so you dont have to redo it all the time. just need to load in the snapshot
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Jan 21, 2014 9:09 am

Re: Spectranet

I can send you my snapshot. all you have to do is enter your ip address
I'm always on the chat or facebook.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Tue Jan 21, 2014 9:18 am

Re: Spectranet

You mean the emulator snapshot? Is is useful for developing routines?
(I have NO experience at all, so maybe this is an obvious question)
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Jan 21, 2014 9:23 am

Re: Spectranet

heres my snapshot
unzip load up fuse and load in the file

you can join me on the zx chat http://www.coldfront.net/tiramisu/tiram ... annels=#zx
Attachments
spnet222.zip
(20.29 KiB) Downloaded 186 times
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Jan 21, 2014 8:16 pm

Re: Spectranet

most is like the code for the microdrive anything with a % is for the spectranet

10 %fopen #4,"file","r"
spectranet for file open

  Code:
 20 %oneof 100
no idea


  Code:
 30 INPUT #4,a$
as with mricrodrive

  Code:
 40 PRINT a$
 50 GO TO 30
normal basic

100 %close #4
as with mricrodrive
I'm always on the chat or facebook.
<<

cheveron

User avatar

Posts: 71

Joined: Sat Dec 11, 2010 11:22 pm

Post Tue Jan 21, 2014 11:03 pm

Re: Spectranet

One thing to beware of on a snapshot is that you need to reset the IP address of the virtual Spectranet to the IP address of your real device. As Spectranet has a whole API and uses channels and streams it would seem like a good idea to use that existing functionality, rather than force keywords into BASIC. Much documentation here:

http://spectrum.alioth.net/doc/index.php/Main_Page
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Sat Jan 25, 2014 12:42 pm

Re: Spectranet

Can the compiler do microdrive code

  Code:
10 OPEN#4:“m”;1:“digits”
20FORn=1TO15
30PRINT#4;n,n*n
40NEXTn
50
CLOSE#4


and so on
I'm always on the chat or facebook.
<<

boriel

Site Admin

Posts: 1463

Joined: Wed Nov 01, 2006 6:18 pm

Location: Santa Cruz de Tenerife, Spain

Post Sat Jan 25, 2014 12:54 pm

Re: Spectranet

Not yet. In fact the idea, as always is to use asm libraries and not to touch ZX BASIC syntax anymore, since it could extend to other platforms.
So, Open #4 should be translated to handle = OpenChannel(4, "m", 1, "digits") a la C.
We can discuss it, however. :)
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Tue Jan 28, 2014 2:00 pm

Re: Spectranet

boriel wrote:Very good idea, Ardencrest! :!:
However, %open and the like are used to extend Sinclair BASIC.
A more simple Idea will be implement them as functions (and even use ASM). Something like:

  Code:
10 DIM handle as Integer;
20 handle = SNetOpen("file", "r"): REM handle is the channel, like #4, but the routine returns its own
30 IF handle = -1 THEN GOTO 3000: END IF: REM Error if -1
35 SNetOneof(100): REM Don't know what it does
40 SNetInput(handle, a$): REM another way could be a$ = SNetRead(handle)
50 PRINT a$
60 GO TO 40
...
100 SNetClose(handle)

I could implement these if you want, but don't own a spectranet.
Do you know if there's an emulator which supports spectranet?


any update an adding the spectranet % to the compiler :wink:

temp.bor:1: illegal character '%'
I'm always on the chat or facebook.
<<

IanJ

Posts: 4

Joined: Thu Aug 28, 2014 6:40 pm

Post Wed Sep 03, 2014 4:11 pm

Re: Spectranet

Hi all,

To ressurect an old thread, I have the Spectranet card and was wondering if there had been any movement with adding the functionality to the compiler. Maybe it has but I am missing the documentation.

Any help appreciated.

PS. Here's the code I'm trying to compile.....it's a wee webserver.

  Code:
4  LET count=0
8  PRINT AT 0,0;"Webserver started"
10 %listen #4,80
20 %control #5
30 PRINT AT 1,0;"Total connections = ";count
40 %accept #5,4
50 PRINT #5;"You are connected to IanJ's ZX Spectrum - Visitor = ";count+1
55 PRINT #5;" "
60 LET count=count+1
70 INPUT #5;a$
90 INPUT #5;a$
100 PRINT AT 7,0;a$
110 PRINT #5;a$
120 INPUT #5;a$
130 PRINT AT 9,0;a$
140 PRINT #5;a$
210 BEEP 0.2,40
220 %close #5
230 %close #4
240 GO TO 10
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Thu Sep 25, 2014 8:55 am

Re: Spectranet

client
Attachments
newtest.rar
(19.7 KiB) Downloaded 71 times
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Thu Sep 25, 2014 10:13 pm

Re: Spectranet

telnet by geusser
Attachments
telnet.rar
(20.49 KiB) Downloaded 83 times
I'm always on the chat or facebook.
<<

ardentcrest

Posts: 94

Joined: Fri Oct 11, 2013 5:19 pm

Post Thu Sep 25, 2014 10:41 pm

Re: Spectranet

Mine

  Code:
10 %connect #4,"zxmud.zapto.org",4000
20 %oneof 80
30 print #4;"0"
40 input #4;a$
50 print a$
60 goto 40
80 %close #4



Telnet

download

http://alistairtesting.no-ip.org/telnet
I'm always on the chat or facebook.
Next

Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin for Free Forums/DivisionCore.

phpBB SEO