Arakula / dasmfw

The DisASseMbler FrameWork
GNU General Public License v2.0
13 stars 4 forks source link

Switch for nmemonic upper/lower case? #4

Closed phillipeaton closed 2 years ago

phillipeaton commented 2 years ago

In the dasmfw.htm manual, all the example mnemonics are shown in lower case.

In my dasmfw output, all the mnemonics are upper case.

I can't find a switch to make the output lower case, is it hardcoded to upper case?

Arakula commented 2 years ago

I'm going to look into that today. At a first glance, it looks like you're right. If so, I'd add it, that's no big deal ... but help me think, please:

I'm not sure whether this is something that each supported assembler can handle. If that would be the case, a general option would make more sense; if not, a processor-specific (and then potentially even assembler-specific) option would be the better way.

What do you think?

phillipeaton commented 2 years ago

Well, I guess older assemblers would always work with upper case. The Kingswood assemblers that I happened to use (popular with Vectrex 6809 users) are relatively new and they expect lower case. They have a switch for case insensitive mnemonics, but it doesn't work, it's a known bug.

You could add switches for all the assemblers, but that could be a lot of switches, though I guess 80% of usage is covered by 20% of assemblers.

I'd probably start with a switch to make mnemonics all lower case, default to upper case. Or maybe vice versa...I don't know what's more prevalent these days, maybe more people are using lower case where possible :-)

Arakula commented 2 years ago

OK, new version uploaded, including a Windows executable. See https://github.com/Arakula/dasmfw/releases/tag/v0.24

This one includes a new option: upmnemo [on|off|default] See dasmfw.htm for (some sparse additional) details.

phillipeaton commented 2 years ago

Unfortunately, whilst the update you made for lower case was as suggested, it didn't fix my problem, the as65 assembler also requries the register names to be lower case.

From the manual:

AS65 is case sensitive, not only does it differentiate between the
   labels XYZ and xyz, but it also requires all (pseudo) instruction and
   register names to be lower case.

I convince it to assemble by selecting all text in my text editor and changing it to lower case, but this obviously messes up any strings.