is it just me or nasm?
Posted: Tue Dec 24, 2002 11:32 am
When I declare a varriable a value at compile time, at run time, that varriable contains the value 0. When i set a varriable a vaule at runtime, it keeps its value. heres the code:
can any one help trying to fix this?
it beeps twice! it should only beep once! when i compile, var's value turns to 0 or var's address isn't what its sapose to be.cmp [var], 61h
je debug
cmp [var], 0
je debug2
debug:
mov ax, 0E07h
int 10h ;beep once
jmp $
debug2:
mov cx, 2
mov ax, 0E07h
.test:
int 10h ;beep twice
loop .test
var db 61h
it beeps once. which is what it should do.....mov [var], 61h
cmp [var], 61h
je debug
cmp [var], 0
je debug2
debug:
mov ax, 0E07h
int 10h ;beep once
jmp $
debug2:
mov cx, 2
mov ax, 0E07h
.test:
int 10h ;beep twice
loop .test
var db 61h
can any one help trying to fix this?