Reading Kernal version

Chat about anything CX16 related that doesn't fit elsewhere
BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

Reading Kernal version

Post by BruceMcF »



17 minutes ago, Scott Robison said:




Looks like I picked the wrong week to stop drinking. Makes sense, sorry for the noise.



Well, it IS a bit subtle, in that in one possible logical branch, if storing the Kernel bank number into $0001 does nothing, that requires a specific Basic ROM binary, so that we know exactly which values are where ... and the Basic ROM binary is subject to change.

But while the Basic ROM binary is subject to change, if it DOES change, then the system will be Revision 39 or later, and storing $0001 will in fact take you to the Kernel bank, where the "mist" signature is stable between revisions.

I didn't actually catch that until the second time I thought about the code.

Stefan
Posts: 456
Joined: Thu Aug 20, 2020 8:59 am

Reading Kernal version

Post by Stefan »



58 minutes ago, BruceMcF said:




Well, it IS a bit subtle, in that in one possible logical branch, if storing the Kernel bank number into $0001 does nothing, that requires a specific Basic ROM binary, so that we know exactly which values are where ... and the Basic ROM binary is subject to change.



But while the Basic ROM binary is subject to change, if it DOES change, then the system will be Revision 39 or later, and storing $0001 will in fact take you to the Kernel bank, where the "mist" signature is stable between revisions.



I didn't actually catch that until the second time I thought about the code.



Yes, it's a clever solution.

Post Reply