Joined: 29 Jul 2004 Posts: 15 Location: New Zealand
Posted: Sat Aug 21, 2004 11:24 pm Post subject: Libary in Bascom-avr
Hi,
Can someone either confirm or correct me on the following ?
If I have a piece of code in assembly can I use it as a component of a libary to be called when required by my main Bascom program.
If this is so does anyone know if there is any software to port a snippet of assembly code written for a 8051 to an AVR
Joined: 29 Jul 2004 Posts: 15 Location: New Zealand
Posted: Thu Aug 26, 2004 10:09 pm Post subject: Libary in Bascom AVR
Hi Richard.
Not really the answer I was looking for but many thanks anyway for your response. I may try to make up a table of the commands etc of both so it may make it easier to go through the code and just sustitute where required. Who knows it may work.
A library is not a simple snippet of AVR asm.
It just is the equivalent of a SUB/FUNCTION that is called by the compiler depending on the statements you use.
Have a look at the libdemo.bas sample and the mylib.lib file.
The advantage of lib is that you can override existing functions by writing your own lib.
for example look at the lcd replacement libs. they result in smaller code as they are fixed for certain pins and not as versatile as the default lib. _________________ Mark
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