Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

"prgm" command causes all string variables to return null #129

Open
programmer2514 opened this issue Apr 22, 2019 · 4 comments
Open

"prgm" command causes all string variables to return null #129

programmer2514 opened this issue Apr 22, 2019 · 4 comments

Comments

@programmer2514
Copy link

When I run a program with prgmPROGRAM from ICE, all string-type variables return null.
If what I am running is BASIC, using Ans and Str1-Str0 causes the ERROR: Undefined error to be thrown.

If ASM is being run from the BASIC program (via the Asm(prgmPROGRAM)), I cannot access any AppVars at all, and though they do not return 0, they return null and the program suddenly exits.

I am not sure if this is an error with ICE, or if it is a problem with the C toolchain.
If it is an error with the C toolchain, just tell me and I will open this issue there.

This is a pretty big error, and it would be amazing if someone could fix it.

Thanks,
calclover2514

@beckadamtheinventor
Copy link
Contributor

beckadamtheinventor commented Apr 22, 2019

If you are trying to access the OS strings from ICE, you will need to open them as you would open a program in ICE, just use the variable type 4, using it's token name in single quotes.
The "OS strings" in ICE are actually just a way of allocating memory within the program, and have no effect on the actual OS strings.
As for the Appvars, that's probably a bug.

@programmer2514
Copy link
Author

programmer2514 commented Apr 22, 2019

You misunderstand me.
Running TI-BASIC from ICE with the prgm modifier causes TI-BASIC not to be able to access OS strings.
The same is true with ASM.
If I have a BASIC program containing :Asm(prgmASM), and I run it from ICE with :prgmBASIC, it makes the ASM program unable to access AppVars.

EDIT: This apparently only affects programs written in C or ICE, not ASM. It must be a single routine that this is affecting.

@PeterTillema
Copy link
Owner

You should not run C programs from ICE, that's asking for problems.

All C programs clears the free RAM, which ICE uses to store strings and variables too, thus clearing literally all the variables, lists and strings in ICE.

@programmer2514
Copy link
Author

Is there a way to clear all these things before running the program?
I already set it up to re-declare all the variables after execution of the program

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants