Page 1 of 1

BBS in EBCDIC

Posted: Mon Jun 14, 2021 8:38 am
by kerravon
It's still "Proof of Concept", but if you would like to see a standard MVS mainframe executable running S/370 code to drive an EBCDIC ANSI terminal, go here:

kerravon.mooo.com 64000

Your telnet is unlikely to understand EBCDIC, but you can get a virtual modem that will convert ASCII to/from EBCDIC here:

https://sourceforge.net/p/mvs380/mvssrc ... /c/modem.c

It is character-based, so you shouldn't need to hit enter. Note that x'F1' rather than x'31' will give you the number "1", if you want to select that.

Also note that it will send an XON before soliciting input, for the benefit of software that has no way of knowing that writing has finished, and is doing blocking reads. I think that is a sensible protocol, but I'm not sure.

All source code involved is available from http://pdos.org

Re: BBS in EBCDIC

Posted: Mon Jun 14, 2021 11:04 pm
by Octocontrabass
kerravon wrote:Your telnet is unlikely to understand EBCDIC,
PuTTY does, if you pick an EBCDIC code page. It doesn't seem to work very well. I'm not sure if that's because PuTTY doesn't really support EBCDIC, or because I chose the wrong EBCDIC code page, or because PuTTY is a bit smarter than your average ANSI terminal.
kerravon wrote:It is character-based, so you shouldn't need to hit enter.
This might just be PuTTY again, but it won't accept input unless I press enter.

It only sometimes tells me whether or not I input a number. Is it supposed to tell me every time?

Re: BBS in EBCDIC

Posted: Tue Jun 15, 2021 12:22 am
by kerravon
Octocontrabass wrote:
kerravon wrote:Your telnet is unlikely to understand EBCDIC,
PuTTY does, if you pick an EBCDIC code page. It doesn't seem to work very well. I'm not sure if that's because PuTTY doesn't really support EBCDIC, or because I chose the wrong EBCDIC code page, or because PuTTY is a bit smarter than your average ANSI terminal.
Cool. I think the output will work with any EBCDIC code page, but the one that I actually support is 1047, especially noticeable when it comes to square brackets (x'AD' and x'BD').
kerravon wrote:It is character-based, so you shouldn't need to hit enter.
This might just be PuTTY again, but it won't accept input unless I press enter.

It only sometimes tells me whether or not I input a number. Is it supposed to tell me every time?
It is supposed to tell you every time, and it used to be behaving properly before I switched to EBCDIC so can no longer easily test. It may be Putty not switching to character mode because there is no Telnet negotiation done (I switched that off, as I want it to work with a "dumb terminal").

Anyway, thanks for trying it! The problem may not be Putty, it may be my end. It is more a "proof of concept". I'm not sure any of this EBCDIC software (like your Putty) has ever really been exercised. I'm not sure anyone is expecting to receive EBCDIC ANSI. I'm not sure anyone else actually produces that either.

I need to carefully check the current behavior of my BBS and start correcting things. I had to put in some hacks to get it to work at all. E.g. you shouldn't need to be the person who types first. I expected the BBS to display something first. There's probably a line in Hercules/380 I failed to comment out after commenting out the telnet negotiation, so now the first thing it does is a useless read or something.

Actually, I might try using Putty myself. I used it years ago for something.

Re: BBS in EBCDIC

Posted: Tue Jun 15, 2021 6:02 am
by bzt
I've always used xtn5250 for Mainframes. Give it a try, it is an xterm like terminal emulator, should work with any EBCDIC charsets.

Cheers,
bzt

Re: BBS in EBCDIC

Posted: Tue Jun 15, 2021 6:21 am
by kerravon
bzt wrote:I've always used xtn5250 for Mainframes. Give it a try, it is an xterm like terminal emulator, should work with any EBCDIC charsets.
I hadn't heard of 5250 before, but it looks like it is related to the 3270, which I am familiar with. The Wikipedia page:

https://en.wikipedia.org/wiki/IBM_5250

says that normal telnet can't be used because the data streams are different, which is correct for 3270.

But my BBS is not using 3270, it is using EBCDIC ANSI.

Note that I tried downloading the source for Putty and building it, but both my Cygwin and my Visual Studio failed to build it.

This is a problem for PDOS/386 and its toolchain to solve. Something as simple as an ANSI terminal will actually work, and not be dependent on having the very latest far-away-from-C90 functions that Microsoft invented yesterday.

Re: BBS in EBCDIC

Posted: Tue Jun 15, 2021 7:49 am
by kerravon
Octocontrabass wrote:It only sometimes tells me whether or not I input a number.
BTW, does it ever correctly detect that you entered a number? One person reports that he enters "1" and it says that x'71' is invalid. I think someone is stripping the high bit of x'F1' but I haven't ruled out my end yet.

The BBS is here BTW:

https://sourceforge.net/p/pdos/gitcode/ ... s370/bbs.c

It's very simple.

Re: BBS in EBCDIC

Posted: Tue Jun 15, 2021 8:59 am
by Octocontrabass
kerravon wrote:BTW, does it ever correctly detect that you entered a number?
Yes, it's always correct when it shows up.