added facility to debug the stack pointer on P3_4 (LCD LED cathode)
roughly 139 bytes functions were chosen by manually traversing pow_decn to the bottom
This commit is contained in:
@ -12,7 +12,7 @@ target_compile_options(coverage_config INTERFACE -O0 -g --coverage)
|
||||
target_link_libraries(coverage_config INTERFACE --coverage)
|
||||
|
||||
# decn library
|
||||
add_library(decn decn.c)
|
||||
add_library(decn decn.c ../utils.c)
|
||||
|
||||
# decn library with coverage
|
||||
add_library(decn_cover decn.c)
|
||||
|
@ -19,6 +19,7 @@
|
||||
*/
|
||||
|
||||
#include "../utils.h"
|
||||
#include "../stack_debug.h"
|
||||
|
||||
#include "decn.h"
|
||||
|
||||
@ -86,6 +87,8 @@ const dec80 DECN_LN_10 = {
|
||||
|
||||
void copy_decn(dec80* const dest, const dec80* const src){
|
||||
uint8_t i;
|
||||
|
||||
stack_debug(0x01);
|
||||
dest->exponent = src->exponent;
|
||||
|
||||
//copy nibbles
|
||||
@ -163,6 +166,7 @@ static void remove_leading_zeros(dec80* x){
|
||||
uint8_t is_negative = (x->exponent < 0);
|
||||
exp_t exponent = get_exponent(x);
|
||||
|
||||
stack_debug(0x02);
|
||||
//find first non-zero digit100
|
||||
for (digit100 = 0; digit100 < DEC80_NUM_LSU; digit100++){
|
||||
if (x->lsu[digit100] != 0){
|
||||
|
Reference in New Issue
Block a user