Re:A83: Using Interups, and strings


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

Re:A83: Using Interups, and strings




there are two possible reasons for this.  One is that it is usually NOT a
good idea to use rom calls from within an interrupt (something about
switching rom pages or exchanging registers when they're not supposed to). 
There isn't really a good way to solve this unless you're good at direct
LCD communication.  If it is problems with exchanging registers, at the
start of your program you could push all the registers, exchange them, then
push all the registers again.  And, of course, pop them then exchange them
then pop them.  Another reason would be because you didn't take into
account the different memory location the string will be in.  To solve this
simply do (I assume you loaded the interrupt into $9a9a)

 ld hl,$9a9a+stringlabel-interrupt_start
 B_CALL(_puts)

btw... did you use the interrupt tutorial that I wrote?



----------------------------------------------
Original Message
From: "Robby Proie"<playnogamz@nls.net>
Subject: A83: Using Interups, and strings
Date: Wed, 14 Feb 2001 18:56:28 -0500

>
>Hi:
>
>	Here is a puzzle that I have not yet been able to figure out.  Ok, to
start
>out with, I am creating my own interup, with most of the core code comming
>from the the interrupt guide at www.ticalc.org/pub/text/ .  I want it to
>display a string, but when I set it up as a regular program that would
>display a string...
>
>
>(More Code)
>
>
>ld hl,text1
>
>bcall(_puts)
>
>text1:	.db "Sample String",0
>
>
>(More code)
>
>It only displays a bunch a garbled information when you press the right
key.
>How do I copy the string so it will be displayed correctly when the user
>presses the right key.
>
>Thanks in advnce
>Rob
>
>
>P.S. My interupt routine itself works just fine, I have tested it with
other
>operations, like clearing the screen, and it performs without a problem.
>
>
>

_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com




Follow-Ups: