Hi,
I'm trying to port the QBasic program DADPORT to Visual Basic, so the program will run as a Windows app. Unfortunately, DADPORT is a huge piece of software, and my familiarity with QBasic is limited. Does anyone know of an easy way to convert to VB or into a Win application? If not, can someone help translate the following piece of code for me:
COMMON ADDR, QST$, PGM, PGM1, PGM4
CLEAR , , 20000
50000 CLS : DTIME = TIMER
50010 ADDR = &H278: GOSUB 50060
50015 ADDR = &H378: GOSUB 50060
50020 ADDR = &H3BC: GOSUB 50060
50030 LOCATE 12, 20: PRINT "THERE IS NO VALID PRINTER PORT IN THIS MACHINE"
50035 END
50060 FOR I = 0 TO 255
50065 OUT ADDR, I
50070 LPT = INP(ADDR): IF LPT <> I THEN RETURN
50080 NEXT I
50085 LOCATE 12, 25: PRINT "PRINTER PORT ADDRESS = HEX "; HEX$(ADDR)
50087 WHILE DTIME + 2.5 > TIMER: GOTO 50087: WEND
(if someone can get me started on this, I can figure out the rest)
Thanks a lot!
-RSLiu
Comments
: Hi,
: I'm trying to port the QBasic program DADPORT to Visual Basic, so the program will run as a Windows app. Unfortunately, DADPORT is a huge piece of software, and my familiarity with QBasic is limited. Does anyone know of an easy way to convert to VB or into a Win application? If not, can someone help translate the following piece of code for me:
:
: COMMON ADDR, QST$, PGM, PGM1, PGM4
: CLEAR , , 20000
: 50000 CLS : DTIME = TIMER
: 50010 ADDR = &H278: GOSUB 50060
: 50015 ADDR = &H378: GOSUB 50060
: 50020 ADDR = &H3BC: GOSUB 50060
: 50030 LOCATE 12, 20: PRINT "THERE IS NO VALID PRINTER PORT IN THIS MACHINE"
: 50035 END
: 50060 FOR I = 0 TO 255
: 50065 OUT ADDR, I
: 50070 LPT = INP(ADDR): IF LPT <> I THEN RETURN
: 50080 NEXT I
: 50085 LOCATE 12, 25: PRINT "PRINTER PORT ADDRESS = HEX "; HEX$(ADDR)
: 50087 WHILE DTIME + 2.5 > TIMER: GOTO 50087: WEND
:
: (if someone can get me started on this, I can figure out the rest)
: Thanks a lot!
: -RSLiu
:
you can translate it...kind of...depending on what you wanna do...but how are you gonna get it compiled?.....unlike visual c++, visual basic doesnt support spontaneous creation of forms and objects very well (in fact i dont think it even did until vb6)...if you want it in vb then you need to get vb...if you have it then i can help...
: Hi,
: I'm trying to port the QBasic program DADPORT to Visual Basic, so the program will run as a Windows app. Unfortunately, DADPORT is a huge piece of software, and my familiarity with QBasic is limited. Does anyone know of an easy way to convert to VB or into a Win application? If not, can someone help translate the following piece of code for me:
:
: COMMON ADDR, QST$, PGM, PGM1, PGM4
: CLEAR , , 20000
: 50000 CLS : DTIME = TIMER
: 50010 ADDR = &H278: GOSUB 50060
: 50015 ADDR = &H378: GOSUB 50060
: 50020 ADDR = &H3BC: GOSUB 50060
: 50030 LOCATE 12, 20: PRINT "THERE IS NO VALID PRINTER PORT IN THIS MACHINE"
: 50035 END
: 50060 FOR I = 0 TO 255
: 50065 OUT ADDR, I
: 50070 LPT = INP(ADDR): IF LPT <> I THEN RETURN
: 50080 NEXT I
: 50085 LOCATE 12, 25: PRINT "PRINTER PORT ADDRESS = HEX "; HEX$(ADDR)
: 50087 WHILE DTIME + 2.5 > TIMER: GOTO 50087: WEND
:
: (if someone can get me started on this, I can figure out the rest)
: Thanks a lot!
: -RSLiu
: