Help with program memory for my GKC TUI

So I’m currently working on a project of mine called" </GKC/> OS." It is an OS (operating system) thats only function is a TUI (textual user interface). At this point it is just an overly complicated text pad capable of holding a singular letter at a time.

The problem I’m encountering is sending the decoded character (coded in binary US-ASCII) to the program memory, swapping to the next byte of data in the program memory, and adding the next decoded character next to the previous character in the text pad without using multiple textboxes.

Basically, does anyone know how to put a character in a textbox, and then put another character next to it using multiple commands, but only 1 textbox?

3 Likes

Um so confused , I’m not that smart to comprehend this but do you mean like how do you make a text display something that changes. And when that something changes so does the stuff written on the textbox.

1 Like

Hmm, so you want the textbox to create a space then have another word or number appear next to it, right? All in just one textbox.

1 Like

So I want to be able to make a character sent to the textbox, be sent to a property, “previous characters,” without deleting it from the textbox, and then when a new character is added, it is added into, “previous characters”

basically you type 1, and that stays in the textbox, but gets sent and added into, “Previous characters,” then when a new character is added, it repeats the process to form words and sentences.

The most logical method would be going into the text’s block code and have something appear when a channel is broadcasted. When the number 1 is shown, just have that stay and code the block to create a space between the two and show the new word or number.

3 Likes

Yeah!
Go to block code inside the textbox, and just make it look like this:

Set text | Create text with | get property | "previous characters"
                            | get property | "added characters"

You’ll need to add the “added characters” property but that’s it!

4 Likes

I’ll try this.
Ty for the help!!!

Ok here is the OS
It’ll show you my issue

Sorry that the GIF is super laggy. idk how to solve that

This is the program memory


Each group of 8 counters is a byte/index of program memory. 1 byte = 1 text character that can be saved in memory. I need the character from the CPU to be sent to program memory, encoded into binary, and sliced into 8 values for each counter. Then that is sent to the text box on the display. I already have the “added characters” property working as it should, but in order for it to be saved in the program memory, the byte of data must be sliced into 8 bits and stored in each counter in the first index. Then it must swap to the next index and convert the added character into the previous characters, by repeating the previous process of slicing it into 8 bits and sending it into all 8 counters of index #2. Your previous solution does work Bird, but in order for it to be saved onto the TUI and not get deleted when the RAM resets, I need to turn this process into what was explained above.

2 Likes

Ok woah that’s a lot let me think and I might be able to get something to you tomorrow.

2 Likes

Just save the text to a property.

1 Like

That is part of what I’m trying to do.

Text gets added → sent to “previous characters” →"previous characters" is converted from example: 00100001(!) to 8 different properties, each being 0,0,1,0,0,0,0,1 and when those are updated they increment each counter → swap to next index of program memory → Next character added → sent to “previous characters"→"previous characters” is converted from example: 00100001(!) to 8 different properties, each being 0,0,1,0,0,0,0,1 and when those are updated they increment each counter on the 2nd index of program memory.

This process can be repeated 48 times, switching to a new index of program memory for every repetition, because I have 48 bytes of program memory.

I need “previous characters” to be sliced into 8 different properties, and then those will increment counters if updated to a 1. after that, it must swap to the next index of program memory or the PC cannot save any data.

I can help you split it up. The block code will look a little like this:

Set property | "firstdigit"
       Value | in text [ get property | "previous characters" ] get letter #1
Set property | "seconddigit"
       Value | in text [ get property | "previous characters" ] get letter #2
And so on...

Just continue that process and you can have the 8 characters split up. Note that these will have to be text properties for this to work, which means you can’t add or subtract, just replace.
Now I’m a little confused about what you mean by:

and:

but I hope what I showed you helped enough to get you started. If you need to elaborate, please do.

2 Likes

Ok I will try and develop a system using this later when I have the time. Also quick question

What is the property limit?

Very, very big. I think 128?

2 Likes

Try looping to shorten the code:

Set variable | "n" 
          To | get property | "i"

Set property | get variable "n"
       Value | in text [get property | "previous characters" ] get letter [get variable "n"] 
3 Likes

Property “i” is used for the loop.

2 Likes

Yeah I was going to but I was kinda rushing so I didn’t lol sorry about that. It also uses an extra property which is more memory so mine’s more memory efficient.

2 Likes

I will test both of these methods as soon as possible.

What would the settings for “I” be?
Also where is the “get variable” block?