Check out my latest project:

(Edit: I had to speed this up, because CEmu made ICE run SO slow.

So what's going to makes this different than BasicNote and TextEditorCE (2 great programs by the way!):

Flashcards
Notes
Reminders
It's in ICE!

I have made much progress in my 2 hours of programming this. However I did run across a problem. Obviously I need saving capabilities, so my question is how do you figure out the size of the appvar for recalling it in a read() command? It was easy storing it, as I already knew how long my document was, but how do you recall it properly? I already thought of storing how long it was a the first slot of the appvar, but so far I haven't been able to get it work.
Calcuon wrote:
how do you figure out the size of the appvar for recalling it in a read() command?

GetSize().

Nice work; this project is looking pretty spiffy Smile
This looks amazing !!! Smile
Look forward to using it.

how does the saving work?
do you save it all in to an appvars ?
how long can the text be?
Alvajoy123 wrote:
This looks amazing !!! Smile
Look forward to using it.

how does the saving work?
do you save it all in to an appvars ?
how long can the text be?


I plan to save work completely through appvars.
Your text can be as long as your ROM provides. Very Happy
Right now I have only programmed one available line, but I will add infinite amount of possible lines, text wrapping, and scrolling.





Edit: I'm going to get yelled at by Kerm for double-posting, so I'm going to combine two posts together. I've started on the appvars section, and I have seem to run another problem (such is the life of a programmer). My program seems to be happy until you type a 3rd character. You can delete over and over again, but the program crashes after the 3rd character is typed. I looked at my code over and over again and I'm baffled over it.


Main Program

Code:

[i]ICEPAD
Alloc(1000->A       
CloseAll
If Open("ICEPadAV","r+"->A
   GetSize(A->POS
   Read(DATA,POS,1,A
   Copy(L6,DATA,POS
Else
   Open("ICEPadAV","w+"->A
   0->POS
End

Begin
AsmComp(ICEPADAT
Copy(L5,L1,38
0->KEY+1->MODE+23->Y
SetColor(107
SetTextBGColor(107
SetTextFGColor(255
SetTextTransparentColor(1
FillRectangle(1,218,318,20
FillRectangle(1,1,318,20
Sprite(ICEDLOGO,4,2
ScaledSprite_NoClip(ALPHA,300,3,2,2
PrintStringXY("ICEPad  v0.1.1",20,8
SetTextBGColor(255
SetTextFGColor(0
Rectangle(1,22,318,195
While 1
   Lbl LOOPW
   Repeat (KEY>8 and KEY<15) or (KEY>16 and KEY<23) or (KEY>24 and KEY<32) or (KEY>32 and KEY<40) or (KEY>41 and KEY<49) or KEY=54 or KEY=56
      getKey->KEY
   End
   If KEY=9 or KEY=48 or KEY=54 or KEY=56
      Goto MISC
   End
   POS+1->POS
   L5((KEY-10)->CHAR
   If CHAR=0
      POS-1->POS
      Goto LOOPW
   End
   KEY->{L6*POS
   SetTextXY((POS-1)*8+3,Y
   PrintChar(CHAR
End

Lbl MISC
If KEY=9
   Goto END
End
If KEY=48
   If MODE=1
      ScaledSprite_NoClip(LALPHA,300,3,2,2
      2->MODE
      Copy(L5,L2,38
      Goto LOOPW
   End
   If MODE>1
      ScaledSprite_NoClip(ALPHA,300,3,2,2
      1->MODE
      Copy(L5,L1,38
      Goto LOOPW
   End
End
If KEY=54
   If MODE<4
      ScaledSprite_NoClip(SECOND,300,3,2,2
      4->MODE
      Copy(L5,L4,38
      Goto LOOPW
   End
   If MODE=4
      SetColor(107
      FillRectangle(300,3,10,14
      3->MODE
      Copy(L5,L3,38
      Goto LOOPW
   End
End
If KEY=56 and POS>0
   SetColor(255
   FillRectangle((POS-1)*8+3,Y,8,8
   POS-1->POS
   Goto LOOPW
End
If KEY=56 and POS=0
   Goto LOOPW
End
Lbl END
Copy(DATA,L6,POS
CloseAll
Open("IcePadAV","w"->A
Write(DATA,POS,1,A
det(1


Subprogram

Code:

[sigmay]L1,1,34,87,82,77,72,0,0,63,0,86,81,76,71,0,0,58,90,85,80,75,70,67,0,32,89,84,79,74,69,66,0,0,88,83,78,73,68,65
[sigmay]L2,1,96,119,114,109,104,0,0,17,0,118,113,108,103,0,0,59,122,117,112,107,102,99,0,32,121,116,111,106,101,98,0,0,120,115,110,105,100,97
[sigmay]L3,1,43,45,42,47,94,0,0,45,51,54,57,41,0,0,0,46,50,53,56,40,0,0,0,48,49,52,55,44,0,0,0,0,0,0,0,0,0,0
[sigmay]L4,1,0,93,91,0,0,0,0,0,0,0,0,125,0,0,0,0,0,0,0,123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[minY]14,17,"6B6BE26B6BE26B6BE26B6BE26B6B3B3BE23B3BE23B3BE23B3BE23B3B3B1D611D1D611D1D611D1D611D3B3B1D61DE1D61DE1D61DE1D61DE3B3B1D1D1D1D1D1D1D1D1D1D1D1D3B3B1D1F1F1F9F9F9F1F1F1F3D1D3B3B1D3D1F5D9F5D5D1F5D5D3D1D3B3B1D3D1F5D9F5D5D1F1F5D3D1D3B3B1D3D1F5D9F5D5D1F5D5D3D1D3B3B1D1F1F1F9F9F9F1F1F1F3D1D3B3B1D9F9F9F5D1F5D9F9F5D3D1D3B3B1D9F5D9F1F5D1F9F5D9F3D1D3B3B1D9F9F9F1F1F1F9F5D9F3D1D3B3B1D9F5D5D1F5D1F9F5D9F3D1D3B3B1D9F3D3D1F3D1F9F9F3D3D1D3B3B1D1D1D1D1D1D1D1D1D1D1D1D3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B"->ICEDLOGO
[minY]5,7,"6B6B6B6B6B6B6BFF6B6B6BFFFFFF6BFF6BFF6BFF6B6BFF6B6B6B6BFF6B6B6B6BFF6B6B"->SECOND
[minY]5,7,"6B6B6B6B6B6B6BFF6B6B6BFF6BFF6B6BFFFFFF6B6BFF6BFF6B6BFF6BFF6B6B6B6B6B6B"->ALPHA
[minY]5,7,"6B6B6B6B6B6B6BFF6B6B6B6B6BFF6B6B6BFFFF6B6BFF6BFF6B6B6BFFFF6B6B6B6B6B6B"->LALPHA
Calcuon wrote:
Alvajoy123 wrote:
This looks amazing !!! Smile
Look forward to using it.

how does the saving work?
do you save it all in to an appvars ?
how long can the text be?


I plan to save work completely through appvars.
Your text can be as long as your ROM provides. Very Happy
Right now I have only programmed one available line, but I will add infinite amount of possible lines, text wrapping, and scrolling.





Edit: I'm going to get yelled at by Kerm for double-posting, so I'm going to combine two posts together. I've started on the appvars section, and I have seem to run another problem (such is the life of a programmer). My program seems to be happy until you type a 3rd character. You can delete over and over again, but the program crashes after the 3rd character is typed. I looked at my code over and over again and I'm baffled over it.


Main Program

Code:

[i]ICEPAD
Alloc(1000->A       
CloseAll
If Open("ICEPadAV","r+"->A
   GetSize(A->POS
   Read(DATA,POS,1,A
   Copy(L6,DATA,POS
Else
   Open("ICEPadAV","w+"->A
   0->POS
End

Begin
AsmComp(ICEPADAT
Copy(L5,L1,38
0->KEY+1->MODE+23->Y
SetColor(107
SetTextBGColor(107
SetTextFGColor(255
SetTextTransparentColor(1
FillRectangle(1,218,318,20
FillRectangle(1,1,318,20
Sprite(ICEDLOGO,4,2
ScaledSprite_NoClip(ALPHA,300,3,2,2
PrintStringXY("ICEPad  v0.1.1",20,8
SetTextBGColor(255
SetTextFGColor(0
Rectangle(1,22,318,195
While 1
   Lbl LOOPW
   Repeat (KEY>8 and KEY<15) or (KEY>16 and KEY<23) or (KEY>24 and KEY<32) or (KEY>32 and KEY<40) or (KEY>41 and KEY<49) or KEY=54 or KEY=56
      getKey->KEY
   End
   If KEY=9 or KEY=48 or KEY=54 or KEY=56
      Goto MISC
   End
   POS+1->POS
   L5((KEY-10)->CHAR
   If CHAR=0
      POS-1->POS
      Goto LOOPW
   End
   KEY->{L6*POS
   SetTextXY((POS-1)*8+3,Y
   PrintChar(CHAR
End

Lbl MISC
If KEY=9
   Goto END
End
If KEY=48
   If MODE=1
      ScaledSprite_NoClip(LALPHA,300,3,2,2
      2->MODE
      Copy(L5,L2,38
      Goto LOOPW
   End
   If MODE>1
      ScaledSprite_NoClip(ALPHA,300,3,2,2
      1->MODE
      Copy(L5,L1,38
      Goto LOOPW
   End
End
If KEY=54
   If MODE<4
      ScaledSprite_NoClip(SECOND,300,3,2,2
      4->MODE
      Copy(L5,L4,38
      Goto LOOPW
   End
   If MODE=4
      SetColor(107
      FillRectangle(300,3,10,14
      3->MODE
      Copy(L5,L3,38
      Goto LOOPW
   End
End
If KEY=56 and POS>0
   SetColor(255
   FillRectangle((POS-1)*8+3,Y,8,8
   POS-1->POS
   Goto LOOPW
End
If KEY=56 and POS=0
   Goto LOOPW
End
Lbl END
Copy(DATA,L6,POS
CloseAll
Open("IcePadAV","w"->A
Write(DATA,POS,1,A
det(1


Subprogram

Code:

[sigmay]L1,1,34,87,82,77,72,0,0,63,0,86,81,76,71,0,0,58,90,85,80,75,70,67,0,32,89,84,79,74,69,66,0,0,88,83,78,73,68,65
[sigmay]L2,1,96,119,114,109,104,0,0,17,0,118,113,108,103,0,0,59,122,117,112,107,102,99,0,32,121,116,111,106,101,98,0,0,120,115,110,105,100,97
[sigmay]L3,1,43,45,42,47,94,0,0,45,51,54,57,41,0,0,0,46,50,53,56,40,0,0,0,48,49,52,55,44,0,0,0,0,0,0,0,0,0,0
[sigmay]L4,1,0,93,91,0,0,0,0,0,0,0,0,125,0,0,0,0,0,0,0,123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
[minY]14,17,"6B6BE26B6BE26B6BE26B6BE26B6B3B3BE23B3BE23B3BE23B3BE23B3B3B1D611D1D611D1D611D1D611D3B3B1D61DE1D61DE1D61DE1D61DE3B3B1D1D1D1D1D1D1D1D1D1D1D1D3B3B1D1F1F1F9F9F9F1F1F1F3D1D3B3B1D3D1F5D9F5D5D1F5D5D3D1D3B3B1D3D1F5D9F5D5D1F1F5D3D1D3B3B1D3D1F5D9F5D5D1F5D5D3D1D3B3B1D1F1F1F9F9F9F1F1F1F3D1D3B3B1D9F9F9F5D1F5D9F9F5D3D1D3B3B1D9F5D9F1F5D1F9F5D9F3D1D3B3B1D9F9F9F1F1F1F9F5D9F3D1D3B3B1D9F5D5D1F5D1F9F5D9F3D1D3B3B1D9F3D3D1F3D1F9F9F3D3D1D3B3B1D1D1D1D1D1D1D1D1D1D1D1D3B3B3B3B3B3B3B3B3B3B3B3B3B3B3B"->ICEDLOGO
[minY]5,7,"6B6B6B6B6B6B6BFF6B6B6BFFFFFF6BFF6BFF6BFF6B6BFF6B6B6B6BFF6B6B6B6BFF6B6B"->SECOND
[minY]5,7,"6B6B6B6B6B6B6BFF6B6B6BFF6BFF6B6BFFFFFF6B6BFF6BFF6B6BFF6BFF6B6B6B6B6B6B"->ALPHA
[minY]5,7,"6B6B6B6B6B6B6BFF6B6B6B6B6BFF6B6B6BFFFF6B6BFF6BFF6B6B6BFFFF6B6B6B6B6B6B"->LALPHA




Code:

Alloc(1000->A       
CloseAll
If Open("ICEPadAV","r+"->A
   GetSize(A->POS
   Read(DATA,POS,1,A
   Copy(L6,DATA,POS
Else
   Open("ICEPadAV","w+"->A
   0->POS
End

You used the variable "A" for the Allocated byte pointer as well as the file slot. The variable "A" would be overwritten by this line

Code:

If Open("ICEPadAV","r+"->A
Would this fix it then:


Code:

Alloc(1000->A       
CloseAll
If Open("ICEPadAV","r+"
   Open("ICEPadAV","r+"->A
   GetSize(A->POS
   Read(DATA,POS,1,A
   Copy(L6,DATA,POS
Else
   Open("ICEPadAV","w+"->A
   0->POS
End
Calcuon wrote:
Would this fix it then:


Code:

Alloc(1000->A       
CloseAll
If Open("ICEPadAV","r+"
   Open("ICEPadAV","r+"->A
   GetSize(A->POS
   Read(DATA,POS,1,A
   Copy(L6,DATA,POS
Else
   Open("ICEPadAV","w+"->A
   0->POS
End

no. Use a different variable for each of them
fyi You can use multiple letters in a variable name
How about:

Code:
CloseAll
OpenVars("ICEPadAV","r",21) -> A
If A
   GetSize(A->POS
   Read(DATA,POS,1,A
   Copy(L6,DATA,POS
Else
   Open("ICEPadAV","w"
   0 -> POS
End


In the Else Con. why are you opening a vars that all ready open?
I have decided to call my Project ICEPad. The ICEPad menu will have a shell feel, with 3 folders containing ICENotes (currently working on), ICECards (Flashcards), and ICECalendar. I will probably change the names later on, but for now it will stay.

OK, progress report:
-- Took out Appvars temporarily
-- Text wrapping works!
-- Moving the cursor and inserting text is in progress

Eye Candy:
Looking pretty spiffy! Keep up the nice work Smile

I like the blinking cursor.
Sorry I didn't get an earlier update out. I got to sit in suspense for almost a week wondering if this computer (and all my calculator files) would have to be reset after the techs at HP computers messed our computer up and got it stuck in some endless bootup loop. Luckily we have a laptop, so I could still see what was up.

Progress repo:
Inserting and deleting inserting text FINALLY WORKS!!!!!
Color implemented
Fix up a couple of visual bugs

Eye Candy:



Onward to appvars!

Edit: hmm.. Sad , I saw some weird bug. Towards the end of that GIF, it appears that the blue F turned into a black V.
Calcuon wrote:
Sorry I didn't get an earlier update out. I got to sit in suspense for almost a week wondering if this computer would have to be reset after the techs at HP computers messed our computer up and got stuck in some endless bootup loop. Luckily we have a laptop, so I could still see what was up.

Progress repo:
Inserting and deleting inserting text FINALLY WORKS!!!!!
Color implemented
Fix up a couple of visual bugs

Eye Candy:



Onward to appvars!

Edit: hmm.. Sad , I saw some weird bug. Towards the end of that GIF, it appears that the blue F turned into a black V.

This is looking AMAZING! Very Happy

I have a few suggestions:
+ Enter key puts new line
+ Changing text size
+ Underlining
(Try this: HorizLine(GetTextX,GetTextY,GetCharWidth(CHAR)))

Keep up the good work! Smile
beckadamtheinventor wrote:


I have a few suggestions:
+ Enter key puts new line
+ Changing text size
+ Underlining
(Try this: HorizLine(GetTextX,GetTextY,GetCharWidth(CHAR)))

Keep up the good work! Smile


+ Will do, should be fairly easy
+ Eh, not going to be so easy to do... but definitely something I will try in the future
+ GetTextX? I think I've been living under a rock. PT_, slow down on those updates Very Happy . Thanks for the advice. More progress very soon.
Calcuon wrote:
+ GetTextX? I think I've been living under a rock. PT_, slow down on those updates Very Happy

This has been implemented since the C libraries were implemented in ICE, FYI Razz (the C version, that is)

Anyway, this program looks excellent, clean and simple, so I hope you continue working on this until it's finished. Keep up the great work! Smile
Is there a github location for this program, or could you post updated code? I would like to see how it contrasts with my text editor code (mine is mega-slow).
This looks familiar lol.

Anyway keep up the great work! I like seeing all the new features Smile
MateoConLechuga wrote:
This looks familiar 0x5.

Anyway keep up the great work! I like seeing all the new features Smile


Yeah, I know. I sorta feel bad, because it seems like I'm plagiarizing an idea. It was made even worse when I announced there were going to be a calendar (reminders) to find out that SM84CE was already working on that... in ICE!

I'm going to try to add lots of functions in ICENote to make it different then BasicNote and TExtEditorCE. (Sorry, I don't have an update today. I haven't had a lot of time time to work on it. Sad I'll try to get an update out this week)
Sorry for no update in almost a month. Sadly, I do not have an update, since I have not had my calculator since the beginning of Christmas break (Mom says I spent too much time on it) and I had not gone around to posting it on github (mostly because I'm unfamiliar with github and the last uploaded ICEPad file onto the computer is not my current progress that I have on my calculator). I've never been so excited for school to start back up in my life. Neutral
Could you post the code? Smile
Justin wrote:
Could you post the code? Smile


Yeah, I'll get around to figuring out github.


For now I do not have an update, but in my defense I've been really busy with Science Olympiad (just got 1st in regionals Smile ) and Playing mario kart on my nspire. Next progress repo this week. I promise.
  
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