#373 M68K/BCPL: readinput_long bug

m68k-amiga
closed-invalid
None
5
2013-02-18
2012-02-25
Mark K
No

The BCPL readinput_long routine returns whatever value Read() returns, shifted right by 2 bits. Read() returns -1 to indicate an error. You need to return -1 to the caller in that case, not (-1)>>2 = $3FFFFFFF.

Discussion

  • Toni Wilen

    Toni Wilen - 2012-02-25

    -1 shifted by asr is still -1.

     
  • Toni Wilen

    Toni Wilen - 2012-02-25
    • status: open --> open-invalid
     
  • Mark K

    Mark K - 2012-02-26

    Ah right, obviously I need to brush up on my asm skills!

    Is there any theoretical case where Read() could be called with length greater than 2GB? The current code would fail because of the asr in that case. I guess you'd need to configure the emulated Amiga with a huge amount of memory.

     
  • Krzysztof Smiechowicz

    • assigned_to: nobody --> twilen
    • status: open-invalid --> closed-invalid
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks