Re: How can PK$save be stopped from adding an extra byte 'FF'?
Posted: Mon Jan 29, 2024 10:15 pm
The SWI address vector is at FFFA, that jumps to 8291 and that jumps to the address in location 2052 (RAM). The reason for these jumps through RAM is indeed so that they can be patched or extended. I'm looking at adding some single stepping of machine code to my recreation so I can trace execution and get answers to these sorts of problems.Lostgallifreyan wrote: ↑Mon Jan 29, 2024 3:03 pmThat's weird.. I'd cut what might have been a longer reply thinking it's not relevant, and you'd already know. That 'rst_entry_point' thing you asked about once. You'll have seen the mention in the system variables list, bolded text "rst_entry_point 2174-76", which I recently saw better described than anywhere before, as a value changed by the Comms Link on install, to point to itself to give access to its own routines.amenjet wrote: ↑Mon Jan 29, 2024 2:43 pm To find a service routine we'd need to follow the SWI vector and find the table of routines that perform each function. I followed to the redirect vector in RAM, but need to find what is there to follow the rest of the code. There should then be a table or sequence f jumps.
What's weird is that if the ROM's internal addresses go with it, and are effectively hardcoded, why jump via some location in RAM? The only reason I can think of was to help people who wanted to replace services with their own code while satisfying expectations of existing code that called for a service.
You traced it to RAM... Which address? I don't know if I can trace it from there but I can try if I can see what my Organiser puts at that address. If I have the routines located my own script will make a disassembly that is easier to read than Gidra's, but more primitive, unless I devise a way to convert branch jump sizes into a label-based notation. (Not that my script has any notion of how to tell code from data, but it usually works if it's definitely pointing at code!)I wonder if these disassembly files could go on a wiki or something so several people could work on bits at once?