Use the set command to set the value of any of the 10 integer
registers or the timer:
You can add (+), subtract (-), multiply (*), and divide (/) integers
in a set command. (The results of integer division are truncated.)
For example:
You can also use Boolean operators AND (&), OR (|), and exclusive
OR (^). The Boolean operators treat integers as an array of bits:
You can use the show reg command to display the contents of the 10 integer registers, the timer, and the error registers.
You can use the integer registers in if
commands for the purpose of making decisions. For instance, you could use
a register to store the baud rate you want to call at:
Then you could use the commands
if reg(3) <= 9600 dial 555-1212 if reg(3) = 14400 dial 555-1234 if reg(3) > 28800 dial 555-5678to dial the modem number appropriate for your baud rate.
The timer register can be used for timing events. For example:
set timer = 0 ; starts the "stopwatch" ztransmit myfile.txt ; transfer a file set reg(2) = timer ; store the elapsed time in register 2Here's another example:
set timer = 0 ; start the "stopwatch" loop: if timer > 60 goto give'up ; give up if no response after 1 min. say "^M" ; send remote system a carriage return until "Enter name:" 5 ; wait 5 seconds for sign-on prompt if err0 # 0 goto loop ; if no prompt, try again goto sign'on ; sign on when prompt received give'up: :<No sign-on prompt from remote system.> finish :X sign'on: ; got sign-on prompt, say name say "my name^M"