Skip to content

Print characters 'c with high bit set as 'c|$80; bump version#8

Open
0cjs wants to merge 1 commit intoArakula:masterfrom
0cjs:master
Open

Print characters 'c with high bit set as 'c|$80; bump version#8
0cjs wants to merge 1 commit intoArakula:masterfrom
0cjs:master

Conversation

@0cjs
Copy link
Contributor

@0cjs 0cjs commented Jul 27, 2019

This is very useful for programs that set the high bit of characters
to indicate end of string or for some other reason. Sample output:

FCB     'E,'N,'D|$80             ;015C: 45 4E C4       'EN.'

This applies only to memory locations explicitly marked as char
(in the info file). If you're doing a disassembly later to be
assembled by an assembler that doesn't support this "logical or"
syntax you can either not mark those bytes as char or, if you've
marked a large range like char 015C-0233, add additional directives
after that to mark individual bytes as non-char, e.g., hex 015E to
would produce $C4 instead of 'D|$80 in the output above.

This syntax is supported by AS and A09, but does not appear to be
supported by TSC.


This is related to issue #7, which includes an old (and somewhat incorrect) version of this patch. While there were some thoughts there about how to expand this feature, at the moment there seems to be no particular demand for anything beyond what this does now.

@btb
Copy link

btb commented Sep 27, 2024

I'd like to see this added as well. The project I'm working on now uses the high bit to show characters inverted, and I believe uses like this are fairly common. Should there be an option to enable/disable this, or is there something else in the way of merging it?

This is very useful for programs that set the high bit of characters
to indicate end of string or for some other reason. Sample output:

    FCB     'E,'N,'D|$80             ;015C: 45 4E C4       'EN.'

This applies only to memory locations explicitly marked as `char`
(in the info file). If you're doing a disassembly later to be
assembled by an assembler that doesn't support this "logical or"
syntax you can either not mark those bytes as `char` or, if you've
marked a large range like `char 015C-0233`, add additional directives
after that to mark individual bytes as non-char, e.g., `hex 015E` to
would produce `$C4` instead of `'D|$80` in the output above.

This syntax is supported by AS and A09, but does not appear to be
supported by TSC.
@0cjs
Copy link
Contributor Author

0cjs commented Sep 28, 2024

I'd totally forgotten that I submitted this five years ago. Yes, it would be nice to get it merged, and I'm happy to add an option if that's really necessary (though I don't feel the need for it myself).

@0cjs
Copy link
Contributor Author

0cjs commented Oct 10, 2024

Just checking back in to see if there's anything here I need to change to make it more suitable for merging.

@0cjs
Copy link
Contributor Author

0cjs commented Jan 28, 2025

Checking back again...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants