Conversation Between EricaHarper and Blah
1 to 15 of 36
  1. Blah
    April 14th, 2015 8:10 AM
    Blah
    It can be arbitrary too. It doesn't have to be a pointer to something, it can be a constant.
  2. EricaHarper
    April 14th, 2015 7:42 AM
    EricaHarper
    So basically, it takes data that exists and gives that data a name so that it can easily be defined in routine?
  3. Blah
    April 14th, 2015 7:18 AM
    Blah
    This is rather basic. It does an in-line substitution before compiling.
  4. EricaHarper
    April 14th, 2015 7:17 AM
    EricaHarper
    Ok, so that would tell the assembler that the symbol name is what's located at the value, or offset? I should slow down a bit. I'll study the basics again then come back to this.
  5. Blah
    April 14th, 2015 7:04 AM
    Blah
    SymbolName:
    .word 0xvalue

    Where value is obviously a number.
  6. EricaHarper
    April 14th, 2015 6:38 AM
    EricaHarper
    Oh, ok. Well, how does it go in the syntax? I'm trying really hard, here...
  7. Blah
    April 14th, 2015 4:14 AM
    Blah
    No, I was just explaining the concept of a symbol in ASM, rather than the syntax.
  8. EricaHarper
    April 13th, 2015 7:36 PM
    EricaHarper
    So I can go "pokemon_data = word *offset of data*"? Thatt's how it goes? I sort of understand, but it hasn't fully clicked yet...
  9. Blah
    April 13th, 2015 4:43 PM
    Blah
    Basically it works like this.
    From now on "XCSYR = the".

    Now XCSYR is used in place of XCSYR word XCSYR. I can use XCSYR to mean XCSYR all the same I could still use XCYSR word "the" and it will have XCSYR same meaning.
  10. EricaHarper
    April 13th, 2015 3:00 PM
    EricaHarper
    Ok. Then how do I set data to a value, like say, setting my pokemon data so that I can use pokemon_data, or my trainer data for player_data?
  11. Blah
    April 9th, 2015 4:41 AM
    Blah
    .player_data and player_data are likely just symbols at the bottom of the routine. They're like definitions again. You set player_data to a value (the value ends up being a pointer to the player data) and whenever you refer to player_data, you are referring to this pointer.

    Think of it like a substitution that happens.
  12. EricaHarper
    April 8th, 2015 2:47 PM
    EricaHarper
    Lol, yeah. It is. Wait, should I just jump to C+ or something? Learning this isn't useless is it?

    Edit: I was cycling through the notes I took and the lessons I read, and noticed this. When referring to the player data, I am supposed to use the instruction ".player_data", but shouldn't it be "player_data", like with "pokemon_data", or is "pokemon_data" merely missing the '.' preceding it?
  13. Blah
    April 8th, 2015 2:11 PM
    Blah
    Oh, it has nothing to do with ASM. I didn't know ASM was your first programming language, ignore that then :D
  14. EricaHarper
    April 8th, 2015 12:37 PM
    EricaHarper
    Oh, ok. So it's something I might not see myself using unless the routine specifically calls for it. What is "int x" mean? I'm still only level 1. Once I make my first routine without help, I'll level up! :]
  15. Blah
    April 8th, 2015 12:27 PM
    Blah
    .word isn't a command, it's more like a definition. The word's value changes depending on what you want. The whole thing can be avoided using "ldr rX, =(0xOffset/value)".

    Think of something like, "int x = 15". It's like that.