Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Redston_1 wrote:
ive found a bug (you probbly arleady klnow aboput it):
The display gets messed up if you ask for user input

Code:
PROGRAM:ZZED
iZICE
For(X,0,10)
det(0
det(3
Input C
det(5,C
Pause
det(1
End

See here

note this is a screenshot

note here i took a picture (sorry its big)

I realize you might not be able to fix this it would be great if you did.

Call det(1 before the user input and det(0 after.
You should add a stop program early if user preses certin button. Kinda like in Matteo's programs where you press [delete] to quit. Or ti basic where the [on] stops the program. Would be usefull for debugging and or if the program is an infinite loop.
Note: wouldn't have to go to the exact line though
Redston_1 wrote:
Or ti basic where the [on] stops the program. Would be usefull for debugging and or if the program is an infinite loop. Note: wouldn't have to go to the exact line though

It would add a few hundred bytes or so, but setting up an interrupt handler to handle the [on] button would be pretty neat and help avoid crashes. I don't know though; PT_ may have different thoughts Razz
Even if I want to, I've no idea how to do it. I don't have any knowledge of interrupts etc to do this, the only thing I can say is that you should be sure such thing wouldn't happen Razz
As I don't know ASM, maybe this is a lot harder than I think it is, but it would be nice to have access to the homescreen beyond just Disp. Could you consider adding a command that works like Output( in Basic or something similar to it?
CodertheBarbarian wrote:
As I don't know ASM, maybe this is a lot harder than I think it is, but it would be nice to have access to the homescreen beyond just Disp. Could you consider adding a command that works like Output( in Basic or something similar to it?
I thought the same thing, until I realized the power and simplicity of the other commands that use the whole screen. You can do so much more!
Output( and running a BASIC subprogram now works!



Note: I don't do any error-checking, so please be sure your BASIC program works fine, I can't guarentee what would happen if you have an error in it Razz

Download:
https://www.cemetech.net/programs/index.php?mode=file&path=/84pce/asm/ICECompiler.zip
Sin() Cos() Tan()
DJ_O wrote:
Sin() Cos() Tan()


Well, that would require a complete rework of the integer arithmetic engine, unless its given as an integer (maybe sin(x)*10^7-8 or so) is what the function outputs.
CodertheBarbarian wrote:
DJ_O wrote:
Sin() Cos() Tan()


Well, that would require a complete rework of the integer arithmetic engine, unless its given as an integer (maybe sin(x)*10^7-8 or so) is what the function outputs.


That would be amazing. Another idea is to allow the use of decimals Razz. Just kidding, that's a TON of work and unnecessary. Just think of it as having int( functions everywhere!
_iPhoenix_ wrote:
CodertheBarbarian wrote:
DJ_O wrote:
Sin() Cos() Tan()


Well, that would require a complete rework of the integer arithmetic engine, unless its given as an integer (maybe sin(x)*10^7-8 or so) is what the function outputs.


That would be amazing. Another idea is to allow the use of decimals Razz. Just kidding, that's a TON of work and unnecessary. Just think of it as having int( functions everywhere!

I think its a combinations of 2 things. In ASM, it is much easier to make integer maths that work with the registers, and it is WAYYY faster. If you want to have decimals, you can't be storing your answer in an 8-bit register (or in ICE's case, 3 bits). I can understand using 3 bits in order to allow for big enough numbers (8 bit integers simply don't cut it sometimes), but I don't see why you would go further, it would bloat up the code, and it would make it slower and make ICE even harder than it already is to implement, it makes no sense. That being said, I would say there is still some work needed in ICE in the form of adding commands before it is up to par with languages like axe and just basic. One command I think should really be added in is sub(), and maybe matrices, not like maths and stuff, but just like a grid-type of storing numbers, which can be useful for games.
So, I'm kinda having a bug with ICE. When I compile it, it says "Something went wrong! Please report it! Error on line 5."

Here's the code for the program
PROGRAM: GET
iCHECK
10->L1(1
5->L1(2
1->L1(3
10->L1(4
5->L1(5
0->L1(6
CompilePrgm(ISGPARS
I don't have any problems compiling this code:

Code:
[i]CHECK
10->L1(1
5->L1(2
1->L1(3
10->L1(4
5->L1(5
0->L1(6

I'm not what/where the problem is. Do you have the latest version?
PT_ wrote:
I don't have any problems compiling this code:

I'm not what/where the problem is. Do you have the latest version?

At the end of the program I'm having it compile another program. Turns out that program has the file, but I'm no closer to solving it, except I think it has something to do with nested if's, as those are the commands it says are wrong.

Code:

[i]TI
If L1(3)>L1(6)
2->theta
Else
If L1(3)<L1(6)
0->theta
Else
If L1(2)>L1(5)
2->theta
Else
If L1(2)<L1(5)
0->theta
Else
If L1(1)>L1(4)
2->theta
Else
If L1(1)<L1(4)
0->theta
Else
1->theta
End
End
End
End
End
End
End
Subprograms should not have the [i] header. If you remove that, does it fix the issue?
I put in the header to test compiling the subprogram separately. I think its something with the if statements.
It's the L1(X)<L1(Y), that makes the error. I will fix it whenever I've time! Smile
Hey PT_, Here's an error I got in the beginning stages of creating my latest program, RubEX. (The file is now in pending.)


Code:
iFAIL
If (G*G)<(A*3)
End

(Error line 2)

I am using ICE v1.5 (10kB), hope it helps!
(Thanks for answering my intro, the final push to compete RubEX was thanks to you)
Probably the same error as listed about, stuff < stuff sometimes fails. Whenever I've time, I will try to fix it Razz
Feature suggestion:
How about Icons and descriptions for ICE compiled programs?
  
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
» Goto page Previous  1, 2, 3 ... 10, 11, 12 ... 19, 20, 21  Next
» View previous topic :: View next topic  
Page 11 of 21
» 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