I found this at Ticalc.org and I want to use it with some BASIC programs, but the problems is, every time I run it, the amount of free RAM goes down, and I have to reset to get the missing RAM back...


Code:
; ===============================================================
; Chars
; ===============================================================

.module Program
.export

   Main
      bcall(_RclAns)
      bcall(_Convop1)
      push af
      bcall(_AnsName)
      bcall(_FindSym)
      ld (hl),StrngObj
      ex de,hl
      ld (hl),1
      inc hl
      ld (hl),0
      pop af
      inc hl
      ld (hl),a
      ret
.endmodule
That is not written correctly. It should delete Ans then create it again as a string.
...And I have no idea what to put to do that... Razz
I'll whip up some code and post or edit this post.

Edit:


Code:
 bcall(_rclans)
 bcall(_convop1)
 push af
 bcall(_ansname)
 rst 10h
 jr c,notfound
 bcall(_delvar)
notfound:
 bcall(_ansname)  ;I'm not sure if this is necessary, but just to be safe
 ld hl,1
 bcall(_createstring)
 pop af
 inc de
 inc de
 ld (de),a
 ret


That should work.
Nope. It keeps saying undefined when I put Ans after running it.

Never mind, I figured it out.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement