Author Topic: DosDevIOCtl disabling keyboard in VIO mode  (Read 11190 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4811
  • Karma: +101/-1
    • View Profile
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #45 on: March 10, 2024, 01:02:15 am »
Running lxlite on the exe gives,
Code: [Select]
H:\tmp>lxlite uemacs.exe
┌[ lxLite ]───────────────────────────────────┬[ Version 1.3.9 ]┐
├ Copyright 1996,97 by FRIENDS software       ├    All rights   ┤
├ Copyright 2001,03 by Max Alekseyev          ├     reserved    ┤
├ Copyright 2008-10 by OS/4 team              ├                 ┤
├ Copyright 2011    by Steven H. Levine       ├                 ┤
├ Copyright 2017-23 by bww bitwise works GmbH └─────────────────┘
├ The file uemacs.exe contains 1 bytes out of module structure
├                  uemacs.exe initial: 72863 final: 42821 gain: 41.3%
├┤Total gain: 30042 bytes

After lxliting with the defaults, the exe will only run on Warp v3 or later. The IBM linkers can also pack the data, code etc.
Hmm, your exe won't run after lxliting,
Code: [Select]
03-09-2024  15:59:13  SYS3175  PID 0085  TID 0001  Slot 00b7
H:\TMP\UEMACS.EXE
c0000005
0001d6a1
P1=00000001  P2=0040fd6c  P3=XXXXXXXX  P4=XXXXXXXX
EAX=00000000  EBX=00000000  ECX=00000000  EDX=00000000
ESI=00000000  EDI=00000000
DS=0053  DSACC=d0f3  DSLIM=bfffffff
ES=0053  ESACC=d0f3  ESLIM=bfffffff
FS=150b  FSACC=00f3  FSLIM=00000030
GS=0000  GSACC=****  GSLIM=********
CS:EIP=005b:0001d6a1  CSACC=d0df  CSLIM=bfffffff
SS:ESP=0053:00047f58  SSACC=d0f3  SSLIM=bfffffff
EBP=00047fd0  FLG=00010212

UEMACS.EXE 0001:0000d6a1

If you can find an old enough exehdr, perhaps the OS/2 v1.3 toolkit, it should run under Win2k as Win2k does support 16 bit OS/2 code

kerravon

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #46 on: March 10, 2024, 02:46:39 am »
Running lxlite on the exe gives,
Code: [Select]
H:\tmp>lxlite uemacs.exe
┌[ lxLite ]───────────────────────────────────┬[ Version 1.3.9 ]┐
├ Copyright 1996,97 by FRIENDS software       ├    All rights   ┤
├ Copyright 2001,03 by Max Alekseyev          ├     reserved    ┤
├ Copyright 2008-10 by OS/4 team              ├                 ┤
├ Copyright 2011    by Steven H. Levine       ├                 ┤
├ Copyright 2017-23 by bww bitwise works GmbH └─────────────────┘
├ The file uemacs.exe contains 1 bytes out of module structure
├                  uemacs.exe initial: 72863 final: 42821 gain: 41.3%
├┤Total gain: 30042 bytes
Am I interpreting that correctly that there is 1 rogue byte somewhere?

Quote
Hmm, your exe won't run after lxliting,
Maybe it doesn't like the non-standard virtual addresses. I am attaching one with the normal 0x10000 - can you see if that is ok?

Quote
If you can find an old enough exehdr, perhaps the OS/2 v1.3 toolkit, it should run under Win2k as Win2k does support 16 bit OS/2 code
That would only operate on 16-bit NE executables, not 32-bit LX executables introduced with OS/2 2.0, right?

kerravon

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #47 on: March 10, 2024, 02:53:05 am »
PDOS/386 now runs the microemacs OS/2 executable. The problem was that I was translating DosWrite into fwrite but had failed to do a fflush. Plus the BSS clearing code wasn't doing a sufficient job. New version of PDOS available at pdos.org

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4757
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #48 on: March 10, 2024, 03:23:58 am »
Hello.

I may be talking nonsense here, since I'm not a developer, but maybe in general terms these projects can help for some code inspiration for your PDOS efforts with OS/2:
- https://github.com/OS2World/LINUX-SYSTEM-OS2Linux
- https://github.com/icculus/2ine
- https://github.com/osfree-project/osfree/tree/ac53235a7bc2a2f91de23e9bf7fdaa9c2c3dc976/OS2/CPI/doscalls

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

kerravon

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #49 on: March 10, 2024, 04:11:49 am »
I may be talking nonsense here, since I'm not a developer, but maybe in general terms these projects can help for some code inspiration for your PDOS efforts with OS/2:
My 32-bit OS/2 work is nearly done. ie I support C90 and ANSI X3.64 sufficiently well to use native OS/2 tools under PDOS/386 to build a better version of OS/2 or anything else that someone may wish to do. I don't personally wish to write millions of lines of code to replicate OS/2 or Windows or whatever. I just want the basic functionality to exist. Perhaps different universities would like to build their own OS, and may choose to clone OS/2, and they can start from a public domain source base.

After some more technical cleanup of the 32-bit OS/2, I'm probably more interested in replicating (to the same limited extent) 16-bit OS/2, for PM32 with D-bit set to 16-bit, PM16 and RM16 - with a single NE binary app able to run on all 3 environments and without separate code paths. I have a Book 8088 to try it on.

BTW, I just checked, and PDOS/386 is about 330k (for everything required to bring up a prompt). ie it would fit on a 360k floppy.

I'm also interested in a public domain C compiler - which may involve bringing SubC up to C90 standard - or at least, close enough to compile the PDOS source. I don't currently have the skills to do that, so would need to learn that. That's the only thing still missing from the essential PDOS/386 suite - I use (a fork of) the copyrighted gcc 3.2.3 because we don't have a 32-bit public domain C compiler that can handle C90 syntax.

There is also an interesting "Sector C" C compiler which inspired me to write "Multi-sector C" using the same algorithm.

Or I may switch back to the mainframe, with z/PDOS.

A lot of the time direction is governed by others who are interested in public domain code and contributing something. So supporting others in their own goals is very productive.

Anyway, we'll see what happens. :-)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4811
  • Karma: +101/-1
    • View Profile
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #50 on: March 10, 2024, 04:15:27 am »
Running lxlite on the exe gives,
Code: [Select]
H:\tmp>lxlite uemacs.exe
┌[ lxLite ]───────────────────────────────────┬[ Version 1.3.9 ]┐
├ Copyright 1996,97 by FRIENDS software       ├    All rights   ┤
├ Copyright 2001,03 by Max Alekseyev          ├     reserved    ┤
├ Copyright 2008-10 by OS/4 team              ├                 ┤
├ Copyright 2011    by Steven H. Levine       ├                 ┤
├ Copyright 2017-23 by bww bitwise works GmbH └─────────────────┘
├ The file uemacs.exe contains 1 bytes out of module structure
├                  uemacs.exe initial: 72863 final: 42821 gain: 41.3%
├┤Total gain: 30042 bytes
Am I interpreting that correctly that there is 1 rogue byte somewhere?

That's my interpretation.

Quote

Quote
Hmm, your exe won't run after lxliting,
Maybe it doesn't like the non-standard virtual addresses. I am attaching one with the normal 0x10000 - can you see if that is ok?

Yes, this one worked after lxliting.

Quote
Quote
If you can find an old enough exehdr, perhaps the OS/2 v1.3 toolkit, it should run under Win2k as Win2k does support 16 bit OS/2 code
That would only operate on 16-bit NE executables, not 32-bit LX executables introduced with OS/2 2.0, right?

Yes, OS/2 1.x text code runs out of the box. Used to be a Presentation Manager kit to run 1.x graphics as well.

kerravon

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #51 on: March 10, 2024, 05:24:24 am »
That's my interpretation.
Ok, I'll pass the observation on, thanks.

Quote
Yes, this one worked after lxliting.
Ok, great.

Quote
Quote
Quote
If you can find an old enough exehdr, perhaps the OS/2 v1.3 toolkit, it should run under Win2k as Win2k does support 16 bit OS/2 code
That would only operate on 16-bit NE executables, not 32-bit LX executables introduced with OS/2 2.0, right?

Yes, OS/2 1.x text code runs out of the box. Used to be a Presentation Manager kit to run 1.x graphics as well.
Right. But the executable I wish to switch from pmcompat to fullscreen is LX, not NE.

So an old exehdr is unlikely to work on it.

Even though an old exehdr should indeed run on Windows 2000.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4811
  • Karma: +101/-1
    • View Profile
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #52 on: March 10, 2024, 07:43:17 am »
Good point about NE vs LX. Wonder when LX was first used on OS/2. Actually I think it was LE before LX.

kerravon

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +0/-0
    • View Profile
Re: DosDevIOCtl disabling keyboard in VIO mode
« Reply #53 on: March 10, 2024, 08:44:03 am »

Quote
Am I interpreting that correctly that there is 1 rogue byte somewhere?

That's my interpretation.

pdld was changed to hopefully fix this problem. Could you please confirm that message is gone with the attached executable?

Thanks. Paul.