Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Assembly environment

I know this is a very trivial question, but I've been unable to find an answer. What should I use for the memory and processor settings of an assembly file? I'm using nasm on Windows XP, and am planning on using assembly to create a few procedures.

Comments

  • BitByBit_ThorBitByBit_Thor Member Posts: 2,444
    : I know this is a very trivial question, but I've been unable to find
    : an answer. What should I use for the memory and processor settings
    : of an assembly file? I'm using nasm on Windows XP, and am planning
    : on using assembly to create a few procedures.
    :

    Normally, there is no need to set any processor setting. NASM only works for the x86 line of processors. Unless you're planning on going 'way back' and use very old processors the normal instruction set is available to you (I doubt NASM supports more recent technologies such as SIMD etc)
    And what do you mean with the memory settings?

    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
  • cactus1cactus1 Member Posts: 41
    : : I know this is a very trivial question, but I've been unable to find
    : : an answer. What should I use for the memory and processor settings
    : : of an assembly file? I'm using nasm on Windows XP, and am planning
    : : on using assembly to create a few procedures.
    : :
    :
    : Normally, there is no need to set any processor setting. NASM only
    : works for the x86 line of processors. Unless you're planning on
    : going 'way back' and use very old processors the normal instruction
    : set is available to you (I doubt NASM supports more recent
    : technologies such as SIMD etc)
    : And what do you mean with the memory settings?
    :
    : Best Regards,
    : Richard
    :
    : The way I see it... Well, it's all pretty blurry
    Memory model.

  • BitByBit_ThorBitByBit_Thor Member Posts: 2,444
    : Memory model.
    :
    :

    Ah like that. Well, if you just use SECTIONs and don't touch the segments then you shouldn't worry about a thing with neither processor nor the current memory model in use by the OS.


    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
  • cactus1cactus1 Member Posts: 41
    : : Memory model.
    : :
    : :
    :
    : Ah like that. Well, if you just use SECTIONs and don't touch the
    : segments then you shouldn't worry about a thing with neither
    : processor nor the current memory model in use by the OS.
    :
    :
    : Best Regards,
    : Richard
    :
    : The way I see it... Well, it's all pretty blurry
    Thanks. So the code would basically be like the sample below?
    [code]
    SECTION whatevername

    GLOBAL _procedure1:
    _procedure1:
    ;code here
    ret
    procedure2:
    ;some other code
    ret
    [/code]
  • BitByBit_ThorBitByBit_Thor Member Posts: 2,444
    : Thanks. So the code would basically be like the sample below?
    : [code]:
    : SECTION whatevername
    :
    : GLOBAL _procedure1:
    : _procedure1:
    : ;code here
    : ret
    : procedure2:
    : ;some other code
    : ret
    : [/code]:
    :

    Pretty much :)

    For section, you need to follow compiler/linker standards. There is always a text (code) section, a (initialized) data section and an unitialized data section, often named .text, .data and .bss
    However, depending on what compiler and linker you use, it might be without the . or some other name

    Best Regards,
    Richard

    The way I see it... Well, it's all pretty blurry
  • cactus1cactus1 Member Posts: 41
    : : Thanks. So the code would basically be like the sample below?
    : : [code]: :
    : : SECTION whatevername
    : :
    : : GLOBAL _procedure1:
    : : _procedure1:
    : : ;code here
    : : ret
    : : procedure2:
    : : ;some other code
    : : ret
    : : [/code]: :
    : :
    :
    : Pretty much :)
    :
    : For section, you need to follow compiler/linker standards. There is
    : always a text (code) section, a (initialized) data section and an
    : unitialized data section, often named .text, .data and .bss
    : However, depending on what compiler and linker you use, it might be
    : without the . or some other name
    :
    : Best Regards,
    : Richard
    :
    : The way I see it... Well, it's all pretty blurry
    Thanks.
Sign In or Register to comment.