Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

QBasic---->VBasic or Windows App

rsliursliu Member Posts: 1
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

  • PrzemekG_PrzemekG_ Member Posts: 595
    I think it will be easyer to translate it to RapidQ since it has more QBasic in it than VB.



    : 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
    :

  • VB5begginnerVB5begginner Member Posts: 66
    how were you planning to compile it to run on windows?
    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
    :

Sign In or Register to comment.