NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: nobody on March 16, 2008, 01:55:45 AM

Title: Variabel
Post by: nobody on March 16, 2008, 01:55:45 AM
How work variables? Inn php are the simpel($variabel = "lol";), but how inn nasm?
Title: Re: Variabel
Post by: nobody on March 16, 2008, 03:37:21 AM
variabel db "lol"

Best,
Frank
Title: Re: Variabel
Post by: nobody on March 16, 2008, 11:58:50 AM
But how to get it then? Youst type Variabel db then?
Title: Re: Variabel
Post by: nobody on March 17, 2008, 07:26:31 AM
NO.

Code: [Select]
           jmp  @f

variabell:  db "lol"
mariawell:  db 0,0,0,0

@@:         mov  ax,"bu"
            mov  [variabell],ax   ; GOOD
            mov  al,"g"
            mov  [variabell+2],al ; GOOD
            mov  eax,"bugs"
;           mov  [variabell],eax  ; !!! BUGGED !!! :-(
            mov  [mariawell],eax  ; GOOD

jmp  far 0:0          ; PM only