Jump to content
Sign in to follow this  
c58_4311

Boostbasic Divide Problem

Recommended Posts

can anybody help me in the following code: (I want to divide an integer by a constant or variable byte and want to store the result in an integer)

 

 

the code that I am using is:

 

 

 

Dim tem_int as integer

 

sub main()

 

temp_int = 5000

 

temp_int = (10 * temp_int) / 60

 

 

Do while 1

Loop

 

end sub

 

 

 

 

 

I am getting an error on compilation as:

 

 

Failure

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

Error: Unresolved external symbol, function:__div_16_16

Exit code was -2.

Removing target: interrupt.pic16.hex

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

Done

Failed

 

 

 

I have further tested that the divide function works correctly by using bytes like:

 

integer = byte / byte (dividing byte by byte is only possible)

 

is there anything that can be done to correct my problem?

 

and one more thing - How to write the assembly routines in boostbasic

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
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  

×