Jump to content
Sign in to follow this  
c58_4311

Boostbasic Multiplaction Problem

Recommended Posts

I have used the new boostbasic compiler and have found that the compiler generates following error and aborts the compilation process:

 

 

 

Building...

BoostBasic Optimizing Basic Compiler Version 6.31 Beta (for PIC16 architecture)

http://www.picant.com/c2c/c.html

Copyright© 2004-2006 Pavel Baranov

Copyright© 2004-2006 David Hobday

 

Beta version. No limitations. Expire date: 2006.05.01

 

 

_.bas

 

success

BoostLink Optimizing Linker Version 6.31

http://www.picant.com/c2c/c.html

Copyright© 2004-2006 Pavel Baranov

Copyright© 2004-2006 David Hobday

 

 

Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)'

 

 

Failure

Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)'

Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)'

Internal Error:Unable to find function ID:0x100003A3

Exit code was -2.

Removing target: interrupt.pic16.hex

Failed to locate output file 'interrupt.pic16.hex'

Done

 

Failed

 

 

 

the programe listing is:

 

Sub main()

Dim x as integer

Dim z as byte

 

trisb = 0 'configure port B

portb = 0 'clear port B

 

 

z = 10

x = z * 200

 

 

 

Do while 1

Loop

 

End Sub

 

 

 

I have also checked that if I replace the variable z with the constant value like - x = 140 * 200, then everything gets ok.

 

I have also tried the example code from the hep given in the sourceboost ide, the same problem is also there -

 

from the sourceboost help :

 

Sub MySub (x As Integer)

Dim v as integer

v = x * 10

End Sub

 

this also gives the following error

 

Failure

Error: Unresolved external function:'__mul_16s_16u__16(signed short,signed short)'

Error: Unresolved external symbol, function:__mul_16s_16u__16

Exit code was -2.

 

 

 

I am using the 6.31 version of sourceboost under windows xp.

 

 

is this a bug or am I doing something wrong. I want to multiply two integers.

Share this post


Link to post
Share on other sites

c58_4311,

 

Looks like a bug in BASIC compiler :(

 

Fix is to not use constant in the mul expression.

See below.

 

sub main()

Dim x as integer
Dim z as byte
dim y as integer
y = 200

trisb = 0 'configure port B
portb = 0 'clear port B


z = 10

x = z * y



Do while 1 
Loop

end sub

 

Regards

Dave

Share this post


Link to post
Share on other sites

Thanks for the prompt reply. I will manage anyhow. But if we change the 'z' variable to byte then also the same problem arrises

 

 

Dim x as integer

Dim z as byte

dim y as integer

 

changed to

 

 

Dim x as integer

Dim z as byte

dim y as integer

 

 

the error now is:

 

Failure

Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)'

Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)'

Error: function and prototype differ in return type:'__mul_8u_8u(unsigned char,unsigned char)'

Internal Error:Unable to find function ID:0x100003A3

Exit code was -2.

 

 

 

anyhow, the remedy you gave is good one. It will help me lot.

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...