PASM to SASM diffuculties.
Fredo
Posts: 10
I continue to experience problems getting a perfectly well behaved PASM program to operate correctly under SASM.
The "Eric_1" code here is a re-arrangement of the original PASM code. Items have been moved and renamed to accomodate SASM. It is heavily cannibalized and many sections are "commented out' the result of trouble shooting. I expect what is left to clear RA,RB & RC (without defining them), set RB.3 low & latch-up in the loop 'Teste'. An LED connected between +5V and RB3 is the indicator.
There is also a rather long data table imported as RETW's with an 'INCLUDE' statement. A review of the assembled code shows ths to be as expected.
I test this by compiling, then driving it with the sxKey clock. I pull down the clock and repeatedly click on 'reset'. I expect the light to light each time.
The results are:
If the 'INCLUDE' statement is commented out, the light lights... every time.
If the 'INCLUDE' statement is included, the light lights sometimes. Sometimes not. Sometimes it flickers randomly and goes out. Sometimes it flickers randomly and stays on.
I am doing something fundamental incorrectly and I hope some one of you out there can point this out to me. Thanks,
Fred Ornellas
goes out. ... every time.
The "Eric_1" code here is a re-arrangement of the original PASM code. Items have been moved and renamed to accomodate SASM. It is heavily cannibalized and many sections are "commented out' the result of trouble shooting. I expect what is left to clear RA,RB & RC (without defining them), set RB.3 low & latch-up in the loop 'Teste'. An LED connected between +5V and RB3 is the indicator.
There is also a rather long data table imported as RETW's with an 'INCLUDE' statement. A review of the assembled code shows ths to be as expected.
I test this by compiling, then driving it with the sxKey clock. I pull down the clock and repeatedly click on 'reset'. I expect the light to light each time.
The results are:
If the 'INCLUDE' statement is commented out, the light lights... every time.
If the 'INCLUDE' statement is included, the light lights sometimes. Sometimes not. Sometimes it flickers randomly and goes out. Sometimes it flickers randomly and stays on.
I am doing something fundamental incorrectly and I hope some one of you out there can point this out to me. Thanks,
Fred Ornellas
goes out. ... every time.
Comments
I looked at your code. Sorry I couldn't make heads or tails out of it.
You need to simplify the code as much as possible leaving only the bare minimum that still causes the problem.
You may even discover the problem yourself while doing this.(I know I have done that several times).
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95
http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
Available soon!! Video overlay(OSD) module...
"I'm a man, but I can change, if I have to, I guess"
Red Green
·
What I don't understand, but I think is a clue, is why the presence or absence of the table (which loads where I want it and does not execute here) should have any impact on the performance of the 15? instructions.
Please, I have a stripped version which contains only the instructions which execute here. It works fine. I'm not sure how it would help. Take another look. Thanks,
Fred Ornellas
On second thought, here is the stripped version. The only variant in the two paths is clearing of the three I/O registers. It does not exhibit this problem. Perhaps this is a clue.
Fred