hi
well i want store variables in a basic prog and use these in the axe prog but it is every time failing cause i cant use the variables in the axe prog.how can i make it?
how can i copy variables from ram (basic prog) ???
thank you
Are you talking about TI-OS variables (Reals)? If so, are you asking how to set OS variables from ASM programs, access them from Axe, or something else?
I can't help you with Axe, but you might want to check out this page from Asm in 28 Days:
http://eeems.omnimaga.org/files/Resources/Tutorials/ASMin28Days/lesson/day19.html

There was an old discussion on MaxCoderz:
http://maxcoderz.org/forum/viewtopic.php?f=5&t=1914
And another quick question on Ans:
http://maxcoderz.org/forum/viewtopic.php?f=5&t=1973

I'm not quite sure what you want to do, though. Variables, you mean A-Z? What do you want to do with them? I'm pretty sure Axe has some support for variables, at least lots of people use it to create programs/appvars.

EDIT: There's also lots of great information on the MC forums, it might be worthwhile just to scroll through everything they've got sometime. The old RevSoft forums had a lot of interesting debates (Jim e and Spencer! Razz), unfortunately they were lost. They might be on archive.org, though.
well i am talking about reals and i mean that i store something in a sring and the axe prog makes it
like executing progs
ex:
"prgmA"-->str1
prgmLIB

prgm "a" is executing

but every time i programm a prog that shall make this it is showing ERR:undef at axe parser.so i have an problem ti copy ti os variables
how can i programm it ?
thank you
PS:
well and i´m not an asm programmer but axe for axe parser
I would love to help, but I'm confused about what you're trying to do. I hear reals, strings, programs, copying, making, executing; but I can't piece together what exactly you're asking. Could you summarize exactly what you'd like to do, perhaps with any code you've tried for it?
well i ve tried this:


Code:
basic prog:
"prgm a"-->str1
prgm axe

axeprog:
getcalc(str1)-->A
...

well i know that in the points but i cant use str1 so i have a problem
axe parser is always sayung
err:undefinet
how can i fix this?
Ah I see, that's actually an easy fix; just change that to GetCalc("Str1"). The quotes are necessary because the GetCalc commands operate on variable names in strings, not just the raw symbols. This also has the nice bonus of allowing you to do things like use GetCalc commands on arbitrary strings.
a i see thank you

and a question i know this copy


Code:
:"A"→Str1
:length(Str1)→L
:If GetCalc("prgmASDF",L)→A
:Copy(Str1,A,L)
:Else
:Disp "Creation error"
:End

but if i try to copy something like Disp it is only copiing the D or it is not making a . but cubic reg how can i fix this?
That's because strings in Axe/assembly are (mostly) strings of characters, while OS program/string/equation variables are strings of tokens. Unfortunately, token string support in Axe is virtually nonexistent.

If you wanted to fill a program with pre-determined data, you'd probably have to store it as raw data in hexadecimal format. If you're not using a lot of data, this may be feasible.This is a good resource for finding the hexadecimal values for tokens. For instance, the data for a program that just contained Disp "Hello" would be [DE2A48BBB4BBBCBBBCBBBF2A].
well i´m working on a c to basic compiler so it includes all ti data
is there maby a another way???
alex99 wrote:
well i´m working on a c to basic compiler so it includes all ti data
is there maby a another way???
Here at Cemetech, we try to help everyone as much as possible. Usually that means helping them program, but sometimes it means guiding their project choices. In this case, I'm afraid I must recommend that you try a few easier projects before diving into a full-fledged C-to-TI-BASIC compiler. There are a huge number of things you must do for such a project, from understanding every intricacy of the C spec to understanding everything that's possible (and impossible), then creating the AST from C code, converting that AST to TI-BASIC, and even rendering the final binary. I must reiterate my recommendation to start smaller.
well i´m programming since 3 years so...
alex99 wrote:
well i´m programming since 3 years so...
Indeed, and that clearly shows from your projects, but if you're not that experienced with assembly concepts and C compiler concepts, you might be in a bit over your head, in my opinion.
okok then i willo make a compiler that don´t write progs but shows what you have made.and i did not want include all the libs of the real c-compiler...only studio.h;math.h and stdlib.h
Those headers aren't part of the compiler, those are just function declarations. The compiler's job is to follow the C spec and be able to compile valid C code.
i know but without the header the compiler nothing knows...
KermMartian wrote:
Here at Cemetech, we try to help everyone as much as possible. Usually that means helping them program, but sometimes it means guiding their project choices. In this case, I'm afraid I must recommend that you try a few easier projects before diving into a full-fledged C-to-TI-BASIC compiler. There are a huge number of things you must do for such a project, from understanding every intricacy of the C spec to understanding everything that's possible (and impossible), then creating the AST from C code, converting that AST to TI-BASIC, and even rendering the final binary. I must reiterate my recommendation to start smaller.


And of course if you can parse C into an AST then producing Z80 instead of TI-Basic would be far more logical and performant (hell, it'd be *easier* too)
That was the most confusing bit for me, why convert to TI-Basic?
well i´m an basic programmer and i can programm a bit with axe and i want to make an oncalc c-compiler so i make this project almost completely with basic,and copy all with axe to a prog...
Alex... either you are hiding some sort of super-library i dont know about, or you dont understand the Basic language at all. im sure its impossible to "Compile" anything with basic. in order to compile anything, you would need to use assembly (not sure what axe can do).

unless you mean you would "WRITE" C on the calc, but would transfer it to the computer, and use something fancy to convert it into a !@#$%^&*(.C file. in whcih case, your making a notepad specializing in C.
  
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