Optimized mul20 & mul40 and extracted to new library.
This commit is contained in:
committed by
Oliver Schmidt
parent
fbf302e6cd
commit
399250a105
@@ -97,6 +97,9 @@
|
||||
Describes Christian Krüger's macro package for writing self modifying
|
||||
assembler code.
|
||||
|
||||
<tag><htmlurl url="specialmath.html" name="specialmath.html"></tag>
|
||||
Library for speed optimized math functions.
|
||||
|
||||
<tag><url name="6502 Binary Relocation Format document"
|
||||
url="http://www.6502.org/users/andre/o65/fileformat.html"></tag>
|
||||
Describes the o65 file format that is used for dynamically loadable modules
|
||||
|
||||
38
doc/specialmath.sgml
Normal file
38
doc/specialmath.sgml
Normal file
@@ -0,0 +1,38 @@
|
||||
<!doctype linuxdoc system>
|
||||
|
||||
<article>
|
||||
<title>Special math functions
|
||||
<author>Christian Krüger
|
||||
|
||||
<abstract>
|
||||
This library provides functions for speed optimized math operations.
|
||||
</abstract>
|
||||
|
||||
<!-- Table of contents -->
|
||||
<toc>
|
||||
|
||||
<!-- Begin the document -->
|
||||
|
||||
<sect>Multiplication<p>
|
||||
|
||||
When accessing screen memory often a multiplication of the vertical position is needed to calculate
|
||||
the target address. A quite common horizontal span for 8-bit systems is 20 or 40 bytes (beside e.g. 32 bytes, where the multiplication can be accomplished by shifting 5 times).
|
||||
|
||||
<p>
|
||||
<tscreen><verb>
|
||||
unsigned int __fastcall__ mul20(unsigned char value);
|
||||
</verb></tscreen>
|
||||
|
||||
The 8 bit <tt>value</tt> is multiplied by 20 and returned as 16 bit value.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<tscreen><verb>
|
||||
unsigned int __fastcall__ mul40(unsigned char value);
|
||||
</verb></tscreen>
|
||||
|
||||
The 8 bit <tt>value</tt> is multiplied by 40 and returned as 16 bit value.
|
||||
</p>
|
||||
|
||||
|
||||
</article>
|
||||
Reference in New Issue
Block a user