6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Jul 12, 2024 3:51 am

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: SBC os reccomandations
PostPosted: Sun Mar 11, 2012 9:29 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
On my sbc, i only used EhBasic, but i was wondering what kind of other systems there exist that have few hardware requirements (EhBasic is quite simple, for input/output it uses functions which you can modify easily).
Is there some other system that is easily modifiable? (since i have a 32k rom, and i only can address 16k at once, i can have 2 systems simultaneously.)

Is there a basic system that actually compiles the basic instructions in cpu instructions??


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 12, 2012 1:03 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8465
Location: Southern California
Shucks-- another call to get my Forth ready, and I've been doing too many other things. A few here have gotten the FIG-Forth going that's on this site at http://6502.org/source/forth65.zip but it's not nearly as well equipped.

Quote:
Is there a basic system that actually compiles the basic instructions in cpu instructions??

I'm not totally sure what you mean there, but what I'm talking about supplying is the assembly-language source code to build the Forth system, so you can set it up with your assembler, and from there you can put it in your ROM if you want it ROM-based. My system does also have an assembler in it too though, so it can do its own assembling of new pieces of code, as well as the usual compilation.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 12, 2012 3:25 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8263
Location: Midwestern USA
Dajgoro wrote:
On my sbc, i only used EhBasic, but i was wondering what kind of other systems there exist that have few hardware requirements (EhBasic is quite simple, for input/output it uses functions which you can modify easily).
Is there some other system that is easily modifiable? (since i have a 32k rom, and i only can address 16k at once, i can have 2 systems simultaneously.)

Is there a basic system that actually compiles the basic instructions in cpu instructions??

As Garth suggested, look at Forth. It's small and runs fast on 65xx hardware. Of course, if you're feeling ambitious, you could roll your own... :D

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Mar 12, 2012 6:46 pm 
Offline

Joined: Thu Mar 03, 2011 5:56 pm
Posts: 280
PLASMA looks interesting:

http://schmenk.is-a-geek.com/PLASMA.html

Also, there's Nick Gammon's Pascal discussed in

http://forum.6502.org/viewtopic.php?t=2073


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 16, 2012 3:49 am 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
What i meant before is: Is there some kind of system that allows you to write a program on a 6502 system, and then compile it and store it in ram. That means that the system should have some sort of text input, and a compiler(so you can write and compile programs on the 6502 system itself without any other computers being involved in the process).

As for Forth I'll give it a try...


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 16, 2012 8:21 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8465
Location: Southern California
Dajgoro wrote:
What i meant before is: Is there some kind of system that allows you to write a program on a 6502 system, and then compile it and store it in ram. That means that the system should have some sort of text input, and a compiler(so you can write and compile programs on the 6502 system itself without any other computers being involved in the process).

As for Forth I'll give it a try...

Yes, Forth can do that, and it is what I do on my workbench computer except that I still use the PC for its full-featured programmer's text editor, full keyboard, and large monitor, something I don't have on the workbench computer. Eventually I would like to have it completely free of the host computer, or at least have the host computer also be of my own construction; but even now, the host computer itself does not do the compiling or assembling (except years ago when I built the actual kernel which I have in the workbench computer's ROM and starts up immediately upon power-up).

After writing source code on the host computer (generally a PC, but it doesn't have to be), I only have it send out that source code as text, as if to a text printer. The host computer does not know that the equipment receiving the info is not a printer. It can be any quantity of source code ranging from a single word to an entire application of hudreds of lines (or potentially tens of thousands, although I've never done one that long this way), then the workbench computer takes that text and figures it out and does its own compiling and assembling, and puts the resulting ready-to-run code in RAM. It is not necessary to suspend other tasks that might be running at the same time. Since the sytem is Forth, this newly compiled code immediately becomes part of the language itself, and it is not necessary to re-compile everything every time to make it integrate, meaning you can get instant results. Already-compiled definitions can be modified, or more comonly, re-defined, again and again, while leaving the rest alone.

I've wanted to do a video of it for years, and now that I have the equipment for it and can even host it on my own website, it's just a matter of taking the time to make the presentation.

Any Forth will have the ability to do its own compiling from text source code. Mine did not originally have an assembler, but I wrote a simple one very quickly. It is not suitable for doing a large application all in assembly, but it works well for doing individual portions where you need maximum performance. Since the assembler runs in Forth, doing macros is super easy-- something that is probably not usually associated with simple assemblers.

_________________
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?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 16, 2012 12:21 pm 
Offline
User avatar

Joined: Mon Aug 08, 2011 2:48 pm
Posts: 808
Location: Croatia
A video presentation on youtube would be a great thing, you could show how it all works...


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 16, 2012 7:38 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8263
Location: Midwestern USA
Dajgoro wrote:
What i meant before is: Is there some kind of system that allows you to write a program on a 6502 system, and then compile it and store it in ram. That means that the system should have some sort of text input, and a compiler(so you can write and compile programs on the 6502 system itself without any other computers being involved in the process).

Most of us who have scratch-developed 65xx hardware have written a ROM BIOS of some sort to do the low level grunt work. Since ROM space can be at a premium, the BIOS is generally written in tightly-coded assembly language (pedantic note: one assembles assembly language and compiles higher level languages, such as C). Your BIOS will need, along with basic hardware support, a machine language monitor so you can tinker, and a loader that allows you to transfer machine code from your development machine to your 65xx SBC. In the case of my POC unit, I use the Motorola S-record format, since my assembler (another pedantic note: an assembler is not a compiler) can generate S-record output. The exact means by which you would link up your hardware with the development box to effect code transfers is up to you. I prefer EIA-232 for such purposes.

Quote:
As for Forth I'll give it a try...

Forth is a fairly easy way to get something going. It isn't for everyone (such as me—RPN and my feeble brain don't get along), but as I earlier mentioned, works well on 65xx hardware. Garth is the reigning Forth expert around here, as well as an enthusiastic supporter. Rumor has it that when he was a baby and started talking the first words out of his mouth were "Go Forth!" :lol:

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 16, 2012 8:32 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8465
Location: Southern California
Quote:
(another pedantic note: an assembler is not a compiler)

I took his word "compiler" to mean he wanted a higher-level language, but maybe I misunderstood.

Quote:
Since ROM space can be at a premium, the BIOS is generally written in tightly-coded assembly language

For tiny jobs, assembly will always take the least memory. A Forth kernel will take a few KB at a minimum, but after passing some threshold of required code amount, Forth will make much more efficient use of memory.

Quote:
and a loader that allows you to transfer machine code from your development machine to your 65xx SBC. In the case of my POC unit, I use the Motorola S-record format, since my assembler [...] can generate S-record output.

I wrote Forth words to receive pre-assembled code from the host computer in Intel Hex, but I haven't used it since I added my assembler to my Forth. I first got familiar with Intel Hex in the 1980's, so that's what I used, although Motorola S-record is just as valid. For PIC development, I so use Microchip's MPASM assembler on the DOS PC and send the Intel Hex output to the workbench computer over RS-232 for my PIC programmer which is controlled by the workbench computer, in Forth.

Quote:
The exact means by which you would link up your hardware with the development box to effect code transfers is up to you. I prefer EIA-232 for such purposes.

I like it too. BTW, if you really want to be up to date, the new name for it is "TIA-232-F" but we still call it RS-232.

Quote:
Garth is the reigning Forth expert around here, as well as an enthusiastic supporter.

Others who come to mind who are extremely strong in it are Bruce and Samuel, possibly Dr Jefyll, (and I'm sure I'm forgetting someone important) although there's not a complete overlap in our abilities.

Quote:
Forth is a fairly easy way to get something going. It isn't for everyone (such as me—RPN and my feeble brain don't get along)

It is an entirely different approach to programming, and not just because of the RPN. My own personal programming started in 1981 with a TI-58c calculator which of course was algebraic. I initially wrote programs for it that did thousands of loop iterations to calculate things in RF design. Later I wanted it to control equipment and take data on the workbench which it was not made to do, so I got an HP-41cx which as you probably know is RPN, not algebraic. In the meantime, I had collected a couple of other algebraic languages too, with their piles of parentheses and sytax requirements. For awhile I could have gone either way--algebraic or RPN--but gradually RPN proved to be much better for all the I/O I was doing. When I met Forth later, the HP-41's RPN had me halfway there already. I was very pleased to get rid of the piles of parentheses and most of the syntax requirements, and also get RPN's more-efficient, implicit parameter-passing and so on. A couple of years ago I was explaining to another engineer I work with that algebraic tells you what you get, whereas RPN tells how you get there. From there, he looked into it further, and became a huge RPN enthusiast.

Quote:
Rumor has it that when he was a baby and started talking the first words out of his mouth were "Go Forth!" :lol:

Ahem-- that would be, "Forth Go" :lol: -- except that I'm older than Forth.

_________________
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?


Top
 Profile  
Reply with quote  
PostPosted: Sat Mar 17, 2012 2:09 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8263
Location: Midwestern USA
GARTHWILSON wrote:
Ahem-- that would be, "Forth Go" :lol: -- except that I'm older than Forth.

Maybe what you said was "I gotta go, Mommy...right now!" :cry:

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Apr 06, 2012 5:42 am 
Offline

Joined: Sat Apr 07, 2012 9:30 am
Posts: 1
only used EhBasic, but i was considering what form of other methods there are available that have few elements requirements (EhBasic is quite simple, for input/output it uses functions which you can modify easily).
Is there some other system that is quickly modifiable? (since i have a 32k rom, and i only can cope with 16k at once, i can have 2 methods as well.)


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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: