1. Need translation from QBasic to EUPHRIA... Please.
- Posted by Dr. Science <kmlmanu at yahoo.es> Apr 17, 2005
- 457 views
Hi friends I'm a newby, in the past I was able to code a litle with QBasic. I have bought a relay board that can be programed with any language that can send bits to the parallel port. This is quite simple in QBasic: DO CLS LOCATE 22,20:PRINT "CTRL+PAUSE TO EXIT" LOCATE 10,20 INPUT "OUTS BINRY:",X LPRINT CHR$(X); LOOP END This piece of code should ask for bits to send then to the parallel port. Answering... 0 : disconnects all relays 1 : connects relay 1 2 : connects relay 2 11: connects relay 1 and 2 and so on... Is it posible to translate this to Euphoria? I'm quite new to programming and I would like to begin whith this language. I've read all documentation and have Googled for a long time but no luck! Anybody helps? PS: First time I had news from Euphoria was 10 years ago, I'm very impressed to see that it is still in development, mantained, and all contributions it has... almost all "hi level" or "Basic" languages I've been interested in had been abandoned... that's the reason I want to learn Euphoria. Thank you.
2. Re: Need translation from QBasic to EUPHRIA... Please.
- Posted by cklester <cklester at yahoo.com> Apr 17, 2005
- 460 views
Dr. Science wrote: > > I have bought a relay board that can be programed with any language that can > send bits to the parallel port. You can look here for some code you might could use: http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=parallel+port -=ck "Programming in a state of EUPHORIA." http://www.cklester.com/euphoria/
3. Re: Need translation from QBasic to EUPHRIA... Please.
- Posted by don cole <doncole at pacbell.net> Apr 17, 2005
- 462 views
Dr. Science wrote: > > Hi friends I'm a newby, in the past I was able to code a litle with QBasic. > > I have bought a relay board that can be programed with any language that can > send bits to the parallel port. This is quite simple in QBasic: > > DO > CLS > LOCATE 22,20:PRINT "CTRL+PAUSE TO EXIT" > LOCATE 10,20 > INPUT "OUTS BINRY:",X > LPRINT CHR$(X); > LOOP > END > > This piece of code should ask for bits to send then to the parallel port. > > Answering... > > 0 : disconnects all relays > 1 : connects relay 1 > 2 : connects relay 2 > 11: connects relay 1 and 2 and so on... > > Is it posible to translate this to Euphoria? > > I'm quite new to programming and I would like to begin whith this language. > I've read all documentation and have Googled for a long time but no luck! > > Anybody helps? > > > PS: First time I had news from Euphoria was 10 years ago, I'm very impressed > to see that it is still in development, mantained, and all contributions it > has... almost all "hi level" or "Basic" languages I've been interested in > had been abandoned... that's the reason I want to learn Euphoria. > > Thank you. > F the first part:
clear_screen() position(22,20) puts(1,"Hit ANY KEY to EXIT/n") while 1 do position(10,20) x=gets(OUTS_BINARY) puts(1,sprintf("%s",{x})) if=get_key() then exit end if end while
Second part I would have to study awhile. Maybe someone else that knows more ports could help. I hope this can get you started. Don Cole SF
4. Re: Need translation from QBasic to EUPHRIA... Please.
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Apr 17, 2005
- 498 views
On Sat, 16 Apr 2005 19:30:16 -0700, "Dr. Science" <guest at RapidEuphoria.com> wrote: >Is it posible to translate this to Euphoria? I think this will work the same:
constant prn=open("PRN","wb") include get.e sequence input while 1 do clear_screen() position(22,20) puts(1,"CTRL+PAUSE TO EXIT") position(10,20) puts(1,"OUTS BINRY:") input=value(gets(0)) if input[1]=GET_SUCCESS and integer(input[2]) then puts(prn,input[2]) end if end while
Pete
5. Re: Need translation from QBasic to EUPHRIA... Please.
- Posted by "David Jarvis" <davidj at ultrasmart.org> Apr 17, 2005
- 454 views
Hi Dr Science Jacques Deschenes' ports.e (in the Eu archive) forms the basis of talking with ports (like the para port) in Eu. It provides similar funtionality to INP and OUT of Qbasic. Feel free to look at my code for controling the par port pins on the Eu Archive: lptpins.zip and mia_eu.zip. These use ports.e You may also be interestested in my DOS based soft PLC written in Eu (v2.4). It is written for 2 different I/O cards that connect to the para port and for I/Os on an embedded PC by ICOP. The site is: http://www.ultrasmart.org The code is shrouded, and the free public versions of the soft PLC do not have the full functionality of the private version. (One needs to make a living.) -- David Jarvis On 16 Apr 2005 at 19:30, Dr. Science wrote: > > > posted by: Dr. Science <kmlmanu at yahoo.es> > > Hi friends I'm a newby, in the past I was able to code a litle with > QBasic. > > I have bought a relay board that can be programed with any language > that can send bits to the parallel port. This is quite simple in > QBasic: > > DO > CLS > LOCATE 22,20:PRINT "CTRL+PAUSE TO EXIT" > LOCATE 10,20 > INPUT "OUTS BINRY:",X > LPRINT CHR$(X); > LOOP > END > > This piece of code should ask for bits to send then to the parallel > port. > > Answering... > > 0 : disconnects all relays > 1 : connects relay 1 > 2 : connects relay 2 > 11: connects relay 1 and 2 and so on... > > Is it posible to translate this to Euphoria? > > I'm quite new to programming and I would like to begin whith this > language. I've read all documentation and have Googled for a long time > but no luck! > > Anybody helps? > > > PS: First time I had news from Euphoria was 10 years ago, I'm very > impressed to see that it is still in development, mantained, and all > contributions it has... almost all "hi level" or "Basic" languages > I've been interested in had been abandoned... that's the reason I want > to learn Euphoria. > > Thank you. > > > >
6. Re: Need translation from QBasic to EUPHRIA... Please.
- Posted by Dr. Science <kmlmanu at yahoo.es> Apr 18, 2005
- 445 views
Thank you all for such a quick help, very instructive ;) Pete, your piece of code works perfectly just like in QBasic. Best regards. ____ ____ _ | _ \ _ __ / ___| ___(_) ___ _ __ ___ ___ | | | | '__| \___ \ / __| |/ _ \ '_ \ / __/ _ \ | |_| | | _ ___) | (__| | __/ | | | (_| __/ |____/|_|(_) |____/ \___|_|\___|_| |_|\___\___|
7. Re: Need translation from QBasic to EUPHRIA... Please.
- Posted by Dr. Science <kmlmanu at yahoo.es> Apr 20, 2005
- 452 views
> I hope this can get you started. > Sure Don, any piece of code is unvaluable for me, now that I'm at the start point in Euphoria this helps a lot ;) I'm trying it, thank you. ____ ____ _ | _ \ _ __ / ___| ___(_) ___ _ __ ___ ___ | | | | '__| \___ \ / __| |/ _ \ '_ \ / __/ _ \ | |_| | | _ ___) | (__| | __/ | | | (_| __/ |____/|_|(_) |____/ \___|_|\___|_| |_|\___\___|