[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

 10 REM THIS PROGRAM SENDS AND RECEIVES TRUE ASCII DATA
 100 OPEN 5,2,3,CHR$(6)
 110 DIM F%(255),T%(255)
 200 FOR J=32 TO 64:T%(J)=J:NEXT
 210 T%(13)=13:T%(20)=8:RV=18:CT=0
 220 FOR J=65 TO 90:K=J+32:T%=(J)=K:NEXT
 230 FOR J=91 TO 95:T%(J)=J:NEXT
 240 FOR J=193 TO 218:K=J-128:T%(J)=K:NEXT
 250 T%(146)=16:T%(133)=16
 260 FOR J=0 TO 255
 270 K=T%(J)
 280 IF K<>0THEN F%(K)=J:F%(K+128)=J
 290 NEXT
 300 PRINT" "CHR$(147)
 310 GET#5,A$
 320 IF A$=""OR ST<>0 THEN 360
 330 PRINT" "CHR$(157);CHR$(F%(ASC(A$)));
 340 IF F%(ASC(A$))=34 THEN POKE212,0
 350 GOTO310
 360 PRINTCHR$(RV)" "CHR$(157);CHR$(146);:GET A$
 370 IF A$<>"" THEN PRINT#5,CHR$(T%(ASC(A$)));
 380 CT=CT+1
 390 IF CT=8 THENCT=0:RV=164-RV
 410 GOTO310

RECEIVER/TRANSMITTER BUFFER BASE LOCATION POINTERS

The two locations above are set up by the OPEN KERNAL routine, each pointing to a different 256-byte buffer. They are de-allocated by writing a zero into the high order bytes ($00F8 and $00FA), which is done by the CLOSE KERNAL entry. They may also be allocated/de-allocated by the machine language programmer for his/her own purposes, removing/creating only the buffer(s) required. When using a machine language program that allocates these buffers, care must be taken to make sure that the top of memory pointers stay correct, especially if BASIC programs are expected to run at the same time.


[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated May 25, 1998.