6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri Nov 15, 2024 8:28 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Jun 02, 2022 3:05 am 
Offline

Joined: Sun Oct 03, 2021 2:17 am
Posts: 114
The ca65 documentation doesn't say much about the .Inn and .Ann (pseudo?) instructions, how do I use them?

https://cc65.github.io/doc/ca65.html#ss11.102


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 02, 2022 4:18 am 
Offline

Joined: Sat Feb 19, 2022 10:14 pm
Posts: 147
These directives tell the assembler whether the registers are in 8-bit or 16-bit mode, nothing more. That will determine how the assembler interprets your code, generating 8-bit or 16-bit operands according to the last directive. Once changed, that directive is in effect further down in the source file until it is changed again.

When smart mode is active, the assembler will track SEP/REP instructions to try to determine the mode but this is problematic if your code doesn't have a top to bottom flow.

It's usually recommended to include these commands in macros. See this post by BDD for example.


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 02, 2022 5:00 am 
Offline

Joined: Sun Oct 03, 2021 2:17 am
Posts: 114
Oh, 8 and 16 are supposed to be substituted in where the n's are. I see, thanks.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: