Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:17 01 Mar 2026 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : EXECUTE command$

Author Message
PhenixRising
Guru

Joined: 07/11/2023
Location: United Kingdom
Posts: 1751
Posted: 09:12pm 28 Feb 2026
Copy link to clipboard 
Print this post

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  
 
lizby
Guru

Joined: 17/05/2016
Location: United States
Posts: 3634
Posted: 09:43pm 28 Feb 2026
Copy link to clipboard 
Print this post

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 ":".
PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3042
Posted: 11:34pm 28 Feb 2026
Copy link to clipboard 
Print this post

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.
 
Print this page


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