Assembler question
Hi all,
I've a question about the load variable:
I use viewport for read into the variable
When I'd write in temp1 with 100 , work! (screen "a" and "a1" file in a1 see variable "v2")
but when I load temp1 with variable "Delay" not work!!!(screen "b" and "b1" file see variable "v2")
Send screen
I've a question about the load variable:
I use viewport for read into the variable
When I'd write in temp1 with 100 , work! (screen "a" and "a1" file in a1 see variable "v2")
mov temp1,#100
but when I load temp1 with variable "Delay" not work!!!(screen "b" and "b1" file see variable "v2")
mov temp1,Delay
Delay long 100
Send screen





Comments
and another question , If I would load variabile with 1000 I have a error! but the register is 32bit?!
Another question
I would developement delay but without use waitcnt
My simple code:
'---------delay mov temp,cnt add temp,Delay mylop cmp temp,cnt IF_B jmp mylop ' if temp is below cnt counter '........... Delay long 4_000_000 temp res 1Is it correct?
mov startTime,cnt ' Save starting time delayLoop mov temp,cnt sub temp,startTime ' Compute difference between now and starting time cmp temp,Delay wc ' Is difference less than desired delay if_b jmp #delayLoop ' If so, continue to waitThe reason for comparing to the time difference is that it avoids problems when the time wraps around (in the 32 bit register).