Discussion:
[hercules-os380] BBS
kerravon86@yahoo.com.au [hercules-os380]
2018-09-12 14:05:49 UTC
Permalink
Today I managed to get keyboardhit() to
work under PDOS/386 which has allowed
me to get the below comms program to
work, which allows me to chat to whoever
connects to my system. I need to hit enter
twice to send my messages because
PDPCLIB doesn't seem to honor the
no-buffering call.

Anyway, if anyone would like to chat
with me, you just need to go:

telnet kerravon.mooo.com 80

I only have port 80 forwarded at the
moment, so that's why the normal 23
isn't being used.

I don't know whether QEMU honors the
DTR signal so that I can test to see
if there is a connection, and also
terminate the connection.

So the below application is running
under PDOS/386 which is running under
qemu. Bochs doesn't allow me to have
different people connecting to me
(serially).

This is the beginning of basic communications
and I would hope that people will be able to
connect to my system using MVS/380 instead
of Unix/Windows telnet.

Note that if you type "B" (plus you may need
to hit enter) you will get a response from the
system if I am not around to answer.

In due course I hope this rudimentary
communication will change into a system
that can exchange messages. I'm still not
sure if we want Fidonet or UUCP or maybe
the mailer can handle both.

BFN. Paul.



/*********************************************************************/
/* */
/* This Program Written By Paul Edwards. */
/* Released to the public domain. */
/* */
/*********************************************************************/
/*********************************************************************/
/* */
/* pdpser - serial comms */
/* */
/*********************************************************************/

#include <stdio.h>

#include <pos.h>

#define PORT 0x3f8

static void init(void);
static int ser_putc(int c);
static void ser_puts(char *s);
static int ser_getc(void);

int main(void)
{
int c;

setbuf(stdin, NULL);
init();
ser_puts("Welcome to pdpser\n");
while (1)
{
c = ser_getc();
if (c != EOF)
{
ser_putc(c);
if (c == 'B')
{
ser_puts("You typed B!\n");
}
}
else if (PosKeyboardHit())
{
c = getchar();
ser_putc(c);
}
else
{
PosYield();
}
}
return (0);
}

static void init(void)
{
outp(PORT + 3, 0x03); /* 8 N 1 */
}

static int ser_putc(int c)
{
while ((inp(PORT + 5) & 0x20) == 0)
{
PosYield();
}
outp(PORT, c);
putchar(c);
fflush(stdout);
return (c);
}

static void ser_puts(char *s)
{
while (*s != '\0')
{
ser_putc(*s);
s++;
}
return;
}

static int ser_getc(void)
{
int c;

if ((inp(PORT + 5) & 0x01) == 0)
{
return (EOF);
}
c = inp(PORT);
return (c);
}
kerravon86@yahoo.com.au [hercules-os380]
2018-09-13 07:10:09 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
telnet kerravon.mooo.com 80
And press ctrl-g to get my attention if I
am awake (it causes a beep).

BFN. Paul.
kerravon86@yahoo.com.au [hercules-os380]
2018-09-13 07:20:53 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
Post by ***@yahoo.com.au [hercules-os380]
telnet kerravon.mooo.com 80
And press ctrl-g to get my attention if I
am awake (it causes a beep).
Oops. It seems that it is the telnet terminal
I was testing with that beeps, not the
PDOS/386 window.

Someone did connect but they just said
"just saying hello" and I didn't see it in
time to reply. Please be a bit patient and
I will press ctrl-g when I notice the screen
to alert you.

BFN. Paul.
kerravon86@yahoo.com.au [hercules-os380]
2018-09-14 04:21:15 UTC
Permalink
Post by ***@yahoo.com.au [hercules-os380]
telnet kerravon.mooo.com 80
I was subjected to what was effectively a
DOS attack. A port scanner connected,
tried some commands, and never
disconnected. As such, I have switched
to the standard telnet port number, but
in my testing I found it was better to still
use the port number, so:

telnet kerravon.mooo.com 23

BFN. Paul.
kerravon86@yahoo.com.au [hercules-os380]
2018-09-14 07:55:53 UTC
Permalink
One of my messages got lost, so if it
appears, ignore the "23".

What I have set up for now is:

telnet kerravon.mooo.com 8888

to avoid a DOS attack where someone
connects and does nothing, and never
disconnects.

Eventually I hope I will be able to drop
DTR after a timeout, and qemu will
hopefully terminate the connection
itself.

BFN. Paul.

Continue reading on narkive:
Loading...