Remote-processing BASIC 52 Manual do Utilizador Página 131

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 163
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 130
RPBASIC-52 PROGRAMMING GUIDE
2-112
TICK
Syntax: TICK(timer)
Where: timer = 0 to 3. It specifies the tim er numbe r.
Function: Returns a time from one of 4 process clocks in 5 ms increments.
Mode: Command,Run
Use: A = TICK(2)
Cards: All
DESCRIPTION
There are four tick timers updated 200 times per second. Each timer is independent of each other in that they
may be read and cleared separately (see CLEAR TICK). All timers are updated at the same time.
This function is separate from the real time clock and is not battery backed. All timers reset to 0 on power up
or reset. Timers continue to run in command mode and cannot b e turned off.
TICK(n) returns time in thousandths of a second (in 5 ms intervals) up to 65535.995 seconds, or
approximately 18.2 hours. The timer then starts at 0 again.
Tick timers are not affected by to the ONTICK instruction.
RELATED
CLEAR TICK, ON TICK
ERRORS
BAD SYNTAX If any parameters left out
BAD ARGUMENT When timer > 3 or negative or left out
EXAMPLE
The following example clears tick timer number 3, delays for a time, then prints tick timers 0 and 3.
10 CLEAR TICK(3)
20 FOR X = 0 TO 1000
30 NEXT
40 PRINT TICK(0),TICK(3)
124.6 .425
Vista de página 130
1 2 ... 126 127 128 129 130 131 132 133 134 135 136 ... 162 163

Comentários a estes Manuais

Sem comentários