0 Members and 5 Guests are viewing this topic.
You could store the values 0.00 to 655.35 in two bytes if you multiplicate your values by 100.Displaying them correctly would be possible with an own displaying routine.Furthermore Axe supports access to the floating-point variables of the OS afaik. Just take a look at the commands list.
Quote from: Aichi on August 03, 2011, 04:39:12 amYou could store the values 0.00 to 655.35 in two bytes if you multiplicate your values by 100.Displaying them correctly would be possible with an own displaying routine.Furthermore Axe supports access to the floating-point variables of the OS afaik. Just take a look at the commands list. Perhaps you mean 0.0 to 255.255? 655.35 wouldnt work so well as a FP high limit, considering the decimal part and integer part are both 8 bits.
In other news, Frey continues kicking unprecedented levels of ass.
.PASTsub(PAS,5)Lbl PAS1->C1->Kr1-K->Bsub(EXC,r1)A->CDisp C>Dec,isub(EXC,K)C/A->CDisp C>Dec,isub(EXC,B)C/A->CDisp C>Dec,iReturnLbl EXC1->AFor(I,1,r1A*I->AEndReturn
sub(EXC,3)Disp A>Dec,i
Advice: Don't use axe 1.0.0 or 1.0.1 as of now, they have a pretty good bug that killed my calculator (still trying to fix it).
Your problem is that you don't quit the program after calling sub(PAS). Then the programm will pass this function twice -> you get it displayed 6 times.put a return after sub(PAS,5)
Your mixing your bases with 255.255, as that number is beyond Axe's precision in decimal and out of bounds in hex. What you're looking for is 0xFF.FF, 255+(255/256) in decimal.
It's not the representation Axe uses though. So whether or not it can be correct in other situations, I don't want people using it in Axe and then being helplessly confused when their program acts strange.