VERSION 5.00 Begin VB.Form PORT08 BorderStyle = 1 'Fixed Single Caption = "Interfejs" ClientHeight = 3690 ClientLeft = 45 ClientTop = 330 ClientWidth = 10095 LinkTopic = "Form1" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 3690 ScaleWidth = 10095 StartUpPosition = 2 'CenterScreen Begin VB.Frame Frame1 Caption = "Bazna Adresa - Heksa" ForeColor = &H00C000C0& Height = 1215 Left = 240 TabIndex = 10 Top = 2280 Width = 1815 Begin VB.OptionButton Option3 Caption = "Option3" Height = 195 Left = 240 TabIndex = 14 Top = 840 Width = 255 End Begin VB.OptionButton Option2 Caption = "Option2" Height = 195 Left = 240 TabIndex = 13 Top = 600 Width = 255 End Begin VB.OptionButton Option1 Caption = "Option1" Height = 195 Left = 240 TabIndex = 11 Top = 360 Value = -1 'True Width = 255 End Begin VB.Label Label6 Caption = "LPT3: 3BC" ForeColor = &H00404080& Height = 255 Left = 600 TabIndex = 16 Top = 840 Width = 1095 End Begin VB.Label Label4 Caption = "LPT2: 278" ForeColor = &H00404080& Height = 375 Left = 600 TabIndex = 15 Top = 600 Width = 975 End Begin VB.Label Label3 Caption = "LPT1: 378" ForeColor = &H00404080& Height = 255 Left = 600 TabIndex = 12 Top = 360 Width = 975 End End Begin VB.CommandButton Command2 BackColor = &H00FFC0C0& Caption = "Upisi" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 7080 MaskColor = &H00FF8080& TabIndex = 8 Top = 2160 Width = 1815 End Begin VB.Label Label5 Caption = "By V. Milanovic" BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 0 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty ForeColor = &H00C000C0& Height = 255 Left = 7080 TabIndex = 25 Top = 3120 Width = 2295 End Begin VB.Line Line3 BorderColor = &H00008000& BorderWidth = 2 Index = 1 X1 = 9960 X2 = 9960 Y1 = 1080 Y2 = 1920 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 8 Left = 4560 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Label Label1 Caption = "D16" Height = 255 Index = 32 Left = 480 TabIndex = 24 Top = 1200 Width = 375 End Begin VB.Label Label1 Caption = "D15" Height = 255 Index = 31 Left = 1080 TabIndex = 23 Top = 1200 Width = 375 End Begin VB.Label Label1 Caption = "D14" Height = 255 Index = 30 Left = 1680 TabIndex = 22 Top = 1200 Width = 375 End Begin VB.Label Label1 Caption = "D13" Height = 255 Index = 29 Left = 2280 TabIndex = 21 Top = 1200 Width = 375 End Begin VB.Label Label1 Caption = "D12" Height = 255 Index = 28 Left = 2880 TabIndex = 20 Top = 1200 Width = 375 End Begin VB.Label Label1 Caption = "D11" Height = 255 Index = 27 Left = 3480 TabIndex = 19 Top = 1200 Width = 375 End Begin VB.Label Label1 Caption = "D10" Height = 255 Index = 26 Left = 4080 TabIndex = 18 Top = 1200 Width = 375 End Begin VB.Label Label1 Caption = "D9" Height = 255 Index = 25 Left = 4680 TabIndex = 17 Top = 1200 Width = 255 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 9 Left = 3960 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 10 Left = 3360 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 11 Left = 2760 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 12 Left = 2160 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 13 Left = 1560 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 14 Left = 960 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 15 Left = 360 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Line Line3 BorderColor = &H00008000& BorderWidth = 2 Index = 0 X1 = 240 X2 = 240 Y1 = 1080 Y2 = 1920 End Begin VB.Line Line2 BorderColor = &H00008000& BorderWidth = 2 Index = 0 X1 = 240 X2 = 9960 Y1 = 1920 Y2 = 1920 End Begin VB.Line Line1 BorderColor = &H00008000& BorderWidth = 2 X1 = 240 X2 = 9960 Y1 = 1080 Y2 = 1080 End Begin VB.Label Label2 Caption = "16 - KANALNI INTERFEJS" BeginProperty Font Name = "MS Sans Serif" Size = 24 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H00C00000& Height = 615 Left = 1680 TabIndex = 9 Top = 240 Width = 6255 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 7 Left = 5160 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 6 Left = 5760 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 5 Left = 6360 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 4 Left = 6960 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 3 Left = 7560 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 2 Left = 8160 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 1 Left = 8760 Shape = 3 'Circle Top = 1440 Width = 495 End Begin VB.Label Label1 Caption = "D1" Height = 255 Index = 7 Left = 9480 TabIndex = 7 Top = 1200 Width = 255 End Begin VB.Label Label1 Caption = "D2" Height = 255 Index = 6 Left = 8880 TabIndex = 6 Top = 1200 Width = 255 End Begin VB.Label Label1 Caption = "D3" Height = 255 Index = 5 Left = 8280 TabIndex = 5 Top = 1200 Width = 255 End Begin VB.Label Label1 Caption = "D4" Height = 255 Index = 4 Left = 7680 TabIndex = 4 Top = 1200 Width = 255 End Begin VB.Label Label1 Caption = "D5" Height = 255 Index = 3 Left = 7080 TabIndex = 3 Top = 1200 Width = 255 End Begin VB.Label Label1 Caption = "D6" Height = 255 Index = 2 Left = 6480 TabIndex = 2 Top = 1200 Width = 255 End Begin VB.Label Label1 Caption = "D7" Height = 255 Index = 1 Left = 5880 TabIndex = 1 Top = 1200 Width = 255 End Begin VB.Label Label1 Caption = "D8" Height = 255 Index = 0 Left = 5280 TabIndex = 0 Top = 1200 Width = 255 End Begin VB.Shape Shape1 BackColor = &H00FFFFFF& BackStyle = 1 'Opaque Height = 375 Index = 0 Left = 9360 Shape = 3 'Circle Top = 1440 Width = 495 End End Attribute VB_Name = "PORT08" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim Data As Byte 'Used in Save Restore Bios. Private Declare Sub Anjan Lib "io.dll" () Private Declare Function Inp Lib "io.dll" (ByVal portaddr&) As Integer Private Declare Function Inpw Lib "io.dll" (ByVal portaddr&) As Long Private Declare Sub Out Lib "io.dll" (ByVal port&, ByVal byt%) Private Declare Sub Outw Lib "io.dll" (ByVal port&, ByVal wrd&) Private Declare Function Peek Lib "io.dll" (ByVal MemAddr&) As Integer Private Declare Function Peekw Lib "io.dll" (ByVal MemAddr&) As Long Private Declare Function Poke Lib "io.dll" (ByVal MemAddr&, ByVal byt%) As Integer Private Declare Function Pokew Lib "io.dll" (ByVal MemAddr&, ByVal wrd&) As Integer Private Declare Function GetLptBaseAddr Lib "io.dll" (ByVal lpt&) As Integer Private Declare Function GetComBaseAddr Lib "io.dll" (ByVal com&) As Integer Private Declare Sub Enable Lib "io.dll" () Private Declare Sub Disable Lib "io.dll" () Private Declare Sub Delay Lib "io.dll" (ByVal count&) Private Declare Sub AboutVBIO Lib "io.dll" () Public Broj, Broj1, Broj2, LPTadresa, CPTadresa As Integer Public br As Integer Private Sub Command2_Click() Call Out(CPTadresa, 1) Call Out(LPTadresa, Broj1) Call Out(CPTadresa, 2) Call Delay(50) Call Out(LPTadresa, Broj2) End Sub Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim i, j As Integer i = 16 If (X >= 360) And (X < 855) And (Y > 1440) And (Y < 1775) Then i = 15 If (X >= 960) And (X < 1495) And (Y > 1440) And (Y < 1775) Then i = 14 If (X >= 1560) And (X < 2055) And (Y > 1440) And (Y < 1775) Then i = 13 If (X >= 2160) And (X < 2655) And (Y > 1440) And (Y < 1775) Then i = 12 If (X >= 2760) And (X < 3350) And (Y > 1440) And (Y < 1775) Then i = 11 If (X >= 3360) And (X < 3835) And (Y > 1440) And (Y < 1775) Then i = 10 If (X >= 3960) And (X < 4435) And (Y > 1440) And (Y < 1775) Then i = 9 If (X >= 4560) And (X < 5035) And (Y > 1440) And (Y < 1775) Then i = 8 If (X >= 5160) And (X < 5635) And (Y > 1440) And (Y < 1775) Then i = 7 If (X >= 5760) And (X < 6235) And (Y > 1440) And (Y < 1775) Then i = 6 If (X >= 6360) And (X < 6835) And (Y > 1440) And (Y < 1775) Then i = 5 If (X >= 6960) And (X < 7435) And (Y > 1440) And (Y < 1775) Then i = 4 If (X >= 7560) And (X < 8030) And (Y > 1440) And (Y < 1775) Then i = 3 If (X >= 8160) And (X < 8635) And (Y > 1440) And (Y < 1775) Then i = 2 If (X >= 8760) And (X < 9195) And (Y > 1440) And (Y < 1775) Then i = 1 If (X >= 9360) And (X < 9835) And (Y > 1440) And (Y < 1775) Then i = 0 If i <> 16 Then If (Shape1(i).BackColor = RGB(255, 255, 255)) Then Shape1(i).BackColor = RGB(255, 0, 0) Else: Shape1(i).BackColor = RGB(255, 255, 255) End If End If Broj1 = 0 For i = 0 To 7 j = 0 If (Shape1(i).BackColor = RGB(255, 0, 0)) Then j = 1 Broj1 = Broj1 + 2 ^ i * j Next i Broj2 = 0 For i = 8 To 15 j = 0 If (Shape1(i).BackColor = RGB(255, 0, 0)) Then j = 1 Broj2 = Broj2 + 2 ^ (i - 8) * j Next i Lpt1h = Hex(Broj1) End Sub Private Sub Form_Load() 'unlock the dll Anjan LPTadresa = &H378 CPTadresa = LPTadresa + 2 CPTadresa = &H37A Call Out(CPTadresa, 3) Call Out(LPTadresa, 0) End Sub Private Sub Option1_Click() LPTadresa = &H378 CPTadresa = LPTadresa + 2 End Sub Private Sub Option2_Click() LPTadresa = &H278 CPTadresa = LPTadresa + 2 End Sub Private Sub Option3_Click() LPTadresa = &H3BC CPTadresa = LPTadresa + 2 End Sub