c128lib Common
Various common functionalities.
|
Math module. More...
Functions | |
macro | c128lib_add16 (value, dest) |
macro | c128lib_sub16 (value, low) |
macro | c128lib_addMem16 (source, destination) |
macro | c128lib_subMem16 (source, destination) |
macro | c128lib_asl16 (address) |
macro | c128lib_inc16 (destination) |
macro | c128lib_dec16 (destination) |
macro | c128lib_mulAndAdd (left, right, targetAddr) |
macro | c128lib_div16By16 (dividend, divisor, remainder) |
macro | c128lib_div16By8 (dividend, divisor, remainder) |
Variables | |
pseudocommand c128lib_add16 | value |
pseudocommand c128lib_sub16 | source |
Math module.
Macros for math.
macro c128lib_add16 | ( | value | , |
dest | ) |
Adds 16 bit number value to given memory cell specified by dest address and set result to dest.
value | first addend |
dest | memory location for second addend and result |
macro c128lib_addMem16 | ( | source | , |
destination | ) |
macro c128lib_asl16 | ( | address | ) |
Shifts left 2 byte number specified with address. Carry flag indicates last bit that has been "shifted out".
address | address to shift Flag C will be affected. |
macro c128lib_dec16 | ( | destination | ) |
Decrements 16 bit number located in memory address starting from "destination".
destination | memory address to decrement |
macro c128lib_div16By16 | ( | dividend | , |
divisor | , | ||
remainder | ) |
Divides the two-byte number dividend by the two-byte number divisor, leaving the quotient in dividend and the remainder in remainder. Addressing mode of 16-bit numbers uses little endian.
dividend | dividend and also quotient |
divisor | divisor |
remainder | remainder (wide as divisor) |
macro c128lib_div16By8 | ( | dividend | , |
divisor | , | ||
remainder | ) |
Divides the two-byte number dividend by the one-byte number divisor, leaving the quotient in dividend and the remainder in remainder. Addressing mode of 16-bit numbers uses little endian.
dividend | dividend and also quotient |
divisor | divisor |
remainder | remainder (wide as divisor) |
macro c128lib_inc16 | ( | destination | ) |
Increments 16 bit number located in memory address starting from "destination".
address | address to shift |
macro c128lib_mulAndAdd | ( | left | , |
right | , | ||
targetAddr | ) |
Multiplies left times right. Target value will be added to the value stored in targetAddr.
left | first factor |
dest | second factor |
targetAddr | adding value and result |
Subtracts 16 bit number value from given memory cell specified by low address and set result to low.
value | subtracting |
dest | memory location for minuend and result |
macro c128lib_subMem16 | ( | source | , |
destination | ) |
Subtracts value from "source" memory location from value in "destination" memory location.
[in] | source | subtracting |
[in,out] | dest | memory location for minuend and result |
pseudocommand copy8 source |
Subtracts value from "source" memory location from value in "destination" memory location.
MOD: A, C
pseudocommand c128lib_add16 value |
Adds 16 bit number value to given memory cell specified by dest address and set result to dest.
value | first addend |
dest | memory location for second addend and result |