Please enable JavaScript to view this site.

A-Shell Consolidated Reference

Navigation: Subroutines > MIAMEX

MX_CMD_STATUS

Scroll Prev Top Next More

Reviewed and revised April 2024

xcall MIAMEX, MX_CMD_STATUS, cmdcode

MX_CMD_STATUS (MIAMEX 1) sets the command file status, returning the previous status.

Parameters

cmdcode  (Unsigned Int)  [in/out]

Sets the new command file status and retrieves the prior status, based on the following table.

Value

Meaning

0

No command file currently running

1

Command file is in silent (:S) mode

2

Command file is in response (:R) mode

3

Command file is in trace (:T) mode

4

Command file is executing last line while in silent mode

Comments

To retrieve the current status without changing it, make a copy of the returned status and call it a second time. For example:

map1 cmdcode,b,1

map1 cmdcode2,b,1

 

xcall MIAMEX, MX_CMD_STATUS, cmdcode      ! retrieve current status, set new status to 0

cmdcode2 = cmdcode                        ! copy of original status

xcall MIAMEX, MX_CMD_STATUS, cmdcode2     ! reset the original status

? "Current status is "; cmdcode