The first version of this patch did not work, as it made logical operations with compare result = true (-1) impossible. To print the proper value for free bytes you should use
Code:
? FRE(0)-(FRE(0)<0)*$10000
When FRE(0) returns a negative value $10000 is added.
If you really want to deviate from the beaten path, you can add a routine to convert unsigned integers and jump to it from the functions that you want to respond with an unsigned number. Possible candidates are FRE(), SADD(), VARPTR() and DEEK().
Code:
; save and convert unsigned integer AY to FAC1
LAB_UAYFC
LSR Dtypef ; clear data type flag, $FF=string, $00=numeric
STA FAC1_1 ; save FAC1 mantissa1
STY FAC1_2 ; save FAC1 mantissa2
LDX #$90 ; set exponent=2^16 (integer)
SEC ; always positive
JMP LAB_STFA ; set exp=X, clear FAC1_3, normalise and return