Thread View: comp.sys.ibm.pc.programmer
2 messages
2 total messages
Started by Francis Ho
Thu, 06 Jun 1991 18:37
(Q)Basic -> C
Author: Francis Ho
Date: Thu, 06 Jun 1991 18:37
Date: Thu, 06 Jun 1991 18:37
26 lines
1219 bytes
1219 bytes
what is the C equivalent (MSC 5.1 or TC/TC++) of these (Q)basic statements: resumecom% = 11 /* is this an int? */ ctrladdress% = &H3FC /* COM1 */ OUT ctrladress%, resumecom% /* incidentally, why the '%', is this to signify ints ? */ is the TC/TC++ version of the above : #define COM1 0 [...] bioscom(1, '\11', COM1); or ^^^^^ (char)(11) neither seems to work please send replies to francis@cunixf.cc.columbia.edu I thought I felt love for you/There was a closeness and warmth that I had never had before/Yet, it was not love./We both search endlessly for it/ We will not find it within each other/What we have, though, is also/ Special, in and of itself/We are too close to part/Yet too far to love.
Re: (Q)Basic -> C
Author: Steve Resnick
Date: Thu, 06 Jun 1991 22:39
Date: Thu, 06 Jun 1991 22:39
39 lines
1745 bytes
1745 bytes
In article <1991Jun6.183759.5605@cunixf.cc.columbia.edu> francis@cunixf.cc.columbia.edu (Francis Ho) writes:
>
>what is the C equivalent (MSC 5.1 or TC/TC++) of these (Q)basic statements:
>
> resumecom% = 11 /* is this an int? */
> ctrladdress% = &H3FC /* COM1 */
> OUT ctrladress%, resumecom%
>
> /* incidentally, why the '%', is this to signify ints ? */
>
>is the TC/TC++ version of the above :
>
> #define COM1 0
>
> [...]
>
> bioscom(1, '\11', COM1);
> or ^^^^^ (char)(11)
> neither seems to work
>
>
What you want is:
outportb(0x3fc,11);
bioscom(1,(char)11,COM1) will write 11 to port 3F8 (which is the
serial port transmitter) 0x3FC is the Modem control register which
I don't think bioscom() can access.
Cheers!
Steve
--
-------------------------------------------------------------------------------
resnicks@netcom.com, steve@camphq, IFNA: 1:143/105.0,
co moderator for comp.binaries.os2
Real life: Steve Resnick. Chief Software Architect, Process Scientific, Inc
Flames, grammar and spelling errors >/dev/null
The Asylum OS/2 BBS - (408)263-8017 12/2400,8,1 - Running Maximus CBCS 1.2
-------------------------------------------------------------------------------
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads