Re: Break Key Info

 BBS: Inland Empire Archive
Date: 01-30-93 (19:28)             Number: 379
From: DICK DENNISON                Refer#: NONE
  To: FRANCOIS ROY                  Recvd: NO  
Subj: Re: Break Key Info             Conf: (2) Quik_Bas
FR>  If anyone has translated this in QB, I'm *very* interested :-)

'Dick Dennison 1:272/34  1/93 PubDomain
'Here's my attempt at it:
'
'A "break" signal is that state in which the comm port sends a steady
'stream of the "break" character.  Here's a snippet of what Telix does,
'in algorithmic form, when Ctrl
'        Get the value of the address of the UART's Line Control Reg.
'        Turn off interrupts
'        To turn on a break, OR the LCR with 01000000b  (128 dec)
'        To turn off a break, AND NOT the LCR with 01000000b
'        Turn on interrupts                      -Jeff Woods

SELECT CASE Port$
    CASE "COM1:"
            BaseAddress% = &H3F8
    CASE "COM2:"
            BaseAddress% = &H2F8
    CASE "COM3:"
            BaseAddress% = &H3E8
    CASE "COM4:"
            BaseAddress% = &H2E8
END SELECT

OldLCR% = INP(BaseAddress% + 3)  'Get line control register
OUT (BaseAddress% + 3), (OldLCR% OR 128)  'Turn on break
SLEEP 1  'Not sure if needed              'Pause a sec
OUT (BaseAddress% + 3), (OldLCR% AND NOT 128) 'Turn off break
OUT (BaseAddress% + 3), OldLCR%  'Restore Line Control Reg


--- VP [DOS] V4.09e
 * Origin: The MailMan  (914)374-3903 NY Quick Share Pt #7 *HST (1:272/34)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET