BZC
KermMartian wrote:
Actually no, because with C you can reuse functions you use multiple times. Macros are essentually find-and-replace coding.


yes, but all those push-pops add up really fast....(remember my instcirc.8xp proggy?)
You have to do that with this ABC language too though.
KermMartian wrote:
You have to do that with this ABC language too though.


but it can be more hand optimized to push/pop only needed/destroyed registers...
something1990 wrote:
Hey maybe this could be that universal language for DCS we were talking about in another topic.

Well, the ultimate goal of our project is to create a language that can be used to make everything from programs to applications to operating systems. Almost any program format can be supported simply by loading the appropriate include files in the source code file.
That's great. I can't wait for final product. It will be so awesome beyond belief. Heck it might be so good that even people like Josh Frisby will be incapable of writing bad code with BZC.
where there is a will, there is a way
Kllrnohj wrote:

but it can be more hand optimized to push/pop only needed/destroyed registers...


Normally, you shouldn't have to worry about registers at all when programming in BASIC ASM, unless you're inserting native ASM code in your program.
Hey Snave, I have a suggestion. I think you should focus on making a better tutorial because the current one isn't all that explanatory. You weren't clear on program control, booleans, and data manipulation. Basically, I think you should go through all of Kerm's BASIC tutorials and for each lesson, make a BZC equivalent. I think a good tutorial will make your BZC more popular and easier to use.
Snave2000 wrote:
Kllrnohj wrote:

but it can be more hand optimized to push/pop only needed/destroyed registers...


Normally, you shouldn't have to worry about registers at all when programming in BASIC ASM, unless you're inserting native ASM code in your program.
What sorts of things can you do with BZC? I assume it can do computations on numbers, print, and take input; however, have you made more intricate routines like interfacing with system variables, displaying sprites, interrupt routines, and port operations? If you could implement those, than I believe this project really has potential to become the equivalent of the 89's C for z80s.

Oh as a side note, I would reccomend trying to avoid the system routines as much as possible for most routines ie: not adding two byte numbers using floating point math, but instead just using add a,b, and copying the graph buffer with a faster version of _grbufcpy. That way this language will actually have a significant speed increase from regular BASIC, because frankly if you just use bcalls to carry out all functions, this language wouldn't be all that different (speed wise) than BASIC.

Good luck, I look forward to seeing how this project develops. Good Idea
BZC allows for Asm code to be inserted and used, so I suppose port operations and interrupts can be used in that way. It can do computations on number, print, and take input. The manual said that sprite support will be developped for later, but I suppose if you include Mirage/Ion/DCS, you could do sprites by including Asm code. Hopefully all of these feature will be developped into the language itself, instead of relying on inserted Asm code.
Snave2000 wrote:
Kllrnohj wrote:

but it can be more hand optimized to push/pop only needed/destroyed registers...


Normally, you shouldn't have to worry about registers at all when programming in BASIC ASM, unless you're inserting native ASM code in your program.


i was referring to the code it generated, not inserting user coded ASM
something1990 wrote:
It can do computations on number
I hope those computations are done in a smarter way then just loading the registers into floating point numbers and doing the appropriate bcall floating point operation. Maybe there could be an option to optomize within each section for speed or for size. For example, within a critical loop it may be much more advantageous to do computations out with registers to increase speed, while for the rest of the program speed may not be as much of a concern and a bcall would help out on the size.
Kllrnohj wrote:
Snave2000 wrote:
Kllrnohj wrote:

but it can be more hand optimized to push/pop only needed/destroyed registers...


Normally, you shouldn't have to worry about registers at all when programming in BASIC ASM, unless you're inserting native ASM code in your program.


I was referring to the code it generated, not inserting user coded ASM


Well, normally, the programmer is using variables defined in the program to store data, act as counters for loops, etc. The registers are only used for manipulation of data within the built-in functions. An example:

STRING msg = "nothing"
INT counter = 0

START
FOR counter = 0 to 5
PRINTF 0 0 msg
NEXT
END

The "INT" keyword simply causes a label followed by a .DW statement to be created at the end of the program. When the loop runs, the variable is loaded into a register, incremented, and loaded back into storage for the next loop. If you're using a lot of variables only once or twice, then you will get inflated code due to the moving of the data between the registers and storage. But, on the other hand, you don't need to worry about saving registers at all.
Chipmaster wrote:
I hope those computations are done in a smarter way then just loading the registers into floating point numbers and doing the appropriate bcall floating point operation.


Well, floating point operations are not yet supported (i.e. there is no floating point data type yet nor routines to perform floating point operations). The computations something1990 was talking about are only for 1- and 2-byte variables; such computations are performed using the registers.

I should note that we're keeping use of TI-OS routines to an absolute minimum; the only routines at the moment that are currently indispensible are PutS and VPutS, and we are working on replacements for those routines.

Also, BASIC ASM programs currently cannot accept user input, basically due to the fact that we don't have an input routine yet.
To tell you the truth, I'm gonna have to see an example of the ASM this generates before I decide if it's useful. Fair enough?
KermMartian wrote:
To tell you the truth, I'm gonna have to see an example of the ASM this generates before I decide if it's useful. Fair enough?


Certainly. I will upload some ASM code this afternoon (currently, installing BZC requires an administrative account, which I obviously would not have access to at school).
Cool, I look forward to seeing it.
If you can't wait until Snave returns for the Asm code and you have BZC installed on your computer, you simply need to compile one of the programs to see the Asm code it generates. Basically most of the Asm code consists of equates to Rom calls, like in ti83plus.inc, with the actual program code at the bottom, and the variables at the end.

I have a question for Snave. Can BZC do something that in BASIC would be this:
getkey
A+(Ans=24-Ans=26)->A
Maybe in BZC it would be like this:
Asm Getkey routine
result = result + (getkey = left token value) - (getkey = right token value)
At that point wouldn't it just be better to learn ASM? Smile (Just playing devil's advocate here).
At this point maybe. When BZC is fully developped, then it would be easier to learn BZC. Also I think I may have developped a getkey routine using BZC, so I'll use it to compare two different styles to exemplify my point in my last post before this one. I want to know if instead of doing this:

Code:
BYTE getkey
INT result
ASM
   rst 28h
   .dw 4972h
   ld getkey, a
ENDASM
IF getkey == 1 THEN
result += 1
ENDIF
IF getkey == 2 THEN
result -= 1
ENDIF

You can do this:

Code:
BYTE getkey
INT result
ASM
   rst 28h
   .dw 4972h
   ld getkey, a
ENDASM
result += ((getkey == 1) - (getkey ==2))
  
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
BZC
» Goto page Previous  1, 2, 3, 4 ... 10, 11, 12  Next
» View previous topic :: View next topic  
Page 3 of 12
» 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