Menu
JAQForum Ver 19.10.27

Forum Index : Microcontroller and PC projects : EXECUTE command$

Posted: 09:12pm
28 Feb 2026
Copy link to clipboard
PhenixRising
Guru

Looks like it could be useful but how is it used.... typically?

Is it a more efficient approach than something else?

I have the feeling that I'm missing-out  
 
Posted: 09:43pm
28 Feb 2026
Copy link to clipboard
lizby
Guru

I'm using it right now in a program with video output so that a user can arbitrarily inject a command, especially for debugging, by typing at the console, e.g., "!test Execute print a$, b$, c$" or "!test EXECUTE someSubroutine.

It can also be useful for injecting a command into a 2nd connected Picomite. Here's a program from some years back in which a picomite connected to a primary picomite receives serial (while perhaps running a program, not just listening) and in addition to executing canned routines on command, can submit EXECUTE some command if sent, say, "! some command": serial control of 2nd Picomite.

Note: it cannot be multiple commands separated by ":".
 
Posted: 11:34pm
28 Feb 2026
Copy link to clipboard
phil99
Guru


I think the Port command and function still require literal GP pin numbers, so to use a string variable for the Port command and function you need EXECUTE.
Eg. from keypad program.
For n=RowPinGP To RowPinGP+rows-1
  SetPin MM.Info(pinno "GP"+Str$(n)),DOUT 'set the Port out pins
Next

For n=ColPinGP To ColPinGP+Cols-1
  SetPin MM.Info(pinno "GP"+Str$(n)), INTH, Key.Pad, PULLDOWN 'set the Port input pins and ISR
Next

'...

   Execute "Port(GP"+Str$(RowPinGP)+",rows) = 1 << y" 'set the row to read
   Execute "x=Port(GP"+Str$(ColPinGP)+",cols)" 'read the columns


Though in the latest firmware you could probably simplify that a bit.
 


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026