Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Yesterday, I compiled the program and converted it to an Axiom appvar. However, it doesn't work, giving the "ERR: BAD AXIOM" when one of the tokens is referenced. Could one of you who is experienced with Axe please help me?
Do you need some sort of pointer that marks where the end of each Axiom chunk is, or is that what the .dw 3 is for?
The .dw 3 is "the size of the command" according to the documentation. But then all it says is that a .dw 0 signals the end of the Axiom. Go to axe.omnimaga.org and download the newest version of Axe (0.5.1, found in the Latest Updates thread). The Developers folder in the zip contains the axiom documentation.
Compynerd255 wrote:
The .dw 3 is "the size of the command" according to the documentation. But then all it says is that a .dw 0 signals the end of the Axiom.
I'm unclear whether that size field is supposed to be just the command, or the command and that per-command header. Do you have any reference Axioms that might help?
The source looks fine to me.

If you mean you made an uncompiled "hex" assembly program, compiled it, and then converted it to an appvar, that won't actually work. The Axiom requires that the program does NOT have the assembly header $6DBB but instead is replaced with $CODE. Also, Axe automatically converts it to an appvar for you if you keep it as a program in ram your first time using it. But you do have to compile it beforehand using spasm (tasm won't work). Brass might work too, but you have to use .relocate instead of .org.
Brass works fine as far as I can tell; are you sure .org doesn't do it properly? The assembled hEx I posted was made with Brass, and omitted the BB6D header.
Right but to compile that hex on-calc you have to add the AsmProg token which adds those bytes back. The .org stuff is only for the more advanced axioms that use absolute jumps or any inline references.
quigibo wrote:
Right but to compile that hex on-calc you have to add the AsmProg token which adds those bytes back. The .org stuff is only for the more advanced axioms that use absolute jumps or any inline references.
Ahh, of course, that makes sense. Thanks for the clarification. So the long story short is that there's nothing fundamentally wrong with the code that Compynerd posted in this topic or the hEx that I generated, but the way Compynerd turned it into an AppVar on his calculator was the problem?
Yeah, I realize that was the problem. I tried entering the program as hex. I'll try converting it to an Appvar by copying everything in the compiled program except for the first two bytes.
Compynerd255 wrote:
Yeah, I realize that was the problem. I tried entering the program as hex. I'll try converting it to an Appvar by copying everything in the compiled program except for the first two bytes.
Note that you should only omit the first two bytes if they're $BB, $6D. The part that you should keep starts with $DE, $C0.
I just compiled my Axiom using the copy of Spasm supplied with Hot_Dog's ASM tutorial. Here it is. I haven't tested it yet, but will as soon as I can. Please test it out and tell me if it works!
Compynerd255 wrote:
I just compiled my Axiom using the copy of Spasm supplied with Hot_Dog's ASM tutorial. Here it is. I haven't tested it yet, but will as soon as I can. Please test it out and tell me if it works!
I strongly recommend that you instead use the Doors CS SDK, as it's more versatile and flexible (in my very biased experience, of course). That's what I used when I originally compiled it for you and posted the hex here. Do you have a sample Axe program for us to test it with? Oh, and the DCS SDK link:

http://www.ticalc.org/archives/files/fileinfo/341/34192.html
Oh, I have the DCS SDK, and that's what I was trying to use to compile the program originally. But I never got it to function properly: at school, it couldn't run the Python script, and at home, no output file was generated. But I was able to compile with Spasm and a batch file, and it seems like it worked because an output file of appropriate size was generated, and the assembler warned that the program didn't start with BB6D.

And I just realized that the Axiom header, C0DE, was picked because it spelled "code". I feel so dumb.
Haha, I'm entertained that you just noticed that. Smile At school you probably didn't have Python installed. I think we should try to work out your issues with the DCS SDK, because it's supposed to be more or less brainless to use. Out of curiosity, can you run "compile blah" in a terminal instead of via a batch script and see what errors pop up?
lol yeah. It means code, but is 13375p34k
KermMartian wrote:
Out of curiosity, can you run "compile blah" in a terminal instead of via a batch script and see what errors pop up?

The school computers block the command prompt, because of what you can do with it. The batch file is a workaround. However, I did stick a "pause" (wait for a key) command at the end of the batch so I could read the compiler output.

EDIT: And I just realized that there is a fault in the Axiom: the token bytes are in the wrong order. I'll try recompiling with that fix.
Excellent, glad to hear it. Smile On a slightly off-topic note, I'm amused that the computers block the direct use of the command prompt but not the execution of batch files; that's a pretty glaring omission.
KermMartian wrote:
On a slightly off-topic note, I'm amused that the computers block the direct use of the command prompt but not the execution of batch files; that's a pretty glaring omission.

Yeah, which is why I don't like to talk about it (they see it and then figure it out). But they don't block batch files because that would mean blocking Notepad, and you can't get rid of that.
You can block the execution of batch files without blocking Notepad to create batch files; you can create batch files in any text editor, so you'd have to remove every text editor. Anyway, did you try recompiling your Axiom yet? I'm excited to hear someone actually getting CALCnet and Axe working together.
  
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 4 of 4
» All times are GMT - 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