Category:ASM Libraries and Add-Ons
(Created page with "ASM Libs are libraries that are used by the compiler. They contain machine language statements for various statements and functions. A library can also be used to modify an ...") |
|||
Line 1: | Line 1: | ||
− | ASM Libs are libraries that are used by the compiler. | + | ASM Libs are libraries that are used by the compiler.<br /> |
− | + | They contain machine language statements for various statements and functions.<br /> | |
− | They contain machine language statements for various statements and functions. | + | <br /> |
− | + | A library can also be used to modify an existing function.<br /> | |
− | A library can also be used to modify an existing function. | + | <br /> |
− | + | For example when you use a conversion routine num<>string with a byte variable only, the routine from the MCS.LIB has some overhead as it can also convert integers,word and longs.<br /> | |
− | For example when you use a conversion routine num<>string with a byte variable only, the routine from the MCS.LIB has some overhead as it can also convert integers,word and longs. | + | <br /> |
− | + | You can specify the MCSBYTE.LIB or MCSBYTE.LBX library then to override the function from MCS.LIB.<br /> | |
− | You can specify the MCSBYTE.LIB or MCSBYTE.LBX library then to override the function from MCS.LIB. | + | <br /> |
+ | When you write a user sub/function that calls a user lib and passed parameters, you must include some code to restore the frame protection.<br /> | ||
+ | <br /> | ||
+ | In the bcd.lib you can find code like :<br /> | ||
+ | <br /> | ||
+ | #IF _FPROTECT<br /> | ||
+ | Out sreg,r3 ; restore I flag<br /> | ||
+ | #ENDIF<br /><br /> | ||
+ | The bcd.lib and bin2bcd.bas demonstrate how to write a user lib. |
Latest revision as of 11:45, 30 January 2013
ASM Libs are libraries that are used by the compiler.
They contain machine language statements for various statements and functions.
A library can also be used to modify an existing function.
For example when you use a conversion routine num<>string with a byte variable only, the routine from the MCS.LIB has some overhead as it can also convert integers,word and longs.
You can specify the MCSBYTE.LIB or MCSBYTE.LBX library then to override the function from MCS.LIB.
When you write a user sub/function that calls a user lib and passed parameters, you must include some code to restore the frame protection.
In the bcd.lib you can find code like :
#IF _FPROTECT
Out sreg,r3 ; restore I flag
#ENDIF
The bcd.lib and bin2bcd.bas demonstrate how to write a user lib.
Subcategories
This category has the following 11 subcategories, out of 11 total.
Pages in category "ASM Libraries and Add-Ons"
The following 23 pages are in this category, out of 23 total.
EFGHI |
I cont.LM |
M cont.RT |