about summary refs log tree commit diff stats
path: root/subx/apps
diff options
context:
space:
mode:
authorKartik Agaram <vc@akkartik.com>2019-05-20 00:48:13 -0700
committerKartik Agaram <vc@akkartik.com>2019-05-20 00:48:13 -0700
commitaf0c76fffd15176feacde1541ad965fefcae3a4d (patch)
treed8e452a91832948e271cec138c7cb639e5ab2a72 /subx/apps
parentcfd941b0fd015711d72c54545c18e9a71b8ad3ba (diff)
downloadmu-af0c76fffd15176feacde1541ad965fefcae3a4d.tar.gz
standardize the loop in skip-string-in-slice
We're going to be cloning it for the length computation.

Anytime we do something non-standard it's invariably short-lived.
Diffstat (limited to 'subx/apps')
-rwxr-xr-xsubx/apps/dquotesbin26842 -> 26852 bytes
-rw-r--r--subx/apps/dquotes.subx13
2 files changed, 8 insertions, 5 deletions
diff --git a/subx/apps/dquotes b/subx/apps/dquotes
index 687140db..5df16782 100755
--- a/subx/apps/dquotes
+++ b/subx/apps/dquotes
Binary files differdiff --git a/subx/apps/dquotes.subx b/subx/apps/dquotes.subx
index 1e81d4e7..3071bcc4 100644
--- a/subx/apps/dquotes.subx
+++ b/subx/apps/dquotes.subx
@@ -1262,7 +1262,7 @@ test-emit-string-literal-data-handles-escape-sequences:
     # . check-stream-equal(_test-output-stream, "3/imm32 61/a 22 62/b ", msg)
     # . . push args
     68/push  "F - test-emit-string-literal-data-handles-escape-sequences"/imm32
-    68/push  "3/imm32 61/a 22 62/b "/imm32
+    68/push  "0x00000003/imm32 61/a 22 62/b "/imm32
     68/push  _test-output-stream/imm32
     # . . call
     e8/call  check-stream-equal/disp32
@@ -2395,9 +2395,9 @@ skip-string-in-slice:  # curr : (address byte), end : (address byte) -> new_curr
     8b/copy                         1/mod/*+disp8   5/rm32/EBP    .           .                         2/r32/EDX   0xc/disp8         .               # copy *(EBP+12) to EDX
     # EAX = 0
     31/xor                          3/mod/direct    0/rm32/EAX    .           .             .           0/r32/EAX   .               .                 # clear EAX
-$skip-string-in-slice:loop:
-    # ++curr
+    # skip initial dquote
     41/increment-ECX
+$skip-string-in-slice:loop:
     # if (curr >= end) return curr
     39/compare                      3/mod/direct    1/rm32/ECX    .           .             .           2/r32/EDX   .               .                 # compare ECX with EDX
     73/jump-if-greater-unsigned-or-equal  $skip-string-in-slice:return-curr/disp8
@@ -2410,12 +2410,15 @@ $skip-string-in-slice:dquote:
 $skip-string-in-slice:check-for-escape:
     # if (EAX == '\') escape next char
     3d/compare-EAX-and  0x5c/imm32/backslash
-    75/jump-if-not-equal  $skip-string-in-slice:loop/disp8
+    75/jump-if-not-equal  $skip-string-in-slice:continue/disp8
 $skip-string-in-slice:escape:
     41/increment-ECX
+$skip-string-in-slice:continue:
+    # ++curr
+    41/increment-ECX
     eb/jump  $skip-string-in-slice:loop/disp8
 $skip-string-in-slice:break:
-    # step over last '"'
+    # skip final dquote
     41/increment-ECX
 $skip-string-in-slice:return-curr:
     # return curr
="highlight">
<HTML>
<HEAD>
<TITLE>Morton Thompson's Turkey Stuffing</TITLE>
</HEAD>
<BODY>
<H1>Morton Thompson's Turkey Stuffing</H1>


<P>From the book "Joe, the Wounded Tennis Player" by Morton Thompson,
adapted by Craig Claiborne in the NY Times.

<P><a href="turkey-long.txt">See the original Morton Thompson version</a>,
including his complicated but wonderful roasting technique.  Don't be too
offended by the sexism in the article; he lived a long time ago.

<PRE>
1 apple, peeled, cored, and diced
1 orange, peeled, seeded, and diced
1 no. 2 can crushed pineapple, drained
rind of one lemon, grated
3 tablespoons chopped preserved ginger
2 five-oz cans water chestnuts, drained and coarsely chopped
2 teaspoons powdered mustard
2 teaspoons caraway seeds
3 teaspoons celery seeds
2 teaspoons poppy seeds
2 1/2 teaspoons oregano
1 crushed bay leaf
1/2 teaspoon mace
1/4 teaspoon ground cloves
1/2 teaspoon turmeric
1/2 teaspoon marjoram
1/2 teaspoon summer savory
1 tablespoon poultry seasoning
3/4 teaspoon sage
3/4 teaspoon thyme
1/2 teaspoon basil
1/2 teaspoon chili powder
1/4 cup finely chopped parsley
5 cloves garlic, finely minced
6 large ribs celery, chopped
4 large onions, peeled and chopped
5 dashes Tabasco sauce
1 tablespoon salt
6 cups fresh bread crumbs, or 3 packages bread crumbs
3/4 pound ground veal
1/2 pound ground fresh pork or sausage
1/4 pound butter
1 16-pound to 20-pound turkey
</PRE>

<P>In one bowl, combine the diced apple, orange, crushed pineapple,
lemon rind, ginger, and chopped water chestnuts.  Mix well.

<P>In a second (huge) bowl, combine all the herbs and spices, the
parsley, garlic, celery, onions, Tabasco, and salt.  Toss well.

<P>Add the remaining ingredients and the contents of the first bowl.
Blend everything well with the fingers.  Stuff the turkey and
skewer it.  Roast according to any standard recipe.  Any leftover
stuffing may be frozen and used later for chickens, ducks, or
another turkey.  [Or just cooked on the stove and mixed in --BH]

<P><ADDRESS>
<A HREF="index.html"><CODE>www.cs.berkeley.edu/~bh</CODE></A>
</ADDRESS>
</BODY>
</HTML>