Loading ...
Sorry, an error occurred while loading the content.
 

RE: [libertybasic] Confused

Expand Messages
  • Stefan Pendl
    ... You will not create an EXE, but a TKN, which is comparable with a Java JAR archive. You need the following files: run403.exe ...... Runtime Engine rename
    Message 1 of 10 , Mar 10, 2008
      >
      > I am no longer confused. It was just that somehow, I thought that a
      > licensed copy of something was required on the computer where you ran
      > the program - some little tidbit on a FAQ. That was the
      > confusion, and
      > now it has been straightened out. You need a licensed copy to
      > create the
      > exe (so to speak) and once the 'exe' is created and packaged with the
      > '.sll' and '.dll' files, it can be distributed - they just
      > need the sll
      > and dll to make it work. Not a problem. As soon as I have a licensed
      > copy, I will see what a 'packaged' program looks and feels like.
      >

      You will not create an EXE, but a TKN, which is comparable with a Java JAR archive.

      You need the following files:

      run403.exe ...... Runtime Engine
      rename it to match the name of the TKN file,
      so it will find the TKN automatically
      xy.tkn .......... your program
      lbasic400.ini ... needed to set the font of the console window
      can be omitted for GUI programs
      delete the recent files list from it before distributing
      sll and dll ..... support files for the runtime engine
      bmp, etc. ....... any support files your program needs

      ---
      Stefan Pendl
    • Stefan Pendl
      ... How about a custom function like the following? ---code start (watch for line wraps) open COM1:9600 for random as #COMport call SendHEX #COMport ,
      Message 2 of 10 , Mar 10, 2008
        >
        > Now: I want to send the 8 bit value of "26" decimal as a singly 8
        > bit byte to a destination port or stream as a single byte. I have to
        > go through the CHR$(hexdec("1a")) dance. And, If I have to compute
        > the number, it is even less readable. Something like "x=26; print
        > #serialport CHR$(x);" works, but is far from friendly. It would be
        > so much nicer if I could just send 0x1a.
        >
        > This would want to be extend to the "using" function and input
        > functions as well.
        >

        How about a custom function like the following?

        '---code start (watch for line wraps)
        open "COM1:9600" for random as #COMport

        call SendHEX "#COMport", "0x1A"

        close #COMport
        end

        sub SendHEX PortHandle$, HEX$
        if instr(HEX$, "0x") = 1 then HEX$ = mid$(HEX$, 3)

        #PortHandle$ chr$(hexdec(HEX$));
        end sub
        '---code end

        ---
        Stefan Pendl
      Your message has been successfully submitted and would be delivered to recipients shortly.