Richard,
Just wanted to thank you once again, the code is now incorporated in my project and I can display my two 32bit variables nicely.
I hardcoded the divisor to 100k and got rid of the Divisor variable. It grew the codebase by 230bytes and 34bytes of RAM out of which 11 is an array to which I write the result
Code:
DWORDtoString:
CALL DivBy100k
' QUOTL top word, Remainder low word.
' Get Remainder into PBP system variables in preparation for DIV32
ASM
MOVE?BB Remainder, R2
MOVE?BB Remainder + 1 , R2 + 1
MOVE?BB Remainder + 2, R0
MOVE?CB 0, R0 + 1
RST?RP
ENDASM
Result = DIV32 10000
Remains = R2
IF QUOTL THEN
ARRAYWRITE DWordString, [DEC QUOTL, DEC Result, DEC4 Remains, 0]
ELSEIF Result THEN
ARRAYWRITE DWordString, [DEC Result, DEC4 Remains, 0]
ELSE
ARRAYWRITE DWordString, [DEC Remains, 0]
ENDIF
Bookmarks