View previous topic :: View next topic |
Author |
Message |
aphawk
Joined: 23 Jan 2010 Posts: 168 Location: Brazil
|
Posted: Fri Jan 02, 2015 8:23 pm Post subject: |
|
|
Hi, Duval,
Thanks for your reply.
I'm using the routines posted in this Fórum to use the display ILI9341. And have to make them smaller to use with an Arduíno Uno, then I must use only two fonts.
I'm testing the routines to draw lines and circles, and this bug has happened with the circles, that is using an variable to increment the radius of a circle.
The curious is that I have the same results in the real hardware AND in the Proteus 8 Simulation.
I attached all the code I'm using, then you can compile then and see in the simulator.
The For-Next that start at line 86 only executes one time, and exit the loop with the variable Paulo=30 !!
But the next For-Next that starts at line 94 runs perfectly, exiting the loop only when Paulo=7 !!
I can't find what is wrong...
Thanks for help me , Duval !
Paulo |
|
Back to top |
|
|
albertsm
Joined: 09 Apr 2004 Posts: 5913 Location: Holland
|
Posted: Fri Jan 02, 2015 9:05 pm Post subject: |
|
|
I can confirm this is a bug. It will happen for words with a step only. As a work around use an integer or overlayed integer.
The reason is that in 2078 i started to optimize code and the NEXT statement will create different code since it calls the internal add code as well. Instead of add/adc and loading registers with immediate values it will use subi/sbci but this will set different flags.
We will make an update available for this. _________________ Mark |
|
Back to top |
|
|
aphawk
Joined: 23 Jan 2010 Posts: 168 Location: Brazil
|
Posted: Sat Jan 03, 2015 12:40 am Post subject: |
|
|
Mark,
Thanks God !!! I was almost crazy to find what I have made wrong ...
Ok, I will use others ways to make the same thing, this is very easy to make a "bypass".
Thanks again, Mark and Duval, for your time and efforts !
Paulo |
|
Back to top |
|
|
inkni
Joined: 04 Sep 2013 Posts: 5
|
Posted: Sun Jan 04, 2015 8:04 am Post subject: Multi Dimensional Array Missing values |
|
|
Hello Mark and Team,
Thank you.
I always enjoying with BASCOM-AVR and more looking for the BASCOM-ARM .
I downloaded new version and tested the multi dimensional array function.
I tried,
Code: | $regfile = "m32def.dat"
$crystal = 4000000
$hwstack = 40
$swstack = 16
$framesize = 32
$sim
Dim A(3, 3) As Byte
Dim I As Byte , J As Byte , K As Byte
'
For I = 1 To 3
For J = 1 To 3
K = I : K = K * 10 : K = K + J
A(i , J) = K
Print "I=" ; I ; ", J=" ; J ; ", k= " ; K ;
Print ", A(" ; I ; "," ; J ; ")=" ; A(i , J)
Next J
Next I
'
End
|
expecting results are,
I=1, J=1, k=11, A(1,1)=11
I=1, J=2, k=12, A(1,2)=12
I=1, J=3, k=13, A(1,3)=13
I=2, J=1, k=21, A(2,1)=21
I=2, J=2, k=22, A(2,2)=22
I=2, J=3, k=23, A(2,3)=23
I=3, J=1, k=31, A(3,1)=31
I=3, J=2, k=32, A(3,2)=32
I=3, J=3, k=33, A(3,3)=33
but, actual results are,
I=1, J=1, k=11, A(1,1)=11
I=1, J=2, k=12, A(1,2)=11
I=1, J=3, k=13, A(1,3)=11
I=2, J=1, k=21, A(2,1)=21
I=2, J=2, k=22, A(2,2)=21
I=2, J=3, k=23, A(2,3)=21
I=3, J=1, k=31, A(3,1)=31
I=3, J=2, k=32, A(3,2)=31
I=3, J=3, k=33, A(3,3)=31
I think, the multi dimensional array varialbles missing some values.
Please check and fix it.
Best Regards from Korea,
Inkni Kim |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Sun Jan 04, 2015 10:41 am Post subject: |
|
|
Hi Kim,
I've had a look at your problem (I really Need multi dimensional arrays for a Project I'm working on) and it looks if the problem is with the print function.
If I modify your code so that the array element is read into a variable, then printed it works (not nice but it works).
Code: |
$regfile = "m32def.dat"
$crystal = 4000000
$hwstack = 40
$swstack = 16
$framesize = 32
$sim
Dim A(3, 3) As Byte
Dim I As Byte , J As Byte , K As Byte , Z As Byte
'
For I = 1 To 3
For J = 1 To 3
K = I : K = K * 10 : K = K + J
A(i , J) = K
Z = A(i , J)
Print "I=" ; I ; ", J=" ; J ; ", k= " ; K ;
Print ", A(" ; I ; "," ; J ; ")=" ; A(i , J) ; "/" ; Z
Next J
Next I
'
End
|
Output
I=1, J=1, k= 11, A(1,1)=11/11
I=1, J=2, k= 12, A(1,2)=11/12
I=1, J=3, k= 13, A(1,3)=11/13
I=2, J=1, k= 21, A(2,1)=21/21
I=2, J=2, k= 22, A(2,2)=21/22
I=2, J=3, k= 23, A(2,3)=21/23
I=3, J=1, k= 31, A(3,1)=31/31
I=3, J=2, k= 32, A(3,2)=31/32
I=3, J=3, k= 33, A(3,3)=31/33
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
inkni
Joined: 04 Sep 2013 Posts: 5
|
Posted: Sun Jan 04, 2015 11:24 am Post subject: Multi Dimensional Arrays work well |
|
|
Hi Dobson,
Thank you for your reply.
I 've checked your code.
You are right !
Multi dimentional Arrays work very well.
This is good news for me.
I too really need this fuctions like you.
Thanks again
Regards
Inkni Kim
Last edited by inkni on Sun Jan 04, 2015 11:42 am; edited 1 time in total |
|
Back to top |
|
|
Paulvk
Joined: 28 Jul 2006 Posts: 1257 Location: SYDNEY
|
Posted: Sun Jan 04, 2015 11:39 am Post subject: |
|
|
Hello inkni & i.dobson
What would be good is when you make use of the multi dimensional array you could make some examples so others like myself can see how to use them.
Regards Paul |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Fri Jan 23, 2015 5:46 pm Post subject: |
|
|
I have several test programs that are platforms to much larger projects.
Below is a screen shot(v2078error.jpg), reduced in size to just show examples, of the v2.0.7.8's output on my Win7 x64 development system. This the same code from my mercurial repository of BASCOM that compiles with no errors reported in the Code Explorer on my WinXP laptop.
The errors listed on the Win7 x64 machine to the best of my knowledge are not real as the BASCOM-AVR Report is not reporting errors post compile. I have looked at the reporting line:position errors and just don't see what it is error on. At the least there is a discrepancy of the two reporting methods.
The second screen shot(v2078report) shows an error free report.
Also on the first screen shot, lower left hand corner displays 1:1. If you click on one of the errors this number reflects the line:position of the error referenced as it was intended to do. One of the referring errors refers to my server.inc file which contains many thousand lines of code. One of the errors is reporting 1434:108. Which there is not enough space to display that location in the pane. This is just an observation, detail..... Love the feature.
On the report screen shot, the second and third lines display the date and time stamp of the compile. On other systems in the past I have worked on, this information is available and placed in the output hexfile, by design, so that at boot the apps revision date and time stamp are displayed if so desired. Are these internal stamps available for use?
The additions in this release are amazing! When you think it can't get any better, then Mark does it again!
TIA,
Mark |
|
Back to top |
|
|
zofikke
Joined: 05 Jul 2014 Posts: 4
|
Posted: Sat Jan 24, 2015 12:35 am Post subject: |
|
|
After the update I get an error when I open any bas file:
$Regfile = "m8adef.dat"
$Crystal = 4000000
$hwstack = 40
$swstack = 16
$framesize = 32
$baud = 38400
print "M8A_TEST"
dim i as byte
do
print i
wait 1
loop
Error : 13 Line : 0 CONST already specified [_ROMSIZE] , in File :
I have no idea what to do.
I checked unchecked the Use New Method. I get it all. I can not compile any project.
I already tried to use older version of Bascom. They give me errors before they start. Older version do not screen anything in their window.
I would use the newest version but It gives me only error.
I am looking for any solution because it makes me crazy. |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Sat Jan 24, 2015 11:42 am Post subject: end... |
|
|
What happens when you put an END in your program? |
|
Back to top |
|
|
Duval JP
Joined: 22 Jun 2004 Posts: 1161 Location: France
|
Posted: Sat Jan 24, 2015 12:13 pm Post subject: |
|
|
when you start Bascom you have some tips before the program starts itself, one tip said a file to remove in directory appdata when you have errors...
an other tip is to remove all .err files in the directory where you have your program.
Did you tried it ?
for me : W7 32 bits update 2.0.7.8 works well
and I do a very very long program actually.
JP |
|
Back to top |
|
|
zofikke
Joined: 05 Jul 2014 Posts: 4
|
Posted: Sat Jan 24, 2015 2:12 pm Post subject: |
|
|
Thanks for the quick answer. They did not work for me. I deleted the files but when I tried to compile I got the same error(s).
I installed the 2.0.7.7 what I use on my desktop PC. It works well. I reinstalled the Windows 7 64bit on my notebook and I installed the same version of Bascom(2.0.7.7). I have got another error. The program is same as what I already posted.
Error : 222 Line : 0 Illegal character [expected (, got '' [_PRDWORD]] , in File :
Error : 222 Line : 0 Illegal character [expected (, got '' [_PRDWORD]] , in File :
Now I am going to try to install another Windows and try again.
I will inform you if I have some solution.
Probably something is wrong but I do not know what. I use same Win same Bascom version. Same installing method. Same same same...everything is same. |
|
Back to top |
|
|
bzijlstra
Joined: 30 Dec 2004 Posts: 1179 Location: Tilburg - Netherlands
|
Posted: Sat Jan 24, 2015 2:29 pm Post subject: end |
|
|
Also same END? |
|
Back to top |
|
|
zofikke
Joined: 05 Jul 2014 Posts: 4
|
Posted: Sat Jan 24, 2015 3:49 pm Post subject: |
|
|
Yes it is. |
|
Back to top |
|
|
mmarlette
Joined: 30 Nov 2007 Posts: 311 Location: Delano, MN
|
Posted: Sat Jan 24, 2015 5:54 pm Post subject: |
|
|
JP- Thanks for your response.
There is no .err file in the directory, as there are no errors from the compiler. Just the code explorer 'thinks' there are errors.
It lists errors on lines and positions, expecting, for example a quote for a print statement. When you double click on the code explorer error, it takes you to that line : position. There is a quote there at the exact position it is referring to there is an error.
Yesterday, the .bas file would load, the code explorer would display call stack, constants, inc files, etc...then it would update itself with the error group, without even compiling after a second or two.
This am, same file, same everything, and the code explorer's window is blank, to get it to display information you must close the code explorer window and then reopen it under view. No changes to the source and there are about 1/3rd as many errors as yesterday.
I thought I read a post from Mark indicating issues with the Win7 64bit mode but for the life of me can't find that post. Maybe I was dreaming?
Hopefully Mark will reply in this thread as to there status at MCS and x64 bit mode and the code explorer.
Regards,
Mark |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|