Exact match. Not showing close matches.
PICList
Thread
'[SX] memory questions'
2005\11\01@075114
by
dog8spamn/a
|
|
If I set org $0A and then set a list of variables with "variable ds 1" once the ds 1 reaches $10 will that variable be in bank 0 or bank 1?
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=94182
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)
2005\11\02@054133 by dog8spamn/a
|
|
Anybody?
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=94182#m94374
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)
2005\11\02@071551 by Coriolisn/a
|
|
How about compiling an example then looking at the generated asm file and list file? The answer may be dependent on whether you are using a SX28 and SX52 since the addressing mode in SX52 is handled differently and bank 0 is a special case.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=94182#m94382
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)
2005\11\02@072355 by dog8spamn/a
|
|
I'll try that. I am using an SX 52 though.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=94182#m94385
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)
|
|
Letting the variables "overflow" into the next bank can cause you a lot of sleepless nights. Here is an example:
org $8
aaa ds 1
bbb ds 1
ccc ds 1
ddd ds 1
eee ds 1
fff ds 1
ggg ds 1
hhh ds 1
iii ds 1
org $10
jjj ds 1
SASM does not generate an error because in general, it is absolutely legal referring to one value by more than one symbol. The disaster will come up when you indeed assume that iii and jjj are two different variables occupying different RAM locations. As this is not the case, modifying the contents of variable iii also changes the contents of variable jjj, and vice-versa, which is not what you might expect. Therefore, it's a good idea to check the list file for such possible pitfalls.
BTW, the same is true for code-generation across page boundaries.
org $2f3
ClearVars
clr !wdt
sb fsr.4
setb fsr.3
clr ind
incsz fsr
jmp ClearVars
bank PWM
mov PWM_Prescaler, #PWMPeriod
mov !option, #INT_ON
:MainLoop
bank Analog
mov w, Analog_ADCresult
mov rb, w
bank PWM
mov PWM_DutyCycle, w
jmp :MainLoop
Here is a "trick" to let the assembler generate an error on such situations: Place nop instructions at the very first location of each page, as long as you don't need that page for "real" code. When you follow the lines of this sample code with
org $300
nop
SASM will generate an "Overwriting same program counter location" error in this case.
---------- End of Message ----------
You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=94182#m94408
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2005 (http://www.dotNetBB.com)
More... (looser matching)
- Last day of these posts
- In 2005
, 2006 only
- Today
- New search...