Ok, I've another freeze : TEST is an Axe source unarchived. In editor ==> apps ==> Axe ==> compile ==> prgm ==> right (mistake : TEST and another source are not displayed)==> freeze. o_O
I can't get this to happen. Has it happened more than once?
Ok, so an easy way to determine what the calculator is doing when the screen is off is to press some buttons.
Boot into the calculator with battery+DEL and then: 1. Press any button besides ON - if the screen turns off, then the boot code is immediately throwing a link error 2. Press ON, then press any button besides ON - if the screen turns off, then the boot code is indeed waiting to receive an OS 3. If no amount of button mashing can get the screen to turn off, then you've got some serious problems (or you incorrectly entered battery+DEL)
Well, I wrote a program to do it. This program stepped through all of the possible store-enter values and made the least amount of change for them to enter the store with (So 21 is penny, dime, dime) Then, it took each of those coin sets, and bought all the items from [0-99] cents and kept track of what was returned. Here are the results from this:
So, as you can see, you will always leave with on average 4.7 coins meaning that taking in anything is just a waste.
The method I used for purchases was to pay with the least valued coins first. This means use all the pennies, then all the nickels, dimes, quarters, and finally, break out a dollar if need be. This method should maximize the change you give away because the reverse operation (starting big and going to small) minimizes the change you pay. Apparently using this strategy, you'll always end up with the same net coins.
Finally, my program didn't check the non-standard coin sets (like 3 dimes) but, since these all return with 4.7, I assume they will not break the trend.
So blagus, when you did the battery + DEL, did you see the boot code "Waiting..." message? Because if you did, then you clearly have a hardware issue. The only thing you could do in this situation is what was suggested above which is to leave all 5 batteries out for a while.
Before we start making up new key combinations, I'll refer you here.
My suggestion: 1. Hold DEL while inserting the 4th battery, the boot screen will appear, if this doesn't black out, then you have an OS/Archive related issue. 2. Hold CLEAR while pressing ON, this will boot the calculator without looking in the archive, see if this still blacks out
Yes, that's how you make a number. But the idea here is that there is a purchase in the middle.
Basically, I want to have a certain set of coins in my pocket when entering a store so that when I leave, I will also have a small amount of change.
Let's say the correct answer is a quarter and a dime. I would then have to show that 2 + (all of the possible numbers of coins I could be holding when leaving) is more optimized for my quarter-dime scenario than any other set of entering coins.
Now this might be a rather simple problem, but I don't think it is. I'm asking this partially because I'm too lazy to figure it out right now, and also because I feel it will give people an opportunity to think. (This might even end up requiring a program to solve)
So, no one likes to carry around change (coins) and my question is, what coins should you enter a store with so that sum of the number of coins you enter a store and leave a store with is at a minimum?
The general idea here is that you basically want to carry the least amount of change. So, the way this works, is you pick E number of coins to enter with, after buying your items (which have random number of cents) you leave with L number of coins. You want to minimize L + E.
Rules:
We're using American coins, so the choices are: penny - .01, nickel - .05, dime - .10, quarter - .25 (no half dollars, too rare )
The number of cents your purchase costs is random (So, a purchase would cost some dollar amount + [0 - 99] cents)
You receive the minimum number of coins from the cashier ($.90 is not 9 dimes)
Have at it. You'll of course have to provide some sort of justification for your answer.
Spoiler For accepted answer:
Well, it looks like runer had it right from the start. Carrying 0 coins really is the best option.
Whatever the cost of your purchase is and whatever coins you have, you can ensure you leave with the minimum amount of change possible by giving the vendor all of your change. Whatever coins properly contribute to the payment, the vendor will keep; the coins that do not will be returned to you. Since the cents amount of the purchase is an equally-distributed random number, subtracting your constant amount of change from this will result in another equally-distributed random number (mod 100). Whatever amount of change you contribute, the vendor will always have to return to you coins that sum to an equally-distributed random amount of cents from 0-99.
You cannot limit the amount of coins you end with, so the optimal solution is simply to limit the amount of coins you begin with.
And with 2 brute force checks to back this, I'm happy. It looks like I've been doing it right all along.
Now, there were two specific parts that I know you missed. First, run a Ctrl+F for $522, $533, and $FADB. These numbers are correct on the 84+, but what they actually represent are
appBackUpScreen-plotSScreen
appBackUpScreen-plotSScreen+1
plotSScreen-appBackUpScreen+13
respectively. Since we moved these memory locations around, those numbers were now no longer correct.
The second part actually slipped by your disassembler twice. Run a Ctrl+F for "ld bc,$B978". This address was actually 1 byte past the end of your program, so your disassembler assumed that it was a constant memory address.
For the second part of this problem, go to the very end of your data. You'll see .db $F1,$9D,$73,$9F, which we could rearrange to .dw $9DF1, $9F73. These are actually pointers to certain locations in your code and need to adjust with the change in running location. That means they should be more properly written as labels: .dw loc_9DF1, loc_9F73.
But, in all, it's done. So enjoy. I included the source I used as well as the source compiled for use with venus. (That's why there's an awkward header on the files).
Also, this screenshot was the first time I ever got the grappling hook thing, so that kind of freaked me out.
Edit: I have no idea how big loc_8079 should be. You can remove all the zeros before it and probably give it like 2 after. (Rather than 96)
I had a similar issue where it was like someone turned the color and contrast extremely high and the screen just looked funky. Mine would go away on it's own though...
You know, before I finish off this disassembly, what does the setup program do? The reason I ask this is because if it gets some variables prepped, then we'll have to store those variables in a static memory location. You can't allocate space after a program and then expect that memory to remain constant.
Edit: After disassembling it, it would appear that you make an appvar and store some data to saveSScreen. I think I can work with that.