Page 2 of 3
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Wed Jan 13, 2016 9:14 am
by Arlet
Very few people prefer assembly language over C or other high level languages. And those that do on the PC, most likely prefer to use x86 assembly over 6502.
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Wed Jan 13, 2016 9:18 am
by jamesadrian
The "most people" argument does not work. Progress requires meeting unmet needs.
James Adrian
jim@futurebeacon.com
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Wed Jan 13, 2016 4:46 pm
by BigDumbDinosaur
Is there such a thing as a cross assembler that accepts 6502 or 65C816 assembly language as input and produces machine code for a PC or an OS X iMac?
I've never heard of such an animal and at the risk of sounding somewhat myopic, see no reason why anyone would concoct such an animal.
Assembly languages are much too specific to the MPU and the machine in which the MPU runs to make input in assembly language A generate a binary for MPU B to be practical. Compiled languages, such as C and FORTRAN, exist to efface machine differences. If the same approach were practical in assembly language it would have already been done.
Progress requires meeting unmet needs.
That is true—if there is a need. Where is the need for what you are proposing?
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Thu Jan 14, 2016 2:48 am
by barrym95838
That is true—if there is a need. Where is the need for what you are proposing?
I think that it might be a personal journey of progress, BDD. Kinda like translating a 38-year old miniature interpreter from the 6800 to the 6502, or building a seven-foot-long model locomotive ... it scratches an itch.
Mike B.
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Thu Jan 14, 2016 6:13 am
by BigDumbDinosaur
That is true—if there is a need. Where is the need for what you are proposing?
I think that it might be a personal journey of progress, BDD. Kinda like translating a 38-year old miniature interpreter from the 6800 to the 6502, or building a seven-foot-long model locomotive ... it scratches an itch.
You make a valid point, but I'm not interpreting it that way.
My reply may have been a bit crass. However, I took the "unmet needs" statement, which was preceded by the "The 'most people' argument does not work." retort (I think) to Arlet's comment, as a suggestion that the demand for such software is all around us, and that one of us should start shifting our buns and get it written. I don't think there is a demand for such software—I'm not aware of any such demand, and don't see why someone would attempt to write such software, unless that someone has a need for such software.
If it is indeed a personal journey of progress involved, the individual desiring to progress should take a cue from the individual who is building the seven-foot-long model locomotive. His "unmet needs" are not universal.

Re: 6502 or W65C816S to X86 Assembly Language
Posted: Thu Jan 14, 2016 9:21 am
by BigEd
It sounds like I need a translator. Would the 6502 community appreciate the ability to write at least some kinds of programs on PCs and iMacs in 65C816 machine code?
Hi Jim,
from the responses so far, and from general experience, you might happily conclude that there's no such thing as the wishes of the 6502 community - because there are so many different ways of being a 6502 enthusiast. But ask instead if anyone is interested in the possibility, or is anyone interested in hearing about your thoughts and your progress, and you might well find a small audience for your project. If it's something you want to do, then do it, and please do keep up a conversation about your thoughts and your progress - we can all learn from each other.
Cheers
Ed
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Thu Jan 14, 2016 2:05 pm
by jamesadrian
BigEd,
Thank you for your encouraging note.
I am in communication privately with those who are interested. There is no question of the technical feasibility or the need, despite the overwhelming popularity or current methods. I have found a large unmet need among professors and hobbyist. Not eveybody wants to devote their life to programming. Perhaps the subject should now migrate to the imagined technical obstacles.
I see a PC screen with a processor status register visible and the instruction set accessible. It is suitable for writing encryption programs and much much more.
Thank you for your help.
Jim Adrian
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Fri Jan 15, 2016 4:43 pm
by BigEd
I wonder if Bill Forster's approach is quite close to what you're seeking. He's using a set of macros in C so he can write code like this:
Code: Select all
LDXi (0x1F);
SEARCH: LDAx (BOARD,X);
CMP (DIS2);
BEQ (HERE); // DISPLAY
DEX; // PIECE AT
BPL (SEARCH); // FROM
HERE: STX (DIS1); // SQUARE
STX (PIECE);
JMP (RESTART_CHESS);
Apart from the use of upper case everywhere, which is of course a personal choice, it looks OK to me. Very like, but not precisely like, assembly code. The C compiler will then take care of producing machine code for the appropriate CPU - which it can even optimise.
(You could probably write more macros to write more structured assembly language if you so chose.)
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Sat Jan 16, 2016 2:38 am
by jamesadrian
BigEd,
This is very valuable.
Thank you for your help.
Jim Adrian
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Sun Jan 17, 2016 9:02 am
by satpro
I don't think I could list all of my complaints about higher-level languages. I appreciate many of the technical difficulties. I prefer a discussion of the incentives seen by 6502.org members to control PCs and Macs and possibly introduce 6502 assembly language to the Linux world.
I prefer the sense of hardware necessity in assembly language. I dislike starting a program with a lot of declarations about data types and I especially dislike the arbitrariness of the syntax of C and related languages. I would rather use a processor status register than a two hundred page manual. I don't believe in the supposed efficiency of higher-level languages because it discounts the programmers option to define a system of subroutines; but all this and more like it is besides the point. Can the frame of mind and directness of simple assembly languages be introduced into the wider computing market? Do we all believe in that?
No, we don't. That diatribe is grumpy as hell. What are you looking for exactly? You may be in private conversations, etc., but at least for me, I'm not exactly sure what you're asking, and it is most definitely a subject I'm into, so why not elaborate just a hair more? The answers in this thread have so far netted zero, and I have offered a library archive.org would be envious of, so why not just unload?
What is it you need?
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Sun Jan 17, 2016 9:28 am
by BigEd
Can the frame of mind and directness of simple assembly languages be introduced into the wider computing market?
One idea I've read from computer history books is that there were two tribes who came to microcomputing: those who came from minicomputing and those who came from calculators. These days, there's at least one more tribe, which is those who came from gaming.
From minicomputing, we have people who like an operating system, a filing system, tools.
From calculators, we have people who want to string together simple operations and get some results.
From gaming, we have people who want to move pixels on a screen, and play music or at least get sounds.
(Of course that's an approximation, and we're several generations on from those days.)
Jim's ideas to me seem to have something in common with programming a programmable calculator: something direct, with not too many available operations and not too much extra syntax beyond that.
(When MCM introduced their desktop APL machine, their potential customers were happy to write programs in what is a very direct, but also very terse programming language, using only a one-line display. IBM also sold an APL-only machine, and then a dual-boot APL and Basic machine. It seems that Visicalc put paid to APL, as a much more friendly (but much heavier) solution to array-based calculations.)
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Sun Jan 17, 2016 9:39 am
by GARTHWILSON
I hadn't made that division/connection, Ed, even after writing about assembly language's similarity to programmable calculators. but it makes sense. Of course eventually programmable calcs took on file functions too, and later, graphics. I have not gotten into graphics myself. In my youth, my electronics interest did not include computers, as they were (at the time) for data processing for banks and so on. What got me interested later was the prospect of having a small computer or even calculator control circuitry and lab test equipment, as my "Introduce yourself" post describes.
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Sun Jan 17, 2016 9:52 am
by BigEd
Yes - instrumentation and control is (another) category of computing - in fact now I think of it I'm sure I read that there were three kinds of manufacturers who first tried to make and sell computers
- calculator companies
- business system companies (punched cards and time clocks)
- instrument making companies (including control systems like autopilots)
For me, it's usually about numbers, but it's always worth appreciating where other people are coming from.
Re: 6502 or W65C816S to X86 Assembly Language
Posted: Sun Jan 17, 2016 10:31 am
by satpro
I'll take "Topic" for 200, Alex.

Re: 6502 or W65C816S to X86 Assembly Language
Posted: Sun Jan 17, 2016 10:38 am
by BigEd
RIght, but I wasn't talking at random: there seems to be a gap between the puzzle Jim is trying to solve, and your efforts to try to understand what that puzzle is. I thought it should be helpful to consider the different ways people approach computing, while we're waiting for more from Jim.