Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 09 Dec 2019, 03:14
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
A BASIC equivalent for Linux?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Author Message
coldmonday

Joined: 10 Mar 2017
Posts: 43

PostPosted: Fri 26 Apr 2019, 12:03    Post subject:  A BASIC equivalent for Linux?
Subject description: BASIC programming the parallel (printer) port
 

Hi all,

I use BASIC (via DOS) for my simple interface experiments. Is there an equivalent to basic I can use with Puppy ?

I need to be able to access the printer port as I use it to interface with various projects.

Dave.
Back to top
View user's profile Send private message 
jafadmin

Joined: 19 Mar 2009
Posts: 1012

PostPosted: Fri 26 Apr 2019, 12:55    Post subject:  

Assuming you are referring to the parallel port when you say "printer port", you should look into what it's going to take for you to be able to actually do "pin popping" on a parallel port in linux. It may prove to be a bigger project than you imagined. Linux handles the LPT ports the same way it handles all device streams.

Under DOS/Windows the parallel port is promiscuous. Under Unix/Linux it is not. If you have cups installed you will have to exclude the parallel port if using as a controller.

https://www.htlinux.com/parallel_port_control_in_linux/
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 2199

PostPosted: Fri 26 Apr 2019, 13:16    Post subject:  

If you are using puppy you likely have puppybasic included which is a varient of wxbasic. This version of basic looks far different then more modern versions of basic like VB6/VBA/vb.net.

Puppy also comes with a tool to convert basic which is wxbasic compatable to "C" this tool is called BaCon. There is some puppycode complied using BaCon. I forget if it is code related to the package manager or event manager.
Back to top
View user's profile Send private message Visit poster's website 
coldmonday

Joined: 10 Mar 2017
Posts: 43

PostPosted: Fri 26 Apr 2019, 13:29    Post subject:  

Thanks to both for the replies.

It looks as if the sensible way to go is to just use my DOS 6.22 to run the GWbasic; my usual method.
No point in adding layers of complication.

Another question whilst I'm here.

I have download and installed 'Wine'. Apparently into Foobar.

But I can't launch it. It appears to be in /root/wine.

What am I doing wrong ?

Dave.
Back to top
View user's profile Send private message 
Galbi


Joined: 21 Sep 2011
Posts: 1086
Location: Bs.As. - Argentina.

PostPosted: Fri 26 Apr 2019, 15:43    Post subject:  

Open a console and run the command wine

What shows?
If it says command not found, well... it's not installed.

The command which wine will tell you where is installed the wine executable, in my Puppy it's in /usr/bin/wine and I also have a folder in /root/.wine (the point iit's VERY important, it's part of the name of a hidden folder).

Appart of all that, I'm not sure that wine is what you need to handle the printer port, for the reasons jafadmin mentions.

Wine is itself a layer of complication and I'm not sure that has access to the hardware

Saludos.

_________________
Remember: "pecunia pecuniam parere non potest"
Back to top
View user's profile Send private message 
williams2

Joined: 14 Dec 2018
Posts: 205

PostPosted: Fri 26 Apr 2019, 16:30    Post subject:  

Quote:
the sensible way to go is to just use my DOS 6.22 to run the GWbasic

https://freebasic.net/ FreeBasic is "syntax compatible to Microsoft QuickBASIC." It would not be as simple as using DOS 6.2, but you can do much more in such an environment.

OUT help page
Back to top
View user's profile Send private message 
Galbi


Joined: 21 Sep 2011
Posts: 1086
Location: Bs.As. - Argentina.

PostPosted: Fri 26 Apr 2019, 16:44    Post subject:  

And what about FreeDOS?
https://www.freedos.org

_________________
Remember: "pecunia pecuniam parere non potest"
Back to top
View user's profile Send private message 
muggins

Joined: 20 Jan 2006
Posts: 6756
Location: hobart

PostPosted: Fri 26 Apr 2019, 19:48    Post subject:  

For programming the parallel port this link could be helpful:

http://www.murga-linux.com/puppy/viewtopic.php?p=552638#552638
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1344
Location: Connecticut, United States

PostPosted: Fri 26 Apr 2019, 20:35    Post subject:  

I use DosBox to successfully run Qbasic or QuickBasic 4.5. There is a PET right here DosBox is really robust and is easy to use and runs DOS software very well....but printing with it in Linux is tricky to impossible. It can be done, I have achieved it once, but that is like the info on how to build a pyramid....lost to time.
Back to top
View user's profile Send private message Visit poster's website 
musher0

Joined: 04 Jan 2009
Posts: 14528
Location: Gatineau (Qc), Canada

PostPosted: Sat 27 Apr 2019, 10:35    Post subject:  

Hello, coldmonday.

Should you be looking for a current Basic, forum member did18 is also
active in the Gambas community. His Gambas-3 sfs can be found here.

Did18 also published a couple of Gambas utilities for PuppyLinux, such as
img2key, etc.

IHTH.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
coldmonday

Joined: 10 Mar 2017
Posts: 43

PostPosted: Sat 27 Apr 2019, 12:10    Post subject:  

Thanks for the responses.

Galbi,

I'm sticking with running my BASIC from DOS.
Also, as it is on an old 486 machine I can use Assembler to do the bits that need to be fast. (for most of my simple programs BASIC on the 486 is quite fast enough).

The reason I want Wine is to be able to run some of the Windows programs I have accumulated. Mostly pre-XP stuff.

I'll look into all the suggestions above.

Dave.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1571
Location: Drøbak, Norway

PostPosted: Sun 12 May 2019, 22:25    Post subject:  

I just found this comment on BASIC programmers:

Edsger Dijkstra about BASIC

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
Laughing

From http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD498.html

An impressive man with an impressive career, worth reading about:
https://en.wikipedia.org/wiki/Edsger_W._Dijkstra

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 651
Location: Western United States

PostPosted: Mon 13 May 2019, 11:10    Post subject:  

One suspects Dijkstra was exaggerating to make a point. In any case, there are BASICs, and then there are BASICs. Modern structured BASICs are a long way from the line-numbered BASICs of the 1960s. Dijkstra famously railed against the GOTO statement and I would imagine this was his principle objection to unstructured BASIC. That and the lack of ways to manage namespaces (i.e. using global variables everywhere).
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 1571
Location: Drøbak, Norway

PostPosted: Mon 13 May 2019, 11:19    Post subject:  

In the wiki, they wrote:
Dijkstra was famous for his wit, eloquence, and way with words, such as in his remark, "The question of whether Machines Can Think is about as relevant as the question of whether Submarines Can Swim." His advice to a promising researcher, who asked how to select a topic for research, "Do only what only you can do". Dijkstra was also known for his vocal criticism. As an outspoken and critical visionary, he strongly opposed the teaching of BASIC.


He may have been one of those who has a personality you either love, or detest! Laughing

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2937
Location: USA

PostPosted: Mon 13 May 2019, 22:19    Post subject:  

tallboy wrote:
I just found this comment on BASIC programmers:

Edsger Dijkstra about BASIC

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.
Laughing

From http://www.cs.utexas.edu/users/EWD/transcriptions/EWD04xx/EWD498.html

An impressive man with an impressive career, worth reading about:
https://en.wikipedia.org/wiki/Edsger_W._Dijkstra


Hey now! I like Fortran! Smile

_________________
Add swapfile
WellMinded Search
PuppyLinux.US Search
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 2 [21 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0710s ][ Queries: 11 (0.0210s) ][ GZIP on ]