Omnimaga suggested I head here, as these are complicated matters:

1. On startup, launching an app. Better yet, launching only one subroutine from an app. Can someone help with this?

2. Kerm, this is for you: A hook/chain with Cn2.2's interrupt, so I can run a sequence of code after the Cn2.2 interrupt fires, if the receive buffer has data.
You should always come to us with ASM questions. Smile I believe that your first question duplicates a topic you already posted, which has several replies in it. I feel like we've also had a long discussion on the second issue, so I will look when I get home.
KermMartian wrote:
You should always come to us with ASM questions. Smile I believe that your first question duplicates a topic you already posted, which has several replies in it. I feel like we've also had a long discussion on the second issue, so I will look when I get home.


Can you link me to the first topic on the first question. I can't seem to find the topic.

We have discussed my second question in theory, not in practice. I definitely would like to go ahead with it though. At one point, you indicate that I would need to replace the ret in the Cn interrupt with a jump. That still the most viable option?

[Edit] Found the first topic. And sorry bout the title.
Shock You forgot about having started the other topic? Yeah, at this point, your best bet is to make your installer start at the known RAM starting address of the interrupt (I think it's $9999 or $9A9A) then scan forward to find a $C9 (ret), then replace that with a jp to your code.
Hmm. I'm a bit iffy on modifying the interrupt with a language other than what it was coded in, but when I get to it, I'll see what I can do.
ACagliano wrote:
Hmm. I'm a bit iffy on modifying the interrupt with a language other than what it was coded in, but when I get to it, I'll see what I can do.
I don't follow what you mean. You could just write the part I'm describing in pure ASM, can't you?
Zero knowledge of assembly Sad All of my manipulations will need to be in Axe.
ACagliano wrote:
Zero knowledge of assembly Sad All of my manipulations will need to be in Axe.
Then learn ASM! Very Happy That would seem to be the logical conclusion, to me. Smile It's not that much harder than Axe imho.
u recommend "learn asm in 28 days"?

I've been meaning to. Just haven't had time. Won't rest this week until I can code a bit.
ACagliano wrote:
u recommend "learn asm in 28 days"?

I've been meaning to. Just haven't had time. Won't rest this week until I can code a bit.
Haha, that might be a bit too intense of a way to approach it; I'd be happy to code up the interrupt modification code in pure ASM for you. But yes, you definitely should learn ASM, and that's the best of a mixed set of ASM guides. We have a bunch of relatively new users working on ASM self-teaching currently, so you'd be in good company.
I've been wondering, how do jumps work in assembly. Do you have to jump to a specific address that the code is at or do u call it by label, like you would in Basic and Axe? If you wrote that mod code, you would probably need a disassembly of the code that needs to be jumped to, correct?
They're the same thing. As in any other language, labels are merely equates of code locations, or more specifically in any compiled language, memory locations. I would just need to know the address where the code for your custom interrupt posthandler would reside.

Edit: I edited your topic title to be more on-topic, and I'm moving this thread to z80 ASM, where it belongs.
Ok. I need to get better with topic titles.

My question is this: how do I know where it will reside? Won't the location change every time I compile, especially if code gets added to the app? Or would it be written to a static location?
It will indeed change every time you compile. Is there some way that Axe can expose label locations to inline ASM? If so, it could work that way.
KermMartian wrote:
It will indeed change every time you compile. Is there some way that Axe can expose label locations to inline ASM? If so, it could work that way.


I'll poke Quigibo about it. I'll get back to you.
ACagliano wrote:
KermMartian wrote:
It will indeed change every time you compile. Is there some way that Axe can expose label locations to inline ASM? If so, it could work that way.


I'll poke Quigibo about it. I'll get back to you.
Thanks, I look forward to hearing what your explorations yield.
You could add some code at the beginning of your app that checks a value in memory against a predetermined value. Then, if the two values are equal, you could jump to your interrupt handler. If they're not equal, your app would execute normally.
souvik1997 wrote:
You could add some code at the beginning of your app that checks a value in memory against a predetermined value. Then, if the two values are equal, you could jump to your interrupt handler. If they're not equal, your app would execute normally.
No no, you're mixing the two questions together, I think (but please correct me if I'm wrong). You would want to jump to whatever routine that value is indicating, not the interrupt handler.
KermMartian wrote:
Shock You forgot about having started the other topic? Yeah, at this point, your best bet is to make your installer start at the known RAM starting address of the interrupt (I think it's $9999 or $9A9A) then scan forward to find a $C9 (ret), then replace that with a jp to your code.


Kerm, what I meant was that the jp could be a ld (<pointer>),<whatever> \ jp $4100, then at $4100 there could be some Axe code llike this:

Code:

{<ponter>}->A
If A=<whatever>
Goto PST
End

where the label PST is the post-interrupt handler.
But that's not what he wants to do, I think. Smile When his app is running, he can just feed the location of the post-interrupt handler directly in. The triggering of the app is a completely separate issue if I understand him.
  
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 2
» 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