vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
vb@rchiv Offline-Reader - exklusiv auf der vb@rchiv CD Vol.4  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2025
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

Visual-Basic Einsteiger
Re: Qbasic Programm umschreiben nach VB6 
Autor: Seek1
Datum: 14.05.06 15:10

Habs jetzt mal so probiert

Private Sub Sleep(ByVal tau As Long)
 
    t = Timer
    Do
        DoEvents
    Loop Until Timer - t > tau
 
End Sub
 
Private Sub Command1_Click()
 
5 Rem Software Robomemm rev B
6 Rem change 18 To rbit=abit For rev A
7 Rem change 540 To abit For rev A
8 Rem change 560 To <> For rev A
10 Port = &H378
11 sport = &H379
12 cport = &H37A
13 ibit = &H4
14 sbit = &H1
15 bbit = &H80
16 abit = &H40
17 sbith = &HFE
18 rbit = bbit
19 Dim resp(64)
20 Goto 2000
50 For k = 0 To 63
100 a = Inp(cport)
110 Out cport, (a Or ibit) And sbith
120 GoSub 6000
130 For j = 1 To 8
140 GoSub 7000
160 Next
170 GoSub 6000
180 GoSub 8000
200 GoSub 7000
300 Index = &H20
310 If (k And Index) = 0 Then Goto 400
320 GoSub 8000
350 Goto 420
400 GoSub 7000
420 Index = Index \ 2
430 If Index <> 0 Then Goto 310
450 response = 0
500 For Index = 0 To 15
510 GoSub 7000
530 response = response * 2
540 Status = (Inp(sport) And rbit)
560 If Status = 0 Then Goto 600
570 response = response + 1
600 Next
604 resp(k) = response
610 Next
620 For k = 0 To 63
625 Print Chr$(resp(k) - ((resp(k) \ 256) * 256));
630 Print Chr$(resp(k) \ 256);
660 Next
670 Print
700 Return
1000 a = Inp(cport)
1010 Out cport, (a Or ibit) And sbith
1020 GoSub 6000
1030 GoSub 7000
1050 GoSub 7000
1070 GoSub 8000
1090 GoSub 8000
1110 For j = 1 To 15
1120 GoSub 7000
1140 Next
1200 For k = 0 To 63
1210 GoSub 6000
1220 GoSub 7000
1240 GoSub 8000
1260 Index = &H20
1270 If (k And Index) = 0 Then Goto 1310
1280 GoSub 8000
1300 Goto 1330
1310 GoSub 7000
1330 Index = Index \ 2
1340 If Index <> 0 Then Goto 1270
1350 Index = 32768
1360 If (resp(k) And Index) = 0 Then Goto 1400
1370 GoSub 8000
1390 Goto 1430
1400 GoSub 7000
1430 Index = Index \ 2
1440 If Index <> 0 Then Goto 1360
1450 Out Port, &HFF
1460 Sleep 1
1470 Next
1500 Return
2000 Print "Bust a memmory options"
2010 Print "read = 0"
2020 Print "write = 1"
2025 Print "stop = 2"
2030 a = Val(InputBox("", "", ""))
2040 If a = 0 Then Goto 2100
2050 If a = 1 Then Goto 2200
2060 If a = 2 Then Goto 2300
2070 Goto 2000
2100 GoSub 50
2110 Goto 2000
2200 GoSub 1000
2210 Goto 2000
2300 Stop
6000 Out Port, &HFF
'clock high data high select off
6010 Out Port, &HFC
'clock low data low select off
6020 Out Port, &H5C
'select on
6030 Out Port, &H5D
'clock high data low
6040 Out Port, &H5E
'clock low data high
6050 Out Port, &H5F
'clock high data high
6060 Return
7000 Out Port, &H5C
'clock low data low
7010 Out Port, &H5D
'clock high data low
7020 Return
8000 Out Port, &H5E
'clock low data high
8010 Out Port, &H5F
'clock high data high
8020 Return
End Sub
Habe aber ein richtiges Problem. Bei eurer Lösung bekomme ich andere Werte als mit meiner Version. Ich weis aber nicht , was die richtigen Werte sind
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
Qbasic Programm umschreiben nach VB61.117Seek111.05.06 12:06
Re: Qbasic Programm umschreiben nach VB6 Teil1800T.i.m.14.05.06 00:37
Re: Qbasic Programm umschreiben nach VB6 Teil1648ProofP14.05.06 14:17
Re: Qbasic Programm umschreiben nach VB6 Teil1899T.i.m.14.05.06 15:12
Re: Qbasic Programm umschreiben nach VB6 Teil2710T.i.m.14.05.06 00:38
Re: Qbasic Programm umschreiben nach VB6626Seek114.05.06 15:10
Re: Qbasic Programm umschreiben nach VB61.000Seek117.05.06 17:31

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2025 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel