Jump to content
IGNORED

Division in assembly


Recommended Posts

So I have a variable named MusicPtr's value stored in y.

What I want to do is divide that value by 8 and then call it in y again.


        ldy MusicPtr
        lda Notes,y          
        sta AUDF0

        

        ; what do I do here?
        lda BassNotes,y
        sta AUDF1       

Am I making myself clear? How do I divide numbers in assembly?

Link to comment
Share on other sites

The following doesn't work correctly. Channel 1 just mimics the note changing time of Channel 0.


        ldy MusicPtr
        lda Notes,y          
        sta AUDF0

 

        ldy MusicPtr
        lsr
        lsr
        lsr
        sty MusicPtr2
        lda BassNotes,y
        sta AUDF1   

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...