Let Me Do

If you’re not familiar with SHEL, you should be. Their new album dropped recently!

Anyway, I have a compiler that does some funny stuff. When I write

r<<=1;

I would expect the assembly to be

MOV A,r
RLC A
MOV r,A

but instead I get

MOV A,r
ADD A,ACC
MOV r,A

What does this accomplish?

I mean, sure, it’s doubling the input, and for the target it’s the same number of cycles, but it is somewhat confusing.

What’s more confusing, though, is that if r  is 3, I wind up with 3+3=2. Last I checked, this wasn’t the case. Oh, and apparently 2+2=0.

Secondly, if the result of all of my manipulation means that r is 0, I would expect the line return r; to assign 0 to the variable on the left side of the equal sign in the calling function (e.g. var=function(); ). When I step through the code, however, the debugger at the return line tells me that r suddenly is 0xFF. And when the return happens, 0xA1 gets assigned to var. Does this make sense to anyone else?

Back to banging my head against the desk (figuratively) in an attempt to figure out what’s going on here!

Hemingway Burgers

Ingredients:

  • 1 lb ground beef (90% lean or better)
  • 2 cloves minced garlic
  • 2 green onions, chopped
  • 1 tsp India relish1
  • 2 tbsp capers
  • 1 tsp sage
  • 1/2 tsp Beau Monde
  • 1/2 tsp Mei Yen powder2
    • 3/20 tsp salt
    • 3/20 tsp sugar
    • 1/30 tsp MSG
    • 1/16 tsp soy sauce
  • 1 egg
  • 1/3 cup dry red or white wine
  • cooking oil

Directions:

  1. Mix all ingredients save the wine and oil thoroughly in a bowl
  2. Add wine and let marinate for approx. 15 minutes
  3. Heat oil in frying pan
  4. Form large patties (above recipe makes 2) and place in oil
  5. Cook approx. 4 minutes each side or until done
  1.  Heinz apparently still makes this, but I haven’t found it nearby. Replace with MTR Tomato Thokku Pickle, or similar tomato relish.
  2. The replacement listed is probably not realistic unless you have a very impressive selection of measuring devices. More reasonably, mix 3 tbsp (9 tsp) salt, 3 tbsp (9 tsp) sugar, 2 tsp MSG. Take 1/3 tsp of this resulting mixture, and 1/16 tsp soy sauce, as a substitute for the 1/2 tsp Mei Yen powder.