This is pretty vague but I've been mumbling on this idea in my head for a while. There is a core standard for 6502 assembler source code - the mnemonics are invariant (I hope), and the syntax for hex ($0A), addressing modes, register names etc. mightalso be completely standard and invariant from one assembler to another.
However, the standard halts there and each assembler designer from that point elaborates on the language in their own way, leading to the existence of multiple dialects with varying degrees of similarity. Pseudo-ops (EQU, ORG, ASC), rules for forminglabels, comments etc. are all areas of syntactic departure. Dialects include Merlin, Apple Pascal, Big Mac, ORCA for 6502 ... basically each assembler defines one more dialect of the language ... even different versions of one assembler might result in
If I come across an ASM listing in a magazine, the code or the article may or may not identify the target assembler for this particular unit of source code. As well, I may have a different assembler but not the one targeted by the author. So I'd wishfor a tool that could
a) take a source file and detect the assembler(s) it is targeted to, or compatible with; andinformation sources that would to some degree address this functional requirement?
b) automatically translate from dialect A to dialect B
I'm interested in this as a possible programming challenge. Currently I foresee much slogging through assembler manuals to document the syntax rules of each dialect. Does such a tool already exist in some form? Or, do you know of any techniques or
Disclaimer: I can barely write two lines of ASM to save my life, although I've been intending to learn it for the last 40 years. This exercise would go a long way to scratching that itch!
If I come across an ASM listing in a magazine, the code or the article may or may not identify the target assembler for this particular unit of source code. As well, I may have a different assembler but not the one targeted by the author. So I'd wishfor a tool that could
a) take a source file and detect the assembler(s) it is targeted to, or compatible with; andinformation sources that would to some degree address this functional requirement?
b) automatically translate from dialect A to dialect B
I'm interested in this as a possible programming challenge. Currently I foresee much slogging through assembler manuals to document the syntax rules of each dialect. Does such a tool already exist in some form? Or, do you know of any techniques or
Disclaimer: I can barely write two lines of ASM to save my life, although I've been intending to learn it for the last 40 years. This exercise would go a long way to scratching that itch!
This is pretty vague but I've been mumbling on this idea in my head for a while. There is a core standard for 6502 assembler source code - the mnemonics are invariant (I hope), and the syntax for hex ($0A), addressing modes, register names etc. mightalso be completely standard and invariant from one assembler to another.
However, the standard halts there and each assembler designer from that point elaborates on the language in their own way, leading to the existence of multiple dialects with varying degrees of similarity. Pseudo-ops (EQU, ORG, ASC), rules for forminglabels, comments etc. are all areas of syntactic departure. Dialects include Merlin, Apple Pascal, Big Mac, ORCA for 6502 ... basically each assembler defines one more dialect of the language ... even different versions of one assembler might result in
If I come across an ASM listing in a magazine, the code or the article may or may not identify the target assembler for this particular unit of source code. As well, I may have a different assembler but not the one targeted by the author. So I'd wishfor a tool that could
a) take a source file and detect the assembler(s) it is targeted to, or compatible with; and
b) automatically translate from dialect A to dialect B
I'm interested in this as a possible programming challenge. Currently I foresee much slogging through assembler manuals to document the syntax rules of each dialect. Does such a tool already exist in some form?
Or, do you know of any techniques or information sources that would to some degree address this functional requirement?
Disclaimer: I can barely write two lines of ASM to save my life, although I've been intending to learn it for the last 40 years. This exercise would go a long way to scratching that itch!
Does such a tool already exist in some form? Or, do you know of any techniques or information sources that would to some degree address this functional requirement?
Does such a tool already exist in some form? Or, do you know of any
techniques or information sources that would to some degree address this
functional requirement?
I believe there is a tool provided with Merlin to convert from Orca/M code.
IIgs Resource editors have generation for different assembler formats.
Richard Bennett converted a lot of code to Merlin and some code to MPW
IIgs. He has tools that he used to do this work. See MPW to Merlin-16+ http://www.kashum.com/a2lib/
Regards
Andrew
Andrew Roughan <andrew....@writeme.com> wrote:I've been looking through magazines from time to time, making notes of anything interesting to me that I may want to come back to. This subject just happens to be one of them. Here you go, straight from my notes! :-)
Does such a tool already exist in some form? Or, do you know of any
techniques or information sources that would to some degree address this >> functional requirement?
I believe there is a tool provided with Merlin to convert from Orca/M code.
IIgs Resource editors have generation for different assembler formats.
Richard Bennett converted a lot of code to Merlin and some code to MPW IIgs. He has tools that he used to do this work. See MPW to Merlin-16+ http://www.kashum.com/a2lib/Tim Meekins has just released source code for Merlin to Orca. https://github.com/tmeekins/Apple-IIGS-Projects/tree/main/Merlin2Orca
You’re welcome.
Regards
Andrew
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 292 |
Nodes: | 16 (2 / 14) |
Uptime: | 207:35:19 |
Calls: | 6,618 |
Files: | 12,168 |
Messages: | 5,317,007 |