FDIV64 takes 520 bytes in memory. Execution time is independend from the operands always 131 cycles.
typedef struct {
unsigned int quot;
unsigned int rem;
} udiv_t;
/* If you need quotient and reminder */
extern __value_in_regs udiv_t FDIV64(unsigned int dvd_lo,
unsigned int dvd_hi,
unsigned int dvs);
/* If you need only the quotient */
extern unsigned int FDIV64(unsigned int dvd_lo, unsigned int dvd_hi,
unsigned int dvs);
|FDIV64|
adds r0,r0,r0
adc r1,r1,r1
GBLA i
i SETA 31
WHILE i >0
cmp r1,r2 ;Also die 4 Zeilen
subcs r1,r1,r2 ;31 mal wiederholen !
adcs r0,r0,r0
adc r1,r1,r1
i SETA i-1
WEND
cmp r1,r2
subcs r1,r1,r2
adcs r0,r0,r0
movs pc,r14
People with the strong desire to send me an email should combine the three parts peter, peter-teichmann and de in a sensible way to get the address.