Glossary of System Commands
Glossary of I/O Commands


Survey of 'Avise 4.3' Commands sorted by Themes

(Status 12 February 2006)

Arithmetic and compare operators:
 + Addition of two arguments
INKThe top element of the data stack(TOS) is incremented
 -  (minus)Subtraction of two arguments
DEKThe top element of the data stack(TOS) is decremented
 * Multiplication
 / Division
MODreturn modulo (remainder of division)
 */ scaling operation: multiply first, then divide.
*/MODscaling operation: multiply first, then divide.
Return quotient and remainder
ANDBitwise logical AND of two arguments
ORBitwise logical OR of two arguments
XORBitwise logical EXCLUSIVE OR of two arguments
NOTBitwise one's complement
ABStransform to absolute value
CARRYHighlevel carry flag to calculate results with double precision
<<Shift left operator
>>Shift right operator
ROLRotate left operator
RORRotate right operator
=Compare of two arguments: result=1(TRUE), if both are equal
<>Compare of two arguments: result=1(TRUE), if both are UNequal
Ø=logical complement of one argument:
result=1(TRUE), if argument equal 0(FALSE)
result=0(FALSE), if argument UNequal 0(TRUE)
 > Signed Compare of two arguments: result=1(TRUE), if left one greater than right one
U>UNsigned Compare of two arguments: result=1(TRUE), if left one greater than right one
>=Signed Compare of two arguments: result=1(TRUE), if left one greater or equal right one
 < Signed Compare of two arguments: result=1(TRUE), if left one less than right one
U<UNsigned Compare of two arguments: result=1(TRUE), if left one less than right one
<=Signed Compare of two arguments: result=1(TRUE), if left one less or equal right one
ACHECKcompare data word (16bit integer) with reference. If unequal: update reference and set flag
BCHECKcompare boolean data word (equal or unequal 0) with reference. If unequal: update reference and set flag


Communication via RS-232 command interface:
KEYget next byte from RS-232 (wait loop)
KEY?check if a byte is in the RS-232 receive buffer - if is, then get it
EMITsend (raw) byte via RS-232
 . send number ASCII formatted via RS-232 (active number base)
 .$ send number ASCII formatted via RS-232 (as hex number)
 ." send string via RS-232
 & set number base to decimal (enter HEX numbers with $..)
 $ set number base to HEXAdecimal (without $..)

Read from and write to memory:
 RD Read variable (general: read data word from RAM address)
 RB Read byte from RAM address lesen
 WR Write to variable address (general: write data word to address)
 WB Write byte to RAM address
BSETSet one bit of a variable (general: set one bit of a data word in RAM)
BCLRClear one bit of a variable (general: clear one bit of a data word in RAM)
BTSTRead one bit of a variable (general: read one bit of a data word in RAM)
ERBRead byte from CPU internal EEPROM
EWBWrite byte into CPU internal EEPROM

Structuring of program flow:
IFif argument = TRUE, execute subsequent block of statements, else skip itece
ELSEExecute subsequent block of statements if argument of preceeding IF is FALSE
ENDIFTerminates an IF... (ELSE...)ENDIF structure
REPEATStarts a REPEAT...UNTIL loop
UNTILTerminates a REPEAT...UNTIL loop if argument = TRUE
FOREnter a counted program loop
NEXTEnd of counted program loop
LEAVEleave FOR...NEXT loop, continue execution behind

System management:
MSStarts a timer, which counts down to zero during the time (in milliseconds) given in the parameter
TIMEreturns the actual value of the milliseconds timer (informative)
WAITIdles in a loop, until the milliseconds timer is down to zero (delay function)
EXITjumps from a user programmed function into the upper next subroutine nesting level
ABORTPerforms a warm start (actual operations are cancelled, scratch memories are reset, variables and other parameters are preserved
INITPerforms a cold start (equivalent to reset or power on)

Special postfix operators: >
DROPDeletes the top element from the data stack and the second one becomes top
DUPDuplicates the top of the stack
OVERCopies the second element of the data stack over the top of the stack, so the copy becomes new top of the stack
SWAPExchanges the two top elements of the data stack
DSWAPExchanges the 1st and 2nd element of the data stack with the 3rd and 4th ones
ROTrotates the 3 uppermost elements of the data stack: the previous top and second element are rotated down, the previous 3rd element becomes top
-ROTrotates the 3 uppermost elements of the data stack: the previous 2nd and 3rd element are rotated up, the previous top becomes 3rd.

Debug and programming support:
.Sshows the actual content of the stack and the 6 first declared VARiables
MEMshows the amount of memory which is still available for user programs
BREAKPlaces a breakpoint into a user function
DEBUGExecute program in debug mode: When the next breakpoint is reached, execution is halted and .S is displayed.
OPSPrints (sends ASCII text via RS-232) a list containing all system operators as well as all user prorammed functions
SEEDebugger: prints (sends ASCII text via RS-232) the list of all tokens of a user programmed function
SEETEMPDebugger: immediately after a compiler failure prints (sends ASCII text via RS-232) the fragments of the partially compiled function
FORGETDeletes user programmed functions, variables and constants
 { Head of a comment: ignores all console input until the delimiting } or until the end of the current text line
AUTOEXEActivates permanently, if any and which function shall be executed automatically after power on

Compiler:
 : (colon)Starts compilation of a user function
RETFinishes the compilation of a user function. At runtime of this function the execution of the RETURN operator is included
CONSTdeclares a constant with user defined name and assigns a value to it
VARdeclares a global variable (always 16bit integer) and initialises it with value zero

Internal operators, for debug information only:
DOLITRuntime primitive which returns the subsequently compiled number value
GORuntime primitive which always executes a jump to the subsequently compiled code address (complied by ELSE)
IFNOTGORuntime primitive which conditionally executes a jump to the subsequently compiled code address, if the checked parameter is FALSE (block of statements following IF is skipped)
DOFORRuntime primitive which initializes a FOR...NEXT loop
DONEXTRuntime primitive which counts up/down the loop counter in a FOR...NEXT loop and terminates the loop when count is finished.
DOSTRRuntime primitive which sends a precompiled string via serial interface.

I/O commands
IPConfigure digital I/O as input with pull-up resistor
IZConfigure digital I/O as input with high impedance
OHConfigure digital I/O as output with high level
OLConfigure digital I/O as output with low level
RIOPoll and return the logical level of one digital I/O
WPORTWrite TOS to I/O port register
WDDRWrite TOS to I/O port data direction register
RPINRead I/O port input register to TOS
AINPoll and return analog input
CNTØRead and return pulse counter at INT0
ENCØRead and return encoder counter at INT0
CØZReset counter at INT0
CNT1Read and return pulse counter at INT1
ENC1Read and return encoder counter at INT1
C1ZReset counter at INT1
WAVESet the total period of the frequency generator and start it
WAVEHISet the high phase of the frequency generator
PWM1Set the high phase of the pulse width modulator PWM1A and start it
PWM2Set the high phase of the pulse width modulator PWM2 and start it
ISTART Send the I2C START command
ISTOPSend the I2C STOP command
IACKPerform I2C acknowledge, trigger an I2C slave to confirm data reception
IMACKPerform I2C master acknowledge and trigger an I2C slave to send another data byte
ISENDPrimitive to send a data byte to an I2C slave
IRECVPrimitive to receive a data byte from an I2C slave

Glossary of System Commands
Glossary of I/O Commands