Menu

#1820 Doing load from monitor magically sets basic pointers (even if load address is overridden).

v3.x
closed-fixed
gpz
None
Linux
Monitor
2023-07-28
2023-01-29
No

Doing l "<file>" 0 surprisingly sets BASIC pointers in some cases, e.g when the load address is $0801. This is undocumented behaviour and also inconsistent with how native monitors work. There a load is just a load.
Note that there is an additional bug with this. If the load address is overridden with e.g l "<file>" 0 0100, then the pointers are still set if the original load address was $0801.

IMO, if this behaviour is to be kept, there should be clear documentation on when it happens, and how to avoid it when necessary.

x64sc trunk r42970

Discussion

  • Daniel Kahlin

    Daniel Kahlin - 2023-07-25

    I think at least the bug when using overridden load address should be fixed here. The other behaviour might be acceptable if documented, and an alternate way to load without it is provided.

     
  • gpz

    gpz - 2023-07-28

    After thinking about it for a while... i think the cleanest solution would be to introduce an entire different command that would always set the basic pointers. Those magic (and non documented) conditions are just WTF.
    Now the question is... what would be a good command and abbreviation? (bl is already taken for binary load)

     
  • Daniel Kahlin

    Daniel Kahlin - 2023-07-28

    how about loadbas/ ldb ? A bit contrived perhaps, but it shouldn't be the go to command if not needed.

     

    Last edit: Daniel Kahlin 2023-07-28
  • gpz

    gpz - 2023-07-28

    implemented in r44337 :)

     
  • gpz

    gpz - 2023-07-28
    • status: open --> closed-fixed
    • assigned_to: gpz
     
  • Daniel Kahlin

    Daniel Kahlin - 2023-07-28

    I've tested a bit and it seems to be working.

    l is always clean like expected. ldb always sets $ae/af and $2d/2e to the end address regardless of load address. It also sets $2b/2c to the load address which is a bit unexpected, but ok in my view.

     

Log in to post a comment.