6502 or W65C816S to X86 Assembly Language
Re: 6502 or W65C816S to X86 Assembly Language
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.
-
jamesadrian
- Posts: 34
- Joined: 11 Jan 2016
- Location: Rochester, NY 14626
- Contact:
Re: 6502 or W65C816S to X86 Assembly Language
The "most people" argument does not work. Progress requires meeting unmet needs.
James Adrian
jim@futurebeacon.com
James Adrian
jim@futurebeacon.com
Jim Adrian
https://www.futurebeacon.com/jamesadrian.htm
https://www.futurebeacon.com/jamesadrian.htm
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 6502 or W65C816S to X86 Assembly Language
jamesadrian wrote:
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?
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.
Quote:
Progress requires meeting unmet needs.
x86? We ain't got no x86. We don't NEED no stinking x86!
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: 6502 or W65C816S to X86 Assembly Language
Quote:
That is true—if there is a need. Where is the need for what you are proposing?
Mike B.
- BigDumbDinosaur
- Posts: 9428
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: 6502 or W65C816S to X86 Assembly Language
barrym95838 wrote:
Quote:
That is true—if there is a need. Where is the need for what you are proposing?
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.
x86? We ain't got no x86. We don't NEED no stinking x86!
Re: 6502 or W65C816S to X86 Assembly Language
jamesadrian wrote:
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?
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
-
jamesadrian
- Posts: 34
- Joined: 11 Jan 2016
- Location: Rochester, NY 14626
- Contact:
Re: 6502 or W65C816S to X86 Assembly Language
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
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
Jim Adrian
https://www.futurebeacon.com/jamesadrian.htm
https://www.futurebeacon.com/jamesadrian.htm
Re: 6502 or W65C816S to X86 Assembly Language
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:
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.)
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);
(You could probably write more macros to write more structured assembly language if you so chose.)
-
jamesadrian
- Posts: 34
- Joined: 11 Jan 2016
- Location: Rochester, NY 14626
- Contact:
Re: 6502 or W65C816S to X86 Assembly Language
BigEd,
This is very valuable.
Thank you for your help.
Jim Adrian
This is very valuable.
Thank you for your help.
Jim Adrian
Jim Adrian
https://www.futurebeacon.com/jamesadrian.htm
https://www.futurebeacon.com/jamesadrian.htm
Re: 6502 or W65C816S to X86 Assembly Language
jamesadrian wrote:
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?
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?
What is it you need?
Re: 6502 or W65C816S to X86 Assembly Language
jamesadrian wrote:
Can the frame of mind and directness of simple assembly languages be introduced into the wider computing market?
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.)
- GARTHWILSON
- Forum Moderator
- Posts: 8775
- Joined: 30 Aug 2002
- Location: Southern California
- Contact:
Re: 6502 or W65C816S to X86 Assembly Language
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.
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?
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?
Re: 6502 or W65C816S to X86 Assembly Language
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.
- 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
I'll take "Topic" for 200, Alex. 
Re: 6502 or W65C816S to X86 Assembly Language
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.