A89: Re: Re: Storing numbers into strings


[Prev][Next][Index][Thread]

A89: Re: Re: Storing numbers into strings



Yeah, I've already set up the file and all.  I have solved the problem, though.  I just was reading like two bytes too early since in my file I had already written something there and forgotten it when I wrote this email.  Thanks anyway.
----- Original Message -----
From: Miles Raymond
To: assembly-89@lists.ticalc.org
Sent: Monday, November 22, 1999 5:08 PM
Subject: A89: Re: Storing numbers into strings

To what file are you writing?  Have you already set all of that up?
 
-Miles Raymond      EML: m_rayman@bigfoot.com
ICQ: 13217756       IRC: Killer2        AIM: KilIer2 (kilier2)
http://www.bigfoot.com/~m_rayman/
----- Original Message -----
From: Reman Child
To: assembly-89@lists.ticalc.org
Sent: Monday, November 22, 1999 6:55 PM
Subject: A89: Storing numbers into strings

Is it possible to store numbers into strings?  I tried to using the readfile and writefile routines in filelib, but when I compared them, it didn't work.  Here's what I did, maybe you could see what is wrong with it:
 
Write_File:
    move.w #1,d0
    clr.w d1
    lea.l number(pc),a1
    jsr filelib::writefile
 
Read_File:
    move.w #1,d0
    clr.w d1
    lea.l store(pc),a1
    jsr filelib::readfile
 
    move.l #store,a0
    cmp.b #5,(a0)
    beq Equal
    WriteStr #1,#1,#2, Not_Equal
    jsr userlib::idle_loop
    rts
 
Equal:
    WriteStr #1,#1,#2,Equal
    jsr userlib::idle_loop
    rts
 
number    dc.b 5
 
 
Every time I ran it, it always wrote the not equal string.  Any help would be really appreciated.  Thanks.

References: