What does “jmp *” mean in 6502 assembly?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Right now I am learning 6502 assembly. Currently I am using the MADS assembler to program for the Atari 800. This program is just a small tutorial program that came with the assembler zip file I downloaded. The only piece of this program I did't understand is the jmp * operation, what does the '*' mean? Full program:



sm_ptr = $58
ch = $2f4
chr = $2400
rom_chr = $e000
org $2000
.proc main
mva #>chr ch
ldx #0
copy_loop
mva rom_chr,x chr,x
mva rom_chr+$100,x chr+$100,x
mva rom_chr+$200,x chr+$200,x
mva rom_chr+$300,x chr+$300,x
inx
bne copy_loop
ldx #0
space_loop
mva charset.space,x chr,x
inx
cpx #8
bne space_loop
ldy #0
loop
tya
sta (sm_ptr),y
iny
bne loop
jmp *
.local charset
space
.byte %01000100
.byte %00101000
.byte %01111100
.byte %01010100
.byte %11111110
.byte %10101010
.byte %10111010
.byte %00000000
.endl
.endp
run main









share|improve this question









New contributor




user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    1
    down vote

    favorite












    Right now I am learning 6502 assembly. Currently I am using the MADS assembler to program for the Atari 800. This program is just a small tutorial program that came with the assembler zip file I downloaded. The only piece of this program I did't understand is the jmp * operation, what does the '*' mean? Full program:



    sm_ptr = $58
    ch = $2f4
    chr = $2400
    rom_chr = $e000
    org $2000
    .proc main
    mva #>chr ch
    ldx #0
    copy_loop
    mva rom_chr,x chr,x
    mva rom_chr+$100,x chr+$100,x
    mva rom_chr+$200,x chr+$200,x
    mva rom_chr+$300,x chr+$300,x
    inx
    bne copy_loop
    ldx #0
    space_loop
    mva charset.space,x chr,x
    inx
    cpx #8
    bne space_loop
    ldy #0
    loop
    tya
    sta (sm_ptr),y
    iny
    bne loop
    jmp *
    .local charset
    space
    .byte %01000100
    .byte %00101000
    .byte %01111100
    .byte %01010100
    .byte %11111110
    .byte %10101010
    .byte %10111010
    .byte %00000000
    .endl
    .endp
    run main









    share|improve this question









    New contributor




    user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Right now I am learning 6502 assembly. Currently I am using the MADS assembler to program for the Atari 800. This program is just a small tutorial program that came with the assembler zip file I downloaded. The only piece of this program I did't understand is the jmp * operation, what does the '*' mean? Full program:



      sm_ptr = $58
      ch = $2f4
      chr = $2400
      rom_chr = $e000
      org $2000
      .proc main
      mva #>chr ch
      ldx #0
      copy_loop
      mva rom_chr,x chr,x
      mva rom_chr+$100,x chr+$100,x
      mva rom_chr+$200,x chr+$200,x
      mva rom_chr+$300,x chr+$300,x
      inx
      bne copy_loop
      ldx #0
      space_loop
      mva charset.space,x chr,x
      inx
      cpx #8
      bne space_loop
      ldy #0
      loop
      tya
      sta (sm_ptr),y
      iny
      bne loop
      jmp *
      .local charset
      space
      .byte %01000100
      .byte %00101000
      .byte %01111100
      .byte %01010100
      .byte %11111110
      .byte %10101010
      .byte %10111010
      .byte %00000000
      .endl
      .endp
      run main









      share|improve this question









      New contributor




      user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      Right now I am learning 6502 assembly. Currently I am using the MADS assembler to program for the Atari 800. This program is just a small tutorial program that came with the assembler zip file I downloaded. The only piece of this program I did't understand is the jmp * operation, what does the '*' mean? Full program:



      sm_ptr = $58
      ch = $2f4
      chr = $2400
      rom_chr = $e000
      org $2000
      .proc main
      mva #>chr ch
      ldx #0
      copy_loop
      mva rom_chr,x chr,x
      mva rom_chr+$100,x chr+$100,x
      mva rom_chr+$200,x chr+$200,x
      mva rom_chr+$300,x chr+$300,x
      inx
      bne copy_loop
      ldx #0
      space_loop
      mva charset.space,x chr,x
      inx
      cpx #8
      bne space_loop
      ldy #0
      loop
      tya
      sta (sm_ptr),y
      iny
      bne loop
      jmp *
      .local charset
      space
      .byte %01000100
      .byte %00101000
      .byte %01111100
      .byte %01010100
      .byte %11111110
      .byte %10101010
      .byte %10111010
      .byte %00000000
      .endl
      .endp
      run main






      assembly 6502 atari-800






      share|improve this question









      New contributor




      user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 3 hours ago









      Brian Tompsett - 汤莱恩

      573212




      573212






      New contributor




      user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 hours ago









      user115898

      476




      476




      New contributor




      user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      user115898 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          MADS uses * in three ways (See MADS "Manual")



          • Using the current assembly address for calculation of an address, i.e. the one the actual statement is assembled to.

          • Multiplying in expressions.

          • Mark the beginning of a comment (until line end)

          In above listing it will be interpreted as the address the JMP instruction is assembled to, so it will form an infinite loop, effectively halting the machine until Reset.






          share|improve this answer





























            up vote
            3
            down vote













            I suspect the * means the current instruction/location, as it does in some other assemblers, like PDP-8.  Often it would be used in an expression like *-label in the data section to get something's size, or *+3 perhaps, in code.



            If that's the case for 6502 assembly, then jmp * means branch to self, or, infinite loop, which would be a form of halting the program.



            This makes some sense as it comes at the end of main, which presumably has nothing to return to for a bare metal program.



            Some assemblers (e.g. masm, Microsoft's x86 assembler) use $ for the same meaning.






            share|improve this answer




















            • It could, it doesn't seem to effect the main program. I'll test that hypothesis right now.
              – user115898
              4 hours ago











            • Thanks, it is correct that it is an infinite loop that just loops back the the same line.
              – user115898
              4 hours ago










            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "648"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );






            user115898 is a new contributor. Be nice, and check out our Code of Conduct.









             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f7998%2fwhat-does-jmp-mean-in-6502-assembly%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote



            accepted










            MADS uses * in three ways (See MADS "Manual")



            • Using the current assembly address for calculation of an address, i.e. the one the actual statement is assembled to.

            • Multiplying in expressions.

            • Mark the beginning of a comment (until line end)

            In above listing it will be interpreted as the address the JMP instruction is assembled to, so it will form an infinite loop, effectively halting the machine until Reset.






            share|improve this answer


























              up vote
              4
              down vote



              accepted










              MADS uses * in three ways (See MADS "Manual")



              • Using the current assembly address for calculation of an address, i.e. the one the actual statement is assembled to.

              • Multiplying in expressions.

              • Mark the beginning of a comment (until line end)

              In above listing it will be interpreted as the address the JMP instruction is assembled to, so it will form an infinite loop, effectively halting the machine until Reset.






              share|improve this answer
























                up vote
                4
                down vote



                accepted







                up vote
                4
                down vote



                accepted






                MADS uses * in three ways (See MADS "Manual")



                • Using the current assembly address for calculation of an address, i.e. the one the actual statement is assembled to.

                • Multiplying in expressions.

                • Mark the beginning of a comment (until line end)

                In above listing it will be interpreted as the address the JMP instruction is assembled to, so it will form an infinite loop, effectively halting the machine until Reset.






                share|improve this answer














                MADS uses * in three ways (See MADS "Manual")



                • Using the current assembly address for calculation of an address, i.e. the one the actual statement is assembled to.

                • Multiplying in expressions.

                • Mark the beginning of a comment (until line end)

                In above listing it will be interpreted as the address the JMP instruction is assembled to, so it will form an infinite loop, effectively halting the machine until Reset.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 3 hours ago









                Michael Kjörling

                1,3811825




                1,3811825










                answered 3 hours ago









                Raffzahn

                38.1k485153




                38.1k485153




















                    up vote
                    3
                    down vote













                    I suspect the * means the current instruction/location, as it does in some other assemblers, like PDP-8.  Often it would be used in an expression like *-label in the data section to get something's size, or *+3 perhaps, in code.



                    If that's the case for 6502 assembly, then jmp * means branch to self, or, infinite loop, which would be a form of halting the program.



                    This makes some sense as it comes at the end of main, which presumably has nothing to return to for a bare metal program.



                    Some assemblers (e.g. masm, Microsoft's x86 assembler) use $ for the same meaning.






                    share|improve this answer




















                    • It could, it doesn't seem to effect the main program. I'll test that hypothesis right now.
                      – user115898
                      4 hours ago











                    • Thanks, it is correct that it is an infinite loop that just loops back the the same line.
                      – user115898
                      4 hours ago














                    up vote
                    3
                    down vote













                    I suspect the * means the current instruction/location, as it does in some other assemblers, like PDP-8.  Often it would be used in an expression like *-label in the data section to get something's size, or *+3 perhaps, in code.



                    If that's the case for 6502 assembly, then jmp * means branch to self, or, infinite loop, which would be a form of halting the program.



                    This makes some sense as it comes at the end of main, which presumably has nothing to return to for a bare metal program.



                    Some assemblers (e.g. masm, Microsoft's x86 assembler) use $ for the same meaning.






                    share|improve this answer




















                    • It could, it doesn't seem to effect the main program. I'll test that hypothesis right now.
                      – user115898
                      4 hours ago











                    • Thanks, it is correct that it is an infinite loop that just loops back the the same line.
                      – user115898
                      4 hours ago












                    up vote
                    3
                    down vote










                    up vote
                    3
                    down vote









                    I suspect the * means the current instruction/location, as it does in some other assemblers, like PDP-8.  Often it would be used in an expression like *-label in the data section to get something's size, or *+3 perhaps, in code.



                    If that's the case for 6502 assembly, then jmp * means branch to self, or, infinite loop, which would be a form of halting the program.



                    This makes some sense as it comes at the end of main, which presumably has nothing to return to for a bare metal program.



                    Some assemblers (e.g. masm, Microsoft's x86 assembler) use $ for the same meaning.






                    share|improve this answer












                    I suspect the * means the current instruction/location, as it does in some other assemblers, like PDP-8.  Often it would be used in an expression like *-label in the data section to get something's size, or *+3 perhaps, in code.



                    If that's the case for 6502 assembly, then jmp * means branch to self, or, infinite loop, which would be a form of halting the program.



                    This makes some sense as it comes at the end of main, which presumably has nothing to return to for a bare metal program.



                    Some assemblers (e.g. masm, Microsoft's x86 assembler) use $ for the same meaning.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered 4 hours ago









                    Erik Eidt

                    882311




                    882311











                    • It could, it doesn't seem to effect the main program. I'll test that hypothesis right now.
                      – user115898
                      4 hours ago











                    • Thanks, it is correct that it is an infinite loop that just loops back the the same line.
                      – user115898
                      4 hours ago
















                    • It could, it doesn't seem to effect the main program. I'll test that hypothesis right now.
                      – user115898
                      4 hours ago











                    • Thanks, it is correct that it is an infinite loop that just loops back the the same line.
                      – user115898
                      4 hours ago















                    It could, it doesn't seem to effect the main program. I'll test that hypothesis right now.
                    – user115898
                    4 hours ago





                    It could, it doesn't seem to effect the main program. I'll test that hypothesis right now.
                    – user115898
                    4 hours ago













                    Thanks, it is correct that it is an infinite loop that just loops back the the same line.
                    – user115898
                    4 hours ago




                    Thanks, it is correct that it is an infinite loop that just loops back the the same line.
                    – user115898
                    4 hours ago










                    user115898 is a new contributor. Be nice, and check out our Code of Conduct.









                     

                    draft saved


                    draft discarded


















                    user115898 is a new contributor. Be nice, and check out our Code of Conduct.












                    user115898 is a new contributor. Be nice, and check out our Code of Conduct.











                    user115898 is a new contributor. Be nice, and check out our Code of Conduct.













                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f7998%2fwhat-does-jmp-mean-in-6502-assembly%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    Long meetings (6-7 hours a day): Being “babysat” by supervisor

                    Is the Concept of Multiple Fantasy Races Scientifically Flawed? [closed]

                    Confectionery