Dan Moos wrote:
I'm curious. How many here are doing all their coding on the machine they built? Using tools they created?
I started (and still use) ca65 (from the cc65 suite) for development on my Ruby 6502 and '816 systems. I also created a cc65 target for it, so can do ASM and C on a Linux host.
My ultimate aim is for Ruby'816 to be self-hosting. So it has a filing system, serial interface and it runs BBC Basic.
For a while I looked at C running natively (I did use Aztec C on an Apple II in the early 80's and another C on a CP/M system) but I remembered compiling being very slow back then - probably no better today. Quite limited too, so I've settled on BCPL. I did a lot of BCPL coding in the 80s on the 6502 based BBC Micro) So now I have a 32-bit BCPL system running on the '816. The low-level OS is an Acorn MOS look-a-like (BBC Micro operating system) which I wrote from scratch The BCPL Cintcode (the name of the bytecode the compiler generates) interpreter (32-bit bytecode VM thing) is all written in ASM with a C front-end which I'm slowly re-writing in a mixture of ASM and BCPL. The upper level "OS", program launcher, command-line interface, etc. is all in BCPL.
Todays task is compiling the complier directly on it, then finish porting my little text editor (currently in C) to it.
I could use BBC Basic with its built in assembler to generate the assembly stuff for the lower level OS, but it's 65C02 only and I need 65816, so I'll be looking to write an assembler in BCPL for it at some point.
Running a 32-bit VM on a 16 bit micro with an 8-bit data bus is never going to be the fastest thing, but here is 1000 digits of Pi it calculated in just over 11 minutes as part of my testings... And there is a Mandelbrot here
https://unicorn.drogon.net/mand.b.txt that runs in about 14 seconds. (these are interesting diversions, but do make good testing programs when you can run them on other platforms and compare the outputs)
Code:
Time taken: 671615
pi = 3.+
1415926535 8979323846 2643383279 5028841971 6939937510
5820974944 5923078164 0628620899 8628034825 3421170679
8214808651 3282306647 0938446095 5058223172 5359408128
4811174502 8410270193 8521105559 6446229489 5493038196
4428810975 6659334461 2847564823 3786783165 2712019091
4564856692 3460348610 4543266482 1339360726 0249141273
7245870066 0631558817 4881520920 9628292540 9171536436
7892590360 0113305305 4882046652 1384146951 9415116094
3305727036 5759591953 0921861173 8193261179 3105118548
0744623799 6274956735 1885752724 8912279381 8301194912
9833673362 4406566430 8602139494 6395224737 1907021798
6094370277 0539217176 2931767523 8467481846 7669405132
0005681271 4526356082 7785771342 7577896091 7363717872
1468440901 2249534301 4654958537 1050792279 6892589235
4201995611 2129021960 8640344181 5981362977 4771309960
5187072113 4999999837 2978049951 0597317328 1609631859
5024459455 3469083026 4252230825 3344685035 2619311881
7101000313 7838752886 5875332083 8142061717 7669147303
5982534904 2875546873 1159562863 8823537875 9375195778
1857780532 1712268066 1300192787 6611195909 2164201989
Ultimately I want to port a BASIC interpreter I wrote in C a few years back to BCPL with the aim of making it a compiler producing the bytecode that the underlying BCPL system uses. It would never be as fast as BBC Basic (nothing ever will be!) but it would be nice to use my own BASIC on a 'micro' rather than my Linux desktop.
Cheers,
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/