6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue May 21, 2024 9:12 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Where to start?
PostPosted: Mon Dec 30, 2019 11:52 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1002
Location: Canada
If one wants to have a BASIC interpreter to include (at no additional cost) with a commercial product where would one start?

In order of descending difficulty...

A) Write one from scratch

B) Take an abandoned commercial product like MSBASIC and modify it (Like Lee Davdison did) and call it your own

C) Take a derivative of an abandoned commercial product like EhBASIC, modify it and call it your own

A and C seem to be most "legal" to me with C being the path of least resistance.

Any thoughts?

_________________
Bill


Last edited by BillO on Tue Dec 31, 2019 12:27 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Where to start?
PostPosted: Tue Dec 31, 2019 12:12 am 
Offline
User avatar

Joined: Tue Mar 05, 2013 4:31 am
Posts: 1373
Well, I guess you could always write Mr. Gates and ask if he'd mind making MS Basic free for such small projects... it's not like he still needs royalties from it. As noted, Lee did appear to use the MS Basic code as a basis for his EhBasic.

I made a CMOS version from Lee's source, albeit I started with the updated version from Klaus. Even with changes, I certainly don't consider it my own... just heavily modified to run on my system, take less space and a bit quicker in execution. It now has Load and Save implemented by linking to the Xmodem load/save in my monitor.

_________________
Regards, KM
https://github.com/floobydust


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to start?
PostPosted: Tue Dec 31, 2019 3:45 am 
Offline

Joined: Mon Sep 17, 2018 2:39 am
Posts: 133
Hi!

BillO wrote:
If one wants to have a BASIC interpreter to include (at no additional cost) with a commercial product where would one start?

In order of descending difficulty...

A) Write one from scratch

B) Take an abandoned commercial product like MSBASIC and modify it (Like Lee Davdison did) and call it your own

C) Take a derivative of an abandoned commercial product like EhBASIC, modify it and call it your own

A and C seem to be most "legal" to me with C being the path of least resistance.

Any thoughts?


You can also use my FastBasic https://github.com/dmsc/fastbasic , It's GPL so the only restriction is that you must make the source (with your modifications) available to anyone that receives the binary.

Porting FastBasic to a different 6502 system should not be hard, but for full functionality it needs:
- Support for full-screen text for the editor (editor uses PRINT and POSITION).
- Support for file OPEN, READ and WRITE, for the editor and compiler.

Have Fun!


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to start?
PostPosted: Tue Dec 31, 2019 8:52 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10802
Location: England
Nice one, dmsc - I was going to say, there will surely be open-source Basic implementations out there - as well as other abandoned Basics. (MS was not the only game in town.)

For a commercial product, I would think a licensed Basic would be a better idea than a bootleg one - the idea of abandonware varies by jurisdiction and it's not generally free to use, so far as I know. But the good news is that licenses include open source licenses, which include free-of-charge licenses. You just have to read the license and comply with it. Or, negotiate for your case.


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to start?
PostPosted: Tue Dec 31, 2019 10:21 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1415
Location: Scotland
BBC Basic might be worth looking at. However it's history is uncertain, but from what I saw, it appears to be abandoned in that no-one can trace the current owners - which may well have been lots in the twin towers disaster, depending on who you talk to.

I'm using it in my Ruby project but if I ever sell it, I'll be selling hardware and the OS - anything else will be "hey plug in this ROM if you like - it's 100% compatible" ...

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to start?
PostPosted: Thu Jan 02, 2020 8:41 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1002
Location: Canada
Thanks for all the suggestions.

My device will not have video so I can't use anything that will require that. I just need a real stripped down version (no graphics, no load or save, no IDE). I'd probably add a few commands to access various devices such as A/D and D/A converters, stepper motor control, PWM controller, etc... Just need an easy to learn and use language for beginners to experiment around with hardware interfacing and such. More advanced users could use assembly or build whatever ROM they want.

It would have to be a customized version though, so I could not utilize an existing ROM.

_________________
Bill


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to start?
PostPosted: Thu Jan 02, 2020 8:58 pm 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1415
Location: Scotland
BillO wrote:
Thanks for all the suggestions.

My device will not have video so I can't use anything that will require that. I just need a real stripped down version (no graphics, no load or save, no IDE). I'd probably add a few commands to access various devices such as A/D and D/A converters, stepper motor control, PWM controller, etc... Just need an easy to learn and use language for beginners to experiment around with hardware interfacing and such. More advanced users could use assembly or build whatever ROM they want.

It would have to be a customized version though, so I could not utilize an existing ROM.


FWIW: the Acorn Machine OS, (MOS), as used in the BBC Micro c1981 completely separated the OS, and things the OS controlled like video, sound and keyboard from the "language" - which was BBC Basic by default, but could have been a Forth (there were a few), Comal, Pascal, C, BCPL and so on.

Languages had a very well defined set of operating system calls for most stuff, but the graphics were done old-school - by a well defined set of ASCII codes. There was the common ones like Ctrl-L to clear the screen, CR, NL, DEL and Backspace and others were compound to e.g. change screen graphical modes, plot points, triangles and so on.

For Ruby I have 2 interfaces - one is text only and I have a little 'shim' that translates MOS VDU commands into cursor movements and so on into standard ANSI terminal codes, so I can run text editors and other pure text based applications, and a separate one that does the graphics that runs on a Linux host. This is very fast over a 115200 baud serial line.

this: https://www.youtube.com/watch?v=rPGCT0lah4Q is a C program running on the 6502 using the standard MOS VDU codes to draw circles. I'm in the process of adapting Applesoft to make it's HGR, plot, etc. commands use it too.

So just because your system doesn't have on-board graphics, don't rule them out completely - after-all, we were doing it this way on Tektronix 4010 terminals in the '70's ;-)

Cheers,

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to start?
PostPosted: Fri Jan 03, 2020 11:00 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1002
Location: Canada
Thanks Gordon.

drogon wrote:
..., we were doing it this way on Tektronix 4010 terminals in the '70's ;-)

Cheers,

-Gordon
Yes we were!

We had them in the U of T physics lab. Not something I could have afforded to have at home though. Anyone know of a good cheap (preferably free) 401X emulator?

_________________
Bill


Top
 Profile  
Reply with quote  
 Post subject: Re: Where to start?
PostPosted: Sat Jan 04, 2020 8:59 am 
Offline
User avatar

Joined: Wed Feb 14, 2018 2:33 pm
Posts: 1415
Location: Scotland
BillO wrote:
Thanks Gordon.

drogon wrote:
..., we were doing it this way on Tektronix 4010 terminals in the '70's ;-)

Cheers,

-Gordon
Yes we were!

We had them in the U of T physics lab. Not something I could have afforded to have at home though. Anyone know of a good cheap (preferably free) 401X emulator?


Standard Linux/Unix XTERM has had it built in since almost day 1. From the man page:

Quote:
DESCRIPTION
The xterm program is a terminal emulator for the X Window System. It provides DEC VT102/VT220 and
selected features from higher-level terminals such as VT320/VT420/VT520 (VTxxx). It also provides
Tektronix 4014 emulation for programs that cannot use the window system directly. If the underlying
operating system supports terminal resizing capabilities (for example, the SIGWINCH signal in systems
derived from 4.3BSD), xterm will use the facilities to notify programs running in the window whenever it
is resized.

The VTxxx and Tektronix 4014 terminals each have their own window so that you can edit text in one and
look at graphics in the other at the same time. To maintain the correct aspect ratio (height/width),
Tektronix graphics will be restricted to the largest box with a 4014's aspect ratio that will fit in the
window. This box is located in the upper left area of the window.

Although both windows may be displayed at the same time, one of them is considered the “active” window for
receiving keyboard input and terminal output. This is the window that contains the text cursor. The
active window can be chosen through escape sequences, the VT Options menu in the VTxxx window, and the Tek
Options menu in the 4014 window.


You run up an xterm, then use the Ctrl + middle button to get the menu with the Tek window control, then you get a separate window for the Tek output display, or start xterm with xterm -t

-Gordon

_________________
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


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 post attachments in this forum

Search for:
Jump to: