Results 1 to 2 of 2

Thread: [RESOLVED] OPEN COM and DOSBox-X question.

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,812

    Resolved [RESOLVED] OPEN COM and DOSBox-X question.

    Curious as how to use the OPEN COM statement found in many older BASIC dialects I wrote this quick piece of code based on an example:

    Code:
     OPEN "COM1:9600,N,8,1,BIN" FOR OUTPUT AS #1
      PRINT #1, "Hi!"
     CLOSE #1
    In my DOSBox-X config file I have this line:
    Code:
    serial1       = file file:output1.txt timeout:1000 openwith:notepad
    DOSBox-X appears to give no errors and my code runs without errors, however no output1.txt file appears to have been created. Could someone more familiar with the specifics of redirecting serial port communication in DOBox-X point me in the right direction?

    PS:
    Running under regular DOSBox the code procedues a device timeout error. Which implies DOSBox-X appears to be emulating a COM device in some fashion. The question remains, where's my output going?
    Last edited by Peter Swinkels; Mar 2nd, 2024 at 07:00 AM. Reason: additional info

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,812

    Re: OPEN COM and DOSBox-X question.

    Alright, I simplified the line in the configuration file to:

    Code:
    serial1       = file file:d:\output.txt
    Guess what? It works as expected now. :-) Got to love those silent failures. :-(

    Also, I found the built-in SERIAL command which lists the serial port settings being used by DOSBox-X.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width