Searching \ for '[SX] Losing Variables between SX/B and inline asse' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/languages.htm?key=sx
Search entire site for: 'Losing Variables between SX/B and inline asse'.

Exact match. Not showing close matches.
PICList Thread
'[SX] Losing Variables between SX/B and inline asse'
2006\11\01@095946 by afabiann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, afabian wrote:

Hello all,
I'd like to start out by saying that I've having a ton of fun learning to program the SX.  After years of programming, this makes me feel like I'm back to freshman year in college all over again.  So much to learn about low-level programming!

I've found something I'm stuck on though.   The original goal was to get Jon William's MIDI Control application running.  During the course of debugging my project, I found that the ISR is receiving valid bytes of data, but that the main program was blocking forever waiting for GetByte to return.  As I started outputting the value of the various rx* variables at different points in the program, it appears to me that the variables are being lost between the assembly ISR and the BASIC code around it.

In the attached file, there are three lines that i've inserted for testing, with comments like "INSTANCE 1: This works".  All three are basically "MOV CtrlLo, rxHead" (to light up LEDs indicating the value of rxHead), but only the first instance works.  The others show that rxHead = 0 always.

Can anyone help me out?  Thanks!

Andrew Fabian
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=152738
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\11\01@143528 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

Andrew,
 After the assembly code changes FSR with "MOV FSR,#rxBuf" any variables in location > $0F, until FSR is reset with "BANK $00"
 In the code you posted rxHead and rxByte both must be in location <= $0F. Try declaring them first.

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=152738#m152805
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

2006\11\01@144611 by afabiann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, afabian wrote:

Bean,
That worked perfectly, and makes a ton of sense.  Thanks a lot!

Andrew
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=152738#m152812
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2006 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2006 , 2007 only
- Today
- New search...