The PSION Organiser II Homepage
Forum Home Forum Home Help Help Search Search Members Members Login Login Register Register

Welcome, Guest. Please Login or Register.
Why register?
   The Psion Organiser II Forum
   User Forum
   Help
(Moderator: Mikesan)
   NUM TO STR ERR
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: NUM TO STR ERR  (Read 448 times)
POISN
active Member




   


Posts: 48
NUM TO STR ERR
« on: Oct 28th, 2002, 6:13pm »
Quote Quote Modify Modify

I wrote a MC proc, and when run it generates NUM TO STR ERR. How is this error generated?
Boris
Administrator




   
WWW

Posts: 552
Re: NUM TO STR ERR
« Reply #1 on: Oct 28th, 2002, 8:39pm »
Quote Quote Modify Modify

It is listed under CALCULATOR ERRORS
#define ER_MT_FL 250  /* CONVERSION FROM NUMERIC TO STRING FAILED */

My guess is that your input wasn't interpretable as a floating point number, or maybe the output buffer was too small (though I don't really think this is checked).
 
  What did you call when you got the error ??
 
« Last Edit: Oct 28th, 2002, 8:57pm by Boris »

Triholerahduliäöhh gugguh !! (tyrolean joy jodler)
Rough translation: There's a new build of Psi2Win!!
Email: boris[at]psion2[dot]org
POISN
active Member




   


Posts: 48
Re: NUM TO STR ERR
« Reply #2 on: Oct 29th, 2002, 6:04am »
Quote Quote Modify Modify

I called UT$YSNO.
 
The proc starts with QCO_RUN_ASSEM, followed by:
 
$C608  LDAB 8  ;bytes to add to RTA_PC
$37    PUSH B
$3F7D  SWI 125 ;UT$YSNO
$0C    CLC     ;no error
$33    PUL B   ;bytes for RTA_PC to jump stored in B
$39    RTS
 
The proc ends with QCO_RETURN_ZERO.
 
It's just a test proc to see if the proc was generated correctly. I'm not actually trying to convert a float to a string, thus I do not understand the error.
POISN
active Member




   


Posts: 48
Re: NUM TO STR ERR
« Reply #3 on: Apr 20th, 2003, 7:10am »
Quote Quote Modify Modify

Upon using Paul Robson's emulator and debugger on the procedure, I found that the operator QCO_RUN_ASSEM does not appear to be fully implemented as described in the technical reference. On return from the machine code, the contents of the B register is not added to RTA_PC. The Organiser uses a CLR instruction on B first, then increments, and finally adds that value to RTA_PC. Hence, the top loop continues interpreting code immediately following QCO_RUN_ASSEM, which happens to be $C6, which is opcode RTF_SCI. That is why the procedure terminates with ERR 250. The technical reference also contradicts itself by stating "...if there  are  no  errors  carry  must be clear and the B register must be the number of bytes for RTA_PC to jump.", and then it states "If there is no error carry must be set and the B register should contain the number of the error to be reported."  Maybe the technical reference needs to be debugged!
POISN
active Member




   


Posts: 48
Re: NUM TO STR ERR
« Reply #4 on: Apr 20th, 2003, 7:23am »
Quote Quote Modify Modify

I see that the online version of the technical reference differs from the one I have in that it says "If there is AN error carry must be set...".
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

The Psion Organiser II Forum » Powered by YaBB 1 Gold - SP 1.1!
YaBB © 2000-2002,
Xnull. All Rights Reserved.
top