Howdy, Stranger!

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

Categories

VB x BASIC

celiocelio Member Posts: 2
I NEED CHANGE THE SAMPLE FOR VISUAL BASIC

10 '--------> READ STATUS
20 LPRINT CHRS(0)
30 BASE=&HF8
40 T=Timer
50 IF(Timer-T)<0.1 THEW GOTO 50
60 IF((IMP(BASE+5) AND 1) <> 1 THEW GOTO 150
70 STATUS=IMP(BASE)
80 PRINT "STATUS x"; Hex$(status); "h"
90 IF STATUS AND 2 THEN PRINT "BUFFER FULL"
100 IF STATUS AND 4 THEN PRINT "NOT LEAF"
110 IF STATUS AND 8 THEN PRINT "PRINTING"
120 IF STATUS AND 16 THEN PRINT "FAIL BORDER"
130 IF STATUS AND 32 THEN PRINT "FAIL ENGINE"
140 END
150 PRINT "Connection error"
160 RETURN

Comments

  • ColdShineColdShine Member Posts: 597
    In Visual Basic you cannot directly use I/O ports like this code does, so you'd probably find faster to rewrite the code from scratches; also, this code wastes CPU time (line 50: wait loop) while other programs could make proper use of it (because of Windows' multitasking).
    ________________
    [size=1][b][grey]Cold[/grey][blue]Shine[/blue][/b][/size]

  • Justin BibJustin Bib USAMember Posts: 0

    | http://forcoder.org | free ebooks and video tutorials about \ C++ PHP Scratch PL/SQL Ruby MATLAB Visual Basic JavaScript Python C# R Visual Basic .NET Objective-C Go Assembly Swift Perl Java Delphi C Clojure Rust Ada SAS Hack Scala Lisp Kotlin COBOL Erlang Awk Julia FoxPro Crystal VBScript Logo Bash Fortran Scheme LabVIEW Prolog Transact-SQL Lua D ML Apex Alice F# ABAP Dart \ _______

Sign In or Register to comment.