misterc
Joined: 21 Jun 2004 Posts: 1
|
Posted: Mon Jun 21, 2004 3:17 am Post subject: Bug in subroutine call? |
|
|
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? |
|