Giter Club home page Giter Club logo

Comments (3)

tsupplis avatar tsupplis commented on August 26, 2024

I hope I am not a nuisance going through all the legacy functions ...
Using the same legacy program hex2bin and asm, I found they rely on the stability of ha coming out of int 21h functions 14h, and 15h. They are supposed to give their return in AL, not AX.
Here is the proposed fix:

   case 0x14: // SEQUENTIAL READ USING FCB
        dos_show_fcb();
        cpuSetAX(0x1400|dos_read_record_fcb(dosDTA, 1));
        break;
    case 0x15: // SEQUENTIAL WRITE USING FCB
        dos_show_fcb();
        cpuSetAX(0x1500|dos_write_record_fcb(dosDTA, 1));
        break;
....
    case 0x21: // RANDOM READ USING FCB
        dos_show_fcb();
        cpuSetAX(0x2100|dos_read_record_fcb(dosDTA, 0));
        break;
    case 0x22: // RANDOM WRITE USING FCB
        dos_show_fcb();
        cpuSetAX(0x2200|dos_write_record_fcb(dosDTA, 0));
        break;

I noticed the problem is same with open, close who are overwriting ah. so 0x0F to 0x22 also rename/delete missing, I will give you a proposed implementation. I will create a different issue for those if you are ok.

The file below is a first pass at remediating AX vs AL:
dos.zip

I also fixed another small regression. close was setting/clearing CF which is ok for dos 2+ but not for FCB.

from emu2.

dmsc avatar dmsc commented on August 26, 2024

Thanks for all the help!

I fixed it using a different implementation.

Regarding the dos_close_file, I think that modifying the C flag should not be a problem, so I simply overwrite the full AX value on the AH=10H function.

My reference (the "intlist", at http://www.ctyme.com/intr/int-21.htm ) does not specify if C flag is allowed to chante.

from emu2.

dmsc avatar dmsc commented on August 26, 2024

I hope I am not a nuisance going through all the legacy functions ...

No, I really appreciate the help!

I noticed the problem is same with open, close who are overwriting ah. so 0x0F to 0x22 also rename/delete missing, I will give you a proposed implementation. I will create a different issue for those if you are ok.

Yes, please. I have implemented DOS functions as I found programs that used them, I started the emulator with the intention to execute some old DOS electronics programs in Linux (the PALASM and related), and grew it from there.

I also fixed another small regression. close was setting/clearing CF which is ok for dos 2+ but not for FCB.

Yes, I saw that, do you think that this is important? or, any program would be affected by this?

Have Fun!

from emu2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.