system.prompt() ?

what is system.prompt used for?

Gilles explained it once on the Discord channel, here what he said:

I should make this feature official and document it sometime :-) the second parameter is a callback function which will be called when the user >has validated their input (or cancelled it). Here is an example:

    local callback = function(ok,response)
      if ok then
        answered = 1
        name = response
        ask_again = 1

    system.prompt("Enter your name",callback)

@TinkerSmith thanks for answering, exactly what you said ^^^

system.prompt() asks the user to enter some text. The result is sent to your program through the callback function you provided.

Really cool, so what we need now is a system.say() to let the user copy to clipboard.

With this feature, a program (similar to Gilles' CDT 001) can be loaded/saved.

I would be willing to start implementing my microcomputer as soon as such a feature becomes available.

Should you be interested in co-working with me to create this "educational computer trainer", just let me know. I will provide the instruction set, how it works, many examples, etc.:



I'm also sharing a private video so that you can check out the decimal computer trainer I was about to publish on Scratch by the time I discovered microStudio. As you can see, the load/save feature is something necessary:


By the way, two years ago I was awarded the third prize in the Ultimate Arduino Challenge global contest for this project (out of 500) ;)

What do you think? Would you like to build a project team?


Wow @mrpiay .. the decimal computer trainer is impressive.

Coming from an assembler background myself I think it is important to teach the 'behind the scenes' inner workings of a computer. I will definitely follow what you are doing, keep me in the loop :)

P.S. I did my first steps on this: Science of Cambridge - MK14

After that Commodore PET2001 ... yes that one was by default in BASIC ... but since it was too slow I wrote my own assembler in BASIC, LOL.
So I think I have a fair idea of what you are up to.

Live Long And Tinker

@mrpiay awesome project! I have just added system.say(text) :-)

I would be glad to contribute if needed, let me know!

Post a reply



Validate your e-mail address to participate in the community