Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Bug in subroutine call?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
misterc

Bascom Member



Joined: 21 Jun 2004
Posts: 1

PostPosted: Mon Jun 21, 2004 3:17 am    Post subject: Bug in subroutine call? Reply with quote

In BASCOM-AVR 1.11.7.4 the follow program:

---------------------------------------------------------------------------------
Declare Sub Ifoundabug(byval A As Integer , Byval B As Byte , Byval C As Byte , Byval D As Byte , Byval E As Byte)

Dim F As Integer , G As Byte , H As Byte , I As Byte , J As Byte


Call Ifoundabug(3200 , 10 , 20 , 30 , 40 )

F = 32000
G = 45
H = 56
I = 221
J = 78

Ifoundabug F , G , H , I , J

Do : Loop

Sub Ifoundabug(byval A As Integer , Byval B As Byte , Byval C As Byte , Byval D As Byte , Byval E As Byte)
Print "A : " ; A
Print "B : " ; B
Print "C : " ; C
Print "D : " ; D
Print "E : " ; E
End Sub
---------------------------------------------------------------------
produces the following result (in simulator):

A : 188
B : 255
C : 255
D : 30
E : 40
A : 188
B : 255
C : 255
D : 221
E : 78

when programmed on a real chip it produces simular results
-----
It seems that only the last two parameters are passed correctly

Is this a known bug? is there a work around for it?
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5319
Location: Holland

blank.gif
PostPosted: Mon Jun 21, 2004 11:40 pm    Post subject: Reply with quote

Hi,

You need to increase the Software stack and frame space in the Options, Compiler.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
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