A VERY simple 6502 programming language

Programming the 6502 microprocessor and its relatives in assembly and other languages.
User avatar
speculatrix
Posts: 151
Joined: 03 Apr 2018
Contact:

Re: A VERY simple 6502 programming language

Post by speculatrix »

floobydust wrote:
my version of EhBasic should be extremely simple to get running
I see EhBasic all over the web. What’s the definitive URL for your version?
It either works or catches fire. Either way is fun.
Zolatron 64 project (on Medium)
User avatar
GARTHWILSON
Forum Moderator
Posts: 8775
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: A VERY simple 6502 programming language

Post by GARTHWILSON »

speculatrix wrote:
floobydust wrote:
my version of EhBasic should be extremely simple to get running
I see EhBasic all over the web. What’s the definitive URL for your version?
From my links page:

http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
User avatar
floobydust
Posts: 1394
Joined: 05 Mar 2013

Re: A VERY simple 6502 programming language

Post by floobydust »

speculatrix wrote:
floobydust wrote:
my version of EhBasic should be extremely simple to get running
I see EhBasic all over the web. What’s the definitive URL for your version?
My Github page has a recent version based on the P4 patches from Klaus. However, I added the P5 patches he did to the code and it's available in a single zip file here:

viewtopic.php?f=5&t=5760&start=15#p76030

Note that all page zero space is contiguous and the chrget/chrgot is now in ROM and quicker. This uses less page zero space. Look at lines 502 - 540 for setting up memory size, bugger space, ROM start and your existing monitor routines for console I/O. It also has Load/Save base routines added.

I should add this one to Github...
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: A VERY simple 6502 programming language

Post by BillO »

If you'd consider getting her another computer I would suggest the Tandy Color Computer 2 (COCO 2) with Extended BASIC. I would avoid the original as the keyboards were generally crappy. There is a COCO 3, but it is generally fairly expensive.

Things it has over the VIC-20:

. Built in power supply
. Most units available have 64K of RAM
. It's BASIC has simple statements for graphics and sound.
. Disk drives are available for it and unlike the Commodore are much faster and easier to access.
. Adding the disk drive extends the BASIC with additional disk and file statements.
. The manuals are created for children. You can search them on-line and have a look.
. COCO BASIC is a dialect of Microsoft BASIC so is fairly standard.
. Best of all, because it is not associated with Commodore it is a relative bargain

One drawback, it uses a 6809 not a 6502. That has it's advantages too as it can run OS/9 - a really sophisticated UNIX like OS with true multi-tasking and even multi-user capability.
Bill
User avatar
speculatrix
Posts: 151
Joined: 03 Apr 2018
Contact:

Re: A VERY simple 6502 programming language

Post by speculatrix »

floobydust wrote:
My Github page has a recent version based on the P4 patches from Klaus. However, I added the P5 patches he did to the code and it's available in a single zip file here:

viewtopic.php?f=5&t=5760&start=15#p76030
Many thanks.
It either works or catches fire. Either way is fun.
Zolatron 64 project (on Medium)
teamtempest
Posts: 443
Joined: 08 Nov 2009
Location: Minnesota
Contact:

Re: A VERY simple 6502 programming language

Post by teamtempest »

Another direction from ehBASIC is Tiny Basic http://www.ittybittycomputers.com/IttyBitty/TinyBasic/. It is not as full-featured, but is fairly easy to implement. Github hosts several versions, and there are others scattered over the web.
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: A VERY simple 6502 programming language

Post by drogon »

My observations of watching my young nieces grow up (now 10 and 13) is that typing is a barrier - especially to a 4 years old. Also RPN (which Logo uses) Kids today point and swipe. a Raspberry Pi with screen and keyboard and cables all over the place is "a laptop". I recently watched a 9 year old struggle with a mouse as they'd never used one before.

Here in the UK, in schools, the focus is on Scratch, a visual "language" followed by Python (in secondary/high school). However I'd suggest that even Scratch might be a bit much for a 4 year old to grasp, but you never know. It involves dragging command blocks to a vertical column like building up a Lego model. (It's inherently parallel too in that you have several columns of commands which all run concurrently!)

Another visual thing was the Big Track in the 80's. It's essentially a turtle. You give it move and turn commands - the moves are in units of it's own length and turn was in units of minutes of a clock. Today, young people are not normally taught how to read a round clock, so when I added "clock" angles into my turtle graphics sub-system of my BASIC interpreter 12 years back it didn't go down well recently when I was involved with a group of 8-12 year olds in a summer out of school activity group.

After that, I added fraction turns - so right 1/4 to turn right 1/4 of a whole turn. ie. 90°. Children (in the UK) are normally taught fractions at about 8-9 years old though.

So - could you code up a simple turtle system in whatever language you normally use on your 6502 system? I did once (c1980) write a turtle interpreter in Applesoft Basic, so it's possible, if somewhat slow.

A recent demo I did:

https://www.youtube.com/watch?v=O6Uc0Ck-LNo

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
User avatar
CountChocula
Posts: 101
Joined: 07 Nov 2021
Location: Toronto, Canada

Re: A VERY simple 6502 programming language

Post by CountChocula »

drogon wrote:
Here in the UK, in schools, the focus is on Scratch, a visual "language" followed by Python (in secondary/high school).
Ah, this brings back memories of my son trying to learn Scratch for his CS class in high school… he wasn't overly fond of it (and neither was I when he asked for help; we both kept fighting with the darn thing because it refused to let us do things the way we wanted). Considering how crazy it drove us, I doubt that a younger child would be able to use it without getting frustrated.

(My son loved Python though—as do I. It was harder for him to learn, but, once he did, its consistency meant not having to constantly deal with all kinds of bugs and strange behaviours.)
User avatar
BigDumbDinosaur
Posts: 9428
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: A VERY simple 6502 programming language

Post by BigDumbDinosaur »

drogon wrote:
Today, young people are not normally taught how to read a round clock...

...which is odd, considering how many analog clocks exist. Our oldest grandson knew how to tell time from an analog clock when he was four—his mom taught him. What was fun was when I introduced him to my 1960s-era Stromberg-Carlson desk phone, complete with a rotary dial. :D Now, that had him flummoxed for a while.
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Martin_H
Posts: 837
Joined: 08 Jan 2014

Re: A VERY simple 6502 programming language

Post by Martin_H »

BigDumbDinosaur wrote:
drogon wrote:
Today, young people are not normally taught how to read a round clock...

...which is odd, considering how many analog clocks exist. Our oldest grandson knew how to tell time from an analog clock when he was four—his mom taught him. What was fun was when I introduced him to my 1960s-era Stromberg-Carlson desk phone, complete with a rotary dial. :D Now, that had him flummoxed for a while.
My twenty two year old daughter is perpetually confused by them. The phone she keeps on her person at all times is a massive crutch in not learning how to read them. As a result language like quarter after or quarter to also confuses her.
User avatar
BillO
Posts: 1038
Joined: 12 Dec 2008
Location: Canada

Re: A VERY simple 6502 programming language

Post by BillO »

Well, most of don't know how to read a sundial anymore either.

Time moves on no matter what you use to mark it.
Bill
teamtempest
Posts: 443
Joined: 08 Nov 2009
Location: Minnesota
Contact:

Re: A VERY simple 6502 programming language

Post by teamtempest »

Quote:
Well, most of don't know how to read a sundial anymore either.
That got me wondering how sundials compensate for seasonal changes in the day length, and I came across this: https://www.shadowspro.com/en/sundials.html

Yup, it can be way more complicated than you might think. :-)
User avatar
drogon
Posts: 1671
Joined: 14 Feb 2018
Location: Scotland
Contact:

Re: A VERY simple 6502 programming language

Post by drogon »

teamtempest wrote:
Quote:
Well, most of don't know how to read a sundial anymore either.
That got me wondering how sundials compensate for seasonal changes in the day length, and I came across this: https://www.shadowspro.com/en/sundials.html

Yup, it can be way more complicated than you might think. :-)
Even more complicated when you have a stone circle to read and adjust for daylight savings...

https://www.nationaltrust.org.uk/news/m ... ummer-time

-Gordon
--
Gordon Henderson.
See my Ruby 6502 and 65816 SBC projects here: https://projects.drogon.net/ruby/
sburrow
Posts: 833
Joined: 09 Oct 2021
Location: Texas

Re: A VERY simple 6502 programming language

Post by sburrow »

CountChocula wrote:
drogon wrote:
Here in the UK, in schools, the focus is on Scratch, a visual "language" followed by Python (in secondary/high school).
Ah, this brings back memories of my son trying to learn Scratch for his CS class in high school… he wasn't overly fond of it (and neither was I when he asked for help; we both kept fighting with the darn thing because it refused to let us do things the way we wanted). Considering how crazy it drove us, I doubt that a younger child would be able to use it without getting frustrated.

(My son loved Python though—as do I. It was harder for him to learn, but, once he did, its consistency meant not having to constantly deal with all kinds of bugs and strange behaviours.)
Well put. I heard one of my programming friends teach his 12 yo Scratch, don't know how far that really got.

I'm personally NOT a fan of drag-and-drop stuff (or turtles, sorry), very un-useful in the future. Simply teaching the "concepts" of programming is NOT going to get you doing anything (I'm looking at you, Raptor). Immediate results in something useful is more important (in my opinion) and then you can build out from there. Say like in math, when you add two numbers, that skill is useful... forever! Then we say "ah, but now let's put a minus sign there instead" and the concept is nearly identical but in reverse. Same with multiplying. Then simplifying, then solving for x, then derivatives, then integrals. If someone were to say, "Ok, I know you've been dragging and dropping for X years, but today's lesson cannot be done with that method, so now we forget all about that and start typing!" That will not be met well. If they were already typing, they know exactly what to expect.

So, typing is a limitation on younger folks. But my 4 yo is using the keyboard with her whole ONE finger, and it's ok. More will come later.

My point earlier is that I've heard from many folks who "grew up in the 80's" that they had a VIC-20 or C64 plopped down in front of them in at an early age, and they HAD to learn how to program else the machine wouldn't do anything. If 5 yo's in the 80's could program, so can 5 yo's in the 20's.

Thanks everyone.

Chad

EDIT:

Do you know what language was my first programming language? C++, back in 10th grade. It's sad it took that long though. We had these terrible "Turbo Borland" compilers, but gosh darnit I was already making games within the first month of the class. All kids need is the basics of how things work, and off they go! I use C++ DAILY, 30 years later.
User avatar
commodorejohn
Posts: 299
Joined: 21 Jan 2016
Location: Placerville, CA
Contact:

Re: A VERY simple 6502 programming language

Post by commodorejohn »

Yeah, the idea that kids can't work past basic hurdles like typing is drastically selling their capacity to learn short.* I couldn't type either when I started learning how to program, but it's not rocket science and you don't need to be an expert touch-typist to get started in fershlugginer BASIC.

* (It's also a fairly damning indictment of how we approach childhood education - the notion that we shouldn't expect kids to learn how to type because everybody uses fondleslabs for all their web-browsing needs these days would be absurd even if it were true - but that's life in the iConsumer Age for you.)
Post Reply