Self-hosting 65xx systems ... (Languages, OS, etc.)

Let's talk about anything related to the 6502 microprocessor.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by GARTHWILSON »

GlennSmith wrote:
BTW - how do you guys get the "BDD says" title into the quote banner ?
You'll see it if you just click on the quote box at the bottom-right of the post frame.  The reply box will come up with what you're quoting, starting with, for example [quote="BigDumbDinosaur"] (but I had to put another pair of tags in there to keep the quote tag from doing its job).  You could edit it to say for example [quote="BDD"]
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
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by GARTHWILSON »

GlennSmith wrote:
I'll post my findings about PLASMA (it would be nicer to call it "Plasma" - no shouting!)
I always say, if it seems like shouting, just turn the font size down.  Personally, I like most programming to be in all cap.s.  The comments normally shouldn't be though, and I can understand if people don't like to keep finding themselves in the wrong case and always have to be hitting the cap.s-lock key off and on.  In prose however, the lines on the page exist because a book is more manageable than a long ribbon with a lump here and there for pictures.  But in programming, the separation into lines becomes very significant for visual factoring, and having ascenders and descenders (as lower-case does) blurs those divisions.  I especially dislike it when people mix lower-case a-f into them in hEx nUmBErS (since 0-9 are always capitals)!  Here on the forum where the non-[code] sections are in proportional spacing, when someone writes 3fff for example, in whatever font is used there, it initially looks like 3111 to me because the f's are so narrow:
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?
rwiker
Posts: 294
Joined: 03 Mar 2011

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by rwiker »

BigDumbDinosaur wrote:
rwiker wrote:
Unix is probably not an acronym, although it was trademarked as "UNIX".

According to the authors of THE UNIX PROGRAMMING ENVIRONMENT (Kernighan - Pike, Prentice-Hall 1984), “UNIX” is a pun on “MULTICS,” which was the project that Ritchie and Thompson worked on before the latter got started on what would become UNIX.  I dimly recall from a lecture or some such thing that “UNIX” was originally spelled “UNICS.”  In the referenced book, both “MULTICS” and “UNIX” are consistently upper-case.

Quote:
PLASMA is an acronym, and this is also the way that the creator writes it.

In recent years, the preferred form is capitalized: Fortran, Basic, Cobol, Common Lisp. That might make sense for PLASMA, too, but you would not be able to write it like that on Apple ][ and Apple][+ computers, since they do not have lowercase :-)

Preferred by whom?  :D  Cell phone users who are too lazy to properly spell words?  :?  BASIC, for example, is an acronym that has always been rendered all upper-case.  Ditto for COBOL and FORTRAN.
Absolutely not the case for Fortran and Common Lisp, although COBOL and BASIC appear to have kept their all-caps spelling.
GlennSmith
Posts: 162
Joined: 26 Dec 2002
Location: Occitanie, France

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by GlennSmith »

GARTHWILSON wrote:
GlennSmith wrote:
BTW - how do you guys get the "BDD says" title into the quote banner ?
You'll see it if you just click on the quote box at the bottom-right of the post frame.  The reply box will come up with what you're quoting, starting with, for example [quote="BigDumbDinosaur"] (but I had to put another pair of tags in there to keep the quote tag from doing its job).  You could edit it to say for example [quote="BDD"]
Got it! Thanks. I'd been using the little grey buttons inside the editor...

To come back on topic, I've just finished writing the interface for open() and close() - now to test them. Now I've got to grips (in assembler) with the parameter passing between everyone's different stacks it should be easier to get read() and write() done.
Glenn-in-France
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by barnacle »

GARTHWILSON wrote:
Personally, I like most programming to be in all cap.s.
<shudder> Horses for courses, I guess; it was one of the first things I changed on a 6502 BASIC nearly fifty years ago. I hate code that shouts at me!

Neil
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by GARTHWILSON »

barnacle wrote:
GARTHWILSON wrote:
Personally, I like most programming to be in all cap.s.
<shudder> Horses for courses, I guess; it was one of the first things I changed on a 6502 BASIC nearly fifty years ago. I hate code that shouts at me!
Again, JUST TURN THE FONT SIZE DOWN!  Capitalizing things to emphasize them or make them louder, although common, is incorrect.  That job should be left for bold or underlining.
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?
sark02
Posts: 241
Joined: 10 Nov 2015

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by sark02 »

drogon wrote:
Looks like someone has done it again, this time emulating RISC-V...
https://hackaday.com/2023/10/13/because ... duino-uno/
Random fun-fact on CPUs emulating other CPUs: The new Raspberry Pico2 (RP2350 SoC) has both ARM and RISC-V cores, and the chip can boot from ARM or RISC-V. If it boots from RISC-V then firmware runs an ARM emulator so it can use the common ARM object code (to reduce the internal ROM capacity).
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by BigEd »

Do you have a handy link for the idea that the Pico 2 runs an ARM emulator? That's not an idea I've seen. (Of course, it could, and it can, but I've not seen anything official on those lines.) Edit: see below...

My understanding is that it has two ARM cores and two RISC cores, and two active slots each of which can be set, at reset time, to either flavour. The user's boot-time software is compiled for one or other flavour, and if the boot-time core detects that the image is for the other flavour it causes a boot into the other flavour. (Ref and also Ref)

Edit: ah, I see here this
Quote:
Most bootrom functions are written just once, in Arm code, to save space. As a result these functions are emulated when running under the RISC-V architecture. This is largely transparent to the user, however...
and later
Quote:
This part of the ROM contains the NSBOOT (including USB boot) implementation, as well as a RISC-V Armv6-M emulator which can be used to emulate most of the bootrom on RISC-V processors.
sark02
Posts: 241
Joined: 10 Nov 2015

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by sark02 »

BigEd wrote:
Quote:
This part of the ROM contains the NSBOOT (including USB boot) implementation, as well as a RISC-V Armv6-M emulator which can be used to emulate most of the bootrom on RISC-V processors.
If you'd like to dig deeper, the source code to the boot ROM is https://github.com/raspberrypi/pico-boo ... ree/master, and it uses the armulet emulator.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Self-hosting 65xx systems ... (Languages, OS, etc.)

Post by BigEd »

interesting! only 3k of ROM to emulate ARM on RISC-V:
https://github.com/raspberrypi/armulet? ... le#armulet
Post Reply