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

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 163
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 61
RPBASIC-52 PROGRAMMING GUIDE
2-43
GET
Syntax: A = GET
Function: Gets character from buffer.
Mode: Run
Use: A = GET
Cards: All
DESCRIPTION
GET is similar to INKEY$ in other Basic languages. GET returns the ASCII value of the character rather
than the string. This feature makes it useful when receiving binary information.
To rec eive a control-C value (3), set bit 1, a ddress 26H.
DBY(38) = DB Y(38) .OR . 1
This disables program breaks when a <Ctrl-C> is received.
GET can extract characters from C OM 0 or COM 1. The UI 0 or U I 1 command is executed to get characte rs
from an alternate serial port.
The ASCII value 0 is a valid number. Unfortunately, this value can indicate that there are no c haracters
available. If your application program expects to receive ASC II 0's, the following program will wait until if
there are characters in the buffer to ensure a value of 0 is indeed valid.
100 IF COM(0) = 0 THEN 100
110 A = GET
Line 100 loops until there is a character in the buffer. Line 110 extracts the character from the buffer. When
A = 0, zero is the ASCII value.
RELATED
COM , COM$, INPUT , UI 1, UI 0
EXAMPLE
The followin g program ta kes characters one a t a time from the buffer and puts them into expan ded m emo ry.
128K or more of RAM is needed.
100 IF COM(0) = 0 THEN 100
110 A=GET
120 POKEB 1,X,A
130 X=X+1
140 GOTO 100
Vista de página 61
1 2 ... 57 58 59 60 61 62 63 64 65 66 67 ... 162 163

Comentários a estes Manuais

Sem comentários