Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » NF Assembler
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
NF Assembler [message #421751] Wed, 08 May 2024 20:40 Go to next message
Anonymous
Karma:
Originally posted by: Duhast

In the Ninjaforce assembler when you do a:

LDA #"A"

It assembles without the high bit set. Doesn't play nice with COUT and
KYBD reading. Is there a way to force it to a high bit or am I stuck
converting everything to hex? Didn't see anything in the docs....
Re: NF Assembler [message #421752 is a reply to message #421751] Thu, 09 May 2024 01:01 Go to previous messageGo to next message
Michael J. Mahon is currently offline  Michael J. Mahon
Messages: 1772
Registered: October 2012
Karma: 0
Senior Member
Duhast <duhast@123gmail.com> wrote:
> In the Ninjaforce assembler when you do a:
>
> LDA #"A"
>
> It assembles without the high bit set. Doesn't play nice with COUT and
> KYBD reading. Is there a way to force it to a high bit or am I stuck
> converting everything to hex? Didn't see anything in the docs....
>

I’m willing to bet that there’s a convention to select hi-ASCII. But
regardless, you can always just add 128 to the literal, perhaps with a name
like “hi”:

LDA #”A”+hi

It would be harder for a longer string, hence the need for a convention.

--
-michael - NadaNet 3.1 and AppleCrate II: http://michaeljmahon.com
Re: NF Assembler [message #421753 is a reply to message #421751] Thu, 09 May 2024 09:07 Go to previous messageGo to next message
Jeff Blakeney is currently offline  Jeff Blakeney
Messages: 127
Registered: September 2013
Karma: 0
Senior Member
On 2024-05-08 8:40 p.m., Duhast wrote:
> In the Ninjaforce assembler when you do a:
>
> LDA #"A"
>
> It assembles without the high bit set.  Doesn't play nice with COUT and
> KYBD reading.  Is there a way to force it to a high bit or am I stuck
> converting everything to hex?  Didn't see anything in the docs....

I'm not sure about the NinjaForce assembler but some assemblers used
double quotes or single quotes to differentiate between ASCII with the
high bit set or not. I don't know if this was a common convention or
which quote character set the high bit.
Re: NF Assembler [message #421755 is a reply to message #421751] Thu, 09 May 2024 17:14 Go to previous messageGo to next message
mmphosis is currently offline  mmphosis
Messages: 166
Registered: November 2012
Karma: 0
Senior Member
Duhast wrote:
> In the Ninjaforce assembler when you do a:
>
> LDA #"A"
>
> It assembles without the high bit set. Doesn't play nice with COUT and
> KYBD reading. Is there a way to force it to a high bit or am I stuck
> converting everything to hex? Didn't see anything in the docs....
>

Maybe:

MSB ON

MSB Operand is either ON or OFF. - Takes effect on ASC and STR
commands.

http://www.ninjaforce.com/html/products_nf_assembler_documen tation.html

-----
My own cross assembler has this option but I haven't ported it to the Apple
IIGS:

# asm --help|grep '\-8' -
-8 Set 8th bit of ASCII characters

# echo 'LDA #"A" '|asm -8|mondump -r|6502
A=AA X=00 Y=00 S=00 P=22 PC=0300 0
0300- A9 C1 LDA #$C1 A=C1 X=00 Y=00 S=00 P=A0 PC=0302 2
0302- 00 BRK A=C1 X=00 Y=00 S=FD P=A0 PC=0000 9
0000! end
Re: NF Assembler [message #421756 is a reply to message #421755] Fri, 10 May 2024 04:47 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Jan Poulsen

On 09/05/2024 23.14, mmphosis wrote:
> Duhast wrote:
>> In the Ninjaforce assembler when you do a:
>>
>> LDA #"A"
>>
>> It assembles without the high bit set. Doesn't play nice with COUT and
>> KYBD reading. Is there a way to force it to a high bit or am I stuck
>> converting everything to hex? Didn't see anything in the docs....
>>
>
> Maybe:
>
> MSB ON
>
> MSB Operand is either ON or OFF. - Takes effect on ASC and STR
> commands.
>
> http://www.ninjaforce.com/html/products_nf_assembler_documen tation.html
>
> -----
> My own cross assembler has this option but I haven't ported it to the Apple
> IIGS:
>
> # asm --help|grep '\-8' -
> -8 Set 8th bit of ASCII characters
>
> # echo 'LDA #"A" '|asm -8|mondump -r|6502
> A=AA X=00 Y=00 S=00 P=22 PC=0300 0
> 0300- A9 C1 LDA #$C1 A=C1 X=00 Y=00 S=00 P=A0 PC=0302 2
> 0302- 00 BRK A=C1 X=00 Y=00 S=FD P=A0 PC=0000 9
> 0000! end
>
>
I don't know if this is relevant to your issue, but SC Assembler on the
Apple treats single and double quotes differently. Maybe your assembler
does too.

0800- A9 41 1000 LDA #'A'
0802- A9 C1 1010 LDA #"A"

--
--
Jan Poulsen
Re: NF Assembler [message #421757 is a reply to message #421756] Fri, 10 May 2024 10:36 Go to previous messageGo to next message
Anonymous
Karma:
Originally posted by: Duhast

On 5/10/2024 4:47 AM, Jan Poulsen wrote:
> On 09/05/2024 23.14, mmphosis wrote:
>> Duhast wrote:
>>> In the Ninjaforce assembler when you do a:
>>>
>>> LDA #"A"
>>>
>>> It assembles without the high bit set.  Doesn't play nice with COUT and
>>> KYBD reading.  Is there a way to force it to a high bit or am I stuck
>>> converting everything to hex?  Didn't see anything in the docs....
>>>
>>
>> Maybe:
>>
>> MSB ON
>>
>> MSB      Operand is either ON or OFF. - Takes effect on ASC and STR
>> commands.
>>
>> http://www.ninjaforce.com/html/products_nf_assembler_documen tation.html
>>
>> -----

> I don't know if this is relevant to your issue, but SC Assembler on the
> Apple treats single and double quotes differently.  Maybe your assembler
> does too.
>
> 0800- A9 41    1000        LDA #'A'
> 0802- A9 C1    1010        LDA #"A"
>

MSB ON doesn't seem to have an effect with LDA #"A", looks like I'm
going to have to do a +128 on every one.
Re: NF Assembler [message #421758 is a reply to message #421757] Sat, 11 May 2024 11:26 Go to previous message
Andy McFadden is currently offline  Andy McFadden
Messages: 13
Registered: February 2005
Karma: 0
Junior Member
On 5/10/2024 7:36 AM, Duhast wrote:
> MSB ON doesn't seem to have an effect with LDA #"A", looks like I'm
> going to have to do a +128 on every one.

The documentation says it only affects ASC and STR. It also uses the
"+128" notation in its examples... if you scroll down to "example of a
macro call"), it shows two different ways of setting the high bit on a
character constant before calling $FDED.

FWIW, I've used "|$80" elsewhere, which feels a bit closer to the intent
("set the high bit"). The docs don't mention bitwise OR operations though.

Assemblers that trace their origins back to the Apple II usually have
better support for low/high ASCII, because of the way DOS 3.3 and the
text screen worked. Similarly, assemblers written by people who grew up
with a C64 will have better support for alternate character sets
(PETSCII, screen codes). I'm a little surprised that NF didn't adopt
the single/double quote approach, given how much else is similar to Merlin.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Why 80x24 terminal size?
Next Topic: AppleWorks InitPack 2024 Release
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Nov 21 08:26:28 EST 2024

Total time taken to generate the page: 0.01708 seconds