6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Fri May 10, 2024 8:09 am

All times are UTC




Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: BIT Instruction
PostPosted: Sat Jan 22, 2022 9:23 pm 
Offline

Joined: Sun Apr 26, 2020 3:08 am
Posts: 357
I never know how to portray the *+1 when displaying here as some assemblers use *+1 and some use *+3. I don't know what the common understanding is. I guess I should have used a label instead. BTW, I do short tests like this in the mini-assembler and have to type it in to the forums.

But I missed a line anyways.
It should have been

Code:
lda #0
   sta $6

   lda #$FF
   bit $6
   beq label
   rts

label
   brk
   brk


In my tests this routine falls through an doesn't crash. If it is a bug in my emulator, that has been the reason I have avoided programming that way. But I just tested again and it and DOH! it works.


Top
 Profile  
Reply with quote  
 Post subject: Re: BIT Instruction
PostPosted: Sun Jan 23, 2022 12:06 am 
Offline

Joined: Wed Aug 21, 2019 6:10 pm
Posts: 217
IamRob wrote:
I never know how to portray the *+1 when displaying here as some assemblers use *+1 and some use *+3. I don't know what the common understanding is. ...


Since I used an C64 assembler back in the day that used the "+" for transient labels, and now use ACME, I never got into using "*" based relative branch addressing ...
... and, yes, why I noted that it might be assembler dependent. Testing, I see that ACME takes it as set at the beginning of the line of assembly, presumably until that line of assembly is completed, so it would be *+3 for ACME to get a branch operand of $01 (given that 6502 branch operands are relative to the start of the following opcode).

But when I first used it, it was the MOS6510 that decided for me how an opcode works, and AFAIR, setting the zero flag the same as an AND would have done is how BIT has always worked.


Top
 Profile  
Reply with quote  
 Post subject: Re: BIT Instruction
PostPosted: Wed May 25, 2022 8:26 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
GARTHWILSON wrote:

I cannot pass up the opportunity to recommend the excellent programming manual, "Programming the 65816 including the 6502, 65C02, and 65802" by David Eyes and Ron Lichty. This is a .pdf file of a rather large book that is well laid out and is much better than the description there lets on. Note: There were many problems with the earlier .pdf version that were not in the original paper manual; but in late March 2015, WDC scanned and OCR'ed the paper manual and posted the new, repaired .pdf. Chapter 18 gives at least a page for every instruction, telling exactly what it does, and covering all the addressing modes, cycle counts, etc..


What do you think of the Kindle Unlimited version of the programming manual, Garth? J


Top
 Profile  
Reply with quote  
 Post subject: Re: BIT Instruction
PostPosted: Wed May 25, 2022 9:09 pm 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
Jmstein7 wrote:
What do you think of the Kindle Unlimited version of the programming manual, Garth? J

I don't know. Is there a date on it? (I don't do Kindle, only PC.)

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: BIT Instruction
PostPosted: Wed May 25, 2022 9:20 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
GARTHWILSON wrote:
Jmstein7 wrote:
What do you think of the Kindle Unlimited version of the programming manual, Garth? J

I don't know. Is there a date on it? (I don't do Kindle, only PC.)

It looks like its the 2015 soft-cover version.


Top
 Profile  
Reply with quote  
 Post subject: Re: BIT Instruction
PostPosted: Wed May 25, 2022 9:56 pm 
Online
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8433
Location: Southern California
Jmstein7 wrote:
[It looks like its the 2015 soft-cover version.

In late March 2015, WDC scanned and OCR'ed the paper manual and posted the new, repaired .pdf. The .pdf that was distributed before that had problems. I bought my paper version in the 1990's, and it came in a ring binder. I was never aware of a soft-cover version.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
 Post subject: Re: BIT Instruction
PostPosted: Thu May 26, 2022 3:33 pm 
Offline

Joined: Sun May 30, 2021 2:16 am
Posts: 374
GARTHWILSON wrote:
In late March 2015, WDC scanned and OCR'ed the paper manual and posted the new, repaired .pdf. The .pdf that was distributed before that had problems. I bought my paper version in the 1990's, and it came in a ring binder. I was never aware of a soft-cover version.

Yeah, it looks like it was released along with (at the same time as) the single-board dev boards (SBX, QBX, etc.).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 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: