Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
Depending on the context, you should be able to concatenate strings into one string variable. You can store the start positions of the separate strings in a list, so as to use the sub( function to separate them out again.
E.g. "KermMartianjetlegoOldMathTeacher" stored as a single string variable, with {1,12,19} as in index list, is effectively three strings you can display or edit independently of each other with a little cunning in the use of sub( and +.
Quote:
Depending on the context, you should be able to concatenate strings into one string variable.

Well, I am currently working on a program that can find integer answers of unlimited length by using elementary arithmetic rules and it would simplify the program by it not having to check to see if the strings were full for each multiplication step.
jetlego wrote:
Quote:
Depending on the context, you should be able to concatenate strings into one string variable.

Well, I am currently working on a program that can find integer answers of unlimited length by using elementary arithmetic rules and it would simplify the program by it not having to check to see if the strings were full for each multiplication step.
I second OldMathTeacher's answer. A list of offsets and a single packed string works wonders.

tifreak8x wrote:
...Due to an issue within Celtic, however, it reaches a point where it can't collect data, possibly beyond the 16kb size that it assumes an appvar can be?...
I believe I have resolved this issue. It was a compounding of two bugs:
1) The routine to count the total number of characters in an AppVar/program could only handle items that spanned a total of one or two pages. AppVars or programs spanning three or more pages were not properly counted.
2) The routine to compute the next character had similar shortcomings at page boundaries: when the AppVar or program overflowed onto a second (or subsequent) page, it would restart reading at the beginning of the first page.

Known Bugs:
[_] Running Ans-hidden BASIC programs from the homescreen produces the DCSE version error message
[_] Hard-to-track Error: ? bug
[X] Theta character cannot be typed in the folder/rename/new field
[_] ArcUnarcVar shouldn't draw an hour glass on the screen
[X] ColorLine call broken due to calling wrong pixel routine
[_] Leftover DrawShape mode setting described in this post
[_] ReplaceLine bug detailed in this post

Feature Requests:
[_] ArcUnarcVar should take an optional argument, 0 for Arc, 1 for RAM, so it can work as more than just a toggle
[_] Menu option or desktop icon to run Apps (see Runer112's post)
*bump* I believe I have fixed the following bug. tifreak8x and Merth, my two ReplaceLine users: please test this in build 1367+ under the circumstances in which it previously failed and let me know what happens. Thanks in advance!

KermMartian wrote:
I am able to replicate this problem. I started with these two programs:
Code:
PROGRAM:A
:"2"->Str9
:"X"->Str0
:1:det(1

PROGRAM:X
:A
:B
:C
I ended up with this prgmX:
Code:
:2
:
:C>DMS?
I'll look into this when I get a chance; due to work and personal life things, it might not be until tomorrow. I'll try to do it sooner rather than later.
Issue with Error:?

I was running a test program that was using Celtic functions to read a line from an appvar and display a sprite. I ran the program from archive, and was dumping the file back into archive after every edit in Tokens. After a while, It claims the program is archived. If you press 1 to quit, you get Error:? I have had this happen to me 3 times in a row.
How big is the program? Are you running from the DCSE desktop or from the homescreen? How much of your Archive is occupied? Once it gets to Error:? it is stuck in an infinite loop, correct?
The program I'm running is 260 bytes, I have an appvar 64,843 bytes in size, plus DCSE and associated appvars. Running from the homescreen. And yes, once you get that error, you have to start over with the emulator. :<
I ran into the Error: ? bug on the calculator again. I am unable to document the steps because I let others play some games on it. I do know that "prgmA2048" appeared when it was not supposed to. From there, I knew that this bug was triggered. I pressed [Clear] and it led me to the Error: ? loop.

Also, I have another bug on my calculator. I hide programs using the hide option (not in code) through DCSE. I check both the program menu and memory menu to check if I can see them; I do not. I clear the RAM. The programs are then not hidden. (If I only delete the AppVar DCS8, this bug does not happen.) I am unable to replicate this on jsTIfied.

Finally, I wonder if these bugs have been addressed. To my knowledge, these are hard to produce.
-The function hooks ([Alpha][F1, F2, F3, F4, or F5]) sometimes do not work. To fix this, run DCSE8 and exit. Afterwards, the hooks will work.
-When running statistics tests (e.g. Z-Test, T-Test, etc.), the inputs are sometimes filled with garbage. You can only edit the first field. If you try to move onto the next, the calculator throws a memory error. The RAM must be cleared to fix this.
Not sure if anyone has seen this: RAM clears, garbage collects, or defrags can make programs the size of apps, rendering them unusable. RAM clears seem to fix this, though...
Then, with the supersized prgm's, renaming them causes a RAM clear. Interesting.
Sent from my mom's iPhone (stupid auto spellchecker)
I ran into the Error: ? again. It seems like I can predict right before the error is going to happen, especially with any Input or Prompt commands.

This time I was renaming an unarchived, unlocked Basic program through DoorsCSE from prgmPRIME to prgmFACTOR. I successfully did this and proceeded to run the program from DoorsCSE. Before I ran it, I caught a glimpse that it was locked. This is not supposed to be. I thought nothing of it at first. I continued with the program which prompted me for a variable. In fact, the first line of code is Prompt X. But when it prompted the cursor was at (row 1, column 1) on the homescreen instead of (1,4). I entered in three numbers but pressed [Clear] thinking that something was up. I pressed [Clear] two more times. After that, the normal prompt X=? appeared with the cursor at (1,4). I entered a few numbers under the assumption that I avoided this error. I pressed enter and got the "Undefined" error. I selected Goto, which brought me to the homescreen. There displayed the old program name, prgmPRIME. I cleared this entry and did one last thing that I do not remember. This led me to the Error: ?.

Edit: (New instance) This is the second time that this bug has happened within 24 hours. After editing prgmFACTOR a couple of times, I decided to archive it through DoorsCSE. It successfully completed this. Just seeing if I could produce the Error: ? bug, I decided to run it from DoorsCSE. It began with a prompt for X. Right when I entered one number, X=? was erased and replaced with prgmCALCUZAP. I cleared this and pressed [Clear] a couple more times. X=? appeared again and I entered in a value. I pressed enter which led me to the "Undefined" error. I selected Goto, which brought me to the homscreen with prgmFACTOR. I pressed [Clear] and scrolled up and down through history. I tried to run prgmFACTOR which yielded the Archived error. I tried the [On][Prgm] hook which yielded nothing. I went to the memory menu and scrolled through all files. I saw prgmFACTOR that was archived, dcsasmex, CHAIN7, and an unarchived DCS8b. I tried to press [Clear] to exit, but I found the Error: ? bug waiting for me.

Here are two videos that I took of the second instance.
Edit: I removed the links as they are no longer needed.
Bug report with xLIBC's DrawSpriteList8x8A command:

If you try to display a sprite and its X position is higher than 128 on the screen, it will not show up. For example, real(4,2,1,0,0,26,1,127,95,0 will work, but not real(4,2,1,0,0,26,1,128,95,0.
Many thanks for finding this issue DJ, it has now been corrected Smile.
KermMartian wrote:

[_] ArcUnarcVar shouldn't draw an hour glass on the screen
Merthsoft will be happy to hear that this is resolved.

KermMartian wrote:
Feature Requests:
[_] ArcUnarcVar should take an optional argument, 0 for Arc, 1 for RAM, so it can work as more than just a toggle
Spent some time looking into how feasible this is. For backwards compatibility, it's very hard to do this properly, as it's not clear what Ans or theta would be in existing programs. Therefore, I recommend programmers use OutputStatus (det(Cool) with ArcUnarcVar.

Electromagnet8 wrote:
I ran into the Error: ? bug on the calculator again.[...]
I was reading over your bug reports again, and in almost every case it seems that getting an Err:Undefined that dumps you to the homescreen leaves things in a corrupted state where you eventually get an Err:?. Is this correct?
Quote:
I was reading over your bug reports again, and in almost every case it seems that getting an Err:Undefined that dumps you to the homescreen leaves things in a corrupted state where you eventually get an Err:?. Is this correct?


In the past instances that I remember, yes. I have documented every encounter with this error in this topic.
merthsoft wrote:
*bump* Not to be annoying, but has this been looked into at all? It seems like a pretty big problem. Even if I'm doing the syntax wrong (which doesn't seem to be the case), it shouldn't be causing these problems.
(Regarding the issue with det(1) and prgmX and prgmY on page 2 of this topic): It seems det(1) still mistakenly appends a $3F (newline), which corrupts the size of the following program. I am looking into this.

Edit: This appears to be sorted out at last.
Today, I decided to purposely try to trigger the Error: ? bug. I succeeded after a couple tries.

I opened DoorsCSE through the keyhook. In DoorsCSE, I created a copy of a full Basic, archived, and locked prgmRADICAL and named it prgmRADI. I then unarchived and archived it through DoorsCSE. I ran prgmRADI and all looked fine. I quickly entered [7][8][9] without looking at the screen. When I saw the screen, I saw that the second line was "prgmBLOCKDUD89". This indicates that pressing 7 brought up prgmBLOCKDUD and 89 were entered in after it. I pressed [Clear] once and the second line disappeared. I pressed [Clear] again and the homescreen was cleared but the first line was "RADICAND:". I pressed [7][8][9] and pressed [Enter]. The standard Error: Undefined screen came up. I selected 2: Goto, which cleared the homescreen and brought up my last entry "LL10". I had previously deleted this from the TIOS memory management. I pressed [Clear] twice to clear the homescreen. I checked if the DoorsCSE [On][Prgm] hook wored and it did not. I navigated to the TIOS memory management and saw dcsasmex (107 bytes) and CHAIN7 (36 bytes). I pressed [2nd][Quit] to exit the memory menu and that led me to the Error: ? bug.

While writing this post, I thought I had found this bug again. Instead, I found a different minor bug. While on the homescreen, go up to select a past entry. While the past entry is highlighted, open DoorsCSE through the keyhook. Run the program below and you should get "RADICAND:[cursor] DICAL". The Input is written over the Disp.



Here is the code to prgmRADICAL/prgmRADI.

Code:
ClrDraw
Disp "SIMPLIFY RADICAL
Input "RADICAND:",A
iPart(1+sqrt(A->B
Repeat not(fPart(A/B^2
B-1->B
Output(3,1,B
End
Text(1,1,B,"sqrt(",A/B^2,")
Pause
ClrHome
ClrDraw


In addition, is it known that DoorsCSE sometimes disables the function keys from the MathPrint commands? This can just be fixed by running DoorsCSE and exiting. I believe that this was mentioned a while back.
OldMathTeacher wrote:
...
Yesterday I had 3 anomalies cropping up at once:
Programs ending with a Stop command would act as though they had a ClrHome command right after the Stop; the MathPrint shortcuts on the F keys didn't come up; the StatWizards wouldn't appear either.
So I wondered what could have caused all this to change, thought DCSE was the only thing really different I'd done, so I ran the App and quit it using Clear. This removed all those faults, but the one mentioned by Electromagnet8 still occurs. ...

Also, the statistics tests sometimes have garbage in their input fields. If you try to edit them, you get a memory error. You just need to RAM clear to fix this.
Electromagnet8 wrote:
Today, I decided to purposely try to trigger the Error: ? bug. I succeeded after a couple tries. [...]
So, I can finally reproduce this repeatedly. Here's how I can do it (assuming your prgmRADICAL already exists and is on the calculator):
1) Reset calculator to clear RAM
2) Open and quit Doors CSE to set up the hooks
3) Re-open Doors CSE using [ON][PRGM]
4) Run RADICAL from the Doors CSE desktop
5) Press [CLEAR] once or twice, and/or enter a number and press [ENTER]
As far as I can tell, there's some sort of conflict with how I do (or do not) close the edit buffer, and it seems to happen regardless of whether I use _NewContext or _ExecuteApp to run Doors CSE from the hook. Amusingly, it also seems to happen regardless of whether I _CloseEditEqu before Doors CSE starts or not. Are you able to replicate my results with these steps?

Quote:
While writing this post, I thought I had found this bug again. Instead, I found a different minor bug. While on the homescreen, go up to select a past entry. While the past entry is highlighted, open DoorsCSE through the keyhook. Run the program below and you should get "RADICAND:[cursor] DICAL". The Input is written over the Disp.
This is related to the root bug, as discussed above.

Quote:
In addition, is it known that DoorsCSE sometimes disables the function keys from the MathPrint commands? This can just be fixed by running DoorsCSE and exiting. I believe that this was mentioned a while back.
I am afraid that I haven't been able to reproduce this issue. Sad

Quote:
Also, the statistics tests sometimes have garbage in their input fields. If you try to edit them, you get a memory error. You just need to RAM clear to fix this.
Ironically, I address this issue yesterday morning, about ten hours before you posted that. Smile May I please task you with making sure this is fixed in Doors CSE 8.1 RC1?
I am afraid that even if I follow the above steps, I am unable to reproduce the Error: ?. Even running the program twice yeilds nothing. I'll keep trying, though.

KermMartian wrote:
Quote:
Also, the statistics tests sometimes have garbage in their input fields. If you try to edit them, you get a memory error. You just need to RAM clear to fix this.
Ironically, I address this issue yesterday morning, about ten hours before you posted that. :) May I please task you with making sure this is fixed in Doors CSE 8.1 RC1?

I'd be glad to test this out.

Edit:
While trying to produce the Error: ? bug, I found another. I will detail the steps below to produce it to see if it can be replicated by another calculator.

1) Reset the RAM ([2nd][+][7][1][2])
2) Open DoorsCSE through the APPS menu.
3) Exit DoorsCSE ([CLEAR])
4) Access the program menu ([PRGM])
5) Select a program and paste it to the homescreen.
6) Delete the last character on the program name. ([<][DEL])
7) Press [ENTER] to get Error: Undefined.
8) Select 2:Goto.
9) Open DoorsCSE through [ON][PRGM].
10) Run a program with Input/Prompt. (prgmRADICAL)
It looks as if the DoorsCSE text is not cleared.
Electromagnet8 wrote:
While trying to produce the Error: ? bug, I found another. I will detail the steps below to produce it to see if it can be replicated by another calculator.
Nice catch! I suspect that will be fixed if I fix whatever launching issues are weighing me down, though, since you use ON-PRGM there too. The following is mostly at the illustrious BrandonW as well as at my own debugging efforts.

Crashes at Input:

Code:
   res 2,(iy+44h)         ;MathPrint things <- currow used as pencol
   set 6,(iy+49h)         ;MathPrint things   ; was bit 7??
   ld hl,MyAppName+1
   ld de,progToEdit
   ld bc,8
   ldir
   ld a,cxExtApps
   bjump(_NewContext)

ERR:Memory on _NewContext:

Code:
   res 2,(iy+44h)         ;MathPrint things <- currow used as pencol
   res 5,(iy+45h)         ;MathPrint things
   set 6,(iy+49h)         ;MathPrint things   ; was bit 7??
   ld hl,MyAppName+1
   ld de,progToEdit
   ld bc,8
   ldir
   ld a,cxExtApps
   bjump(_NewContext)

Occasionally crashes:

Code:
   bcall(_CloseEditEqu)
   xor a
   ld (menuCurrent),a
   ld hl,MyAppName+1
   ld de,progToEdit
   ld bc,8
   ldir
   ld a,cxExtApps
   bjump(_NewContext)

Leaks memory:

Code:
   ld hl,MyAppName+1
   ld de,progToEdit
   ld bc,8
   ldir
   bcall(_ExecuteApp)

ERR:Memory on _ExecuteApp:

Code:
   res 2,(iy+44h)         ;MathPrint things <- currow used as pencol
   set 6,(iy+49h)         ;MathPrint things   ; was bit 7??
   ld hl,MyAppName+1
   ld de,progToEdit
   ld bc,8
   ldir
   bcall(_ExecuteApp)

ERR:Memory on _ExecuteApp:

Code:
   res 2,(iy+44h)         ;MathPrint things <- currow used as pencol
   res 5,(iy+45h)         ;MathPrint things
   set 6,(iy+49h)         ;MathPrint things   ; was bit 7??
   ld hl,MyAppName+1
   ld de,progToEdit
   ld bc,8
   ldir
   bcall(_ExecuteApp)


Edit: I spent my train and shuttle ride this morning tracing through how launching an App from the Apps menu proceeds. So far I have the following:

Code:
Most OS BCALL definitions (LUT) on page $05
ExecuteApp (4c3c) -> $7AFE on page $05
NewContext (4030) -> $585F on page $03
NewContext0 (4033) > $5874 on page $03


Running an App from the Apps menu:
- Check against $b4 with a=$90 at $535
  - res 1,iy+$28
  - res 2,iy+28
  - bit 5,iy+34 -> because nz, $3f3e called
  -
- Something happens start from $55C, which also triggers on [Apps] (but the rest doesn't)
  - a=$90
  - Carry not set from call $3f44, but a=$58
  - b=a=%48 after call $3f4a
  - a loaded from cxCurApp, but not $58, so no jp to $61f
  - NO CLEANUP or calls from here until NetContext0
- Call into NewContext0 driver starts at $5A4
- NewContext0 kick starts at $06B0 -> $06D7 -> $06E6 -> $06EB -> $06F6
_ NewContext0 (5874/03) sp=ffe7 called from $06FF


Edit #2: Thanks to comparing Prosus' source for page 0 with IDAPro's disassembly of page 0 while stepping through the code to launch a new app in jsTIfied, I have determined that pretty much no sort of cleanup code is called up until _NewContext0, and that never returns. Therefore, whatever cleanup I'm missing is called from _NewContext0, unless there's a flaw in my logic. Then again, _NewContext and _NewContext0 should be roughly equivalent if I'm not crazy, so I'm not sure what else I'm missing.

Edit #3: The following code works (ie, launch DCSE via ON-PRGM, run RADICAL, run RADICAL, quit DCSE) and does not leak memory if the homescreen is empty. If the homescreen has something like "456^-1" on it with MathPrint enabled (I haven't tested with it disabled) and you ON-PRGM launch DCSE, then Input from RADICAL dies in a variety of spectacular ways. I'm really having a hard time detecting what is different with how the OS launches Apps, other than that they bcall _NewContext0.

Code:
   ld hl,MyAppName+1
   ld de,progToEdit
   ld bc,8
   ldir
   ld a,cxExtApps
   bjump(_NewContext)
i Found a 2 bugs in doors cse,

1.)if you press on-prgm while on doors cse, you calc will shutdown

2.)if you press on-prgm while in the prgm menu doorscse wil run, but when you run a program, type anything into input or prompts,a program name will appear, if you hit enter you will get a datatype error which if you hit quit you will go into a error: ? loop, and if you try to clear and type again, what you type will show up, but the ssame thing will happen, but it will be a undefined error instead

Note:If you type something in and you get a prgm name HIT ON to break the program and you wont have the issue, and if you accidentally hit enter: select goto NOT QUIT it will send you back to the home screen of tios, run doorscse again and you will be fine
  
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 ... 6, 7, 8 ... 12, 13, 14  Next
» View previous topic :: View next topic  
Page 7 of 14
» 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