Basic a ovladani portu
Nesvacil Jiri
nesvacil.jiri
Středa Březen 17 11:54:55 CET 2004
a) otevrit treba jako soubor
340 OPEN "COM1:" + SPEED$ + ",N,8,1,RS,CS0,DS" FOR RANDOM AS #1
580 PRINT #1, ZBF$; : GOSUB 660
b) primo ovladat porty prikazy in, out
510 'ZM1%=INP(&H3FE):ZM2%=ZM1% AND &H80
520 'IF ZM2%<>=0 THEN 3000 'CD=1 THEN WAIT ELSE NEXT
530 ZM1% = INP(&H3FC)'RTS OFF --->RTS ON WITH CTS CHECK
540 ZM2% = ZM1% OR &H2
550 OUT &H3FC, ZM2%
560 ZM1% = INP(&H3FE)
570 IF (ZM1% AND &H10) = 0 THEN 560 ELSE 580
580 PRINT #1, ZBF$; : GOSUB 660
590 ZM1% = INP(&H3FC)'RTS ON --->RTS OFF
600 ZM2% = ZM1% AND &HFD
610 OUT &H3FC, ZM2%: RETURN
JN
----- Original Message -----
From: Jiří Brettl <brettl_bfb@iol.cz>
To: Multiple recipients of list <hw-news@list.gin.cz>
Sent: Friday, January 14, 2000 8:05 PM
Subject: Basic a ovladani portu
> Zdavim vsechny,
> muzete mi nekdo poradit jak cist a zapisovat na porty PC (COM, LPT) a to v
> Basicu (GW,Q) ? Pomohl by mne nejaky funkcni vzor zdrojaku.
> Predem dik.
> J.Brettl
>
>
Další informace o konferenci Hw-list