I need help, if somebody could point me to a detailed AXE guide it’d be much appreciated. However, I want to come here, as I am learning axe so I can learn ASM, to ask questions...
I am trying to install an interrupt, say perhaps if it finds that I press two certain buttons at one time, it immediately does some BCall of my choosing. Here is my code, why does it clear my ram?
:.INTERUPT
:Lbl ABC
:If getkey(random keycode I will find out later.)
:Asm(EF....
:fnInt(ABC,6

I’d also like to find out how to turn off the calc using AXE
1. your interrupt, from the code you posted, doesn't ever return. That's a large problem.
2. make sure, when you are using that inline assembly, that you write the called address to RST 28h little endian.

As for turning of the calculator, you would do it the same way as in assembly (and likely, you'll have to use inline assembly) -- turn off the LCD by sending $02 to port $10, and put the CPU into low power mode. And, of course, do the reverse to get out of that.

Finally, please don't call "Axe" in all uppercase. That's not it's name, and it's just kind of annoying that way.
I wasn’t sure, Ash. Razz But thanks. Tell me how to return...?
Dapianokid wrote:
Tell me how to return...?



Code:
Return
Ingenious.
where exactly though?
Dapianokid wrote:
where exactly though?


At the end of the code intended to be an interrupt.
Just to clarify Dapianokid, is your intention to write a program that creates an interrupt that persists after the program has finished executing? I ask because of the peculiar placement of FnInt() in your program, as it is *inside* the interrupt. FnInt() should be placed at the beginning of your program, and is the initialization needed in order for the interrupt to function. Interrupts also need to be reset before the program terminates with LnReg, as Axe interrupts do not work correctly after the program ends. An example program using interrupts might look something like this:

Code:
.Axe
FnInt(INT,6)
..program code..
LnReg
Return

Lbl INT
If getkey(#) and getkey(#)
Asm(-hex codes-)
End
Return


This program first initializes the interrupts with the FnInt() line. From then on, the subroutine is called at regular intervals by the interrupt system. After your program is finished, interrupts are reset with LnReg, and the program returns.
Dapianokid wrote:
where exactly though?
You double-posted within 28 seconds of yourself. This is not a text message nor an IM client, it's a forum. Don't do that again.
Builderboy, in this case, the program does persist? I am still extremely new to Z80 assembly as well as Axe. I like your usage of examples, and much needed pointers, as though I had no idea what I was doing. Because I wasn’t. Over the course of one schoolday, I tend to get anywhere between thirty and fifty RAM clears and three or four AppVars and Archived Programs clears just to get one bit of syntax I wanted right. It’d not the best environment for trial and error.

Sorry, Kerm, the forums I’m used to take double posts and turn them into one post... won’t happen again. >:|
KermMartian wrote:
Dapianokid wrote:
where exactly though?
You double-posted within 28 seconds of yourself. This is not a text message nor an IM client, it's a forum. Don't do that again.

Please don't do that again. Wink

EDIT:

Dapianokid wrote:

I’d also like to find out how to turn off the calc using AXE


http://ourl.ca/9749/187264
Quote:
What do you mean "shut down?"

If you mean to turn the screen off, then just use
Quote
:Asm(DB10CB6F3E0220013CD310C9

Re-run that code to turn it back on as well.

To set the calculator into sleep mode and wait for the [On] key to be pressed, use
Quote
:Asm(3E01D303FB76FDCB09A6C9


To completely turn the calculator off so that the program will exit and the user will return to the homescreen:
Quote
:Asm(EF0850


All courtesy of Xeda and TI-BASIC dev.
  
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