Shop OBEX P1 Docs P2 Docs Learn Events
incrementing memory blocks in assembly — Parallax Forums

incrementing memory blocks in assembly

phil11phil11 Posts: 3
edited 2009-01-28 15:50 in Propeller 1
Is there a way to increment memory in a way similar to incrementing indexes in spin in assembly? I want to iterate a compared memory byte and iterate at every flag loop wile using as less spin as possible, since I want to maximize the output frequency.

thanks!

Comments

  • KyeKye Posts: 2,200
    edited 2009-01-27 20:14
    Um, I'm not sure what you mean...please be more specific.

    Because what you are describing is:

    add x, #1....
    cmp x #number wz

    if_z ...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • phil11phil11 Posts: 3
    edited 2009-01-28 00:37
    The subroutine I was refering to is in the attachement, the line with the asterixes is the problem one. I want to iterate the memory blocks IMAGE[noparse][[/noparse]1..5]. Sorry for the confusion.· thanks again!
  • KyeKye Posts: 2,200
    edited 2009-01-28 15:50
    Well, I'm still not sure what the asm is sopposed to do but I think your trying to acess memory as if it were in an array.

    If so, simply put a label on the command you want to modify and add #1 to that label.

    Remeber that you can use self modifying code. Be warned however that an instruction must be placed between the modifying code and the modified code.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
Sign In or Register to comment.