HeyTomCat / ProgramLangs

Some small programming languages i coded myself
Other
1 stars 0 forks source link

Some questions #4

Closed CleverLemming1337 closed 6 months ago

CleverLemming1337 commented 6 months ago

Maybe that are stupid questions, but:

  1. How to read user input and output text / ASCII code? Maybe with ext?
  2. What's the difference between registers and the memory?
HeyTomCat commented 6 months ago
  1. Yes, it is done with ext. Just I haven't yet finished the specification of external commands.
  2. The registers can directly be accessed and computations can be done, while the memory
       is just extra data storage, that first has to be loaded into the registers. There's also significant
       differences in size:    The registers consist of 256 cells of 4 byte.    The memory consists of 4294967296 cells of 1 byte.
HeyTomCat commented 6 months ago

Also please notice that I added labels for each of the programming languages.

CleverLemming1337 commented 6 months ago

Yes thank you. So the register is like the RAM and the memory is the SSD?

CleverLemming1337 commented 6 months ago

That's funny. I just saw that AMA stands for Ask me anything...

HeyTomCat commented 6 months ago

Yes thank you. So the register is like the RAM and the memory is the SSD?

The memory is the RAM and the register is a way smaller
data storage inside the CPU, at least in a real assembly
language. Here it is all just in the RAM. Also your comparison
wouldn't really work, because SSDs are designend to save
files, unlike the RAM, which is designed to handle thousands
of reads and writes per second and doesn't keep its data when
power is cut.

That's funny. I just saw that AMA stands for Ask me anything...

I added the AMA label, because your questions were AMA-related,
am I right?

To your very first question I also have to say, that it runs on UTF-32
instead of ASCII.