Browse Source

calc: Copy, real Val and basic REAL math (ladder 40930)

Copy(S,start,len) gets a counted-string runtime entry and a 256-byte scratch;
real Val copies the counted source to an ASCIIZ buffer and calls the existing
ascreal core, preserving the destination on a hard error and returning the
1-based first-bad position.  Mixed REAL/integer comparisons (f > 0) convert an
integer constant to MBF.

Abs clears the MBF sign, Sqr lowers to real_mul, and Sqrt is Newton over the
real_div/real_add entries.  The remaining transcedentals (Sin, Cos, Arctan,
Ln, Exp) still have no runtime implementation and stay loud; the ladder now
stops at exp(38) * ln(1) in Factor.

Fixtures t102_copy, t103_valreal and t104_mathbasic execute under qemu and
Exec86.  The runtime is 5,228 bytes and the rt_exec scaffold moved to
HDR=0x1800.  Verified: compile matrix 105/105, ladder 1/1 at ERR 41 40930,
91 .COM executions under both oracles, rt_exec 276/276, nonvacuity 121/121,
run_all ALL PASS.
Eric Streit 5 days ago
parent
commit
df54e71df9

+ 21 - 8
CALC-COMPILE.md

@@ -97,7 +97,7 @@ Current rung (measured today, normalised position):
 
 
 | position | blocker |
 | position | blocker |
 |---|---|
 |---|---|
-| **35135** | `Copy(Formula,Start,...)` in `Factor` — string Copy builtin (`ERR 41`) |
+| **40930** | `exp(38) * ln(1)` in `Factor` — the real transcendental functions (`ERR 41`) |
 
 
 Rungs behind it (now passed):
 Rungs behind it (now passed):
 
 
@@ -150,7 +150,9 @@ Rungs ahead:
 | 33374 | enum-indexed array (`array[Standardfunction]`) - DONE |
 | 33374 | enum-indexed array (`array[Standardfunction]`) - DONE |
 | 33537 | string-array typed constant (`StandardfunctionNames`) - DONE |
 | 33537 | string-array typed constant (`StandardfunctionNames`) - DONE |
 | 33778 | local REAL variable (`F : Real`) - DONE |
 | 33778 | local REAL variable (`F : Real`) - DONE |
-| 35135 | `Copy` string builtin |
+| 35135 | `Copy` string builtin - DONE |
+| 40333 | mixed REAL/integer comparison (`f > 0`) - DONE |
+| 40930 | `exp`/`ln` (and then sin/cos/arctan) |
 
 
 Corrections the measurements force, worth stating plainly because the stage list
 Corrections the measurements force, worth stating plainly because the stage list
 below was written before them:
 below was written before them:
@@ -475,7 +477,9 @@ file control-block operations, VAR string parameters, `Chr`, typed-file
 block I/O, text-file output, `Str`, pointer types with `New`/dereference,
 block I/O, text-file output, `Str`, pointer types with `New`/dereference,
 text `Eof`/`Readln`, integer `Str`, integer `Val`, and VAR REAL parameters). The
 text `Eof`/`Readln`, integer `Str`, integer `Val`, and VAR REAL parameters). The
 ladder has moved from the first typed constant at 7,791 to **35,135**, where
 ladder has moved from the first typed constant at 7,791 to **35,135**, where
-`Copy(Formula,Start,...)` asks for the string Copy builtin.
+`exp(38) * ln(1)` asks for the real transcendental functions.  Copy, real
+`Val`, `Abs`, `Sqr` and `Sqrt` are landed; `Sin`, `Cos`, `Arctan`, `Ln` and
+`Exp` remain.
 
 
 The rung commits and their tags, in order (each is one rung with its own
 The rung commits and their tags, in order (each is one rung with its own
 fixture, red proof, and — where the harness allows — execution under qemu and
 fixture, red proof, and — where the harness allows — execution under qemu and
@@ -522,7 +526,8 @@ Exec86):
 | `9d4ab01` | `v-TP3-CALC-VALINT` | `ERR 102 31758` (VAR REAL) |
 | `9d4ab01` | `v-TP3-CALC-VALINT` | `ERR 102 31758` (VAR REAL) |
 | `a4e72bf` | `v-TP3-CALC-VARREAL` | `ERR 102 32096` (REAL function result) |
 | `a4e72bf` | `v-TP3-CALC-VARREAL` | `ERR 102 32096` (REAL function result) |
 | `884edba` | `v-TP3-CALC-REALFUNC` | `ERR 102 32482` (REAL constants) |
 | `884edba` | `v-TP3-CALC-REALFUNC` | `ERR 102 32482` (REAL constants) |
-| *(this commit)* | `v-TP3-CALC-REALEXPR` | **`ERR 41 35135`** (`Copy`) |
+| `30782f6` | `v-TP3-CALC-REALEXPR` | `ERR 41 35135` (`Copy`) |
+| *(this commit)* | `v-TP3-CALC-COPYVAL` | **`ERR 41 40930`** (`Exp`) |
 
 
 - **Code HEAD** is the layout rung (`v-TP3-CALC-LAYOUT`).  Nothing is pushed.
 - **Code HEAD** is the layout rung (`v-TP3-CALC-LAYOUT`).  Nothing is pushed.
   The terminal-config work (`v-TP3-TERMCFG`) and the editor key map
   The terminal-config work (`v-TP3-TERMCFG`) and the editor key map
@@ -574,6 +579,15 @@ Exec86):
   12-byte block, with integer constants converted to MBF.  Self-recursion,
   12-byte block, with integer constants converted to MBF.  Self-recursion,
   enum-indexed arrays, string-array typed constants and local REAL variables
   enum-indexed arrays, string-array typed constants and local REAL variables
   were the prerequisites exposed along the way (`t101_recursion`).
   were the prerequisites exposed along the way (`t101_recursion`).
+- **The `Copy` string builtin and REAL `Val` are landed (`t102_copy`,
+  `t103_valreal`).**  `Copy` uses a counted-string runtime entry and a fresh
+  256-byte scratch; `val_real` copies the counted source to an ASCIIZ buffer
+  and calls the existing ascreal core, preserving the destination on a hard
+  error and returning the 1-based first-bad position.
+- **`Abs`, `Sqr` and `Sqrt` are landed (`t104_mathbasic`).**  `Abs` clears the
+  MBF sign, `Sqr` lowers to the real multiply entry, and `Sqrt` is Newton over
+  the existing real division/addition entries.  `Sin`, `Cos`, `Arctan`, `Ln`
+  and `Exp` still have no runtime implementation and remain loud.
 - **REAL function results and value REAL parameters are landed**
 - **REAL function results and value REAL parameters are landed**
   (`t98_realfunc`, `t99_valreal`).  A REAL function's caller supplies a
   (`t98_realfunc`, `t99_valreal`).  A REAL function's caller supplies a
   six-byte scratch address in DI; the callee saves it in a hidden local and
   six-byte scratch address in DI; the callee saves it in a hidden local and
@@ -1199,10 +1213,9 @@ and TEXT file output is done (`t91_textout`), both compile-only because the
 harness has no filesystem.  `Str` real formatting is done (`t92_strreal`),
 harness has no filesystem.  `Str` real formatting is done (`t92_strreal`),
 pointer types with `New`/`Dispose`/dereference are done (`t93_pointer`), and
 pointer types with `New`/`Dispose`/dereference are done (`t93_pointer`), and
 text `Eof`/`Readln` plus integer `Str` are done (`t94_textread`/`t95_strint`).
 text `Eof`/`Readln` plus integer `Str` are done (`t94_textread`/`t95_strint`).
-The next ladder blocker is the `Copy` string builtin, then real `Val` and the
-transcendental functions (`Abs`, `Sqrt`, `Sqr`, `Sin`, `Cos`, `Arctan`, `Ln`,
-`Exp`).  The probe scaffold is at HDR=0x1300 / data 0x2110; the runtime is
-4,386 bytes and now has room for the remaining work.
+The next ladder blocker is `Exp`/`Ln` in `Factor`; `Sin`, `Cos` and `Arctan`
+follow.  Copy, real `Val`, `Abs`, `Sqr` and `Sqrt` are landed.  The probe
+scaffold is at HDR=0x1800 / data 0x2110; the runtime is 5,228 bytes.
 
 
 **Stage 14 — the CRT identifiers.** `GotoXY` (25), `LowVideo`/`NormVideo`
 **Stage 14 — the CRT identifiers.** `GotoXY` (25), `LowVideo`/`NormVideo`
 (16 + 16), `ClrEol` (10), `ClrScr` (6), `KeyPressed` (3), `Delay` (1),
 (16 + 16), `ClrEol` (10), `ClrScr` (6), `KeyPressed` (3), `Delay` (1),

+ 4 - 3
SUMMARY.md

@@ -2044,7 +2044,7 @@ the compiler *emitting* a 16,560-byte program). The ratchet and front-end
 features through **file control-block operations and the original memory
 features through **file control-block operations and the original memory
 layout** are landed: the ladder (`tests/calc_ladder.sh` +
 layout** are landed: the ladder (`tests/calc_ladder.sh` +
 `tests/fixtures/calc_ladder.tsv`, run by `run_all.sh`; CALC.PAS now stops at
 `tests/fixtures/calc_ladder.tsv`, run by `run_all.sh`; CALC.PAS now stops at
-`ERR 41` at pos 35135, `Copy(Formula,...)` in Factor), the `{$I}` include,
+`ERR 41` at pos 40930, `exp(38) * ln(1)` in Factor), the `{$I}` include,
 `^X`/`#nn`, scalar typed constants, sets, enums, records (CellRec = 80),
 `^X`/`#nn`, scalar typed constants, sets, enums, records (CellRec = 80),
 subranges, arrays, element/field access, file types, string value parameters,
 subranges, arrays, element/field access, file types, string value parameters,
 `Length`, the CRT identifiers (`ClrScr`/`GotoXY`/`ClrEol`/`LowVideo`/
 `Length`, the CRT identifiers (`ClrScr`/`GotoXY`/`ClrEol`/`LowVideo`/
@@ -2066,8 +2066,9 @@ pointer types with `New`/`Dispose`/dereference (`t93`), text `Eof`/`Readln`
 (`t94`), integer `Str` (`t95`), and integer `Val` (`t96`). The next rung is
 (`t94`), integer `Str` (`t95`), and integer `Val` (`t96`). The next rung is
 REAL function results (`t98`), value REAL parameters (`t99`), REAL
 REAL function results (`t98`), value REAL parameters (`t99`), REAL
 literals/comparisons/arithmetic (`t100`) and self-recursion (`t101`). The next
 literals/comparisons/arithmetic (`t100`) and self-recursion (`t101`). The next
-rung is the `Copy` string builtin, then real `Val` and the transcendentals. The runtime is 3,907 bytes / 39 entries and its probe
-scaffold is nearly full, so the next runtime addition must move HDR. Items 1-4
+rung is `Exp`/`Ln`, then `Sin`/`Cos`/`Arctan`.  Copy, real `Val`, `Abs`,
+`Sqr` and `Sqrt` are landed.  The runtime is 5,228 bytes / 49 entries; the
+probe scaffold moved to HDR=0x1800. Items 1-4
 below are independent of both tracks.
 below are independent of both tracks.
 
 
 1. The rest of the string language. `v-TP3-STRVAR`/`v-TP3-STRREAD-ASSIGN` cover
 1. The rest of the string language. `v-TP3-STRVAR`/`v-TP3-STRREAD-ASSIGN` cover

+ 162 - 2
shell/Compiler.mod

@@ -142,6 +142,7 @@ CONST
    BI_Assign = 16 ; BI_Reset = 17 ; BI_Rewrite = 18 ;
    BI_Assign = 16 ; BI_Reset = 17 ; BI_Rewrite = 18 ;
    BI_Close = 19 ; BI_IoResult = 20 ; BI_Chr = 21 ; BI_Str = 22 ;
    BI_Close = 19 ; BI_IoResult = 20 ; BI_Chr = 21 ; BI_Str = 22 ;
    BI_New = 23 ; BI_Dispose = 24 ; BI_Eof = 25 ; BI_Val = 26 ;
    BI_New = 23 ; BI_Dispose = 24 ; BI_Eof = 25 ; BI_Val = 26 ;
+   BI_Copy = 27 ; BI_Abs = 28 ; BI_Sqrt = 29 ; BI_Sqr = 30 ;
    (* the sub-codes EmCrtSeq takes *)
    (* the sub-codes EmCrtSeq takes *)
    CrtClr = 0 ; CrtDl = 1 ; CrtDh = 2 ; CrtCaret = 3 ; CrtEol = 4 ;
    CrtClr = 0 ; CrtDl = 1 ; CrtDh = 2 ; CrtCaret = 3 ; CrtEol = 4 ;
    CrtLow = 5 ; CrtNorm = 6 ; CrtDelay = 7 ; CrtKey = 8 ;
    CrtLow = 5 ; CrtNorm = 6 ; CrtDelay = 7 ; CrtKey = 8 ;
@@ -415,6 +416,9 @@ VAR
    TU_FileReadln  : CARDINAL ;  (* text-file line read *)
    TU_FileReadln  : CARDINAL ;  (* text-file line read *)
    TU_IntFmt      : CARDINAL ;  (* integer -> counted string *)
    TU_IntFmt      : CARDINAL ;  (* integer -> counted string *)
    TU_ValInt      : CARDINAL ;  (* counted string -> integer *)
    TU_ValInt      : CARDINAL ;  (* counted string -> integer *)
+   TU_StrCopy     : CARDINAL ;  (* Copy(S,start,len) *)
+   TU_ValReal     : CARDINAL ;  (* counted string -> REAL *)
+   TU_RealAbs     : CARDINAL ;  TU_RealSqrt : CARDINAL ;
    TU_CmpStr   : CARDINAL ;  (* string comparison; two addresses on the stack,
    TU_CmpStr   : CARDINAL ;  (* string comparison; two addresses on the stack,
                                 signed -1/0/+1 in AX *)
                                 signed -1/0/+1 in AX *)
    TU_StrCat   : CARDINAL ;  (* string concatenation; dest and source addresses
    TU_StrCat   : CARDINAL ;  (* string concatenation; dest and source addresses
@@ -1056,6 +1060,12 @@ END EmPopAx ;
 PROCEDURE EmPushBx () ;
 PROCEDURE EmPushBx () ;
 BEGIN Ebyte (53H) END EmPushBx ;
 BEGIN Ebyte (53H) END EmPushBx ;
 
 
+PROCEDURE EmPushCx () ;
+BEGIN Ebyte (51H) END EmPushCx ;
+
+PROCEDURE EmPushDx () ;
+BEGIN Ebyte (52H) END EmPushDx ;
+
 PROCEDURE EmPopBx () ;
 PROCEDURE EmPopBx () ;
 BEGIN Ebyte (5BH) END EmPopBx ;
 BEGIN Ebyte (5BH) END EmPopBx ;
 
 
@@ -2382,6 +2392,7 @@ PROCEDURE NewScratchReal () : CARDINAL ; FORWARD ;
 PROCEDURE EmPushRealAddr (r : ERes) ; FORWARD ;
 PROCEDURE EmPushRealAddr (r : ERes) ; FORWARD ;
 PROCEDURE EmCopyRealTo (dstOff : CARDINAL ; r : ERes) ; FORWARD ;
 PROCEDURE EmCopyRealTo (dstOff : CARDINAL ; r : ERes) ; FORWARD ;
 PROCEDURE RealBin (op : CARDINAL ; left, right : ERes ; VAR res : ERes) ; FORWARD ;
 PROCEDURE RealBin (op : CARDINAL ; left, right : ERes ; VAR res : ERes) ; FORWARD ;
+PROCEDURE RealUnary (ent : CARDINAL ; VAR r : ERes) ; FORWARD ;
 PROCEDURE IntToMbf (v : LONGINT ; VAR b : ARRAY OF CHAR) ; FORWARD ;
 PROCEDURE IntToMbf (v : LONGINT ; VAR b : ARRAY OF CHAR) ; FORWARD ;
 
 
 (* ---------------------------------------------------------------- *)
 (* ---------------------------------------------------------------- *)
@@ -3788,7 +3799,7 @@ PROCEDURE ParseCmp (VAR r : ERes) ;
 VAR op : CARDINAL ;
 VAR op : CARDINAL ;
     left, right : ERes ;
     left, right : ERes ;
     f : LONGINT ;
     f : LONGINT ;
-    size, base, block : CARDINAL ;
+    size, base, block, scratch : CARDINAL ;
 BEGIN
 BEGIN
    ParseAdd (r) ;
    ParseAdd (r) ;
    LOOP
    LOOP
@@ -3901,6 +3912,12 @@ BEGIN
          IF NOT OK () THEN
          IF NOT OK () THEN
             RETURN
             RETURN
          END ;
          END ;
+         IF (right.cls = TScalar) AND (right.kind = 0) THEN
+            scratch := NewScratchReal () ;
+            EmCopyRealTo (symtab [scratch].off, right) ;
+            right.idx := scratch ; right.kind := 1 ; right.cls := TReal ;
+            right.sz := 6 ; right.boff := 0
+         END ;
          IF right.cls # TReal THEN
          IF right.cls # TReal THEN
             Err (ETypeErr) ;
             Err (ETypeErr) ;
             RETURN
             RETURN
@@ -4445,6 +4462,86 @@ BEGIN
       r.cls := TBool ;
       r.cls := TBool ;
       r.chr := FALSE ;
       r.chr := FALSE ;
       RETURN
       RETURN
+   ELSIF (symtab [idx].tag = KBuiltin) AND
+         ((symtab [idx].cls = BI_Abs) OR (symtab [idx].cls = BI_Sqrt)) THEN
+      IF NOT MatchDelim ('(') THEN
+         Err (ENoSemi) ;
+         RETURN
+      END ;
+      ParseExpr (r) ;
+      ExpectDelim (')', ENoSemi) ;
+      IF NOT OK () THEN
+         RETURN
+      END ;
+      IF r.cls # TReal THEN
+         Err (ETypeErr) ;
+         RETURN
+      END ;
+      IF symtab [idx].cls = BI_Abs THEN
+         RealUnary (TU_RealAbs, r)
+      ELSE
+         RealUnary (TU_RealSqrt, r)
+      END ;
+      RETURN
+   ELSIF (symtab [idx].tag = KBuiltin) AND (symtab [idx].cls = BI_Sqr) THEN
+      IF NOT MatchDelim ('(') THEN
+         Err (ENoSemi) ;
+         RETURN
+      END ;
+      ParseExpr (r) ;
+      ExpectDelim (')', ENoSemi) ;
+      IF NOT OK () THEN
+         RETURN
+      END ;
+      IF r.cls # TReal THEN
+         Err (ETypeErr) ;
+         RETURN
+      END ;
+      RealBin (OpMul, r, r, r) ;
+      RETURN
+   ELSIF (symtab [idx].tag = KBuiltin) AND (symtab [idx].cls = BI_Copy) THEN
+      (* Copy(S, start, len): a counted-string result in a fresh 256-byte
+         scratch.  S's address is parked while start/len are parsed, then the
+         four words are re-pushed in the runtime's [source,dest,start,len]
+         order. *)
+      IF NOT MatchDelim ('(') THEN
+         Err (ENoSemi) ;
+         RETURN
+      END ;
+      ParseExpr (r) ;
+      IF OK () AND (r.cls = TString) AND
+         ((r.kind = 1) OR (r.kind = 3) OR (r.kind = 5)) THEN
+         EmPushStrAddr (r) ;           (* park S *)
+         ExpectDelim (',', ENoSemi) ;
+         ParseExpr (r) ;
+         IF OK () AND ((r.cls = TScalar) OR (r.cls = TChar)) THEN
+            LoadAtom (r) ; EmPushAx () ;
+            ExpectDelim (',', ENoSemi) ;
+            ParseExpr (r) ;
+            IF OK () AND ((r.cls = TScalar) OR (r.cls = TChar)) THEN
+               LoadAtom (r) ; EmPushAx () ;
+               scratch := NewScratchStr () ;
+               EmPushVarAddr (FALSE, symtab [scratch].off) ;
+               EmPopAx () ;             (* dest *)
+               EmPopBx () ;             (* len *)
+               EmPopCx () ;             (* start *)
+               EmPopDx () ;             (* source *)
+               EmPushBx () ; EmPushCx () ; EmPushAx () ; EmPushDx () ;
+               DropC (EmCall (TU_StrCopy)) ;
+               EmAddSp (8) ;
+               r.kind := 1 ; r.idx := scratch ; r.cls := TString ;
+               r.sz := 256 ; r.boff := 0 ; r.chr := FALSE
+            ELSIF OK () THEN
+               Err (ETypeErr)
+            END
+         ELSIF OK () THEN
+            Err (ETypeErr)
+         END ;
+         ExpectDelim (')', ENoSemi)
+      ELSIF OK () THEN
+         Err (ETypeErr)
+      END ;
+      RETURN
    ELSIF (symtab [idx].tag = KBuiltin) AND (symtab [idx].cls = BI_Length) THEN
    ELSIF (symtab [idx].tag = KBuiltin) AND (symtab [idx].cls = BI_Length) THEN
       (* LENGTH (s): the string's length byte, loaded inline.  No runtime
       (* LENGTH (s): the string's length byte, loaded inline.  No runtime
          entry, and no address is pushed - a string's value already carries its
          entry, and no address is pushed - a string's value already carries its
@@ -4463,7 +4560,11 @@ BEGIN
          Err (ETypeErr) ;
          Err (ETypeErr) ;
          RETURN
          RETURN
       END ;
       END ;
-      IF (r.kind = 1) AND symtab [r.idx].isVar THEN
+      IF r.kind = 5 THEN
+         (* A string field/element addressed by DI (e.g. a typed-constant
+            array element): its length byte is at [DI]. *)
+         EmLdAlDi () ; EmMovAh0 ()
+      ELSIF (r.kind = 1) AND symtab [r.idx].isVar THEN
          (* VAR string: the slot holds the address; read the length byte
          (* VAR string: the slot holds the address; read the length byte
             through that pointer. *)
             through that pointer. *)
          IF r.boff # 0 THEN
          IF r.boff # 0 THEN
@@ -4864,6 +4965,23 @@ BEGIN
    res.boff := 0
    res.boff := 0
 END RealBin ;
 END RealBin ;
 
 
+PROCEDURE RealUnary (ent : CARDINAL ; VAR r : ERes) ;
+(* A one-argument REAL builtin: copy the operand into a 12-byte block and let
+   the runtime entry leave its result in the first six bytes. *)
+VAR block : CARDINAL ;
+BEGIN
+   block := NewScratchRealBlock () ;
+   EmCopyRealTo (symtab [block].off, r) ;
+   EmPushVarAddr (FALSE, symtab [block].off) ;
+   DropC (EmCall (ent)) ;
+   EmAddSp (2) ;
+   r.kind := 1 ;
+   r.idx := block ;
+   r.cls := TReal ;
+   r.sz := 6 ;
+   r.boff := 0
+END RealUnary ;
+
 PROCEDURE Assignment (r : ERes) ;
 PROCEDURE Assignment (r : ERes) ;
 (* ':=' already consumed by the caller; store expression into r *)
 (* ':=' already consumed by the caller; store expression into r *)
 VAR src : ERes ;
 VAR src : ERes ;
@@ -5142,6 +5260,26 @@ BEGIN
          truncation included, and the tail past the new length is left as it
          truncation included, and the tail past the new length is left as it
          was, exactly as strstore leaves it. *)
          was, exactly as strstore leaves it. *)
       ParseExpr (src) ;
       ParseExpr (src) ;
+      IF (src.cls = TChar) OR ((src.cls = TScalar) AND src.chr) THEN
+         (* `s := ch': a one-character string.  This is CALC's
+            `EXY := FactorCh' before Val. *)
+         IF src.kind = 0 THEN
+            EmMovAxi (1) ;
+            EmStoreVar (symtab [r.idx].local,
+                        (symtab [r.idx].off + r.boff) MOD 10000H, 1) ;
+            EmMovAxi (W16 (src.imm)) ;
+            EmStoreVar (symtab [r.idx].local,
+                        (symtab [r.idx].off + r.boff + 1) MOD 10000H, 1)
+         ELSE
+            LoadAtom (src) ;
+            EmStoreVar (symtab [r.idx].local,
+                        (symtab [r.idx].off + r.boff + 1) MOD 10000H, 1) ;
+            EmMovAxi (1) ;
+            EmStoreVar (symtab [r.idx].local,
+                        (symtab [r.idx].off + r.boff) MOD 10000H, 1)
+         END ;
+         RETURN
+      END ;
       IF (src.cls # TString) THEN
       IF (src.cls # TString) THEN
          Err (ENoLib) ;
          Err (ENoLib) ;
          RETURN
          RETURN
@@ -5478,6 +5616,16 @@ BEGIN
             EmPushStrAddr (arg) ;
             EmPushStrAddr (arg) ;
             DropC (EmCall (TU_ValInt)) ;
             DropC (EmCall (TU_ValInt)) ;
             EmAddSp (6)
             EmAddSp (6)
+         ELSIF OK () AND (dummy.cls = TReal) AND
+            ((dummy.kind = 1) OR (dummy.kind = 5)) AND
+            (errV.kind = 1) AND (errV.cls = TScalar) AND (VarSize (errV) = 2)
+         THEN
+            EmPushVarAddr (symtab [errV.idx].local,
+                           (symtab [errV.idx].off + errV.boff) MOD 10000H) ;
+            EmPushRealAddr (dummy) ;
+            EmPushStrAddr (arg) ;
+            DropC (EmCall (TU_ValReal)) ;
+            EmAddSp (6)
          ELSIF OK () THEN
          ELSIF OK () THEN
             Err (ETypeErr)
             Err (ETypeErr)
          END
          END
@@ -7718,6 +7866,14 @@ BEGIN
    i := NewSym ("EOF", KBuiltin, BI_Eof, 0, 0, 0, 0, FALSE) ;
    i := NewSym ("EOF", KBuiltin, BI_Eof, 0, 0, 0, 0, FALSE) ;
    symtab [i].defnd := TRUE ;
    symtab [i].defnd := TRUE ;
    i := NewSym ("VAL", KBuiltin, BI_Val, 0, 0, 0, 0, FALSE) ;
    i := NewSym ("VAL", KBuiltin, BI_Val, 0, 0, 0, 0, FALSE) ;
+   DropC (i) ;
+   i := NewSym ("COPY", KBuiltin, BI_Copy, 0, 0, 0, 0, FALSE) ;
+   symtab [i].defnd := TRUE ;
+   i := NewSym ("ABS", KBuiltin, BI_Abs, 0, 0, 0, 0, FALSE) ;
+   symtab [i].defnd := TRUE ;
+   i := NewSym ("SQRT", KBuiltin, BI_Sqrt, 0, 0, 0, 0, FALSE) ;
+   symtab [i].defnd := TRUE ;
+   i := NewSym ("SQR", KBuiltin, BI_Sqr, 0, 0, 0, 0, FALSE) ;
    symtab [i].defnd := TRUE ;
    symtab [i].defnd := TRUE ;
    (* KBD: the console keyboard as a TEXT file.  This runtime's read entries
    (* KBD: the console keyboard as a TEXT file.  This runtime's read entries
       already read the console, so `Read(Kbd, Ch)' drops the file argument and
       already read the console, so `Read(Kbd, Ch)' drops the file argument and
@@ -7896,6 +8052,10 @@ BEGIN
    TU_FileReadln  := RT_Entry (42) ;
    TU_FileReadln  := RT_Entry (42) ;
    TU_IntFmt      := RT_Entry (43) ;
    TU_IntFmt      := RT_Entry (43) ;
    TU_ValInt      := RT_Entry (44) ;
    TU_ValInt      := RT_Entry (44) ;
+   TU_StrCopy     := RT_Entry (45) ;
+   TU_ValReal     := RT_Entry (46) ;
+   TU_RealAbs     := RT_Entry (47) ;
+   TU_RealSqrt    := RT_Entry (48) ;
    TU_WrStr    := RT_Entry (15) ;      (* a string variable is written through
    TU_WrStr    := RT_Entry (15) ;      (* a string variable is written through
                                           the address on the stack *)
                                           the address on the stack *)
    TU_RdStr    := RT_Entry (16) ;      (* readln(s)/read(s): TPSRC8 prdstr,
    TU_RdStr    := RT_Entry (16) ;      (* readln(s)/read(s): TPSRC8 prdstr,

+ 5 - 0
shell/Runtime.def

@@ -83,6 +83,11 @@ CONST
    E_FileReadln = 42 ;      (* [BP+4]=file, [BP+6]=dest string, [BP+8]=max *)
    E_FileReadln = 42 ;      (* [BP+4]=file, [BP+6]=dest string, [BP+8]=max *)
    E_IntFmt = 43 ;          (* [BP+4]=dest string, [BP+6]=integer value *)
    E_IntFmt = 43 ;          (* [BP+4]=dest string, [BP+6]=integer value *)
    E_ValInt = 44 ;          (* [BP+4]=string, [BP+6]=dest, [BP+8]=error pos *)
    E_ValInt = 44 ;          (* [BP+4]=string, [BP+6]=dest, [BP+8]=error pos *)
+   E_StrCopy = 45 ;         (* [BP+4]=source string, [BP+6]=dest, [BP+8]=start,
+                               [BP+10]=length *)
+   E_ValReal = 46 ;         (* [BP+4]=string, [BP+6]=dest real, [BP+8]=error *)
+   E_RealAbs = 47 ;         (* [BP+4]=12-byte block; result in its first 6 bytes *)
+   E_RealSqrt = 48 ;        (* [BP+4]=12-byte block; Sqrt of the first REAL *)
 
 
    (* File control block, mirrored by Compiler.FileVarSize. *)
    (* File control block, mirrored by Compiler.FileVarSize. *)
    F_NameOff = 4 ;           (* handle word, mode word, then the name *)
    F_NameOff = 4 ;           (* handle word, mode word, then the name *)

+ 205 - 6
shell/Runtime.mod

@@ -103,7 +103,12 @@ CONST
    D_TXCH  = 200 ;    (* 1 byte: one-byte INT 21h read scratch *)
    D_TXCH  = 200 ;    (* 1 byte: one-byte INT 21h read scratch *)
    D_VALSIGN = 201 ;  (* 1 byte: Val integer sign flag *)
    D_VALSIGN = 201 ;  (* 1 byte: Val integer sign flag *)
    D_VALCH = 202 ;    (* 2 bytes: Val digit scratch *)
    D_VALCH = 202 ;    (* 2 bytes: Val digit scratch *)
-   D_END   = 204 ;    (* the block is padded to here *)
+   D_VALBUF = 204 ;   (* 256 bytes: counted string -> ASCIIZ for val_real *)
+   D_MATHC = 460 ;    (* 6 bytes: the saved original in Sqrt *)
+   D_MATHX = 466 ;    (* 6 bytes: the current Newton iterate *)
+   D_MATHQ = 472 ;    (* 6 bytes: a division result *)
+   D_MATHI = 478 ;    (* 1 byte: a small loop counter *)
+   D_END   = 479 ;    (* the block is padded to here *)
 
 
    (* THE LOAD BIAS.  Everything above is an offset into the image as this
    (* THE LOAD BIAS.  Everything above is an offset into the image as this
       compiler numbers it: the entry JMP is at image 0.  But a DOS .COM is
       compiler numbers it: the entry JMP is at image 0.  But a DOS .COM is
@@ -160,7 +165,7 @@ VAR
    dataAt : CARDINAL ;
    dataAt : CARDINAL ;
    rtBase : CARDINAL ;
    rtBase : CARDINAL ;
    built  : BOOLEAN ;
    built  : BOOLEAN ;
-   entNm  : ARRAY [0..44] OF ARRAY [0..MaxNm] OF CHAR ;
+   entNm  : ARRAY [0..63] OF ARRAY [0..MaxNm] OF CHAR ;
 
 
 (* ---------------------------------------------------------------- *)
 (* ---------------------------------------------------------------- *)
 (*  name helpers                                                     *)
 (*  name helpers                                                     *)
@@ -367,6 +372,7 @@ PROCEDURE PushBp ; BEGIN B (55H) END PushBp ;
 PROCEDURE PopBp  ; BEGIN B (5DH) END PopBp ;
 PROCEDURE PopBp  ; BEGIN B (5DH) END PopBp ;
 PROCEDURE MovBpSp ; BEGIN B (8BH) ; B (0ECH) END MovBpSp ;  (* 8B EC: MOV BP,SP *)
 PROCEDURE MovBpSp ; BEGIN B (8BH) ; B (0ECH) END MovBpSp ;  (* 8B EC: MOV BP,SP *)
 PROCEDURE MovSpBp ; BEGIN B (89H) ; B (0ECH) END MovSpBp ;  (* 89 EC: MOV SP,BP *)
 PROCEDURE MovSpBp ; BEGIN B (89H) ; B (0ECH) END MovSpBp ;  (* 89 EC: MOV SP,BP *)
+PROCEDURE AddSp2 ; BEGIN B (83H) ; B (0C4H) ; B (2) END AddSp2 ;   (* ADD SP,2 *)
 PROCEDURE LeaveR ; BEGIN B (0C9H) END LeaveR ;
 PROCEDURE LeaveR ; BEGIN B (0C9H) END LeaveR ;
 PROCEDURE RetR   ; BEGIN B (0C3H) END RetR ;
 PROCEDURE RetR   ; BEGIN B (0C3H) END RetR ;
 PROCEDURE Int21  ; BEGIN B (0CDH) ; B (21H) END Int21 ;
 PROCEDURE Int21  ; BEGIN B (0CDH) ; B (21H) END Int21 ;
@@ -395,6 +401,8 @@ PROCEDURE IncCx ; BEGIN B (41H) END IncCx ;
 PROCEDURE IncSi ; BEGIN B (46H) END IncSi ;
 PROCEDURE IncSi ; BEGIN B (46H) END IncSi ;
 PROCEDURE DecSi ; BEGIN B (4EH) END DecSi ;
 PROCEDURE DecSi ; BEGIN B (4EH) END DecSi ;
 PROCEDURE AddDi2 ; BEGIN B (83H) ; B (0C7H) ; B (2) END AddDi2 ;  (* 11 000 111 *)
 PROCEDURE AddDi2 ; BEGIN B (83H) ; B (0C7H) ; B (2) END AddDi2 ;  (* 11 000 111 *)
+PROCEDURE AddDiImm (v : CARDINAL) ;
+BEGIN B (81H) ; B (0C7H) ; W (v) END AddDiImm ;          (* ADD DI,imm16 *)
 
 
 PROCEDURE CmpAl (v : CARDINAL ) ; BEGIN B (3CH) ; B (v) END CmpAl ;
 PROCEDURE CmpAl (v : CARDINAL ) ; BEGIN B (3CH) ; B (v) END CmpAl ;
 PROCEDURE CmpAx0 ; BEGIN B (83H) ; B (0F8H) ; B (0) END CmpAx0 ;
 PROCEDURE CmpAx0 ; BEGIN B (83H) ; B (0F8H) ; B (0) END CmpAx0 ;
@@ -519,6 +527,7 @@ PROCEDURE MovDxSi2 ; BEGIN B (8BH) ; B (54H) ; B (2) END MovDxSi2 ;
 PROCEDURE MovDxSi4 ; BEGIN B (8BH) ; B (54H) ; B (4) END MovDxSi4 ;
 PROCEDURE MovDxSi4 ; BEGIN B (8BH) ; B (54H) ; B (4) END MovDxSi4 ;
 PROCEDURE MovAxBp4 ; BEGIN B (8BH) ; B (46H) ; B (4) END MovAxBp4 ;  (* AX:=[BP+4] *)
 PROCEDURE MovAxBp4 ; BEGIN B (8BH) ; B (46H) ; B (4) END MovAxBp4 ;  (* AX:=[BP+4] *)
 PROCEDURE MovAxBp6 ; BEGIN B (8BH) ; B (46H) ; B (6) END MovAxBp6 ;  (* AX:=[BP+6] *)
 PROCEDURE MovAxBp6 ; BEGIN B (8BH) ; B (46H) ; B (6) END MovAxBp6 ;  (* AX:=[BP+6] *)
+PROCEDURE MovAxBp8 ; BEGIN B (8BH) ; B (46H) ; B (8) END MovAxBp8 ;  (* AX:=[BP+8] *)
 PROCEDURE MovBxBp4 ; BEGIN B (8BH) ; B (5EH) ; B (4) END MovBxBp4 ;  (* BX:=[BP+4] *)
 PROCEDURE MovBxBp4 ; BEGIN B (8BH) ; B (5EH) ; B (4) END MovBxBp4 ;  (* BX:=[BP+4] *)
 PROCEDURE MovBxBp6 ; BEGIN B (8BH) ; B (5EH) ; B (6) END MovBxBp6 ;  (* BX:=[BP+6] *)
 PROCEDURE MovBxBp6 ; BEGIN B (8BH) ; B (5EH) ; B (6) END MovBxBp6 ;  (* BX:=[BP+6] *)
 PROCEDURE MovAlDh  ; BEGIN B (8AH) ; B (0C6H) END MovAlDh ;  (* 8A C6: AL:=DH *)
 PROCEDURE MovAlDh  ; BEGIN B (8AH) ; B (0C6H) END MovAlDh ;  (* 8A C6: AL:=DH *)
@@ -653,6 +662,7 @@ PROCEDURE RclDx1 ; BEGIN B (0D1H) ; B (0D2H) END RclDx1 ;   (* RCL DX,1 *)
 PROCEDURE ShlAh1 ; BEGIN B (0D0H) ; B (0E4H) END ShlAh1 ;   (* SHL AH,1 *)
 PROCEDURE ShlAh1 ; BEGIN B (0D0H) ; B (0E4H) END ShlAh1 ;   (* SHL AH,1 *)
 PROCEDURE IncAl ; BEGIN B (0FEH) ; B (0C0H) END IncAl ;     (* INC AL *)
 PROCEDURE IncAl ; BEGIN B (0FEH) ; B (0C0H) END IncAl ;     (* INC AL *)
 PROCEDURE DecCl ; BEGIN B (0FEH) ; B (0C9H) END DecCl ;     (* DEC CL *)
 PROCEDURE DecCl ; BEGIN B (0FEH) ; B (0C9H) END DecCl ;     (* DEC CL *)
+PROCEDURE SarCl1 ; BEGIN B (0D0H) ; B (0F9H) END SarCl1 ;   (* SAR CL,1 *)
 PROCEDURE Stc ; BEGIN B (0F9H) END Stc ;                    (* STC *)
 PROCEDURE Stc ; BEGIN B (0F9H) END Stc ;                    (* STC *)
 PROCEDURE CmpAlCl ; BEGIN B (38H) ; B (0C8H) END CmpAlCl ;  (* CMP AL,CL *)
 PROCEDURE CmpAlCl ; BEGIN B (38H) ; B (0C8H) END CmpAlCl ;  (* CMP AL,CL *)
 PROCEDURE CmpCl0 ; BEGIN B (80H) ; B (0F9H) ; B (0) END CmpCl0 ; (* 80 F9 00 *)
 PROCEDURE CmpCl0 ; BEGIN B (80H) ; B (0F9H) ; B (0) END CmpCl0 ; (* 80 F9 00 *)
@@ -780,6 +790,13 @@ BEGIN B (0C7H) ; B (04H) ; W (v) END StSiImm ;                   (* [SI]:=imm16
 PROCEDURE StSiAl ; BEGIN B (88H) ; B (04H) END StSiAl ;          (* [SI]:=AL *)
 PROCEDURE StSiAl ; BEGIN B (88H) ; B (04H) END StSiAl ;          (* [SI]:=AL *)
 PROCEDURE StSiCh ; BEGIN B (88H) ; B (2CH) END StSiCh ;          (* [SI]:=CH *)
 PROCEDURE StSiCh ; BEGIN B (88H) ; B (2CH) END StSiCh ;          (* [SI]:=CH *)
 PROCEDURE StBxAl ; BEGIN B (88H) ; B (07H) END StBxAl ;          (* [BX]:=AL *)
 PROCEDURE StBxAl ; BEGIN B (88H) ; B (07H) END StBxAl ;          (* [BX]:=AL *)
+PROCEDURE StBxCl ; BEGIN B (88H) ; B (0FH) END StBxCl ;          (* [BX]:=CL *)
+PROCEDURE StBxAx ; BEGIN B (89H) ; B (07H) END StBxAx ;          (* [BX]:=AX *)
+PROCEDURE IncAx ; BEGIN B (40H) END IncAx ;                     (* INC AX *)
+PROCEDURE XorChCh ; BEGIN B (30H) ; B (0EDH) END XorChCh ;      (* XOR CH,CH *)
+PROCEDURE CmpAxCx ; BEGIN B (39H) ; B (0C8H) END CmpAxCx ;      (* CMP AX,CX *)
+PROCEDURE CmpAxSi ; BEGIN B (39H) ; B (0F0H) END CmpAxSi ;      (* CMP AX,SI *)
+PROCEDURE AddBxDx ; BEGIN B (01H) ; B (0D3H) END AddBxDx ;      (* BX:=BX+DX *)
 PROCEDURE LdAlSi ; BEGIN B (8AH) ; B (04H) END LdAlSi ;          (* AL:=[SI] *)
 PROCEDURE LdAlSi ; BEGIN B (8AH) ; B (04H) END LdAlSi ;          (* AL:=[SI] *)
 PROCEDURE LdClBx ; BEGIN B (8AH) ; B (0FH) END LdClBx ;          (* CL:=[BX] *)
 PROCEDURE LdClBx ; BEGIN B (8AH) ; B (0FH) END LdClBx ;          (* CL:=[BX] *)
 PROCEDURE LdAlDi ; BEGIN B (8AH) ; B (05H) END LdAlDi ;          (* AL:=[DI] *)
 PROCEDURE LdAlDi ; BEGIN B (8AH) ; B (05H) END LdAlDi ;          (* AL:=[DI] *)
@@ -1774,6 +1791,53 @@ BEGIN
    END
    END
 END Str5 ;
 END Str5 ;
 
 
+PROCEDURE EmitStrCopy ;
+(* str_copy: Copy(S, start, len), TPSRC2's xcopy shape.
+
+   ABI: [BP+4]=counted source, [BP+6]=counted destination, [BP+8]=start
+   (1-based), [BP+10]=length.  The destination receives min(len, |S|-start+1)
+   characters; start < 1 is clamped to 1 and a start past the end yields an
+   empty string.  AX returns the copied length. *)
+BEGIN
+   M ("str_copy") ;
+   PushBp ; MovBpSp ;
+   PushBx ; PushCx ; PushDx ; PushSi ; PushDi ;
+   MovDxBp6 ;                       (* DX := destination *)
+   MovDiDx ;                        (* DI := destination + 1 *)
+   XorAxAx ; StDiAl ; IncDi ;        (* dest[0] := 0 *)
+   PushDx ;                         (* keep the destination base *)
+   MovBxBp4 ;                       (* BX := source *)
+   LdAlBx ; XorAhAh ; MovCxAx ;      (* CX := source length *)
+   MovSiBx ; IncSi ;                (* SI := source characters *)
+   MovAxBp8 ;                       (* AX := start *)
+   CmpAxImm (1) ; Jge8 ("cps_start") ;
+   MovAxImm (1) ;
+   M ("cps_start") ;
+   CmpAxCx ; Jbe8 ("cps_inrange") ;
+   Jmp8 ("cps_empty") ;              (* start past the end -> empty *)
+   M ("cps_inrange") ;
+   MovDxAx ;                        (* DX := start *)
+   MovAxCx ; SubAxDx ; AddAxImm (1) ;(* AX := available *)
+   MovSiBp10 ;                      (* SI := requested length *)
+   CmpAxSi ; Jbe8 ("cps_count") ;
+   MovAxSi ;
+   M ("cps_count") ;
+   MovCxAx ;                        (* CX := count *)
+   PushCx ;                         (* keep it across LOOP *)
+   MovBxBp4 ; IncBx ; AddBxDx ; DecBx ; (* BX := first source character *)
+   Jcxz8 ("cps_copied") ;
+   M ("cps_loop") ;
+   LdAlBx ; StDiAl ; IncBx ; IncDi ; Loop8 ("cps_loop") ;
+   M ("cps_copied") ;
+   PopCx ; PopBx ; StBxCl ;          (* destination length *)
+   Jmp8 ("cps_exit") ;
+   M ("cps_empty") ;
+   PopBx ; XorAxAx ; StBxAl ;        (* destination length 0 *)
+   M ("cps_exit") ;
+   PopDi ; PopSi ; PopDx ; PopCx ; PopBx ;
+   MovSpBp ; PopBp ; RetR
+END EmitStrCopy ;
+
 PROCEDURE EmitRealFromInt ;
 PROCEDURE EmitRealFromInt ;
 (* intreal (TPSRC3 130): an INTEGER -> the 6-byte MBF real.
 (* intreal (TPSRC3 130): an INTEGER -> the 6-byte MBF real.
 
 
@@ -2270,6 +2334,93 @@ BEGIN
    Jmp8 ("ri_store")
    Jmp8 ("ri_store")
 END EmitRealInt ;
 END EmitRealInt ;
 
 
+PROCEDURE EmitRealMath ;
+(* REAL math entries.  The caller passes a 12-byte block; the first six bytes
+   are the argument and are overwritten by the result.  Abs is a sign clear.
+   Sqrt is Newton's iteration with a fixed count: the 8086 has no FPU, so the
+   working precision is the same packed MBF format the arithmetic entries use.
+   The internal mt_* bridges call the existing register cores directly. *)
+
+PROCEDURE LoadMath (off : CARDINAL) ;
+BEGIN
+   MovAxData (off) ; MovBxData (off + 2) ; MovDxData (off + 4)
+END LoadMath ;
+
+PROCEDURE StoreMath (off : CARDINAL) ;
+BEGIN
+   StDataAx (off) ; StDataBx (off + 2) ; StDataDx (off + 4)
+END StoreMath ;
+
+BEGIN
+   M ("mt_add") ;
+   StDataImm (D_RSIGN, 0) ; Call ("rd_core") ; RetR ;
+   M ("mt_div") ;
+   Call ("rv_core") ; RetR ;
+
+   M ("real_abs") ;
+   PushBp ; MovBpSp ; PushBx ; PushDx ; PushSi ; PushDi ;
+   PushBp4 ;
+   MovDiBp4 ;
+   LdAxDi ; LdCxDiOff (2) ; MovBxCx ; LdDxDiOff (4) ;
+   AndDhImm (7FH) ;
+   StDiAx ; StDiOffBx (2) ; StDiOffDx (4) ;
+   PopDi ; PopSi ; PopDx ; PopBx ; MovSpBp ; PopBp ; RetR ;
+
+   M ("real_sqrt") ;
+   PushBp ; MovBpSp ; PushBx ; PushDx ; PushSi ; PushDi ;
+   PushBp4 ;
+   MovSiBp4 ;
+   LdAxSi ; LdCxSiOff (2) ; MovBxCx ; LdDxSiOff (4) ;
+   CmpAl0 ; JccNear (74H, "ms_zero") ;
+   TestDhImm (80H) ; JccNear (75H, "ms_err") ;
+   StoreMath (D_MATHC) ;
+   (* initial guess: same mantissa, half the exponent *)
+   MovClAl ; AddClImm (80H) ; SarCl1 ; AddClImm (80H) ; MovAlCl ;
+   StoreMath (D_MATHX) ;
+   StDataByte (D_MATHI, 12) ;
+   M ("ms_loop") ;
+   MovDiBp4 ;
+   MovAxData (D_MATHC) ; StDiAx ;
+   MovBxData (D_MATHC + 2) ; StDiOffBx (2) ;
+   MovDxData (D_MATHC + 4) ; StDiOffDx (4) ;
+   MovDiBp4 ; AddDiImm (6) ;
+   MovAxData (D_MATHX) ; StDiAx ;
+   MovBxData (D_MATHX + 2) ; StDiOffBx (2) ;
+   MovDxData (D_MATHX + 4) ; StDiOffDx (4) ;
+   PushBp4 ; Call ("real_div") ; AddSp2 ;
+   MovSiBp4 ; LdAxSi ; LdCxSiOff (2) ; MovBxCx ; LdDxSiOff (4) ; StoreMath (D_MATHQ) ;
+   MovDiBp4 ;
+   MovAxData (D_MATHX) ; StDiAx ;
+   MovBxData (D_MATHX + 2) ; StDiOffBx (2) ;
+   MovDxData (D_MATHX + 4) ; StDiOffDx (4) ;
+   MovDiBp4 ; AddDiImm (6) ;
+   MovAxData (D_MATHQ) ; StDiAx ;
+   MovBxData (D_MATHQ + 2) ; StDiOffBx (2) ;
+   MovDxData (D_MATHQ + 4) ; StDiOffDx (4) ;
+   PushBp4 ; Call ("real_add") ; AddSp2 ;
+   MovSiBp4 ; LdAxSi ; LdCxSiOff (2) ; MovBxCx ; LdDxSiOff (4) ;
+   DecAl ;
+   StoreMath (D_MATHX) ;
+   DecData (D_MATHI) ; JccNear (75H, "ms_loop") ;
+   M ("ms_storex") ;
+   LoadMath (D_MATHX) ;
+   Jmp8 ("ms_store2") ;
+   M ("ms_storeq") ;
+   LoadMath (D_MATHQ) ;
+   M ("ms_store2") ;
+   PopDi ;
+   StDiAx ; StDiOffBx (2) ; StDiOffDx (4) ;
+   Jmp8 ("ms_done") ;
+   M ("ms_zero") ;
+   PopDi ;
+   M ("ms_done") ;
+   M ("ms_done2") ;
+   PopDi ; PopSi ; PopDx ; PopBx ; MovSpBp ; PopBp ; RetR ;
+   M ("ms_err") ;
+   PopDi ;
+   MovAlD (3) ; MovAh (4CH) ; Int21
+END EmitRealMath ;
+
 PROCEDURE EmitRealConv ;
 PROCEDURE EmitRealConv ;
 (* fmtreal / ascreal: the decimal<->binary conversions, TPSRC3 880-1250.
 (* fmtreal / ascreal: the decimal<->binary conversions, TPSRC3 880-1250.
 
 
@@ -3213,6 +3364,50 @@ BEGIN
    MovSpBp ; PopBp ; RetR
    MovSpBp ; PopBp ; RetR
 END EmitFileOps ;
 END EmitFileOps ;
 
 
+PROCEDURE EmitValReal ;
+(* val_real: Val(S, real, error) for a counted source.
+
+   ABI: [BP+4]=counted source, [BP+6]=destination REAL, [BP+8]=error word.
+   ascreal wants an ASCIIZ string, so the counted bytes are copied to
+   D_VALBUF and NUL-terminated first.  On success the destination is written
+   and error is 0 when the whole string was consumed, else the 1-based first
+   unconsumed character.  On a hard parse error the destination is untouched
+   and error is 1. *)
+BEGIN
+   M ("val_real") ;
+   PushBp ; MovBpSp ;
+   PushBx ; PushCx ; PushDx ; PushSi ; PushDi ;
+   MovSiBp4 ; LdAlSi ; XorAhAh ; MovCxAx ; IncSi ;
+   MovDiData (D_VALBUF) ;
+   Jcxz8 ("vr_copied") ;
+   M ("vr_copy") ;
+   LdAlSi ; StDiAl ; IncSi ; IncDi ; Loop8 ("vr_copy") ;
+   M ("vr_copied") ;
+   XorAxAx ; StDiAl ;                (* NUL terminate *)
+   MovBxDataAddr (D_VALBUF) ;
+   MovDiBp6 ;
+   StDataBx (D_ASCSRC) ;
+   Call ("rc_asc") ;
+   Jb8 ("vr_hard") ;
+   MovAxBx ;                        (* consumed end pointer *)
+   MovDxData (D_ASCSRC) ;
+   SubAxDx ;                        (* AX := consumed length *)
+   MovSiBp4 ; LdClSi ; XorChCh ;     (* CX := source length *)
+   CmpAxCx ; Je8 ("vr_ok") ;
+   IncAx ;
+   Jmp8 ("vr_err") ;
+   M ("vr_ok") ;
+   XorAxAx ;
+   M ("vr_err") ;
+   MovBxBp8 ; StBxAx ;               (* error := AX *)
+   Jmp8 ("vr_done") ;
+   M ("vr_hard") ;
+   MovAxImm (1) ; MovBxBp8 ; StBxAx ;
+   M ("vr_done") ;
+   PopDi ; PopSi ; PopDx ; PopCx ; PopBx ;
+   MovSpBp ; PopBp ; RetR
+END EmitValReal ;
+
 PROCEDURE EmitData ;
 PROCEDURE EmitData ;
 (* The runtime's data block.  The D_ constants name the offsets in it and are
 (* The runtime's data block.  The D_ constants name the offsets in it and are
    ASSERTED against what is emitted here, three ways: the starting offset of
    ASSERTED against what is emitted here, three ways: the starting offset of
@@ -3437,10 +3632,10 @@ BEGIN
    EmitRdInt ; EmitRdScan ; EmitRdByte ;
    EmitRdInt ; EmitRdScan ; EmitRdByte ;
    EmitRdChar ; EmitRdBool ; EmitRdLn ;
    EmitRdChar ; EmitRdBool ; EmitRdLn ;
    EmitGetCh ; EmitUnGetCh ;
    EmitGetCh ; EmitUnGetCh ;
-   EmitRdStr ; EmitStrStore ; EmitCmpStr ; EmitStrCat ;
+   EmitRdStr ; EmitStrStore ; EmitCmpStr ; EmitStrCat ; EmitStrCopy ;
    EmitRealFromInt ; EmitRealAddSub ; EmitRealMul ;
    EmitRealFromInt ; EmitRealAddSub ; EmitRealMul ;
-   EmitRealCmp ; EmitRealInt ; EmitRealConv ; EmitSetOps ;
-   EmitFileOps ;
+   EmitRealCmp ; EmitRealInt ; EmitRealMath ; EmitRealConv ; EmitSetOps ;
+   EmitFileOps ; EmitValReal ;
    EmitData ;
    EmitData ;
    FixUp ;
    FixUp ;
    SetStr (entNm [0], "initmem") ;
    SetStr (entNm [0], "initmem") ;
@@ -3488,6 +3683,10 @@ BEGIN
    SetStr (entNm [42], "file_readln") ;
    SetStr (entNm [42], "file_readln") ;
    SetStr (entNm [43], "int_fmt") ;
    SetStr (entNm [43], "int_fmt") ;
    SetStr (entNm [44], "val_int") ;
    SetStr (entNm [44], "val_int") ;
+   SetStr (entNm [45], "str_copy") ;
+   SetStr (entNm [46], "val_real") ;
+   SetStr (entNm [47], "real_abs") ;
+   SetStr (entNm [48], "real_sqrt") ;
    built := TRUE
    built := TRUE
 END RT_Build ;
 END RT_Build ;
 
 
@@ -3515,7 +3714,7 @@ BEGIN
    IF NOT built THEN
    IF NOT built THEN
       RT_Build (0)
       RT_Build (0)
    END ;
    END ;
-   IF i > 44 THEN
+   IF i > 48 THEN
       RETURN 0
       RETURN 0
    END ;
    END ;
    RETURN rtBase + LblOff (entNm [i])
    RETURN rtBase + LblOff (entNm [i])

+ 7 - 3
shell/tests/RtProbe.mod

@@ -108,7 +108,7 @@ END PENT ;
 
 
 PROCEDURE Main ;
 PROCEDURE Main ;
 VAR i, n, base : CARDINAL ;
 VAR i, n, base : CARDINAL ;
-    names : ARRAY [0..44] OF ARRAY [0..15] OF CHAR ;
+    names : ARRAY [0..48] OF ARRAY [0..15] OF CHAR ;
 BEGIN
 BEGIN
    base := GetBase () ;
    base := GetBase () ;
    RT_Build (base) ;
    RT_Build (base) ;
@@ -121,7 +121,7 @@ BEGIN
    PCARD (RT_Size ()) ; PS (" bytes") ; NL ;
    PCARD (RT_Size ()) ; PS (" bytes") ; NL ;
    PS ("code ends at ") ; PCARD (RT_CodeEnd ()) ; NL ;
    PS ("code ends at ") ; PCARD (RT_CodeEnd ()) ; NL ;
    i := 0 ;
    i := 0 ;
-   WHILE i <= 44 DO
+   WHILE i <= 48 DO
       names [i] := "" ;
       names [i] := "" ;
       INC (i)
       INC (i)
    END ;
    END ;
@@ -157,8 +157,12 @@ BEGIN
    names [42] := "file_readln" ;
    names [42] := "file_readln" ;
    names [43] := "int_fmt" ;
    names [43] := "int_fmt" ;
    names [44] := "val_int" ;
    names [44] := "val_int" ;
+   names [45] := "str_copy" ;
+   names [46] := "val_real" ;
+   names [47] := "real_abs" ;
+   names [48] := "real_sqrt" ;
    i := 0 ;
    i := 0 ;
-   WHILE i <= 44 DO
+   WHILE i <= 48 DO
       PENT (i, names [i]) ;
       PENT (i, names [i]) ;
       INC (i)
       INC (i)
    END ;
    END ;

+ 1 - 0
shell/tests/audit_helpers.py

@@ -156,6 +156,7 @@ NON_ONE_LINE = {
         # bytes are pinned by rt_exec's file_assign case and the runtime
         # bytes are pinned by rt_exec's file_assign case and the runtime
         # golden; the name grammar cannot read a whole routine.
         # golden; the name grammar cannot read a whole routine.
         "EmitFileOps": COMP,
         "EmitFileOps": COMP,
+        "AddDiImm": COMP,
     },
     },
     "Compiler.mod": {
     "Compiler.mod": {
         "FileIo": COMP,        # typed-file INT 21h sequence; see EmFileIo
         "FileIo": COMP,        # typed-file INT 21h sequence; see EmFileIo

+ 1 - 1
shell/tests/exec/rtdrv.s

@@ -92,7 +92,7 @@
 # silently run into the test scaffolding.  rt_exec.py asserts
 # silently run into the test scaffolding.  rt_exec.py asserts
 # RT_BASE + blob size <= HDR, so the bound is a checked one.
 # RT_BASE + blob size <= HDR, so the bound is a checked one.
 	.set	RT_BASE, 0x0190
 	.set	RT_BASE, 0x0190
-	.set	HDR, 0x1300
+	.set	HDR, 0x1800
 	.set	FMTDEST, 0x2430	# 64-byte destination for real_fmt
 	.set	FMTDEST, 0x2430	# 64-byte destination for real_fmt
 	.set	ASCSRC, 0x2470	# ASCIIZ sources for real_val
 	.set	ASCSRC, 0x2470	# ASCIIZ sources for real_val
 	.set	DATA, 0x2110
 	.set	DATA, 0x2110

+ 1 - 1
shell/tests/fixtures/calc_ladder.tsv

@@ -36,4 +36,4 @@
 # 22280 -> 22706 -> 22859 -> 23700 -> 25674 -> 26066 -> 26924 -> 27648 ->
 # 22280 -> 22706 -> 22859 -> 23700 -> 25674 -> 26066 -> 26924 -> 27648 ->
 # 28074 -> 31758 -> 32096 -> 32284 -> 32482 -> 32564 -> 33374 -> 33537 ->
 # 28074 -> 31758 -> 32096 -> 32284 -> 32482 -> 32564 -> 33374 -> 33537 ->
 # 33778 -> 35135.  The next blocker is the Copy string builtin (TP3 error 41).
 # 33778 -> 35135.  The next blocker is the Copy string builtin (TP3 error 41).
-CALC.PAS	ERR	41	35135
+CALC.PAS	ERR	41	40930

+ 8 - 0
shell/tests/fixtures/expected.tsv

@@ -703,3 +703,11 @@ t100_realexpr	OK	1001	140
 
 
 #   t101_recursion      direct self-recursion: fact(5) = 120.
 #   t101_recursion      direct self-recursion: fact(5) = 120.
 t101_recursion	OK	137	5
 t101_recursion	OK	137	5
+
+#   t102_copy            Copy(S,start,len), including clipping and empty results.
+t102_copy	OK	441	1327
+#   t103_valreal         Val(counted, REAL, error), valid and trailing-invalid.
+t103_valreal	OK	350	34
+
+#   t104_mathbasic       REAL Abs, Sqr and Sqrt.
+t104_mathbasic	OK	472	80

+ 5 - 0
shell/tests/fixtures/t102_copy.out

@@ -0,0 +1,5 @@
+bcd
+abcdef
+ab
+[]
+[]

+ 19 - 0
shell/tests/fixtures/t102_copy.pas

@@ -0,0 +1,19 @@
+program t102_copy;
+
+{ t102 -- the Copy string builtin: clipping at both ends and an empty result. }
+
+var
+  S, T : string[20];
+begin
+  S := 'abcdef';
+  T := Copy (S, 2, 3);
+  writeln (T);
+  T := Copy (S, 1, 99);
+  writeln (T);
+  T := Copy (S, 0, 2);
+  writeln (T);
+  T := Copy (S, 10, 2);
+  writeln ('[', T, ']');
+  T := Copy (S, 3, 0);
+  writeln ('[', T, ']')
+end.

+ 3 - 0
shell/tests/fixtures/t103_valreal.out

@@ -0,0 +1,3 @@
+1.5 0
+-2.25 0
+4

+ 22 - 0
shell/tests/fixtures/t103_valreal.pas

@@ -0,0 +1,22 @@
+program t103_valreal;
+
+{ t103 -- Val on a REAL destination.  The counted source is copied to an
+  ASCIIZ buffer by val_real, then parsed by the same ascreal core. }
+
+var
+  S : string[20];
+  R : real;
+  E : integer;
+begin
+  S := '1.5';
+  Val (S, R, E);
+  Str (R : 0 : 1, S);
+  writeln (S, ' ', E);
+  S := '-2.25';
+  Val (S, R, E);
+  Str (R : 0 : 2, S);
+  writeln (S, ' ', E);
+  S := '3.5x';
+  Val (S, R, E);
+  writeln (E)
+end.

+ 3 - 0
shell/tests/fixtures/t104_mathbasic.out

@@ -0,0 +1,3 @@
+3.5
+9
+1.4142

+ 15 - 0
shell/tests/fixtures/t104_mathbasic.pas

@@ -0,0 +1,15 @@
+program t104_mathbasic;
+
+{ t104 -- Abs, Sqr and Sqrt on REAL. }
+
+var
+  R : real;
+  S : string[20];
+begin
+  R := -3.5;
+  Str (Abs (R) : 0 : 1, S) ; writeln (S) ;
+  R := 3;
+  Str (Sqr (R) : 0 : 0, S) ; writeln (S) ;
+  R := 2;
+  Str (Sqrt (R) : 0 : 4, S) ; writeln (S)
+end.

+ 3 - 2
shell/tests/rt_exec.py

@@ -63,7 +63,7 @@ SHELL = os.path.dirname(HERE)
 # two are written down and then CHECKED against each other (see build_image).
 # two are written down and then CHECKED against each other (see build_image).
 # A restated constant that is never compared is a constant waiting to lie.
 # A restated constant that is never compared is a constant waiting to lie.
 RT_BASE = 0x0190
 RT_BASE = 0x0190
-HDR = 0x1300
+HDR = 0x1800
 DLEN = 32
 DLEN = 32
 DATA = 0x2110
 DATA = 0x2110
 STORE = 0x2140
 STORE = 0x2140
@@ -114,7 +114,8 @@ ENTS = ["initmem", "progend", "stackchk", "wrint", "wrchar", "wrbool",
         "real_write", "set_op", "set_cmp", "set_copy",
         "real_write", "set_op", "set_cmp", "set_copy",
         "file_assign", "file_reset", "file_rewrite", "file_close",
         "file_assign", "file_reset", "file_rewrite", "file_close",
         "ioresult", "io_store", "heap_new", "file_eof", "file_readln",
         "ioresult", "io_store", "heap_new", "file_eof", "file_readln",
-        "int_fmt", "val_int"]
+        "int_fmt", "val_int", "str_copy", "val_real", "real_abs",
+        "real_sqrt"]
 
 
 # A call slot's flags, as rtdrv.s reads them.
 # A call slot's flags, as rtdrv.s reads them.
 F_STACK = 1     # the argument goes on the stack, popped by the caller
 F_STACK = 1     # the argument goes on the stack, popped by the caller

+ 1835 - 1585
shell/tests/runtime.golden

@@ -22,7 +22,7 @@
 0015  39 CF       cmp di,cx
 0015  39 CF       cmp di,cx
 0017  72 F5       jb 0eh
 0017  72 F5       jb 0eh
 0019  89 C8       mov ax,cx
 0019  89 C8       mov ax,cx
-001B  A3 1B 12    mov word ptr [121bh],ax
+001B  A3 52 14    mov word ptr [1452h],ax
 001E  1E          push ds
 001E  1E          push ds
 001F  07          pop es
 001F  07          pop es
 0020  C3          ret
 0020  C3          ret
@@ -43,7 +43,7 @@
 003B  58          pop ax
 003B  58          pop ax
 003C  F7 D8       neg ax
 003C  F7 D8       neg ax
 003E  B9 0A 00    mov cx,0ah
 003E  B9 0A 00    mov cx,0ah
-0041  BB 5E 11    mov bx,115eh
+0041  BB 95 13    mov bx,1395h
 0044  89 DE       mov si,bx
 0044  89 DE       mov si,bx
 0046  31 D2       xor dx,dx
 0046  31 D2       xor dx,dx
 0048  F7 F1       div ax,cx
 0048  F7 F1       div ax,cx
@@ -95,7 +95,7 @@
 00A7  58          pop ax
 00A7  58          pop ax
 00A8  F7 D8       neg ax
 00A8  F7 D8       neg ax
 00AA  B9 0A 00    mov cx,0ah
 00AA  B9 0A 00    mov cx,0ah
-00AD  BB 5E 11    mov bx,115eh
+00AD  BB 95 13    mov bx,1395h
 00B0  89 DE       mov si,bx
 00B0  89 DE       mov si,bx
 00B2  31 D2       xor dx,dx
 00B2  31 D2       xor dx,dx
 00B4  F7 F1       div ax,cx
 00B4  F7 F1       div ax,cx
@@ -127,18 +127,18 @@
 00E3  83 7E 04 00 cmp word ptr [bp+4h],0h
 00E3  83 7E 04 00 cmp word ptr [bp+4h],0h
 00E7  89 EC       mov sp,bp
 00E7  89 EC       mov sp,bp
 00E9  75 05       jne 0f0h
 00E9  75 05       jne 0f0h
-00EB  BA 63 11    mov dx,1163h
+00EB  BA 9A 13    mov dx,139ah
 00EE  EB 03       jmp 0f3h
 00EE  EB 03       jmp 0f3h
-00F0  BA 5E 11    mov dx,115eh
+00F0  BA 95 13    mov dx,1395h
 00F3  B4 09       mov ah,9h
 00F3  B4 09       mov ah,9h
 00F5  CD 21       int 21h
 00F5  CD 21       int 21h
 00F7  5D          pop bp
 00F7  5D          pop bp
 00F8  C3          ret
 00F8  C3          ret
-00F9  BA 6C 11    mov dx,116ch
+00F9  BA A3 13    mov dx,13a3h
 00FC  B4 09       mov ah,9h
 00FC  B4 09       mov ah,9h
 00FE  CD 21       int 21h
 00FE  CD 21       int 21h
 0100  C3          ret
 0100  C3          ret
-0101  BA 69 11    mov dx,1169h
+0101  BA A0 13    mov dx,13a0h
 0104  B4 09       mov ah,9h
 0104  B4 09       mov ah,9h
 0106  CD 21       int 21h
 0106  CD 21       int 21h
 0108  C3          ret
 0108  C3          ret
@@ -305,12 +305,12 @@
 021C  EB EF       jmp 20dh
 021C  EB EF       jmp 20dh
 021E  58          pop ax
 021E  58          pop ax
 021F  C3          ret
 021F  C3          ret
-0220  8B 1E 72 11 mov bx,word ptr [1172h]
+0220  8B 1E A9 13 mov bx,word ptr [13a9h]
 0224  83 FB 00    cmp bx,0h
 0224  83 FB 00    cmp bx,0h
 0227  74 09       je 232h
 0227  74 09       je 232h
 0229  8A C3       mov al,bl
 0229  8A C3       mov al,bl
 022B  31 DB       xor bx,bx
 022B  31 DB       xor bx,bx
-022D  89 1E 72 11 mov word ptr [1172h],bx
+022D  89 1E A9 13 mov word ptr [13a9h],bx
 0231  C3          ret
 0231  C3          ret
 0232  B4 08       mov ah,8h
 0232  B4 08       mov ah,8h
 0234  CD 21       int 21h
 0234  CD 21       int 21h
@@ -318,7 +318,7 @@
 0237  88 C2       mov dl,al
 0237  88 C2       mov dl,al
 0239  BB 01 00    mov bx,1h
 0239  BB 01 00    mov bx,1h
 023C  8A DA       mov bl,dl
 023C  8A DA       mov bl,dl
-023E  89 1E 72 11 mov word ptr [1172h],bx
+023E  89 1E A9 13 mov word ptr [13a9h],bx
 0242  C3          ret
 0242  C3          ret
 0243  55          push bp
 0243  55          push bp
 0244  8B EC       mov bp,sp
 0244  8B EC       mov bp,sp
@@ -487,1582 +487,1832 @@
 0354  55          push bp
 0354  55          push bp
 0355  8B EC       mov bp,sp
 0355  8B EC       mov bp,sp
 0357  53          push bx
 0357  53          push bx
-0358  52          push dx
-0359  56          push si
-035A  57          push di
-035B  8B 76 06    mov si,word ptr [bp+6h]
-035E  8B 04       mov ax,word ptr [si]
-0360  E8 13 00    call 376h
-0363  8B 7E 04    mov di,word ptr [bp+4h]
-0366  89 05       mov word ptr [di],ax
-0368  89 5D 02    mov word ptr [di+2h],bx
-036B  89 55 04    mov word ptr [di+4h],dx
-036E  5F          pop di
-036F  5E          pop si
-0370  5A          pop dx
-0371  5B          pop bx
-0372  89 EC       mov sp,bp
-0374  5D          pop bp
-0375  C3          ret
-0376  83 F8 00    cmp ax,0h
-0379  75 06       jne 381h
-037B  31 DB       xor bx,bx
-037D  31 D2       xor dx,dx
-037F  EB 2C       jmp 3adh
-0381  88 E7       mov bh,ah
-0383  89 C2       mov dx,ax
-0385  83 FA 00    cmp dx,0h
-0388  79 02       jns 38ch
-038A  F7 DA       neg dx
-038C  B8 90 00    mov ax,90h
-038F  80 FE 00    cmp dh,0h
-0392  75 04       jne 398h
-0394  B0 88       mov al,88h
-0396  86 D6       xchg dh,dl
-0398  83 FA 00    cmp dx,0h
-039B  78 06       js 3a3h
-039D  FE C8       dec al
-039F  D1 E2       shl dx,1h
-03A1  79 FA       jns 39dh
-03A3  80 FF 00    cmp bh,0h
-03A6  78 03       js 3abh
-03A8  80 E6 7F    and dh,7fh
-03AB  31 DB       xor bx,bx
-03AD  C3          ret
-03AE  55          push bp
-03AF  8B EC       mov bp,sp
-03B1  53          push bx
-03B2  52          push dx
-03B3  56          push si
-03B4  57          push di
-03B5  FF 76 04    push word ptr [bp+4h]
-03B8  8B 76 04    mov si,word ptr [bp+4h]
-03BB  8B 04       mov ax,word ptr [si]
-03BD  8B 4C 02    mov cx,word ptr [si+2h]
-03C0  8B 54 04    mov dx,word ptr [si+4h]
-03C3  89 CB       mov bx,cx
-03C5  8B FE       mov di,si
-03C7  8B 4D 06    mov cx,word ptr [di+6h]
-03CA  8B 75 08    mov si,word ptr [di+8h]
-03CD  8B 7D 0A    mov di,word ptr [di+0ah]
-03D0  C7 06 74 11 00 00 mov word ptr [1174h],0h
-03D6  E8 4D 00    call 426h
-03D9  5F          pop di
-03DA  89 05       mov word ptr [di],ax
-03DC  89 5D 02    mov word ptr [di+2h],bx
-03DF  89 55 04    mov word ptr [di+4h],dx
-03E2  5F          pop di
-03E3  5E          pop si
-03E4  5A          pop dx
-03E5  5B          pop bx
-03E6  89 EC       mov sp,bp
-03E8  5D          pop bp
-03E9  C3          ret
-03EA  55          push bp
-03EB  8B EC       mov bp,sp
-03ED  53          push bx
-03EE  52          push dx
-03EF  56          push si
-03F0  57          push di
-03F1  FF 76 04    push word ptr [bp+4h]
-03F4  8B 76 04    mov si,word ptr [bp+4h]
-03F7  8B 04       mov ax,word ptr [si]
-03F9  8B 4C 02    mov cx,word ptr [si+2h]
-03FC  8B 54 04    mov dx,word ptr [si+4h]
-03FF  89 CB       mov bx,cx
-0401  8B FE       mov di,si
-0403  8B 4D 06    mov cx,word ptr [di+6h]
-0406  8B 75 08    mov si,word ptr [di+8h]
-0409  8B 7D 0A    mov di,word ptr [di+0ah]
-040C  C7 06 74 11 00 80 mov word ptr [1174h],8000h
-0412  E8 11 00    call 426h
-0415  5F          pop di
-0416  89 05       mov word ptr [di],ax
-0418  89 5D 02    mov word ptr [di+2h],bx
-041B  89 55 04    mov word ptr [di+4h],dx
-041E  5F          pop di
-041F  5E          pop si
-0420  5A          pop dx
-0421  5B          pop bx
-0422  89 EC       mov sp,bp
-0424  5D          pop bp
-0425  C3          ret
-0426  80 F9 00    cmp cl,0h
-0429  74 0E       je 439h
-042B  33 3E 74 11 xor di,word ptr [1174h]
-042F  3C 00       cmp al,0h
-0431  75 07       jne 43ah
-0433  89 C8       mov ax,cx
-0435  89 F3       mov bx,si
-0437  89 FA       mov dx,di
-0439  C3          ret
-043A  38 C8       cmp al,cl
-043C  76 05       jbe 443h
-043E  91          xchg ax,cx
-043F  87 F3       xchg bx,si
-0441  87 FA       xchg dx,di
-0443  88 0E 78 11 mov byte ptr [1178h],cl
-0447  28 C1       sub cl,al
-0449  80 F9 28    cmp cl,28h
-044C  72 06       jb 454h
-044E  8A 0E 78 11 mov cl,byte ptr [1178h]
-0452  EB DF       jmp 433h
-0454  89 3E 74 11 mov word ptr [1174h],di
-0458  80 26 75 11 80 and byte ptr [1175h],80h
-045D  89 3E 76 11 mov word ptr [1176h],di
-0461  30 36 77 11 xor byte ptr [1177h],dh
-0465  81 CF 00 80 or di,8000h
-0469  80 CE 80    or dh,80h
-046C  80 F9 10    cmp cl,10h
-046F  72 0B       jb 47ch
-0471  88 FC       mov ah,bh
-0473  89 D3       mov bx,dx
-0475  31 D2       xor dx,dx
-0477  80 E9 10    sub cl,10h
-047A  EB F0       jmp 46ch
-047C  80 F9 08    cmp cl,8h
-047F  72 0D       jb 48eh
-0481  88 DC       mov ah,bl
-0483  88 FB       mov bl,bh
-0485  88 D7       mov bh,dl
-0487  88 F2       mov dl,dh
-0489  30 F6       xor dh,dh
-048B  80 E9 08    sub cl,8h
-048E  80 F9 00    cmp cl,0h
-0491  74 0A       je 49dh
-0493  D1 EA       shr dx,1h
-0495  D1 DB       rcr bx,1h
-0497  D0 DC       rcr ah,1h
-0499  FE C9       dec cl
-049B  75 F6       jne 493h
-049D  A0 78 11    mov al,byte ptr [1178h]
-04A0  F6 06 77 11 80 test byte ptr [1177h],80h
-04A5  75 14       jne 4bbh
-04A7  00 EC       add ah,ch
-04A9  11 F3       adc bx,si
-04AB  11 FA       adc dx,di
-04AD  73 5F       jnb 50eh
-04AF  D1 DA       rcr dx,1h
-04B1  D1 DB       rcr bx,1h
-04B3  D0 DC       rcr ah,1h
-04B5  FE C0       inc al
-04B7  75 55       jne 50eh
-04B9  F9          stc
-04BA  C3          ret
-04BB  86 EC       xchg ah,ch
-04BD  87 F3       xchg bx,si
-04BF  87 FA       xchg dx,di
-04C1  28 EC       sub ah,ch
-04C3  19 F3       sbb bx,si
-04C5  19 FA       sbb dx,di
-04C7  73 14       jnb 4ddh
-04C9  80 36 75 11 80 xor byte ptr [1175h],80h
-04CE  F6 D4       not ah
-04D0  F7 D3       not bx
-04D2  F7 D2       not dx
-04D4  80 C4 01    add ah,1h
-04D7  83 D3 00    adc bx,0h
-04DA  83 D2 00    adc dx,0h
-04DD  B1 05       mov cl,5h
-04DF  80 FE 00    cmp dh,0h
-04E2  75 14       jne 4f8h
-04E4  88 D6       mov dh,dl
-04E6  88 FA       mov dl,bh
-04E8  88 DF       mov bh,bl
-04EA  88 E3       mov bl,ah
-04EC  30 E4       xor ah,ah
-04EE  2C 08       sub al,8h
-04F0  72 15       jb 507h
-04F2  FE C9       dec cl
-04F4  75 E9       jne 4dfh
-04F6  EB 0F       jmp 507h
-04F8  F6 C6 80    test dh,80h
-04FB  75 11       jne 50eh
-04FD  D0 E4       shl ah,1h
-04FF  D1 D3       rcl bx,1h
-0501  D1 D2       rcl dx,1h
-0503  FE C8       dec al
-0505  75 F1       jne 4f8h
-0507  31 C0       xor ax,ax
-0509  31 DB       xor bx,bx
-050B  31 D2       xor dx,dx
-050D  C3          ret
-050E  80 E6 7F    and dh,7fh
-0511  32 36 75 11 xor dh,byte ptr [1175h]
-0515  C3          ret
-0516  55          push bp
-0517  8B EC       mov bp,sp
-0519  53          push bx
-051A  52          push dx
-051B  56          push si
-051C  57          push di
-051D  FF 76 04    push word ptr [bp+4h]
-0520  8B 76 04    mov si,word ptr [bp+4h]
-0523  8B 04       mov ax,word ptr [si]
-0525  8B 4C 02    mov cx,word ptr [si+2h]
-0528  8B 54 04    mov dx,word ptr [si+4h]
-052B  89 CB       mov bx,cx
-052D  8B FE       mov di,si
-052F  8B 4D 06    mov cx,word ptr [di+6h]
-0532  8B 75 08    mov si,word ptr [di+8h]
-0535  8B 7D 0A    mov di,word ptr [di+0ah]
-0538  E8 11 00    call 54ch
-053B  5F          pop di
-053C  89 05       mov word ptr [di],ax
-053E  89 5D 02    mov word ptr [di+2h],bx
-0541  89 55 04    mov word ptr [di+4h],dx
-0544  5F          pop di
-0545  5E          pop si
-0546  5A          pop dx
-0547  5B          pop bx
-0548  89 EC       mov sp,bp
-054A  5D          pop bp
-054B  C3          ret
-054C  80 F9 00    cmp cl,0h
-054F  75 03       jne 554h
-0551  E9 A4 00    jmp 5f8h
-0554  3C 00       cmp al,0h
-0556  75 03       jne 55bh
-0558  E9 A3 00    jmp 5feh
-055B  00 C8       add al,cl
-055D  72 07       jb 566h
-055F  04 80       add al,80h
-0561  72 0D       jb 570h
-0563  E9 92 00    jmp 5f8h
-0566  04 80       add al,80h
-0568  73 06       jnb 570h
-056A  B0 01       mov al,1h
-056C  B4 4C       mov ah,4ch
-056E  CD 21       int 21h
-0570  89 0E 7F 11 mov word ptr [117fh],cx
-0574  8B CA       mov cx,dx
-0576  31 F9       xor cx,di
-0578  F6 D5       not ch
-057A  80 E5 80    and ch,80h
-057D  88 2E 75 11 mov byte ptr [1175h],ch
-0581  80 CE 80    or dh,80h
-0584  81 CF 00 80 or di,8000h
-0588  89 36 81 11 mov word ptr [1181h],si
-058C  89 3E 83 11 mov word ptr [1183h],di
-0590  A3 79 11    mov word ptr [1179h],ax
-0593  89 1E 7B 11 mov word ptr [117bh],bx
-0597  89 16 7D 11 mov word ptr [117dh],dx
-059B  30 E4       xor ah,ah
-059D  31 DB       xor bx,bx
-059F  31 D2       xor dx,dx
-05A1  BF 7F 11    mov di,117fh
-05A4  B1 05       mov cl,5h
-05A6  47          inc di
-05A7  8A 2D       mov ch,byte ptr [di]
-05A9  80 FD 00    cmp ch,0h
-05AC  75 0C       jne 5bah
-05AE  88 DC       mov ah,bl
-05B0  88 FB       mov bl,bh
-05B2  88 D7       mov bh,dl
-05B4  88 F2       mov dl,dh
-05B6  30 F6       xor dh,dh
-05B8  EB 1C       jmp 5d6h
-05BA  BE 08 00    mov si,8h
-05BD  D0 DD       rcr ch,1h
-05BF  73 0C       jnb 5cdh
-05C1  02 26 7A 11 add ah,byte ptr [117ah]
-05C5  13 1E 7B 11 adc bx,word ptr [117bh]
-05C9  13 16 7D 11 adc dx,word ptr [117dh]
-05CD  D1 DA       rcr dx,1h
-05CF  D1 DB       rcr bx,1h
-05D1  D0 DC       rcr ah,1h
-05D3  4E          dec si
-05D4  75 E7       jne 5bdh
-05D6  FE C9       dec cl
-05D8  75 CC       jne 5a6h
-05DA  91          xchg ax,cx
-05DB  9F          lahf
-05DC  F6 C6 80    test dh,80h
-05DF  75 0E       jne 5efh
-05E1  9E          sahf
-05E2  D0 D5       rcl ch,1h
-05E4  D1 D3       rcl bx,1h
-05E6  D1 D2       rcl dx,1h
-05E8  80 F9 00    cmp cl,0h
-05EB  74 02       je 5efh
-05ED  FE C9       dec cl
-05EF  91          xchg ax,cx
-05F0  32 36 75 11 xor dh,byte ptr [1175h]
-05F4  3C 00       cmp al,0h
-05F6  75 06       jne 5feh
-05F8  31 C0       xor ax,ax
-05FA  31 DB       xor bx,bx
-05FC  31 D2       xor dx,dx
-05FE  C3          ret
-05FF  55          push bp
-0600  8B EC       mov bp,sp
-0602  53          push bx
-0603  52          push dx
-0604  56          push si
-0605  57          push di
-0606  FF 76 04    push word ptr [bp+4h]
-0609  8B 76 04    mov si,word ptr [bp+4h]
-060C  8B 04       mov ax,word ptr [si]
-060E  8B 4C 02    mov cx,word ptr [si+2h]
-0611  8B 54 04    mov dx,word ptr [si+4h]
-0614  89 CB       mov bx,cx
-0616  8B FE       mov di,si
-0618  8B 4D 06    mov cx,word ptr [di+6h]
-061B  8B 75 08    mov si,word ptr [di+8h]
-061E  8B 7D 0A    mov di,word ptr [di+0ah]
-0621  E8 11 00    call 635h
-0624  5F          pop di
-0625  89 05       mov word ptr [di],ax
-0627  89 5D 02    mov word ptr [di+2h],bx
-062A  89 55 04    mov word ptr [di+4h],dx
-062D  5F          pop di
-062E  5E          pop si
-062F  5A          pop dx
-0630  5B          pop bx
-0631  89 EC       mov sp,bp
-0633  5D          pop bp
-0634  C3          ret
-0635  3C 00       cmp al,0h
-0637  75 03       jne 63ch
-0639  E9 C2 FF    jmp 5feh
-063C  28 C8       sub al,cl
-063E  F5          cmc
-063F  72 07       jb 648h
-0641  04 80       add al,80h
-0643  72 0D       jb 652h
-0645  E9 B0 FF    jmp 5f8h
-0648  04 80       add al,80h
-064A  73 06       jnb 652h
-064C  B0 01       mov al,1h
-064E  B4 4C       mov ah,4ch
-0650  CD 21       int 21h
-0652  89 0E 7F 11 mov word ptr [117fh],cx
-0656  8B CA       mov cx,dx
-0658  31 F9       xor cx,di
-065A  F6 D5       not ch
-065C  80 E5 80    and ch,80h
-065F  88 2E 75 11 mov byte ptr [1175h],ch
-0663  80 CE 80    or dh,80h
-0666  81 CF 00 80 or di,8000h
-066A  89 36 81 11 mov word ptr [1181h],si
-066E  89 3E 83 11 mov word ptr [1183h],di
-0672  A2 79 11    mov byte ptr [1179h],al
-0675  BF 7E 11    mov di,117eh
-0678  B1 05       mov cl,5h
-067A  BE 08 00    mov si,8h
-067D  3B 16 83 11 cmp dx,word ptr [1183h]
-0681  75 0A       jne 68dh
-0683  3B 1E 81 11 cmp bx,word ptr [1181h]
-0687  75 04       jne 68dh
-0689  3A 26 80 11 cmp ah,byte ptr [1180h]
-068D  72 0C       jb 69bh
-068F  2A 26 80 11 sub ah,byte ptr [1180h]
-0693  1B 1E 81 11 sbb bx,word ptr [1181h]
-0697  1B 16 83 11 sbb dx,word ptr [1183h]
-069B  F5          cmc
-069C  D0 D5       rcl ch,1h
-069E  4E          dec si
-069F  75 0A       jne 6abh
-06A1  88 2D       mov byte ptr [di],ch
-06A3  FE C9       dec cl
-06A5  74 1B       je 6c2h
-06A7  4F          dec di
-06A8  BE 08 00    mov si,8h
-06AB  D0 E4       shl ah,1h
-06AD  D1 D3       rcl bx,1h
-06AF  D1 D2       rcl dx,1h
-06B1  73 CA       jnb 67dh
-06B3  2A 26 80 11 sub ah,byte ptr [1180h]
-06B7  1B 1E 81 11 sbb bx,word ptr [1181h]
-06BB  1B 16 83 11 sbb dx,word ptr [1183h]
-06BF  F8          clc
-06C0  EB D9       jmp 69bh
-06C2  D0 E4       shl ah,1h
-06C4  D1 D3       rcl bx,1h
-06C6  D1 D2       rcl dx,1h
-06C8  72 11       jb 6dbh
-06CA  3B 16 83 11 cmp dx,word ptr [1183h]
-06CE  75 0A       jne 6dah
-06D0  3B 1E 81 11 cmp bx,word ptr [1181h]
-06D4  75 04       jne 6dah
-06D6  3A 26 80 11 cmp ah,byte ptr [1180h]
-06DA  F5          cmc
-06DB  8B 0E 79 11 mov cx,word ptr [1179h]
-06DF  8B 1E 7B 11 mov bx,word ptr [117bh]
-06E3  8B 16 7D 11 mov dx,word ptr [117dh]
-06E7  9F          lahf
-06E8  F6 C6 80    test dh,80h
-06EB  75 09       jne 6f6h
-06ED  9E          sahf
-06EE  D0 D5       rcl ch,1h
-06F0  D1 D3       rcl bx,1h
-06F2  D1 D2       rcl dx,1h
-06F4  EB 0A       jmp 700h
-06F6  FE C1       inc cl
-06F8  75 06       jne 700h
-06FA  B0 01       mov al,1h
-06FC  B4 4C       mov ah,4ch
-06FE  CD 21       int 21h
-0700  E9 EC FE    jmp 5efh
-0703  55          push bp
-0704  8B EC       mov bp,sp
-0706  53          push bx
-0707  52          push dx
-0708  56          push si
-0709  57          push di
-070A  8B 76 04    mov si,word ptr [bp+4h]
-070D  8B 04       mov ax,word ptr [si]
-070F  8B 4C 02    mov cx,word ptr [si+2h]
-0712  8B 54 04    mov dx,word ptr [si+4h]
-0715  89 CB       mov bx,cx
-0717  8B FE       mov di,si
-0719  8B 4D 06    mov cx,word ptr [di+6h]
-071C  8B 75 08    mov si,word ptr [di+8h]
-071F  8B 7D 0A    mov di,word ptr [di+0ah]
-0722  52          push dx
-0723  31 FA       xor dx,di
-0725  5A          pop dx
-0726  79 06       jns 72eh
-0728  52          push dx
-0729  D1 D2       rcl dx,1h
-072B  5A          pop dx
-072C  EB 10       jmp 73eh
-072E  F6 C6 80    test dh,80h
-0731  74 08       je 73bh
-0733  E8 20 00    call 756h
-0736  74 06       je 73eh
-0738  F5          cmc
-0739  EB 03       jmp 73eh
-073B  E8 18 00    call 756h
-073E  B0 00       mov al,0h
-0740  B4 00       mov ah,0h
-0742  72 06       jb 74ah
-0744  74 08       je 74eh
-0746  B0 01       mov al,1h
-0748  EB 04       jmp 74eh
-074A  B0 FF       mov al,0ffh
-074C  B4 FF       mov ah,0ffh
-074E  5F          pop di
-074F  5E          pop si
-0750  5A          pop dx
-0751  5B          pop bx
-0752  89 EC       mov sp,bp
-0754  5D          pop bp
-0755  C3          ret
-0756  38 C8       cmp al,cl
-0758  75 0E       jne 768h
-075A  3C 00       cmp al,0h
-075C  74 0A       je 768h
-075E  39 FA       cmp dx,di
-0760  75 06       jne 768h
-0762  39 F3       cmp bx,si
-0764  75 02       jne 768h
-0766  38 EC       cmp ah,ch
-0768  C3          ret
-0769  55          push bp
-076A  8B EC       mov bp,sp
-076C  53          push bx
-076D  52          push dx
-076E  56          push si
-076F  57          push di
-0770  FF 76 04    push word ptr [bp+4h]
-0773  8B 76 04    mov si,word ptr [bp+4h]
-0776  8B 04       mov ax,word ptr [si]
-0778  8B 4C 02    mov cx,word ptr [si+2h]
-077B  8B 54 04    mov dx,word ptr [si+4h]
-077E  89 CB       mov bx,cx
-0780  3C A8       cmp al,0a8h
-0782  73 4C       jnb 7d0h
-0784  89 C1       mov cx,ax
-0786  89 DE       mov si,bx
-0788  89 D7       mov di,dx
-078A  30 E4       xor ah,ah
-078C  31 DB       xor bx,bx
-078E  31 D2       xor dx,dx
-0790  80 E9 80    sub cl,80h
-0793  76 4C       jbe 7e1h
-0795  80 F9 10    cmp cl,10h
-0798  72 0C       jb 7a6h
-079A  88 FC       mov ah,bh
-079C  89 D3       mov bx,dx
-079E  BA FF FF    mov dx,0ffffh
-07A1  80 E9 10    sub cl,10h
-07A4  EB EF       jmp 795h
-07A6  80 F9 08    cmp cl,8h
-07A9  72 0F       jb 7bah
-07AB  88 DC       mov ah,bl
-07AD  88 FB       mov bl,bh
-07AF  88 D7       mov bh,dl
-07B1  88 F2       mov dl,dh
-07B3  B6 FF       mov dh,0ffh
-07B5  80 E9 08    sub cl,8h
-07B8  EB EC       jmp 7a6h
-07BA  80 F9 00    cmp cl,0h
-07BD  74 0B       je 7cah
-07BF  F9          stc
-07C0  D1 DA       rcr dx,1h
-07C2  D1 DB       rcr bx,1h
-07C4  D0 DC       rcr ah,1h
-07C6  FE C9       dec cl
-07C8  75 F5       jne 7bfh
-07CA  21 FA       and dx,di
-07CC  21 F3       and bx,si
-07CE  20 EC       and ah,ch
-07D0  5F          pop di
-07D1  89 05       mov word ptr [di],ax
-07D3  89 5D 02    mov word ptr [di+2h],bx
-07D6  89 55 04    mov word ptr [di+4h],dx
-07D9  5F          pop di
-07DA  5E          pop si
-07DB  5A          pop dx
-07DC  5B          pop bx
-07DD  89 EC       mov sp,bp
-07DF  5D          pop bp
-07E0  C3          ret
-07E1  B0 00       mov al,0h
-07E3  EB EB       jmp 7d0h
-07E5  55          push bp
-07E6  8B EC       mov bp,sp
-07E8  53          push bx
-07E9  52          push dx
-07EA  56          push si
-07EB  57          push di
-07EC  8B 7E 04    mov di,word ptr [bp+4h]
-07EF  88 EA       mov dl,ch
-07F1  B5 00       mov ch,0h
-07F3  B6 00       mov dh,0h
-07F5  51          push cx
-07F6  BB CF 11    mov bx,11cfh
-07F9  E8 41 02    call 0a3dh
-07FC  59          pop cx
-07FD  89 D8       mov ax,bx
-07FF  BB CF 11    mov bx,11cfh
-0802  2B C3       sub ax,bx
-0804  A3 0F 12    mov word ptr [120fh],ax
-0807  89 0E 11 12 mov word ptr [1211h],cx
-080B  8B 06 11 12 mov ax,word ptr [1211h]
-080F  8B 16 0F 12 mov dx,word ptr [120fh]
-0813  2B C2       sub ax,dx
-0815  83 F8 00    cmp ax,0h
-0818  7D 02       jnl 81ch
-081A  31 C0       xor ax,ax
-081C  A3 13 12    mov word ptr [1213h],ax
-081F  8B 16 0F 12 mov dx,word ptr [120fh]
-0823  03 C2       add ax,dx
-0825  3D FF 00    cmp ax,0ffh
-0828  77 03       jnbe 82dh
-082A  E9 03 00    jmp 830h
-082D  B8 FF 00    mov ax,0ffh
-0830  A3 15 12    mov word ptr [1215h],ax
-0833  8B 56 06    mov dx,word ptr [bp+6h]
-0836  89 D7       mov di,dx
-0838  88 05       mov byte ptr [di],al
-083A  47          inc di
-083B  8B 0E 13 12 mov cx,word ptr [1213h]
-083F  E3 07       jcxz 848h
-0841  B0 20       mov al,20h
-0843  88 05       mov byte ptr [di],al
-0845  47          inc di
-0846  E2 F9       loop 841h
-0848  BE CF 11    mov si,11cfh
-084B  8B 0E 0F 12 mov cx,word ptr [120fh]
-084F  E3 08       jcxz 859h
-0851  8A 04       mov al,byte ptr [si]
-0853  88 05       mov byte ptr [di],al
-0855  46          inc si
-0856  47          inc di
-0857  E2 F8       loop 851h
-0859  8B 06 15 12 mov ax,word ptr [1215h]
-085D  5F          pop di
-085E  5E          pop si
-085F  5A          pop dx
-0860  5B          pop bx
-0861  89 EC       mov sp,bp
-0863  5D          pop bp
-0864  C3          ret
-0865  55          push bp
-0866  8B EC       mov bp,sp
-0868  53          push bx
-0869  52          push dx
-086A  56          push si
-086B  57          push di
-086C  8B 5E 04    mov bx,word ptr [bp+4h]
-086F  8B 7E 06    mov di,word ptr [bp+6h]
-0872  89 1E 17 12 mov word ptr [1217h],bx
-0876  E8 CF 02    call 0b48h
-0879  73 03       jnb 87eh
-087B  E9 0B 00    jmp 889h
-087E  89 D8       mov ax,bx
-0880  8B 16 17 12 mov dx,word ptr [1217h]
-0884  2B C2       sub ax,dx
-0886  E9 03 00    jmp 88ch
-0889  B8 FF FF    mov ax,0ffffh
-088C  5F          pop di
-088D  5E          pop si
-088E  5A          pop dx
-088F  5B          pop bx
-0890  89 EC       mov sp,bp
-0892  5D          pop bp
-0893  C3          ret
-0894  3C 00       cmp al,0h
-0896  74 03       je 89bh
-0898  E9 01 00    jmp 89ch
-089B  C3          ret
-089C  80 CE 80    or dh,80h
-089F  51          push cx
-08A0  52          push dx
-08A1  53          push bx
-08A2  50          push ax
-08A3  D1 EA       shr dx,1h
-08A5  D1 DB       rcr bx,1h
-08A7  D0 DC       rcr ah,1h
-08A9  D1 EA       shr dx,1h
-08AB  D1 DB       rcr bx,1h
-08AD  D0 DC       rcr ah,1h
-08AF  59          pop cx
-08B0  00 EC       add ah,ch
-08B2  59          pop cx
-08B3  13 D9       adc bx,cx
-08B5  59          pop cx
-08B6  13 D1       adc dx,cx
-08B8  59          pop cx
-08B9  72 03       jb 8beh
-08BB  E9 0F 00    jmp 8cdh
-08BE  D1 DA       rcr dx,1h
-08C0  D1 DB       rcr bx,1h
-08C2  D0 DC       rcr ah,1h
-08C4  FE C0       inc al
-08C6  74 03       je 8cbh
-08C8  E9 02 00    jmp 8cdh
-08CB  F9          stc
-08CC  C3          ret
-08CD  80 E6 7F    and dh,7fh
-08D0  04 03       add al,3h
-08D2  C3          ret
-08D3  52          push dx
-08D4  53          push bx
-08D5  50          push ax
-08D6  88 0E 91 11 mov byte ptr [1191h],cl
-08DA  80 F9 00    cmp cl,0h
-08DD  78 03       js 8e2h
-08DF  E9 02 00    jmp 8e4h
-08E2  F6 D9       neg cl
-08E4  88 CB       mov bl,cl
-08E6  80 E3 FC    and bl,0fch
-08E9  88 DF       mov bh,bl
-08EB  D0 EB       shr bl,1h
-08ED  00 FB       add bl,bh
-08EF  30 FF       xor bh,bh
-08F1  8D BF 93 11 lea di,[bx+1193h]
-08F5  8B 05       mov ax,word ptr [di]
-08F7  8B 5D 02    mov bx,word ptr [di+2h]
-08FA  8B 55 04    mov dx,word ptr [di+4h]
-08FD  80 E1 03    and cl,3h
-0900  75 03       jne 905h
-0902  E9 0A 00    jmp 90fh
-0905  E8 8C FF    call 894h
-0908  FE C9       dec cl
-090A  74 03       je 90fh
-090C  E9 F6 FF    jmp 905h
-090F  89 C1       mov cx,ax
-0911  89 DE       mov si,bx
-0913  89 D7       mov di,dx
-0915  58          pop ax
-0916  5B          pop bx
-0917  5A          pop dx
-0918  F6 06 91 11 80 test byte ptr [1191h],80h
-091D  74 03       je 922h
-091F  E9 03 00    jmp 925h
-0922  E9 27 FC    jmp 54ch
-0925  E9 0D FD    jmp 635h
-0928  80 F9 DA    cmp cl,0dah
-092B  7D 03       jnl 930h
-092D  E9 12 00    jmp 942h
-0930  80 F9 26    cmp cl,26h
-0933  7E 03       jle 938h
-0935  E9 0A 00    jmp 942h
-0938  51          push cx
-0939  56          push si
-093A  57          push di
-093B  E8 95 FF    call 8d3h
-093E  5F          pop di
-093F  5E          pop si
-0940  59          pop cx
-0941  C3          ret
-0942  F9          stc
-0943  C3          ret
-0944  8B 05       mov ax,word ptr [di]
-0946  8B 5D 02    mov bx,word ptr [di+2h]
-0949  8B 55 04    mov dx,word ptr [di+4h]
-094C  3C 00       cmp al,0h
-094E  74 03       je 953h
-0950  E9 16 00    jmp 969h
-0953  BE 85 11    mov si,1185h
-0956  C7 04 30 30 mov word ptr [si],3030h
-095A  46          inc si
-095B  46          inc si
-095C  81 FE 91 11 cmp si,1191h
-0960  74 03       je 965h
-0962  E9 F1 FF    jmp 956h
-0965  B9 00 00    mov cx,0h
-0968  C3          ret
-0969  88 F5       mov ch,dh
-096B  80 E6 7F    and dh,7fh
-096E  50          push ax
-096F  52          push dx
-0970  2C 80       sub al,80h
-0972  98          cbw
-0973  BA 4D 00    mov dx,4dh
-0976  F7 EA       imul dx
-0978  05 05 00    add ax,5h
-097B  88 E1       mov cl,ah
-097D  5A          pop dx
-097E  58          pop ax
-097F  80 F9 D9    cmp cl,0d9h
-0982  74 03       je 987h
-0984  E9 02 00    jmp 989h
-0987  FE C1       inc cl
-0989  51          push cx
-098A  F6 D9       neg cl
-098C  E8 44 FF    call 8d3h
-098F  59          pop cx
-0990  3C 81       cmp al,81h
-0992  72 03       jb 997h
-0994  E9 05 00    jmp 99ch
-0997  E8 FA FE    call 894h
-099A  FE C9       dec cl
-099C  51          push cx
-099D  80 CE 80    or dh,80h
-09A0  B1 84       mov cl,84h
-09A2  28 C1       sub cl,al
-09A4  B0 00       mov al,0h
-09A6  80 F9 00    cmp cl,0h
-09A9  75 03       jne 9aeh
-09AB  E9 0D 00    jmp 9bbh
-09AE  D1 EA       shr dx,1h
-09B0  D1 DB       rcr bx,1h
-09B2  D0 DC       rcr ah,1h
-09B4  FE C9       dec cl
-09B6  74 03       je 9bbh
-09B8  E9 F3 FF    jmp 9aeh
-09BB  BE 85 11    mov si,1185h
-09BE  88 F5       mov ch,dh
-09C0  B1 04       mov cl,4h
-09C2  D2 ED       shr ch,cl
-09C4  80 C5 30    add ch,30h
-09C7  88 2C       mov byte ptr [si],ch
-09C9  80 E6 0F    and dh,0fh
-09CC  52          push dx
-09CD  53          push bx
-09CE  50          push ax
-09CF  D1 E0       shl ax,1h
-09D1  D1 D3       rcl bx,1h
-09D3  D1 D2       rcl dx,1h
-09D5  D1 E0       shl ax,1h
-09D7  D1 D3       rcl bx,1h
-09D9  D1 D2       rcl dx,1h
-09DB  59          pop cx
-09DC  03 C1       add ax,cx
-09DE  59          pop cx
-09DF  13 D9       adc bx,cx
-09E1  59          pop cx
-09E2  13 D1       adc dx,cx
-09E4  D1 E0       shl ax,1h
-09E6  D1 D3       rcl bx,1h
-09E8  D1 D2       rcl dx,1h
-09EA  46          inc si
-09EB  81 FE 91 11 cmp si,1191h
-09EF  74 03       je 9f4h
-09F1  E9 CA FF    jmp 9beh
-09F4  59          pop cx
-09F5  C3          ret
-09F6  30 E4       xor ah,ah
-09F8  BB 85 11    mov bx,1185h
-09FB  03 D8       add bx,ax
-09FD  80 3F 35    cmp byte ptr [bx],35h
-0A00  C6 07 00    mov byte ptr [bx],0h
-0A03  73 03       jnb 0a08h
-0A05  E9 21 00    jmp 0a29h
-0A08  FE C8       dec al
-0A0A  79 03       jns 0a0fh
-0A0C  E9 11 00    jmp 0a20h
-0A0F  4B          dec bx
-0A10  FE 07       inc byte ptr [bx]
-0A12  80 3F 3A    cmp byte ptr [bx],3ah
-0A15  73 03       jnb 0a1ah
-0A17  E9 0F 00    jmp 0a29h
-0A1A  C6 07 00    mov byte ptr [bx],0h
-0A1D  E9 E8 FF    jmp 0a08h
-0A20  C6 07 31    mov byte ptr [bx],31h
-0A23  C6 47 01 00 mov byte ptr [bx+1h],0h
-0A27  FE C1       inc cl
-0A29  C3          ret
-0A2A  8A 04       mov al,byte ptr [si]
-0A2C  3C 00       cmp al,0h
-0A2E  75 03       jne 0a33h
-0A30  E9 04 00    jmp 0a37h
-0A33  46          inc si
-0A34  E9 02 00    jmp 0a39h
-0A37  B0 30       mov al,30h
-0A39  88 07       mov byte ptr [bx],al
-0A3B  43          inc bx
-0A3C  C3          ret
+0358  51          push cx
+0359  52          push dx
+035A  56          push si
+035B  57          push di
+035C  8B 56 06    mov dx,word ptr [bp+6h]
+035F  89 D7       mov di,dx
+0361  31 C0       xor ax,ax
+0363  88 05       mov byte ptr [di],al
+0365  47          inc di
+0366  52          push dx
+0367  8B 5E 04    mov bx,word ptr [bp+4h]
+036A  8A 07       mov al,byte ptr [bx]
+036C  30 E4       xor ah,ah
+036E  89 C1       mov cx,ax
+0370  89 DE       mov si,bx
+0372  46          inc si
+0373  8B 46 08    mov ax,word ptr [bp+8h]
+0376  3D 01 00    cmp ax,1h
+0379  7D 03       jnl 37eh
+037B  B8 01 00    mov ax,1h
+037E  39 C8       cmp ax,cx
+0380  76 02       jbe 384h
+0382  EB 2C       jmp 3b0h
+0384  89 C2       mov dx,ax
+0386  89 C8       mov ax,cx
+0388  2B C2       sub ax,dx
+038A  05 01 00    add ax,1h
+038D  8B 76 0A    mov si,word ptr [bp+0ah]
+0390  39 F0       cmp ax,si
+0392  76 02       jbe 396h
+0394  89 F0       mov ax,si
+0396  89 C1       mov cx,ax
+0398  51          push cx
+0399  8B 5E 04    mov bx,word ptr [bp+4h]
+039C  43          inc bx
+039D  01 D3       add bx,dx
+039F  4B          dec bx
+03A0  E3 08       jcxz 3aah
+03A2  8A 07       mov al,byte ptr [bx]
+03A4  88 05       mov byte ptr [di],al
+03A6  43          inc bx
+03A7  47          inc di
+03A8  E2 F8       loop 3a2h
+03AA  59          pop cx
+03AB  5B          pop bx
+03AC  88 0F       mov byte ptr [bx],cl
+03AE  EB 05       jmp 3b5h
+03B0  5B          pop bx
+03B1  31 C0       xor ax,ax
+03B3  88 07       mov byte ptr [bx],al
+03B5  5F          pop di
+03B6  5E          pop si
+03B7  5A          pop dx
+03B8  59          pop cx
+03B9  5B          pop bx
+03BA  89 EC       mov sp,bp
+03BC  5D          pop bp
+03BD  C3          ret
+03BE  55          push bp
+03BF  8B EC       mov bp,sp
+03C1  53          push bx
+03C2  52          push dx
+03C3  56          push si
+03C4  57          push di
+03C5  8B 76 06    mov si,word ptr [bp+6h]
+03C8  8B 04       mov ax,word ptr [si]
+03CA  E8 13 00    call 3e0h
+03CD  8B 7E 04    mov di,word ptr [bp+4h]
+03D0  89 05       mov word ptr [di],ax
+03D2  89 5D 02    mov word ptr [di+2h],bx
+03D5  89 55 04    mov word ptr [di+4h],dx
+03D8  5F          pop di
+03D9  5E          pop si
+03DA  5A          pop dx
+03DB  5B          pop bx
+03DC  89 EC       mov sp,bp
+03DE  5D          pop bp
+03DF  C3          ret
+03E0  83 F8 00    cmp ax,0h
+03E3  75 06       jne 3ebh
+03E5  31 DB       xor bx,bx
+03E7  31 D2       xor dx,dx
+03E9  EB 2C       jmp 417h
+03EB  88 E7       mov bh,ah
+03ED  89 C2       mov dx,ax
+03EF  83 FA 00    cmp dx,0h
+03F2  79 02       jns 3f6h
+03F4  F7 DA       neg dx
+03F6  B8 90 00    mov ax,90h
+03F9  80 FE 00    cmp dh,0h
+03FC  75 04       jne 402h
+03FE  B0 88       mov al,88h
+0400  86 D6       xchg dh,dl
+0402  83 FA 00    cmp dx,0h
+0405  78 06       js 40dh
+0407  FE C8       dec al
+0409  D1 E2       shl dx,1h
+040B  79 FA       jns 407h
+040D  80 FF 00    cmp bh,0h
+0410  78 03       js 415h
+0412  80 E6 7F    and dh,7fh
+0415  31 DB       xor bx,bx
+0417  C3          ret
+0418  55          push bp
+0419  8B EC       mov bp,sp
+041B  53          push bx
+041C  52          push dx
+041D  56          push si
+041E  57          push di
+041F  FF 76 04    push word ptr [bp+4h]
+0422  8B 76 04    mov si,word ptr [bp+4h]
+0425  8B 04       mov ax,word ptr [si]
+0427  8B 4C 02    mov cx,word ptr [si+2h]
+042A  8B 54 04    mov dx,word ptr [si+4h]
+042D  89 CB       mov bx,cx
+042F  8B FE       mov di,si
+0431  8B 4D 06    mov cx,word ptr [di+6h]
+0434  8B 75 08    mov si,word ptr [di+8h]
+0437  8B 7D 0A    mov di,word ptr [di+0ah]
+043A  C7 06 AB 13 00 00 mov word ptr [13abh],0h
+0440  E8 4D 00    call 490h
+0443  5F          pop di
+0444  89 05       mov word ptr [di],ax
+0446  89 5D 02    mov word ptr [di+2h],bx
+0449  89 55 04    mov word ptr [di+4h],dx
+044C  5F          pop di
+044D  5E          pop si
+044E  5A          pop dx
+044F  5B          pop bx
+0450  89 EC       mov sp,bp
+0452  5D          pop bp
+0453  C3          ret
+0454  55          push bp
+0455  8B EC       mov bp,sp
+0457  53          push bx
+0458  52          push dx
+0459  56          push si
+045A  57          push di
+045B  FF 76 04    push word ptr [bp+4h]
+045E  8B 76 04    mov si,word ptr [bp+4h]
+0461  8B 04       mov ax,word ptr [si]
+0463  8B 4C 02    mov cx,word ptr [si+2h]
+0466  8B 54 04    mov dx,word ptr [si+4h]
+0469  89 CB       mov bx,cx
+046B  8B FE       mov di,si
+046D  8B 4D 06    mov cx,word ptr [di+6h]
+0470  8B 75 08    mov si,word ptr [di+8h]
+0473  8B 7D 0A    mov di,word ptr [di+0ah]
+0476  C7 06 AB 13 00 80 mov word ptr [13abh],8000h
+047C  E8 11 00    call 490h
+047F  5F          pop di
+0480  89 05       mov word ptr [di],ax
+0482  89 5D 02    mov word ptr [di+2h],bx
+0485  89 55 04    mov word ptr [di+4h],dx
+0488  5F          pop di
+0489  5E          pop si
+048A  5A          pop dx
+048B  5B          pop bx
+048C  89 EC       mov sp,bp
+048E  5D          pop bp
+048F  C3          ret
+0490  80 F9 00    cmp cl,0h
+0493  74 0E       je 4a3h
+0495  33 3E AB 13 xor di,word ptr [13abh]
+0499  3C 00       cmp al,0h
+049B  75 07       jne 4a4h
+049D  89 C8       mov ax,cx
+049F  89 F3       mov bx,si
+04A1  89 FA       mov dx,di
+04A3  C3          ret
+04A4  38 C8       cmp al,cl
+04A6  76 05       jbe 4adh
+04A8  91          xchg ax,cx
+04A9  87 F3       xchg bx,si
+04AB  87 FA       xchg dx,di
+04AD  88 0E AF 13 mov byte ptr [13afh],cl
+04B1  28 C1       sub cl,al
+04B3  80 F9 28    cmp cl,28h
+04B6  72 06       jb 4beh
+04B8  8A 0E AF 13 mov cl,byte ptr [13afh]
+04BC  EB DF       jmp 49dh
+04BE  89 3E AB 13 mov word ptr [13abh],di
+04C2  80 26 AC 13 80 and byte ptr [13ach],80h
+04C7  89 3E AD 13 mov word ptr [13adh],di
+04CB  30 36 AE 13 xor byte ptr [13aeh],dh
+04CF  81 CF 00 80 or di,8000h
+04D3  80 CE 80    or dh,80h
+04D6  80 F9 10    cmp cl,10h
+04D9  72 0B       jb 4e6h
+04DB  88 FC       mov ah,bh
+04DD  89 D3       mov bx,dx
+04DF  31 D2       xor dx,dx
+04E1  80 E9 10    sub cl,10h
+04E4  EB F0       jmp 4d6h
+04E6  80 F9 08    cmp cl,8h
+04E9  72 0D       jb 4f8h
+04EB  88 DC       mov ah,bl
+04ED  88 FB       mov bl,bh
+04EF  88 D7       mov bh,dl
+04F1  88 F2       mov dl,dh
+04F3  30 F6       xor dh,dh
+04F5  80 E9 08    sub cl,8h
+04F8  80 F9 00    cmp cl,0h
+04FB  74 0A       je 507h
+04FD  D1 EA       shr dx,1h
+04FF  D1 DB       rcr bx,1h
+0501  D0 DC       rcr ah,1h
+0503  FE C9       dec cl
+0505  75 F6       jne 4fdh
+0507  A0 AF 13    mov al,byte ptr [13afh]
+050A  F6 06 AE 13 80 test byte ptr [13aeh],80h
+050F  75 14       jne 525h
+0511  00 EC       add ah,ch
+0513  11 F3       adc bx,si
+0515  11 FA       adc dx,di
+0517  73 5F       jnb 578h
+0519  D1 DA       rcr dx,1h
+051B  D1 DB       rcr bx,1h
+051D  D0 DC       rcr ah,1h
+051F  FE C0       inc al
+0521  75 55       jne 578h
+0523  F9          stc
+0524  C3          ret
+0525  86 EC       xchg ah,ch
+0527  87 F3       xchg bx,si
+0529  87 FA       xchg dx,di
+052B  28 EC       sub ah,ch
+052D  19 F3       sbb bx,si
+052F  19 FA       sbb dx,di
+0531  73 14       jnb 547h
+0533  80 36 AC 13 80 xor byte ptr [13ach],80h
+0538  F6 D4       not ah
+053A  F7 D3       not bx
+053C  F7 D2       not dx
+053E  80 C4 01    add ah,1h
+0541  83 D3 00    adc bx,0h
+0544  83 D2 00    adc dx,0h
+0547  B1 05       mov cl,5h
+0549  80 FE 00    cmp dh,0h
+054C  75 14       jne 562h
+054E  88 D6       mov dh,dl
+0550  88 FA       mov dl,bh
+0552  88 DF       mov bh,bl
+0554  88 E3       mov bl,ah
+0556  30 E4       xor ah,ah
+0558  2C 08       sub al,8h
+055A  72 15       jb 571h
+055C  FE C9       dec cl
+055E  75 E9       jne 549h
+0560  EB 0F       jmp 571h
+0562  F6 C6 80    test dh,80h
+0565  75 11       jne 578h
+0567  D0 E4       shl ah,1h
+0569  D1 D3       rcl bx,1h
+056B  D1 D2       rcl dx,1h
+056D  FE C8       dec al
+056F  75 F1       jne 562h
+0571  31 C0       xor ax,ax
+0573  31 DB       xor bx,bx
+0575  31 D2       xor dx,dx
+0577  C3          ret
+0578  80 E6 7F    and dh,7fh
+057B  32 36 AC 13 xor dh,byte ptr [13ach]
+057F  C3          ret
+0580  55          push bp
+0581  8B EC       mov bp,sp
+0583  53          push bx
+0584  52          push dx
+0585  56          push si
+0586  57          push di
+0587  FF 76 04    push word ptr [bp+4h]
+058A  8B 76 04    mov si,word ptr [bp+4h]
+058D  8B 04       mov ax,word ptr [si]
+058F  8B 4C 02    mov cx,word ptr [si+2h]
+0592  8B 54 04    mov dx,word ptr [si+4h]
+0595  89 CB       mov bx,cx
+0597  8B FE       mov di,si
+0599  8B 4D 06    mov cx,word ptr [di+6h]
+059C  8B 75 08    mov si,word ptr [di+8h]
+059F  8B 7D 0A    mov di,word ptr [di+0ah]
+05A2  E8 11 00    call 5b6h
+05A5  5F          pop di
+05A6  89 05       mov word ptr [di],ax
+05A8  89 5D 02    mov word ptr [di+2h],bx
+05AB  89 55 04    mov word ptr [di+4h],dx
+05AE  5F          pop di
+05AF  5E          pop si
+05B0  5A          pop dx
+05B1  5B          pop bx
+05B2  89 EC       mov sp,bp
+05B4  5D          pop bp
+05B5  C3          ret
+05B6  80 F9 00    cmp cl,0h
+05B9  75 03       jne 5beh
+05BB  E9 A4 00    jmp 662h
+05BE  3C 00       cmp al,0h
+05C0  75 03       jne 5c5h
+05C2  E9 A3 00    jmp 668h
+05C5  00 C8       add al,cl
+05C7  72 07       jb 5d0h
+05C9  04 80       add al,80h
+05CB  72 0D       jb 5dah
+05CD  E9 92 00    jmp 662h
+05D0  04 80       add al,80h
+05D2  73 06       jnb 5dah
+05D4  B0 01       mov al,1h
+05D6  B4 4C       mov ah,4ch
+05D8  CD 21       int 21h
+05DA  89 0E B6 13 mov word ptr [13b6h],cx
+05DE  8B CA       mov cx,dx
+05E0  31 F9       xor cx,di
+05E2  F6 D5       not ch
+05E4  80 E5 80    and ch,80h
+05E7  88 2E AC 13 mov byte ptr [13ach],ch
+05EB  80 CE 80    or dh,80h
+05EE  81 CF 00 80 or di,8000h
+05F2  89 36 B8 13 mov word ptr [13b8h],si
+05F6  89 3E BA 13 mov word ptr [13bah],di
+05FA  A3 B0 13    mov word ptr [13b0h],ax
+05FD  89 1E B2 13 mov word ptr [13b2h],bx
+0601  89 16 B4 13 mov word ptr [13b4h],dx
+0605  30 E4       xor ah,ah
+0607  31 DB       xor bx,bx
+0609  31 D2       xor dx,dx
+060B  BF B6 13    mov di,13b6h
+060E  B1 05       mov cl,5h
+0610  47          inc di
+0611  8A 2D       mov ch,byte ptr [di]
+0613  80 FD 00    cmp ch,0h
+0616  75 0C       jne 624h
+0618  88 DC       mov ah,bl
+061A  88 FB       mov bl,bh
+061C  88 D7       mov bh,dl
+061E  88 F2       mov dl,dh
+0620  30 F6       xor dh,dh
+0622  EB 1C       jmp 640h
+0624  BE 08 00    mov si,8h
+0627  D0 DD       rcr ch,1h
+0629  73 0C       jnb 637h
+062B  02 26 B1 13 add ah,byte ptr [13b1h]
+062F  13 1E B2 13 adc bx,word ptr [13b2h]
+0633  13 16 B4 13 adc dx,word ptr [13b4h]
+0637  D1 DA       rcr dx,1h
+0639  D1 DB       rcr bx,1h
+063B  D0 DC       rcr ah,1h
+063D  4E          dec si
+063E  75 E7       jne 627h
+0640  FE C9       dec cl
+0642  75 CC       jne 610h
+0644  91          xchg ax,cx
+0645  9F          lahf
+0646  F6 C6 80    test dh,80h
+0649  75 0E       jne 659h
+064B  9E          sahf
+064C  D0 D5       rcl ch,1h
+064E  D1 D3       rcl bx,1h
+0650  D1 D2       rcl dx,1h
+0652  80 F9 00    cmp cl,0h
+0655  74 02       je 659h
+0657  FE C9       dec cl
+0659  91          xchg ax,cx
+065A  32 36 AC 13 xor dh,byte ptr [13ach]
+065E  3C 00       cmp al,0h
+0660  75 06       jne 668h
+0662  31 C0       xor ax,ax
+0664  31 DB       xor bx,bx
+0666  31 D2       xor dx,dx
+0668  C3          ret
+0669  55          push bp
+066A  8B EC       mov bp,sp
+066C  53          push bx
+066D  52          push dx
+066E  56          push si
+066F  57          push di
+0670  FF 76 04    push word ptr [bp+4h]
+0673  8B 76 04    mov si,word ptr [bp+4h]
+0676  8B 04       mov ax,word ptr [si]
+0678  8B 4C 02    mov cx,word ptr [si+2h]
+067B  8B 54 04    mov dx,word ptr [si+4h]
+067E  89 CB       mov bx,cx
+0680  8B FE       mov di,si
+0682  8B 4D 06    mov cx,word ptr [di+6h]
+0685  8B 75 08    mov si,word ptr [di+8h]
+0688  8B 7D 0A    mov di,word ptr [di+0ah]
+068B  E8 11 00    call 69fh
+068E  5F          pop di
+068F  89 05       mov word ptr [di],ax
+0691  89 5D 02    mov word ptr [di+2h],bx
+0694  89 55 04    mov word ptr [di+4h],dx
+0697  5F          pop di
+0698  5E          pop si
+0699  5A          pop dx
+069A  5B          pop bx
+069B  89 EC       mov sp,bp
+069D  5D          pop bp
+069E  C3          ret
+069F  3C 00       cmp al,0h
+06A1  75 03       jne 6a6h
+06A3  E9 C2 FF    jmp 668h
+06A6  28 C8       sub al,cl
+06A8  F5          cmc
+06A9  72 07       jb 6b2h
+06AB  04 80       add al,80h
+06AD  72 0D       jb 6bch
+06AF  E9 B0 FF    jmp 662h
+06B2  04 80       add al,80h
+06B4  73 06       jnb 6bch
+06B6  B0 01       mov al,1h
+06B8  B4 4C       mov ah,4ch
+06BA  CD 21       int 21h
+06BC  89 0E B6 13 mov word ptr [13b6h],cx
+06C0  8B CA       mov cx,dx
+06C2  31 F9       xor cx,di
+06C4  F6 D5       not ch
+06C6  80 E5 80    and ch,80h
+06C9  88 2E AC 13 mov byte ptr [13ach],ch
+06CD  80 CE 80    or dh,80h
+06D0  81 CF 00 80 or di,8000h
+06D4  89 36 B8 13 mov word ptr [13b8h],si
+06D8  89 3E BA 13 mov word ptr [13bah],di
+06DC  A2 B0 13    mov byte ptr [13b0h],al
+06DF  BF B5 13    mov di,13b5h
+06E2  B1 05       mov cl,5h
+06E4  BE 08 00    mov si,8h
+06E7  3B 16 BA 13 cmp dx,word ptr [13bah]
+06EB  75 0A       jne 6f7h
+06ED  3B 1E B8 13 cmp bx,word ptr [13b8h]
+06F1  75 04       jne 6f7h
+06F3  3A 26 B7 13 cmp ah,byte ptr [13b7h]
+06F7  72 0C       jb 705h
+06F9  2A 26 B7 13 sub ah,byte ptr [13b7h]
+06FD  1B 1E B8 13 sbb bx,word ptr [13b8h]
+0701  1B 16 BA 13 sbb dx,word ptr [13bah]
+0705  F5          cmc
+0706  D0 D5       rcl ch,1h
+0708  4E          dec si
+0709  75 0A       jne 715h
+070B  88 2D       mov byte ptr [di],ch
+070D  FE C9       dec cl
+070F  74 1B       je 72ch
+0711  4F          dec di
+0712  BE 08 00    mov si,8h
+0715  D0 E4       shl ah,1h
+0717  D1 D3       rcl bx,1h
+0719  D1 D2       rcl dx,1h
+071B  73 CA       jnb 6e7h
+071D  2A 26 B7 13 sub ah,byte ptr [13b7h]
+0721  1B 1E B8 13 sbb bx,word ptr [13b8h]
+0725  1B 16 BA 13 sbb dx,word ptr [13bah]
+0729  F8          clc
+072A  EB D9       jmp 705h
+072C  D0 E4       shl ah,1h
+072E  D1 D3       rcl bx,1h
+0730  D1 D2       rcl dx,1h
+0732  72 11       jb 745h
+0734  3B 16 BA 13 cmp dx,word ptr [13bah]
+0738  75 0A       jne 744h
+073A  3B 1E B8 13 cmp bx,word ptr [13b8h]
+073E  75 04       jne 744h
+0740  3A 26 B7 13 cmp ah,byte ptr [13b7h]
+0744  F5          cmc
+0745  8B 0E B0 13 mov cx,word ptr [13b0h]
+0749  8B 1E B2 13 mov bx,word ptr [13b2h]
+074D  8B 16 B4 13 mov dx,word ptr [13b4h]
+0751  9F          lahf
+0752  F6 C6 80    test dh,80h
+0755  75 09       jne 760h
+0757  9E          sahf
+0758  D0 D5       rcl ch,1h
+075A  D1 D3       rcl bx,1h
+075C  D1 D2       rcl dx,1h
+075E  EB 0A       jmp 76ah
+0760  FE C1       inc cl
+0762  75 06       jne 76ah
+0764  B0 01       mov al,1h
+0766  B4 4C       mov ah,4ch
+0768  CD 21       int 21h
+076A  E9 EC FE    jmp 659h
+076D  55          push bp
+076E  8B EC       mov bp,sp
+0770  53          push bx
+0771  52          push dx
+0772  56          push si
+0773  57          push di
+0774  8B 76 04    mov si,word ptr [bp+4h]
+0777  8B 04       mov ax,word ptr [si]
+0779  8B 4C 02    mov cx,word ptr [si+2h]
+077C  8B 54 04    mov dx,word ptr [si+4h]
+077F  89 CB       mov bx,cx
+0781  8B FE       mov di,si
+0783  8B 4D 06    mov cx,word ptr [di+6h]
+0786  8B 75 08    mov si,word ptr [di+8h]
+0789  8B 7D 0A    mov di,word ptr [di+0ah]
+078C  52          push dx
+078D  31 FA       xor dx,di
+078F  5A          pop dx
+0790  79 06       jns 798h
+0792  52          push dx
+0793  D1 D2       rcl dx,1h
+0795  5A          pop dx
+0796  EB 10       jmp 7a8h
+0798  F6 C6 80    test dh,80h
+079B  74 08       je 7a5h
+079D  E8 20 00    call 7c0h
+07A0  74 06       je 7a8h
+07A2  F5          cmc
+07A3  EB 03       jmp 7a8h
+07A5  E8 18 00    call 7c0h
+07A8  B0 00       mov al,0h
+07AA  B4 00       mov ah,0h
+07AC  72 06       jb 7b4h
+07AE  74 08       je 7b8h
+07B0  B0 01       mov al,1h
+07B2  EB 04       jmp 7b8h
+07B4  B0 FF       mov al,0ffh
+07B6  B4 FF       mov ah,0ffh
+07B8  5F          pop di
+07B9  5E          pop si
+07BA  5A          pop dx
+07BB  5B          pop bx
+07BC  89 EC       mov sp,bp
+07BE  5D          pop bp
+07BF  C3          ret
+07C0  38 C8       cmp al,cl
+07C2  75 0E       jne 7d2h
+07C4  3C 00       cmp al,0h
+07C6  74 0A       je 7d2h
+07C8  39 FA       cmp dx,di
+07CA  75 06       jne 7d2h
+07CC  39 F3       cmp bx,si
+07CE  75 02       jne 7d2h
+07D0  38 EC       cmp ah,ch
+07D2  C3          ret
+07D3  55          push bp
+07D4  8B EC       mov bp,sp
+07D6  53          push bx
+07D7  52          push dx
+07D8  56          push si
+07D9  57          push di
+07DA  FF 76 04    push word ptr [bp+4h]
+07DD  8B 76 04    mov si,word ptr [bp+4h]
+07E0  8B 04       mov ax,word ptr [si]
+07E2  8B 4C 02    mov cx,word ptr [si+2h]
+07E5  8B 54 04    mov dx,word ptr [si+4h]
+07E8  89 CB       mov bx,cx
+07EA  3C A8       cmp al,0a8h
+07EC  73 4C       jnb 83ah
+07EE  89 C1       mov cx,ax
+07F0  89 DE       mov si,bx
+07F2  89 D7       mov di,dx
+07F4  30 E4       xor ah,ah
+07F6  31 DB       xor bx,bx
+07F8  31 D2       xor dx,dx
+07FA  80 E9 80    sub cl,80h
+07FD  76 4C       jbe 84bh
+07FF  80 F9 10    cmp cl,10h
+0802  72 0C       jb 810h
+0804  88 FC       mov ah,bh
+0806  89 D3       mov bx,dx
+0808  BA FF FF    mov dx,0ffffh
+080B  80 E9 10    sub cl,10h
+080E  EB EF       jmp 7ffh
+0810  80 F9 08    cmp cl,8h
+0813  72 0F       jb 824h
+0815  88 DC       mov ah,bl
+0817  88 FB       mov bl,bh
+0819  88 D7       mov bh,dl
+081B  88 F2       mov dl,dh
+081D  B6 FF       mov dh,0ffh
+081F  80 E9 08    sub cl,8h
+0822  EB EC       jmp 810h
+0824  80 F9 00    cmp cl,0h
+0827  74 0B       je 834h
+0829  F9          stc
+082A  D1 DA       rcr dx,1h
+082C  D1 DB       rcr bx,1h
+082E  D0 DC       rcr ah,1h
+0830  FE C9       dec cl
+0832  75 F5       jne 829h
+0834  21 FA       and dx,di
+0836  21 F3       and bx,si
+0838  20 EC       and ah,ch
+083A  5F          pop di
+083B  89 05       mov word ptr [di],ax
+083D  89 5D 02    mov word ptr [di+2h],bx
+0840  89 55 04    mov word ptr [di+4h],dx
+0843  5F          pop di
+0844  5E          pop si
+0845  5A          pop dx
+0846  5B          pop bx
+0847  89 EC       mov sp,bp
+0849  5D          pop bp
+084A  C3          ret
+084B  B0 00       mov al,0h
+084D  EB EB       jmp 83ah
+084F  C7 06 AB 13 00 00 mov word ptr [13abh],0h
+0855  E8 38 FC    call 490h
+0858  C3          ret
+0859  E8 43 FE    call 69fh
+085C  C3          ret
+085D  55          push bp
+085E  8B EC       mov bp,sp
+0860  53          push bx
+0861  52          push dx
+0862  56          push si
+0863  57          push di
+0864  FF 76 04    push word ptr [bp+4h]
+0867  8B 7E 04    mov di,word ptr [bp+4h]
+086A  8B 05       mov ax,word ptr [di]
+086C  8B 4D 02    mov cx,word ptr [di+2h]
+086F  89 CB       mov bx,cx
+0871  8B 55 04    mov dx,word ptr [di+4h]
+0874  80 E6 7F    and dh,7fh
+0877  89 05       mov word ptr [di],ax
+0879  89 5D 02    mov word ptr [di+2h],bx
+087C  89 55 04    mov word ptr [di+4h],dx
+087F  5F          pop di
+0880  5E          pop si
+0881  5A          pop dx
+0882  5B          pop bx
+0883  89 EC       mov sp,bp
+0885  5D          pop bp
+0886  C3          ret
+0887  55          push bp
+0888  8B EC       mov bp,sp
+088A  53          push bx
+088B  52          push dx
+088C  56          push si
+088D  57          push di
+088E  FF 76 04    push word ptr [bp+4h]
+0891  8B 76 04    mov si,word ptr [bp+4h]
+0894  8B 04       mov ax,word ptr [si]
+0896  8B 4C 02    mov cx,word ptr [si+2h]
+0899  89 CB       mov bx,cx
+089B  8B 54 04    mov dx,word ptr [si+4h]
+089E  3C 00       cmp al,0h
+08A0  75 03       jne 8a5h
+08A2  E9 05 01    jmp 9aah
+08A5  F6 C6 80    test dh,80h
+08A8  74 03       je 8adh
+08AA  E9 06 01    jmp 9b3h
+08AD  A3 59 15    mov word ptr [1559h],ax
+08B0  89 1E 5B 15 mov word ptr [155bh],bx
+08B4  89 16 5D 15 mov word ptr [155dh],dx
+08B8  88 C1       mov cl,al
+08BA  80 C1 80    add cl,80h
+08BD  D0 F9       sar cl,1h
+08BF  80 C1 80    add cl,80h
+08C2  88 C8       mov al,cl
+08C4  A3 5F 15    mov word ptr [155fh],ax
+08C7  89 1E 61 15 mov word ptr [1561h],bx
+08CB  89 16 63 15 mov word ptr [1563h],dx
+08CF  C6 06 6B 15 0C mov byte ptr [156bh],0ch
+08D4  8B 7E 04    mov di,word ptr [bp+4h]
+08D7  8B 06 59 15 mov ax,word ptr [1559h]
+08DB  89 05       mov word ptr [di],ax
+08DD  8B 1E 5B 15 mov bx,word ptr [155bh]
+08E1  89 5D 02    mov word ptr [di+2h],bx
+08E4  8B 16 5D 15 mov dx,word ptr [155dh]
+08E8  89 55 04    mov word ptr [di+4h],dx
+08EB  8B 7E 04    mov di,word ptr [bp+4h]
+08EE  81 C7 06 00 add di,6h
+08F2  8B 06 5F 15 mov ax,word ptr [155fh]
+08F6  89 05       mov word ptr [di],ax
+08F8  8B 1E 61 15 mov bx,word ptr [1561h]
+08FC  89 5D 02    mov word ptr [di+2h],bx
+08FF  8B 16 63 15 mov dx,word ptr [1563h]
+0903  89 55 04    mov word ptr [di+4h],dx
+0906  FF 76 04    push word ptr [bp+4h]
+0909  E8 5D FD    call 669h
+090C  83 C4 02    add sp,2h
+090F  8B 76 04    mov si,word ptr [bp+4h]
+0912  8B 04       mov ax,word ptr [si]
+0914  8B 4C 02    mov cx,word ptr [si+2h]
+0917  89 CB       mov bx,cx
+0919  8B 54 04    mov dx,word ptr [si+4h]
+091C  A3 65 15    mov word ptr [1565h],ax
+091F  89 1E 67 15 mov word ptr [1567h],bx
+0923  89 16 69 15 mov word ptr [1569h],dx
+0927  8B 7E 04    mov di,word ptr [bp+4h]
+092A  8B 06 5F 15 mov ax,word ptr [155fh]
+092E  89 05       mov word ptr [di],ax
+0930  8B 1E 61 15 mov bx,word ptr [1561h]
+0934  89 5D 02    mov word ptr [di+2h],bx
+0937  8B 16 63 15 mov dx,word ptr [1563h]
+093B  89 55 04    mov word ptr [di+4h],dx
+093E  8B 7E 04    mov di,word ptr [bp+4h]
+0941  81 C7 06 00 add di,6h
+0945  8B 06 65 15 mov ax,word ptr [1565h]
+0949  89 05       mov word ptr [di],ax
+094B  8B 1E 67 15 mov bx,word ptr [1567h]
+094F  89 5D 02    mov word ptr [di+2h],bx
+0952  8B 16 69 15 mov dx,word ptr [1569h]
+0956  89 55 04    mov word ptr [di+4h],dx
+0959  FF 76 04    push word ptr [bp+4h]
+095C  E8 B9 FA    call 418h
+095F  83 C4 02    add sp,2h
+0962  8B 76 04    mov si,word ptr [bp+4h]
+0965  8B 04       mov ax,word ptr [si]
+0967  8B 4C 02    mov cx,word ptr [si+2h]
+096A  89 CB       mov bx,cx
+096C  8B 54 04    mov dx,word ptr [si+4h]
+096F  FE C8       dec al
+0971  A3 5F 15    mov word ptr [155fh],ax
+0974  89 1E 61 15 mov word ptr [1561h],bx
+0978  89 16 63 15 mov word ptr [1563h],dx
+097C  FE 0E 6B 15 dec byte ptr [156bh]
+0980  74 03       je 985h
+0982  E9 4F FF    jmp 8d4h
+0985  8B 06 5F 15 mov ax,word ptr [155fh]
+0989  8B 1E 61 15 mov bx,word ptr [1561h]
+098D  8B 16 63 15 mov dx,word ptr [1563h]
+0991  EB 0C       jmp 99fh
+0993  8B 06 65 15 mov ax,word ptr [1565h]
+0997  8B 1E 67 15 mov bx,word ptr [1567h]
+099B  8B 16 69 15 mov dx,word ptr [1569h]
+099F  5F          pop di
+09A0  89 05       mov word ptr [di],ax
+09A2  89 5D 02    mov word ptr [di+2h],bx
+09A5  89 55 04    mov word ptr [di+4h],dx
+09A8  EB 01       jmp 9abh
+09AA  5F          pop di
+09AB  5F          pop di
+09AC  5E          pop si
+09AD  5A          pop dx
+09AE  5B          pop bx
+09AF  89 EC       mov sp,bp
+09B1  5D          pop bp
+09B2  C3          ret
+09B3  5F          pop di
+09B4  B0 03       mov al,3h
+09B6  B4 4C       mov ah,4ch
+09B8  CD 21       int 21h
+09BA  55          push bp
+09BB  8B EC       mov bp,sp
+09BD  53          push bx
+09BE  52          push dx
+09BF  56          push si
+09C0  57          push di
+09C1  8B 7E 04    mov di,word ptr [bp+4h]
+09C4  88 EA       mov dl,ch
+09C6  B5 00       mov ch,0h
+09C8  B6 00       mov dh,0h
+09CA  51          push cx
+09CB  BB 06 14    mov bx,1406h
+09CE  E8 41 02    call 0c12h
+09D1  59          pop cx
+09D2  89 D8       mov ax,bx
+09D4  BB 06 14    mov bx,1406h
+09D7  2B C3       sub ax,bx
+09D9  A3 46 14    mov word ptr [1446h],ax
+09DC  89 0E 48 14 mov word ptr [1448h],cx
+09E0  8B 06 48 14 mov ax,word ptr [1448h]
+09E4  8B 16 46 14 mov dx,word ptr [1446h]
+09E8  2B C2       sub ax,dx
+09EA  83 F8 00    cmp ax,0h
+09ED  7D 02       jnl 9f1h
+09EF  31 C0       xor ax,ax
+09F1  A3 4A 14    mov word ptr [144ah],ax
+09F4  8B 16 46 14 mov dx,word ptr [1446h]
+09F8  03 C2       add ax,dx
+09FA  3D FF 00    cmp ax,0ffh
+09FD  77 03       jnbe 0a02h
+09FF  E9 03 00    jmp 0a05h
+0A02  B8 FF 00    mov ax,0ffh
+0A05  A3 4C 14    mov word ptr [144ch],ax
+0A08  8B 56 06    mov dx,word ptr [bp+6h]
+0A0B  89 D7       mov di,dx
+0A0D  88 05       mov byte ptr [di],al
+0A0F  47          inc di
+0A10  8B 0E 4A 14 mov cx,word ptr [144ah]
+0A14  E3 07       jcxz 0a1dh
+0A16  B0 20       mov al,20h
+0A18  88 05       mov byte ptr [di],al
+0A1A  47          inc di
+0A1B  E2 F9       loop 0a16h
+0A1D  BE 06 14    mov si,1406h
+0A20  8B 0E 46 14 mov cx,word ptr [1446h]
+0A24  E3 08       jcxz 0a2eh
+0A26  8A 04       mov al,byte ptr [si]
+0A28  88 05       mov byte ptr [di],al
+0A2A  46          inc si
+0A2B  47          inc di
+0A2C  E2 F8       loop 0a26h
+0A2E  8B 06 4C 14 mov ax,word ptr [144ch]
+0A32  5F          pop di
+0A33  5E          pop si
+0A34  5A          pop dx
+0A35  5B          pop bx
+0A36  89 EC       mov sp,bp
+0A38  5D          pop bp
+0A39  C3          ret
+0A3A  55          push bp
+0A3B  8B EC       mov bp,sp
 0A3D  53          push bx
 0A3D  53          push bx
-0A3E  81 FA 19 00 cmp dx,19h
-0A42  73 03       jnb 0a47h
-0A44  E9 3F 00    jmp 0a86h
-0A47  89 C8       mov ax,cx
-0A49  80 FD 00    cmp ch,0h
-0A4C  75 03       jne 0a51h
-0A4E  E9 10 00    jmp 0a61h
-0A51  F6 C5 80    test ch,80h
-0A54  75 03       jne 0a59h
-0A56  E9 05 00    jmp 0a5eh
-0A59  31 C0       xor ax,ax
+0A3E  52          push dx
+0A3F  56          push si
+0A40  57          push di
+0A41  8B 5E 04    mov bx,word ptr [bp+4h]
+0A44  8B 7E 06    mov di,word ptr [bp+6h]
+0A47  89 1E 4E 14 mov word ptr [144eh],bx
+0A4B  E8 CF 02    call 0d1dh
+0A4E  73 03       jnb 0a53h
+0A50  E9 0B 00    jmp 0a5eh
+0A53  89 D8       mov ax,bx
+0A55  8B 16 4E 14 mov dx,word ptr [144eh]
+0A59  2B C2       sub ax,dx
 0A5B  E9 03 00    jmp 0a61h
 0A5B  E9 03 00    jmp 0a61h
-0A5E  B8 FF 00    mov ax,0ffh
-0A61  B2 07       mov dl,7h
-0A63  F6 45 05 80 test byte ptr [di+5h],80h
-0A67  75 03       jne 0a6ch
-0A69  E9 02 00    jmp 0a6eh
-0A6C  FE C2       inc dl
-0A6E  2A C2       sub al,dl
-0A70  72 03       jb 0a75h
-0A72  E9 02 00    jmp 0a77h
-0A75  B0 00       mov al,0h
-0A77  3C 09       cmp al,9h
-0A79  73 03       jnb 0a7eh
-0A7B  E9 02 00    jmp 0a80h
-0A7E  B0 09       mov al,9h
-0A80  FE C0       inc al
-0A82  88 C2       mov dl,al
-0A84  88 C6       mov dh,al
-0A86  52          push dx
-0A87  E8 BA FE    call 944h
-0A8A  5A          pop dx
-0A8B  8A C2       mov al,dl
-0A8D  FE C0       inc al
-0A8F  80 FE 00    cmp dh,0h
-0A92  74 03       je 0a97h
-0A94  E9 18 00    jmp 0aafh
-0A97  00 C8       add al,cl
-0A99  78 03       js 0a9eh
-0A9B  E9 08 00    jmp 0aa6h
-0A9E  C6 06 85 11 00 mov byte ptr [1185h],0h
-0AA3  E9 0C 00    jmp 0ab2h
-0AA6  3C 0C       cmp al,0ch
-0AA8  73 03       jnb 0aadh
-0AAA  E9 02 00    jmp 0aafh
-0AAD  B0 0B       mov al,0bh
-0AAF  E8 44 FF    call 9f6h
-0AB2  5B          pop bx
-0AB3  BE 85 11    mov si,1185h
-0AB6  F6 C5 80    test ch,80h
-0AB9  75 03       jne 0abeh
-0ABB  E9 05 00    jmp 0ac3h
-0ABE  B0 2D       mov al,2dh
-0AC0  E8 76 FF    call 0a39h
-0AC3  88 CD       mov ch,cl
-0AC5  80 FE 00    cmp dh,0h
-0AC8  75 03       jne 0acdh
-0ACA  E9 02 00    jmp 0acfh
-0ACD  B5 00       mov ch,0h
-0ACF  80 FD 00    cmp ch,0h
-0AD2  78 03       js 0ad7h
-0AD4  E9 06 00    jmp 0addh
-0AD7  E8 5D FF    call 0a37h
-0ADA  E9 0A 00    jmp 0ae7h
-0ADD  E8 4A FF    call 0a2ah
-0AE0  FE CD       dec ch
-0AE2  78 03       js 0ae7h
-0AE4  E9 F6 FF    jmp 0addh
-0AE7  80 FA 00    cmp dl,0h
-0AEA  75 03       jne 0aefh
-0AEC  E9 23 00    jmp 0b12h
-0AEF  B0 2E       mov al,2eh
-0AF1  E8 45 FF    call 0a39h
-0AF4  FE C5       inc ch
-0AF6  75 03       jne 0afbh
-0AF8  E9 0A 00    jmp 0b05h
-0AFB  E8 39 FF    call 0a37h
-0AFE  FE CA       dec dl
-0B00  74 03       je 0b05h
-0B02  E9 EF FF    jmp 0af4h
-0B05  FE CA       dec dl
-0B07  79 03       jns 0b0ch
-0B09  E9 06 00    jmp 0b12h
-0B0C  E8 1B FF    call 0a2ah
-0B0F  E9 F3 FF    jmp 0b05h
-0B12  80 FE 00    cmp dh,0h
-0B15  74 03       je 0b1ah
-0B17  E9 01 00    jmp 0b1bh
-0B1A  C3          ret
-0B1B  B0 45       mov al,45h
-0B1D  E8 19 FF    call 0a39h
-0B20  B0 2B       mov al,2bh
-0B22  80 F9 00    cmp cl,0h
-0B25  78 03       js 0b2ah
-0B27  E9 04 00    jmp 0b2eh
-0B2A  F6 D9       neg cl
-0B2C  B0 2D       mov al,2dh
-0B2E  E8 08 FF    call 0a39h
-0B31  B0 2F       mov al,2fh
-0B33  FE C0       inc al
-0B35  80 E9 0A    sub cl,0ah
-0B38  72 03       jb 0b3dh
-0B3A  E9 F6 FF    jmp 0b33h
-0B3D  E8 F9 FE    call 0a39h
-0B40  80 C1 3A    add cl,3ah
-0B43  88 C8       mov al,cl
-0B45  E9 F1 FE    jmp 0a39h
-0B48  8A 0F       mov cl,byte ptr [bx]
-0B4A  80 F9 2D    cmp cl,2dh
-0B4D  74 03       je 0b52h
-0B4F  E9 01 00    jmp 0b53h
-0B52  43          inc bx
-0B53  51          push cx
-0B54  E8 1F 00    call 0b76h
-0B57  59          pop cx
-0B58  73 03       jnb 0b5dh
-0B5A  E9 17 00    jmp 0b74h
-0B5D  80 F9 2D    cmp cl,2dh
-0B60  74 03       je 0b65h
-0B62  E9 0D 00    jmp 0b72h
-0B65  8A 05       mov al,byte ptr [di]
-0B67  3C 00       cmp al,0h
-0B69  75 03       jne 0b6eh
-0B6B  E9 04 00    jmp 0b72h
-0B6E  80 75 05 80 xor byte ptr [di+5h],80h
-0B72  F8          clc
-0B73  C3          ret
-0B74  F9          stc
-0B75  C3          ret
-0B76  89 DE       mov si,bx
-0B78  31 C0       xor ax,ax
-0B7A  31 DB       xor bx,bx
-0B7C  31 D2       xor dx,dx
-0B7E  31 C9       xor cx,cx
-0B80  C6 06 92 11 00 mov byte ptr [1192h],0h
-0B85  8A 0C       mov cl,byte ptr [si]
-0B87  80 F9 61    cmp cl,61h
-0B8A  73 03       jnb 0b8fh
-0B8C  E9 08 00    jmp 0b97h
-0B8F  80 F9 7A    cmp cl,7ah
-0B92  77 03       jnbe 0b97h
-0B94  80 E9 20    sub cl,20h
-0B97  E8 C8 00    call 0c62h
-0B9A  73 03       jnb 0b9fh
-0B9C  E9 3A 00    jmp 0bd9h
-0B9F  E8 F2 FC    call 894h
-0BA2  73 03       jnb 0ba7h
-0BA4  E9 B5 00    jmp 0c5ch
-0BA7  57          push di
-0BA8  56          push si
-0BA9  51          push cx
-0BAA  52          push dx
-0BAB  53          push bx
-0BAC  50          push ax
-0BAD  88 C8       mov al,cl
-0BAF  30 E4       xor ah,ah
-0BB1  E8 C2 F7    call 376h
-0BB4  89 C1       mov cx,ax
-0BB6  89 DE       mov si,bx
-0BB8  89 D7       mov di,dx
-0BBA  58          pop ax
-0BBB  5B          pop bx
-0BBC  5A          pop dx
-0BBD  C7 06 74 11 00 00 mov word ptr [1174h],0h
-0BC3  E8 60 F8    call 426h
-0BC6  59          pop cx
-0BC7  5E          pop si
-0BC8  5F          pop di
-0BC9  F6 C5 40    test ch,40h
-0BCC  75 03       jne 0bd1h
-0BCE  E9 04 00    jmp 0bd5h
-0BD1  FE 0E 92 11 dec byte ptr [1192h]
-0BD5  46          inc si
-0BD6  E9 AC FF    jmp 0b85h
-0BD9  80 F9 2E    cmp cl,2eh
-0BDC  74 03       je 0be1h
-0BDE  E9 0E 00    jmp 0befh
-0BE1  F6 C5 40    test ch,40h
-0BE4  74 03       je 0be9h
-0BE6  E9 73 00    jmp 0c5ch
-0BE9  80 CD 40    or ch,40h
-0BEC  E9 E6 FF    jmp 0bd5h
-0BEF  80 F9 45    cmp cl,45h
-0BF2  8A 0E 92 11 mov cl,byte ptr [1192h]
-0BF6  74 03       je 0bfbh
-0BF8  E9 4D 00    jmp 0c48h
-0BFB  E8 2A FD    call 928h
-0BFE  73 03       jnb 0c03h
-0C00  E9 59 00    jmp 0c5ch
-0C03  46          inc si
-0C04  8A 0C       mov cl,byte ptr [si]
-0C06  80 F9 2B    cmp cl,2bh
-0C09  75 03       jne 0c0eh
-0C0B  E9 0B 00    jmp 0c19h
-0C0E  80 F9 2D    cmp cl,2dh
-0C11  74 03       je 0c16h
-0C13  E9 04 00    jmp 0c1ah
-0C16  80 CD 20    or ch,20h
-0C19  46          inc si
-0C1A  E8 43 00    call 0c60h
-0C1D  73 03       jnb 0c22h
-0C1F  E9 3A 00    jmp 0c5ch
-0C22  50          push ax
-0C23  88 C8       mov al,cl
-0C25  46          inc si
-0C26  E8 37 00    call 0c60h
-0C29  73 03       jnb 0c2eh
-0C2B  E9 0D 00    jmp 0c3bh
-0C2E  88 C4       mov ah,al
-0C30  D0 E0       shl al,1h
-0C32  D0 E0       shl al,1h
-0C34  00 E0       add al,ah
-0C36  D0 E0       shl al,1h
-0C38  00 C8       add al,cl
-0C3A  46          inc si
-0C3B  88 C1       mov cl,al
-0C3D  58          pop ax
-0C3E  F6 C5 20    test ch,20h
-0C41  75 03       jne 0c46h
-0C43  E9 02 00    jmp 0c48h
-0C46  F6 D9       neg cl
-0C48  E8 DD FC    call 928h
-0C4B  73 03       jnb 0c50h
-0C4D  E9 0C 00    jmp 0c5ch
-0C50  89 05       mov word ptr [di],ax
-0C52  89 5D 02    mov word ptr [di+2h],bx
-0C55  89 55 04    mov word ptr [di+4h],dx
-0C58  F8          clc
-0C59  E9 01 00    jmp 0c5dh
-0C5C  F9          stc
-0C5D  89 F3       mov bx,si
-0C5F  C3          ret
-0C60  8A 0C       mov cl,byte ptr [si]
-0C62  80 F9 30    cmp cl,30h
-0C65  73 03       jnb 0c6ah
-0C67  E9 0C 00    jmp 0c76h
-0C6A  80 F9 3A    cmp cl,3ah
-0C6D  F5          cmc
-0C6E  73 03       jnb 0c73h
-0C70  E9 03 00    jmp 0c76h
-0C73  80 E9 30    sub cl,30h
-0C76  C3          ret
-0C77  55          push bp
-0C78  8B EC       mov bp,sp
-0C7A  53          push bx
-0C7B  52          push dx
-0C7C  56          push si
-0C7D  57          push di
-0C7E  8B 46 06    mov ax,word ptr [bp+6h]
-0C81  A3 11 12    mov word ptr [1211h],ax
-0C84  8B 56 04    mov dx,word ptr [bp+4h]
-0C87  8B 4E 06    mov cx,word ptr [bp+6h]
-0C8A  8B 7E 08    mov di,word ptr [bp+8h]
-0C8D  BB CF 11    mov bx,11cfh
-0C90  E8 AA FD    call 0a3dh
-0C93  89 D8       mov ax,bx
-0C95  BB CF 11    mov bx,11cfh
-0C98  2B C3       sub ax,bx
-0C9A  A3 0F 12    mov word ptr [120fh],ax
-0C9D  8B 06 11 12 mov ax,word ptr [1211h]
-0CA1  8B 16 0F 12 mov dx,word ptr [120fh]
-0CA5  2B C2       sub ax,dx
-0CA7  83 F8 00    cmp ax,0h
-0CAA  7D 02       jnl 0caeh
-0CAC  31 C0       xor ax,ax
-0CAE  A3 13 12    mov word ptr [1213h],ax
-0CB1  8B 0E 13 12 mov cx,word ptr [1213h]
-0CB5  E3 08       jcxz 0cbfh
-0CB7  B0 20       mov al,20h
-0CB9  B4 02       mov ah,2h
-0CBB  CD 21       int 21h
-0CBD  E2 F8       loop 0cb7h
-0CBF  BE CF 11    mov si,11cfh
-0CC2  8B 0E 0F 12 mov cx,word ptr [120fh]
-0CC6  E3 09       jcxz 0cd1h
-0CC8  8A 04       mov al,byte ptr [si]
-0CCA  B4 02       mov ah,2h
-0CCC  CD 21       int 21h
-0CCE  46          inc si
-0CCF  E2 F7       loop 0cc8h
-0CD1  5F          pop di
-0CD2  5E          pop si
-0CD3  5A          pop dx
-0CD4  5B          pop bx
-0CD5  89 EC       mov sp,bp
-0CD7  5D          pop bp
-0CD8  C3          ret
-0CD9  55          push bp
-0CDA  8B EC       mov bp,sp
-0CDC  53          push bx
-0CDD  51          push cx
-0CDE  52          push dx
-0CDF  56          push si
-0CE0  57          push di
-0CE1  8B 46 04    mov ax,word ptr [bp+4h]
-0CE4  88 C6       mov dh,al
-0CE6  8B 76 0A    mov si,word ptr [bp+0ah]
-0CE9  8B 7E 08    mov di,word ptr [bp+8h]
-0CEC  8B 5E 06    mov bx,word ptr [bp+6h]
-0CEF  80 FE 00    cmp dh,0h
-0CF2  74 23       je 0d17h
-0CF4  8A 04       mov al,byte ptr [si]
-0CF6  8A 15       mov dl,byte ptr [di]
-0CF8  80 FC 00    cmp ah,0h
-0CFB  74 0B       je 0d08h
-0CFD  80 FC 01    cmp ah,1h
-0D00  74 0A       je 0d0ch
-0D02  F6 D2       not dl
-0D04  20 D0       and al,dl
-0D06  EB 06       jmp 0d0eh
-0D08  20 D0       and al,dl
-0D0A  EB 02       jmp 0d0eh
-0D0C  08 D0       or al,dl
-0D0E  88 07       mov byte ptr [bx],al
-0D10  46          inc si
-0D11  47          inc di
-0D12  43          inc bx
-0D13  FE CE       dec dh
-0D15  75 DD       jne 0cf4h
-0D17  5F          pop di
-0D18  5E          pop si
-0D19  5A          pop dx
-0D1A  59          pop cx
-0D1B  5B          pop bx
-0D1C  89 EC       mov sp,bp
-0D1E  5D          pop bp
-0D1F  C3          ret
-0D20  55          push bp
-0D21  8B EC       mov bp,sp
-0D23  53          push bx
-0D24  51          push cx
-0D25  52          push dx
-0D26  56          push si
-0D27  57          push di
-0D28  8B 4E 04    mov cx,word ptr [bp+4h]
-0D2B  8B 76 08    mov si,word ptr [bp+8h]
-0D2E  8B 7E 06    mov di,word ptr [bp+6h]
-0D31  B4 07       mov ah,7h
-0D33  E3 2B       jcxz 0d60h
-0D35  8A 04       mov al,byte ptr [si]
-0D37  8A 15       mov dl,byte ptr [di]
-0D39  88 C3       mov bl,al
-0D3B  88 D6       mov dh,dl
-0D3D  3A C2       cmp al,dl
-0D3F  74 03       je 0d44h
-0D41  80 E4 FE    and ah,0feh
-0D44  F6 D2       not dl
-0D46  20 D0       and al,dl
-0D48  3C 00       cmp al,0h
-0D4A  74 03       je 0d4fh
-0D4C  80 E4 FD    and ah,0fdh
-0D4F  8A C3       mov al,bl
-0D51  F6 D0       not al
-0D53  20 F0       and al,dh
-0D55  3C 00       cmp al,0h
-0D57  74 03       je 0d5ch
-0D59  80 E4 FB    and ah,0fbh
-0D5C  46          inc si
-0D5D  47          inc di
-0D5E  E2 D5       loop 0d35h
-0D60  F6 C4 01    test ah,1h
-0D63  74 03       je 0d68h
-0D65  80 E4 F9    and ah,0f9h
-0D68  88 E0       mov al,ah
-0D6A  B4 00       mov ah,0h
-0D6C  5F          pop di
-0D6D  5E          pop si
-0D6E  5A          pop dx
-0D6F  59          pop cx
-0D70  5B          pop bx
-0D71  89 EC       mov sp,bp
-0D73  5D          pop bp
-0D74  C3          ret
-0D75  55          push bp
-0D76  8B EC       mov bp,sp
-0D78  53          push bx
-0D79  51          push cx
-0D7A  56          push si
-0D7B  8B 4E 04    mov cx,word ptr [bp+4h]
-0D7E  8B 76 06    mov si,word ptr [bp+6h]
-0D81  8B 5E 08    mov bx,word ptr [bp+8h]
-0D84  E3 08       jcxz 0d8eh
-0D86  8A 04       mov al,byte ptr [si]
-0D88  88 07       mov byte ptr [bx],al
-0D8A  46          inc si
-0D8B  43          inc bx
-0D8C  E2 F8       loop 0d86h
-0D8E  5E          pop si
-0D8F  59          pop cx
+0A5E  B8 FF FF    mov ax,0ffffh
+0A61  5F          pop di
+0A62  5E          pop si
+0A63  5A          pop dx
+0A64  5B          pop bx
+0A65  89 EC       mov sp,bp
+0A67  5D          pop bp
+0A68  C3          ret
+0A69  3C 00       cmp al,0h
+0A6B  74 03       je 0a70h
+0A6D  E9 01 00    jmp 0a71h
+0A70  C3          ret
+0A71  80 CE 80    or dh,80h
+0A74  51          push cx
+0A75  52          push dx
+0A76  53          push bx
+0A77  50          push ax
+0A78  D1 EA       shr dx,1h
+0A7A  D1 DB       rcr bx,1h
+0A7C  D0 DC       rcr ah,1h
+0A7E  D1 EA       shr dx,1h
+0A80  D1 DB       rcr bx,1h
+0A82  D0 DC       rcr ah,1h
+0A84  59          pop cx
+0A85  00 EC       add ah,ch
+0A87  59          pop cx
+0A88  13 D9       adc bx,cx
+0A8A  59          pop cx
+0A8B  13 D1       adc dx,cx
+0A8D  59          pop cx
+0A8E  72 03       jb 0a93h
+0A90  E9 0F 00    jmp 0aa2h
+0A93  D1 DA       rcr dx,1h
+0A95  D1 DB       rcr bx,1h
+0A97  D0 DC       rcr ah,1h
+0A99  FE C0       inc al
+0A9B  74 03       je 0aa0h
+0A9D  E9 02 00    jmp 0aa2h
+0AA0  F9          stc
+0AA1  C3          ret
+0AA2  80 E6 7F    and dh,7fh
+0AA5  04 03       add al,3h
+0AA7  C3          ret
+0AA8  52          push dx
+0AA9  53          push bx
+0AAA  50          push ax
+0AAB  88 0E C8 13 mov byte ptr [13c8h],cl
+0AAF  80 F9 00    cmp cl,0h
+0AB2  78 03       js 0ab7h
+0AB4  E9 02 00    jmp 0ab9h
+0AB7  F6 D9       neg cl
+0AB9  88 CB       mov bl,cl
+0ABB  80 E3 FC    and bl,0fch
+0ABE  88 DF       mov bh,bl
+0AC0  D0 EB       shr bl,1h
+0AC2  00 FB       add bl,bh
+0AC4  30 FF       xor bh,bh
+0AC6  8D BF CA 13 lea di,[bx+13cah]
+0ACA  8B 05       mov ax,word ptr [di]
+0ACC  8B 5D 02    mov bx,word ptr [di+2h]
+0ACF  8B 55 04    mov dx,word ptr [di+4h]
+0AD2  80 E1 03    and cl,3h
+0AD5  75 03       jne 0adah
+0AD7  E9 0A 00    jmp 0ae4h
+0ADA  E8 8C FF    call 0a69h
+0ADD  FE C9       dec cl
+0ADF  74 03       je 0ae4h
+0AE1  E9 F6 FF    jmp 0adah
+0AE4  89 C1       mov cx,ax
+0AE6  89 DE       mov si,bx
+0AE8  89 D7       mov di,dx
+0AEA  58          pop ax
+0AEB  5B          pop bx
+0AEC  5A          pop dx
+0AED  F6 06 C8 13 80 test byte ptr [13c8h],80h
+0AF2  74 03       je 0af7h
+0AF4  E9 03 00    jmp 0afah
+0AF7  E9 BC FA    jmp 5b6h
+0AFA  E9 A2 FB    jmp 69fh
+0AFD  80 F9 DA    cmp cl,0dah
+0B00  7D 03       jnl 0b05h
+0B02  E9 12 00    jmp 0b17h
+0B05  80 F9 26    cmp cl,26h
+0B08  7E 03       jle 0b0dh
+0B0A  E9 0A 00    jmp 0b17h
+0B0D  51          push cx
+0B0E  56          push si
+0B0F  57          push di
+0B10  E8 95 FF    call 0aa8h
+0B13  5F          pop di
+0B14  5E          pop si
+0B15  59          pop cx
+0B16  C3          ret
+0B17  F9          stc
+0B18  C3          ret
+0B19  8B 05       mov ax,word ptr [di]
+0B1B  8B 5D 02    mov bx,word ptr [di+2h]
+0B1E  8B 55 04    mov dx,word ptr [di+4h]
+0B21  3C 00       cmp al,0h
+0B23  74 03       je 0b28h
+0B25  E9 16 00    jmp 0b3eh
+0B28  BE BC 13    mov si,13bch
+0B2B  C7 04 30 30 mov word ptr [si],3030h
+0B2F  46          inc si
+0B30  46          inc si
+0B31  81 FE C8 13 cmp si,13c8h
+0B35  74 03       je 0b3ah
+0B37  E9 F1 FF    jmp 0b2bh
+0B3A  B9 00 00    mov cx,0h
+0B3D  C3          ret
+0B3E  88 F5       mov ch,dh
+0B40  80 E6 7F    and dh,7fh
+0B43  50          push ax
+0B44  52          push dx
+0B45  2C 80       sub al,80h
+0B47  98          cbw
+0B48  BA 4D 00    mov dx,4dh
+0B4B  F7 EA       imul dx
+0B4D  05 05 00    add ax,5h
+0B50  88 E1       mov cl,ah
+0B52  5A          pop dx
+0B53  58          pop ax
+0B54  80 F9 D9    cmp cl,0d9h
+0B57  74 03       je 0b5ch
+0B59  E9 02 00    jmp 0b5eh
+0B5C  FE C1       inc cl
+0B5E  51          push cx
+0B5F  F6 D9       neg cl
+0B61  E8 44 FF    call 0aa8h
+0B64  59          pop cx
+0B65  3C 81       cmp al,81h
+0B67  72 03       jb 0b6ch
+0B69  E9 05 00    jmp 0b71h
+0B6C  E8 FA FE    call 0a69h
+0B6F  FE C9       dec cl
+0B71  51          push cx
+0B72  80 CE 80    or dh,80h
+0B75  B1 84       mov cl,84h
+0B77  28 C1       sub cl,al
+0B79  B0 00       mov al,0h
+0B7B  80 F9 00    cmp cl,0h
+0B7E  75 03       jne 0b83h
+0B80  E9 0D 00    jmp 0b90h
+0B83  D1 EA       shr dx,1h
+0B85  D1 DB       rcr bx,1h
+0B87  D0 DC       rcr ah,1h
+0B89  FE C9       dec cl
+0B8B  74 03       je 0b90h
+0B8D  E9 F3 FF    jmp 0b83h
+0B90  BE BC 13    mov si,13bch
+0B93  88 F5       mov ch,dh
+0B95  B1 04       mov cl,4h
+0B97  D2 ED       shr ch,cl
+0B99  80 C5 30    add ch,30h
+0B9C  88 2C       mov byte ptr [si],ch
+0B9E  80 E6 0F    and dh,0fh
+0BA1  52          push dx
+0BA2  53          push bx
+0BA3  50          push ax
+0BA4  D1 E0       shl ax,1h
+0BA6  D1 D3       rcl bx,1h
+0BA8  D1 D2       rcl dx,1h
+0BAA  D1 E0       shl ax,1h
+0BAC  D1 D3       rcl bx,1h
+0BAE  D1 D2       rcl dx,1h
+0BB0  59          pop cx
+0BB1  03 C1       add ax,cx
+0BB3  59          pop cx
+0BB4  13 D9       adc bx,cx
+0BB6  59          pop cx
+0BB7  13 D1       adc dx,cx
+0BB9  D1 E0       shl ax,1h
+0BBB  D1 D3       rcl bx,1h
+0BBD  D1 D2       rcl dx,1h
+0BBF  46          inc si
+0BC0  81 FE C8 13 cmp si,13c8h
+0BC4  74 03       je 0bc9h
+0BC6  E9 CA FF    jmp 0b93h
+0BC9  59          pop cx
+0BCA  C3          ret
+0BCB  30 E4       xor ah,ah
+0BCD  BB BC 13    mov bx,13bch
+0BD0  03 D8       add bx,ax
+0BD2  80 3F 35    cmp byte ptr [bx],35h
+0BD5  C6 07 00    mov byte ptr [bx],0h
+0BD8  73 03       jnb 0bddh
+0BDA  E9 21 00    jmp 0bfeh
+0BDD  FE C8       dec al
+0BDF  79 03       jns 0be4h
+0BE1  E9 11 00    jmp 0bf5h
+0BE4  4B          dec bx
+0BE5  FE 07       inc byte ptr [bx]
+0BE7  80 3F 3A    cmp byte ptr [bx],3ah
+0BEA  73 03       jnb 0befh
+0BEC  E9 0F 00    jmp 0bfeh
+0BEF  C6 07 00    mov byte ptr [bx],0h
+0BF2  E9 E8 FF    jmp 0bddh
+0BF5  C6 07 31    mov byte ptr [bx],31h
+0BF8  C6 47 01 00 mov byte ptr [bx+1h],0h
+0BFC  FE C1       inc cl
+0BFE  C3          ret
+0BFF  8A 04       mov al,byte ptr [si]
+0C01  3C 00       cmp al,0h
+0C03  75 03       jne 0c08h
+0C05  E9 04 00    jmp 0c0ch
+0C08  46          inc si
+0C09  E9 02 00    jmp 0c0eh
+0C0C  B0 30       mov al,30h
+0C0E  88 07       mov byte ptr [bx],al
+0C10  43          inc bx
+0C11  C3          ret
+0C12  53          push bx
+0C13  81 FA 19 00 cmp dx,19h
+0C17  73 03       jnb 0c1ch
+0C19  E9 3F 00    jmp 0c5bh
+0C1C  89 C8       mov ax,cx
+0C1E  80 FD 00    cmp ch,0h
+0C21  75 03       jne 0c26h
+0C23  E9 10 00    jmp 0c36h
+0C26  F6 C5 80    test ch,80h
+0C29  75 03       jne 0c2eh
+0C2B  E9 05 00    jmp 0c33h
+0C2E  31 C0       xor ax,ax
+0C30  E9 03 00    jmp 0c36h
+0C33  B8 FF 00    mov ax,0ffh
+0C36  B2 07       mov dl,7h
+0C38  F6 45 05 80 test byte ptr [di+5h],80h
+0C3C  75 03       jne 0c41h
+0C3E  E9 02 00    jmp 0c43h
+0C41  FE C2       inc dl
+0C43  2A C2       sub al,dl
+0C45  72 03       jb 0c4ah
+0C47  E9 02 00    jmp 0c4ch
+0C4A  B0 00       mov al,0h
+0C4C  3C 09       cmp al,9h
+0C4E  73 03       jnb 0c53h
+0C50  E9 02 00    jmp 0c55h
+0C53  B0 09       mov al,9h
+0C55  FE C0       inc al
+0C57  88 C2       mov dl,al
+0C59  88 C6       mov dh,al
+0C5B  52          push dx
+0C5C  E8 BA FE    call 0b19h
+0C5F  5A          pop dx
+0C60  8A C2       mov al,dl
+0C62  FE C0       inc al
+0C64  80 FE 00    cmp dh,0h
+0C67  74 03       je 0c6ch
+0C69  E9 18 00    jmp 0c84h
+0C6C  00 C8       add al,cl
+0C6E  78 03       js 0c73h
+0C70  E9 08 00    jmp 0c7bh
+0C73  C6 06 BC 13 00 mov byte ptr [13bch],0h
+0C78  E9 0C 00    jmp 0c87h
+0C7B  3C 0C       cmp al,0ch
+0C7D  73 03       jnb 0c82h
+0C7F  E9 02 00    jmp 0c84h
+0C82  B0 0B       mov al,0bh
+0C84  E8 44 FF    call 0bcbh
+0C87  5B          pop bx
+0C88  BE BC 13    mov si,13bch
+0C8B  F6 C5 80    test ch,80h
+0C8E  75 03       jne 0c93h
+0C90  E9 05 00    jmp 0c98h
+0C93  B0 2D       mov al,2dh
+0C95  E8 76 FF    call 0c0eh
+0C98  88 CD       mov ch,cl
+0C9A  80 FE 00    cmp dh,0h
+0C9D  75 03       jne 0ca2h
+0C9F  E9 02 00    jmp 0ca4h
+0CA2  B5 00       mov ch,0h
+0CA4  80 FD 00    cmp ch,0h
+0CA7  78 03       js 0cach
+0CA9  E9 06 00    jmp 0cb2h
+0CAC  E8 5D FF    call 0c0ch
+0CAF  E9 0A 00    jmp 0cbch
+0CB2  E8 4A FF    call 0bffh
+0CB5  FE CD       dec ch
+0CB7  78 03       js 0cbch
+0CB9  E9 F6 FF    jmp 0cb2h
+0CBC  80 FA 00    cmp dl,0h
+0CBF  75 03       jne 0cc4h
+0CC1  E9 23 00    jmp 0ce7h
+0CC4  B0 2E       mov al,2eh
+0CC6  E8 45 FF    call 0c0eh
+0CC9  FE C5       inc ch
+0CCB  75 03       jne 0cd0h
+0CCD  E9 0A 00    jmp 0cdah
+0CD0  E8 39 FF    call 0c0ch
+0CD3  FE CA       dec dl
+0CD5  74 03       je 0cdah
+0CD7  E9 EF FF    jmp 0cc9h
+0CDA  FE CA       dec dl
+0CDC  79 03       jns 0ce1h
+0CDE  E9 06 00    jmp 0ce7h
+0CE1  E8 1B FF    call 0bffh
+0CE4  E9 F3 FF    jmp 0cdah
+0CE7  80 FE 00    cmp dh,0h
+0CEA  74 03       je 0cefh
+0CEC  E9 01 00    jmp 0cf0h
+0CEF  C3          ret
+0CF0  B0 45       mov al,45h
+0CF2  E8 19 FF    call 0c0eh
+0CF5  B0 2B       mov al,2bh
+0CF7  80 F9 00    cmp cl,0h
+0CFA  78 03       js 0cffh
+0CFC  E9 04 00    jmp 0d03h
+0CFF  F6 D9       neg cl
+0D01  B0 2D       mov al,2dh
+0D03  E8 08 FF    call 0c0eh
+0D06  B0 2F       mov al,2fh
+0D08  FE C0       inc al
+0D0A  80 E9 0A    sub cl,0ah
+0D0D  72 03       jb 0d12h
+0D0F  E9 F6 FF    jmp 0d08h
+0D12  E8 F9 FE    call 0c0eh
+0D15  80 C1 3A    add cl,3ah
+0D18  88 C8       mov al,cl
+0D1A  E9 F1 FE    jmp 0c0eh
+0D1D  8A 0F       mov cl,byte ptr [bx]
+0D1F  80 F9 2D    cmp cl,2dh
+0D22  74 03       je 0d27h
+0D24  E9 01 00    jmp 0d28h
+0D27  43          inc bx
+0D28  51          push cx
+0D29  E8 1F 00    call 0d4bh
+0D2C  59          pop cx
+0D2D  73 03       jnb 0d32h
+0D2F  E9 17 00    jmp 0d49h
+0D32  80 F9 2D    cmp cl,2dh
+0D35  74 03       je 0d3ah
+0D37  E9 0D 00    jmp 0d47h
+0D3A  8A 05       mov al,byte ptr [di]
+0D3C  3C 00       cmp al,0h
+0D3E  75 03       jne 0d43h
+0D40  E9 04 00    jmp 0d47h
+0D43  80 75 05 80 xor byte ptr [di+5h],80h
+0D47  F8          clc
+0D48  C3          ret
+0D49  F9          stc
+0D4A  C3          ret
+0D4B  89 DE       mov si,bx
+0D4D  31 C0       xor ax,ax
+0D4F  31 DB       xor bx,bx
+0D51  31 D2       xor dx,dx
+0D53  31 C9       xor cx,cx
+0D55  C6 06 C9 13 00 mov byte ptr [13c9h],0h
+0D5A  8A 0C       mov cl,byte ptr [si]
+0D5C  80 F9 61    cmp cl,61h
+0D5F  73 03       jnb 0d64h
+0D61  E9 08 00    jmp 0d6ch
+0D64  80 F9 7A    cmp cl,7ah
+0D67  77 03       jnbe 0d6ch
+0D69  80 E9 20    sub cl,20h
+0D6C  E8 C8 00    call 0e37h
+0D6F  73 03       jnb 0d74h
+0D71  E9 3A 00    jmp 0daeh
+0D74  E8 F2 FC    call 0a69h
+0D77  73 03       jnb 0d7ch
+0D79  E9 B5 00    jmp 0e31h
+0D7C  57          push di
+0D7D  56          push si
+0D7E  51          push cx
+0D7F  52          push dx
+0D80  53          push bx
+0D81  50          push ax
+0D82  88 C8       mov al,cl
+0D84  30 E4       xor ah,ah
+0D86  E8 57 F6    call 3e0h
+0D89  89 C1       mov cx,ax
+0D8B  89 DE       mov si,bx
+0D8D  89 D7       mov di,dx
+0D8F  58          pop ax
 0D90  5B          pop bx
 0D90  5B          pop bx
-0D91  89 EC       mov sp,bp
-0D93  5D          pop bp
-0D94  C3          ret
-0D95  55          push bp
-0D96  8B EC       mov bp,sp
-0D98  53          push bx
-0D99  51          push cx
-0D9A  52          push dx
-0D9B  56          push si
-0D9C  57          push di
-0D9D  8B 7E 04    mov di,word ptr [bp+4h]
-0DA0  B8 FF FF    mov ax,0ffffh
-0DA3  89 05       mov word ptr [di],ax
-0DA5  31 C0       xor ax,ax
-0DA7  89 45 02    mov word ptr [di+2h],ax
-0DAA  8B 76 06    mov si,word ptr [bp+6h]
-0DAD  8A 04       mov al,byte ptr [si]
-0DAF  46          inc si
-0DB0  3C 7F       cmp al,7fh
-0DB2  76 02       jbe 0db6h
-0DB4  B0 7F       mov al,7fh
-0DB6  88 C1       mov cl,al
-0DB8  30 ED       xor ch,ch
-0DBA  83 C7 04    add di,4h
-0DBD  E3 08       jcxz 0dc7h
-0DBF  8A 04       mov al,byte ptr [si]
-0DC1  88 05       mov byte ptr [di],al
-0DC3  46          inc si
-0DC4  47          inc di
-0DC5  E2 F8       loop 0dbfh
-0DC7  C6 05 00    mov byte ptr [di],0h
-0DCA  5F          pop di
-0DCB  5E          pop si
-0DCC  5A          pop dx
-0DCD  59          pop cx
-0DCE  5B          pop bx
-0DCF  89 EC       mov sp,bp
-0DD1  5D          pop bp
-0DD2  C3          ret
-0DD3  55          push bp
-0DD4  8B EC       mov bp,sp
-0DD6  53          push bx
-0DD7  51          push cx
-0DD8  52          push dx
-0DD9  57          push di
-0DDA  8B 7E 04    mov di,word ptr [bp+4h]
-0DDD  8D 55 04    lea dx,[di+4h]
-0DE0  B8 00 3D    mov ax,3d00h
-0DE3  CD 21       int 21h
-0DE5  72 0F       jb 0df6h
-0DE7  89 05       mov word ptr [di],ax
-0DE9  B8 01 00    mov ax,1h
-0DEC  89 45 02    mov word ptr [di+2h],ax
-0DEF  31 C0       xor ax,ax
-0DF1  A3 19 12    mov word ptr [1219h],ax
-0DF4  EB 10       jmp 0e06h
-0DF6  89 C3       mov bx,ax
-0DF8  B8 FF FF    mov ax,0ffffh
-0DFB  89 05       mov word ptr [di],ax
-0DFD  31 C0       xor ax,ax
-0DFF  89 45 02    mov word ptr [di+2h],ax
-0E02  89 1E 19 12 mov word ptr [1219h],bx
-0E06  5F          pop di
-0E07  5A          pop dx
-0E08  59          pop cx
-0E09  5B          pop bx
-0E0A  89 EC       mov sp,bp
-0E0C  5D          pop bp
-0E0D  C3          ret
-0E0E  55          push bp
-0E0F  8B EC       mov bp,sp
-0E11  53          push bx
-0E12  51          push cx
-0E13  52          push dx
-0E14  57          push di
-0E15  8B 7E 04    mov di,word ptr [bp+4h]
-0E18  8D 55 04    lea dx,[di+4h]
-0E1B  31 C9       xor cx,cx
-0E1D  B8 00 3C    mov ax,3c00h
-0E20  CD 21       int 21h
-0E22  72 0F       jb 0e33h
-0E24  89 05       mov word ptr [di],ax
-0E26  B8 02 00    mov ax,2h
-0E29  89 45 02    mov word ptr [di+2h],ax
-0E2C  31 C0       xor ax,ax
-0E2E  A3 19 12    mov word ptr [1219h],ax
-0E31  EB 10       jmp 0e43h
-0E33  89 C3       mov bx,ax
-0E35  B8 FF FF    mov ax,0ffffh
-0E38  89 05       mov word ptr [di],ax
-0E3A  31 C0       xor ax,ax
-0E3C  89 45 02    mov word ptr [di+2h],ax
-0E3F  89 1E 19 12 mov word ptr [1219h],bx
-0E43  5F          pop di
-0E44  5A          pop dx
-0E45  59          pop cx
-0E46  5B          pop bx
-0E47  89 EC       mov sp,bp
-0E49  5D          pop bp
-0E4A  C3          ret
-0E4B  55          push bp
-0E4C  8B EC       mov bp,sp
-0E4E  53          push bx
-0E4F  52          push dx
-0E50  57          push di
-0E51  8B 7E 04    mov di,word ptr [bp+4h]
-0E54  8B 05       mov ax,word ptr [di]
-0E56  3D FF FF    cmp ax,0ffffh
-0E59  74 16       je 0e71h
-0E5B  89 C3       mov bx,ax
-0E5D  B4 3E       mov ah,3eh
-0E5F  CD 21       int 21h
-0E61  89 C3       mov bx,ax
-0E63  B8 FF FF    mov ax,0ffffh
-0E66  89 05       mov word ptr [di],ax
-0E68  31 C0       xor ax,ax
-0E6A  89 45 02    mov word ptr [di+2h],ax
-0E6D  89 1E 19 12 mov word ptr [1219h],bx
-0E71  5F          pop di
-0E72  5A          pop dx
-0E73  5B          pop bx
-0E74  89 EC       mov sp,bp
-0E76  5D          pop bp
-0E77  C3          ret
-0E78  8B 06 19 12 mov ax,word ptr [1219h]
-0E7C  C7 06 19 12 00 00 mov word ptr [1219h],0h
-0E82  C3          ret
-0E83  A3 19 12    mov word ptr [1219h],ax
-0E86  C3          ret
-0E87  55          push bp
-0E88  8B EC       mov bp,sp
-0E8A  53          push bx
-0E8B  51          push cx
-0E8C  52          push dx
-0E8D  8B 1E 1B 12 mov bx,word ptr [121bh]
-0E91  8B 56 04    mov dx,word ptr [bp+4h]
-0E94  89 1A       mov word ptr [bp+si],bx
-0E96  8B 4E 06    mov cx,word ptr [bp+6h]
-0E99  89 D8       mov ax,bx
-0E9B  03 C1       add ax,cx
-0E9D  A3 1B 12    mov word ptr [121bh],ax
-0EA0  5A          pop dx
-0EA1  59          pop cx
-0EA2  5B          pop bx
-0EA3  89 EC       mov sp,bp
-0EA5  5D          pop bp
-0EA6  C3          ret
-0EA7  55          push bp
-0EA8  8B EC       mov bp,sp
-0EAA  53          push bx
-0EAB  51          push cx
-0EAC  52          push dx
-0EAD  56          push si
-0EAE  57          push di
-0EAF  A0 1D 12    mov al,byte ptr [121dh]
-0EB2  3C 00       cmp al,0h
-0EB4  75 42       jne 0ef8h
-0EB6  8B 7E 04    mov di,word ptr [bp+4h]
-0EB9  8B 05       mov ax,word ptr [di]
-0EBB  3D FF FF    cmp ax,0ffffh
-0EBE  74 38       je 0ef8h
-0EC0  89 C3       mov bx,ax
-0EC2  31 C9       xor cx,cx
-0EC4  31 D2       xor dx,dx
-0EC6  B8 01 42    mov ax,4201h
-0EC9  CD 21       int 21h
-0ECB  8B F0       mov si,ax
-0ECD  89 D7       mov di,dx
-0ECF  31 C9       xor cx,cx
-0ED1  31 D2       xor dx,dx
-0ED3  B8 02 42    mov ax,4202h
-0ED6  CD 21       int 21h
-0ED8  39 FA       cmp dx,di
-0EDA  72 08       jb 0ee4h
-0EDC  77 0B       jnbe 0ee9h
-0EDE  39 F0       cmp ax,si
-0EE0  72 02       jb 0ee4h
-0EE2  77 05       jnbe 0ee9h
-0EE4  B8 01 00    mov ax,1h
-0EE7  EB 02       jmp 0eebh
-0EE9  31 C0       xor ax,ax
-0EEB  50          push ax
-0EEC  89 F9       mov cx,di
-0EEE  89 F2       mov dx,si
-0EF0  B8 00 42    mov ax,4200h
-0EF3  CD 21       int 21h
-0EF5  58          pop ax
-0EF6  EB 03       jmp 0efbh
-0EF8  B8 01 00    mov ax,1h
-0EFB  5F          pop di
-0EFC  5E          pop si
-0EFD  5A          pop dx
-0EFE  59          pop cx
-0EFF  5B          pop bx
-0F00  89 EC       mov sp,bp
-0F02  5D          pop bp
-0F03  C3          ret
-0F04  55          push bp
-0F05  8B EC       mov bp,sp
-0F07  53          push bx
-0F08  51          push cx
-0F09  52          push dx
-0F0A  56          push si
-0F0B  57          push di
-0F0C  8B 7E 06    mov di,word ptr [bp+6h]
-0F0F  C6 05 00    mov byte ptr [di],0h
-0F12  47          inc di
-0F13  31 C9       xor cx,cx
-0F15  8B 76 04    mov si,word ptr [bp+4h]
-0F18  8B 04       mov ax,word ptr [si]
-0F1A  89 C3       mov bx,ax
-0F1C  BA 1E 12    mov dx,121eh
-0F1F  B9 01 00    mov cx,1h
-0F22  B4 3F       mov ah,3fh
-0F24  CD 21       int 21h
-0F26  83 F8 00    cmp ax,0h
-0F29  74 1C       je 0f47h
-0F2B  A0 1E 12    mov al,byte ptr [121eh]
-0F2E  3C 1A       cmp al,1ah
-0F30  74 1C       je 0f4eh
-0F32  3C 0D       cmp al,0dh
-0F34  74 E2       je 0f18h
-0F36  3C 0A       cmp al,0ah
-0F38  74 19       je 0f53h
-0F3A  8B 46 08    mov ax,word ptr [bp+8h]
-0F3D  39 C8       cmp ax,cx
-0F3F  76 D7       jbe 0f18h
-0F41  88 05       mov byte ptr [di],al
-0F43  47          inc di
-0F44  41          inc cx
-0F45  EB D1       jmp 0f18h
-0F47  C6 06 1D 12 01 mov byte ptr [121dh],1h
-0F4C  EB 05       jmp 0f53h
-0F4E  C6 06 1D 12 01 mov byte ptr [121dh],1h
-0F53  8B 5E 06    mov bx,word ptr [bp+6h]
-0F56  88 0F       mov byte ptr [bx],cl
-0F58  31 C0       xor ax,ax
-0F5A  A3 19 12    mov word ptr [1219h],ax
-0F5D  5F          pop di
-0F5E  5E          pop si
-0F5F  5A          pop dx
-0F60  59          pop cx
-0F61  5B          pop bx
-0F62  89 EC       mov sp,bp
-0F64  5D          pop bp
-0F65  C3          ret
-0F66  55          push bp
-0F67  8B EC       mov bp,sp
-0F69  53          push bx
-0F6A  51          push cx
-0F6B  52          push dx
-0F6C  56          push si
-0F6D  57          push di
-0F6E  8B 7E 04    mov di,word ptr [bp+4h]
-0F71  C6 05 00    mov byte ptr [di],0h
-0F74  47          inc di
-0F75  8B 46 06    mov ax,word ptr [bp+6h]
-0F78  C6 06 1E 12 00 mov byte ptr [121eh],0h
-0F7D  83 F8 00    cmp ax,0h
-0F80  7D 07       jnl 0f89h
-0F82  C6 06 1E 12 01 mov byte ptr [121eh],1h
-0F87  F7 D8       neg ax
-0F89  B9 0A 00    mov cx,0ah
-0F8C  BB 5E 11    mov bx,115eh
-0F8F  89 DE       mov si,bx
-0F91  31 D2       xor dx,dx
-0F93  F7 F1       div ax,cx
-0F95  80 C2 30    add dl,30h
-0F98  4E          dec si
-0F99  88 14       mov byte ptr [si],dl
-0F9B  83 F8 00    cmp ax,0h
-0F9E  75 F1       jne 0f91h
-0FA0  A0 1E 12    mov al,byte ptr [121eh]
-0FA3  3C 00       cmp al,0h
-0FA5  74 04       je 0fabh
-0FA7  C6 05 2D    mov byte ptr [di],2dh
-0FAA  47          inc di
-0FAB  89 D9       mov cx,bx
-0FAD  29 F1       sub cx,si
-0FAF  A0 1E 12    mov al,byte ptr [121eh]
-0FB2  3C 00       cmp al,0h
-0FB4  74 01       je 0fb7h
-0FB6  41          inc cx
-0FB7  8A D1       mov dl,cl
-0FB9  8A 04       mov al,byte ptr [si]
-0FBB  88 05       mov byte ptr [di],al
-0FBD  46          inc si
-0FBE  47          inc di
-0FBF  E2 F8       loop 0fb9h
-0FC1  8B 5E 04    mov bx,word ptr [bp+4h]
-0FC4  88 17       mov byte ptr [bx],dl
-0FC6  5F          pop di
-0FC7  5E          pop si
-0FC8  5A          pop dx
-0FC9  59          pop cx
-0FCA  5B          pop bx
-0FCB  89 EC       mov sp,bp
-0FCD  5D          pop bp
-0FCE  C3          ret
-0FCF  55          push bp
-0FD0  8B EC       mov bp,sp
-0FD2  53          push bx
-0FD3  51          push cx
-0FD4  52          push dx
-0FD5  56          push si
-0FD6  57          push di
-0FD7  8B 7E 04    mov di,word ptr [bp+4h]
-0FDA  8A 05       mov al,byte ptr [di]
-0FDC  88 C1       mov cl,al
-0FDE  30 ED       xor ch,ch
-0FE0  47          inc di
-0FE1  89 FE       mov si,di
-0FE3  31 DB       xor bx,bx
-0FE5  C6 06 1F 12 00 mov byte ptr [121fh],0h
-0FEA  E3 35       jcxz 1021h
-0FEC  8A 05       mov al,byte ptr [di]
-0FEE  3C 2D       cmp al,2dh
-0FF0  74 02       je 0ff4h
-0FF2  EB 09       jmp 0ffdh
-0FF4  C6 06 1F 12 01 mov byte ptr [121fh],1h
-0FF9  47          inc di
-0FFA  49          dec cx
-0FFB  E3 46       jcxz 1043h
-0FFD  8A 05       mov al,byte ptr [di]
-0FFF  3C 30       cmp al,30h
-1001  72 40       jb 1043h
-1003  3C 39       cmp al,39h
-1005  77 3C       jnbe 1043h
-1007  2C 30       sub al,30h
-1009  30 E4       xor ah,ah
-100B  A3 20 12    mov word ptr [1220h],ax
-100E  89 D8       mov ax,bx
-1010  BB 0A 00    mov bx,0ah
-1013  F7 E3       mul bx
-1015  03 06 20 12 add ax,word ptr [1220h]
-1019  89 C3       mov bx,ax
-101B  47          inc di
-101C  49          dec cx
-101D  E3 0B       jcxz 102ah
-101F  EB DC       jmp 0ffdh
-1021  8B 5E 08    mov bx,word ptr [bp+8h]
-1024  31 C0       xor ax,ax
-1026  89 07       mov word ptr [bx],ax
-1028  EB 23       jmp 104dh
-102A  A0 1F 12    mov al,byte ptr [121fh]
-102D  3C 00       cmp al,0h
-102F  74 02       je 1033h
-1031  F7 DB       neg bx
-1033  89 D8       mov ax,bx
-1035  8B 5E 06    mov bx,word ptr [bp+6h]
-1038  89 07       mov word ptr [bx],ax
-103A  8B 5E 08    mov bx,word ptr [bp+8h]
+0D91  5A          pop dx
+0D92  C7 06 AB 13 00 00 mov word ptr [13abh],0h
+0D98  E8 F5 F6    call 490h
+0D9B  59          pop cx
+0D9C  5E          pop si
+0D9D  5F          pop di
+0D9E  F6 C5 40    test ch,40h
+0DA1  75 03       jne 0da6h
+0DA3  E9 04 00    jmp 0daah
+0DA6  FE 0E C9 13 dec byte ptr [13c9h]
+0DAA  46          inc si
+0DAB  E9 AC FF    jmp 0d5ah
+0DAE  80 F9 2E    cmp cl,2eh
+0DB1  74 03       je 0db6h
+0DB3  E9 0E 00    jmp 0dc4h
+0DB6  F6 C5 40    test ch,40h
+0DB9  74 03       je 0dbeh
+0DBB  E9 73 00    jmp 0e31h
+0DBE  80 CD 40    or ch,40h
+0DC1  E9 E6 FF    jmp 0daah
+0DC4  80 F9 45    cmp cl,45h
+0DC7  8A 0E C9 13 mov cl,byte ptr [13c9h]
+0DCB  74 03       je 0dd0h
+0DCD  E9 4D 00    jmp 0e1dh
+0DD0  E8 2A FD    call 0afdh
+0DD3  73 03       jnb 0dd8h
+0DD5  E9 59 00    jmp 0e31h
+0DD8  46          inc si
+0DD9  8A 0C       mov cl,byte ptr [si]
+0DDB  80 F9 2B    cmp cl,2bh
+0DDE  75 03       jne 0de3h
+0DE0  E9 0B 00    jmp 0deeh
+0DE3  80 F9 2D    cmp cl,2dh
+0DE6  74 03       je 0debh
+0DE8  E9 04 00    jmp 0defh
+0DEB  80 CD 20    or ch,20h
+0DEE  46          inc si
+0DEF  E8 43 00    call 0e35h
+0DF2  73 03       jnb 0df7h
+0DF4  E9 3A 00    jmp 0e31h
+0DF7  50          push ax
+0DF8  88 C8       mov al,cl
+0DFA  46          inc si
+0DFB  E8 37 00    call 0e35h
+0DFE  73 03       jnb 0e03h
+0E00  E9 0D 00    jmp 0e10h
+0E03  88 C4       mov ah,al
+0E05  D0 E0       shl al,1h
+0E07  D0 E0       shl al,1h
+0E09  00 E0       add al,ah
+0E0B  D0 E0       shl al,1h
+0E0D  00 C8       add al,cl
+0E0F  46          inc si
+0E10  88 C1       mov cl,al
+0E12  58          pop ax
+0E13  F6 C5 20    test ch,20h
+0E16  75 03       jne 0e1bh
+0E18  E9 02 00    jmp 0e1dh
+0E1B  F6 D9       neg cl
+0E1D  E8 DD FC    call 0afdh
+0E20  73 03       jnb 0e25h
+0E22  E9 0C 00    jmp 0e31h
+0E25  89 05       mov word ptr [di],ax
+0E27  89 5D 02    mov word ptr [di+2h],bx
+0E2A  89 55 04    mov word ptr [di+4h],dx
+0E2D  F8          clc
+0E2E  E9 01 00    jmp 0e32h
+0E31  F9          stc
+0E32  89 F3       mov bx,si
+0E34  C3          ret
+0E35  8A 0C       mov cl,byte ptr [si]
+0E37  80 F9 30    cmp cl,30h
+0E3A  73 03       jnb 0e3fh
+0E3C  E9 0C 00    jmp 0e4bh
+0E3F  80 F9 3A    cmp cl,3ah
+0E42  F5          cmc
+0E43  73 03       jnb 0e48h
+0E45  E9 03 00    jmp 0e4bh
+0E48  80 E9 30    sub cl,30h
+0E4B  C3          ret
+0E4C  55          push bp
+0E4D  8B EC       mov bp,sp
+0E4F  53          push bx
+0E50  52          push dx
+0E51  56          push si
+0E52  57          push di
+0E53  8B 46 06    mov ax,word ptr [bp+6h]
+0E56  A3 48 14    mov word ptr [1448h],ax
+0E59  8B 56 04    mov dx,word ptr [bp+4h]
+0E5C  8B 4E 06    mov cx,word ptr [bp+6h]
+0E5F  8B 7E 08    mov di,word ptr [bp+8h]
+0E62  BB 06 14    mov bx,1406h
+0E65  E8 AA FD    call 0c12h
+0E68  89 D8       mov ax,bx
+0E6A  BB 06 14    mov bx,1406h
+0E6D  2B C3       sub ax,bx
+0E6F  A3 46 14    mov word ptr [1446h],ax
+0E72  8B 06 48 14 mov ax,word ptr [1448h]
+0E76  8B 16 46 14 mov dx,word ptr [1446h]
+0E7A  2B C2       sub ax,dx
+0E7C  83 F8 00    cmp ax,0h
+0E7F  7D 02       jnl 0e83h
+0E81  31 C0       xor ax,ax
+0E83  A3 4A 14    mov word ptr [144ah],ax
+0E86  8B 0E 4A 14 mov cx,word ptr [144ah]
+0E8A  E3 08       jcxz 0e94h
+0E8C  B0 20       mov al,20h
+0E8E  B4 02       mov ah,2h
+0E90  CD 21       int 21h
+0E92  E2 F8       loop 0e8ch
+0E94  BE 06 14    mov si,1406h
+0E97  8B 0E 46 14 mov cx,word ptr [1446h]
+0E9B  E3 09       jcxz 0ea6h
+0E9D  8A 04       mov al,byte ptr [si]
+0E9F  B4 02       mov ah,2h
+0EA1  CD 21       int 21h
+0EA3  46          inc si
+0EA4  E2 F7       loop 0e9dh
+0EA6  5F          pop di
+0EA7  5E          pop si
+0EA8  5A          pop dx
+0EA9  5B          pop bx
+0EAA  89 EC       mov sp,bp
+0EAC  5D          pop bp
+0EAD  C3          ret
+0EAE  55          push bp
+0EAF  8B EC       mov bp,sp
+0EB1  53          push bx
+0EB2  51          push cx
+0EB3  52          push dx
+0EB4  56          push si
+0EB5  57          push di
+0EB6  8B 46 04    mov ax,word ptr [bp+4h]
+0EB9  88 C6       mov dh,al
+0EBB  8B 76 0A    mov si,word ptr [bp+0ah]
+0EBE  8B 7E 08    mov di,word ptr [bp+8h]
+0EC1  8B 5E 06    mov bx,word ptr [bp+6h]
+0EC4  80 FE 00    cmp dh,0h
+0EC7  74 23       je 0eech
+0EC9  8A 04       mov al,byte ptr [si]
+0ECB  8A 15       mov dl,byte ptr [di]
+0ECD  80 FC 00    cmp ah,0h
+0ED0  74 0B       je 0eddh
+0ED2  80 FC 01    cmp ah,1h
+0ED5  74 0A       je 0ee1h
+0ED7  F6 D2       not dl
+0ED9  20 D0       and al,dl
+0EDB  EB 06       jmp 0ee3h
+0EDD  20 D0       and al,dl
+0EDF  EB 02       jmp 0ee3h
+0EE1  08 D0       or al,dl
+0EE3  88 07       mov byte ptr [bx],al
+0EE5  46          inc si
+0EE6  47          inc di
+0EE7  43          inc bx
+0EE8  FE CE       dec dh
+0EEA  75 DD       jne 0ec9h
+0EEC  5F          pop di
+0EED  5E          pop si
+0EEE  5A          pop dx
+0EEF  59          pop cx
+0EF0  5B          pop bx
+0EF1  89 EC       mov sp,bp
+0EF3  5D          pop bp
+0EF4  C3          ret
+0EF5  55          push bp
+0EF6  8B EC       mov bp,sp
+0EF8  53          push bx
+0EF9  51          push cx
+0EFA  52          push dx
+0EFB  56          push si
+0EFC  57          push di
+0EFD  8B 4E 04    mov cx,word ptr [bp+4h]
+0F00  8B 76 08    mov si,word ptr [bp+8h]
+0F03  8B 7E 06    mov di,word ptr [bp+6h]
+0F06  B4 07       mov ah,7h
+0F08  E3 2B       jcxz 0f35h
+0F0A  8A 04       mov al,byte ptr [si]
+0F0C  8A 15       mov dl,byte ptr [di]
+0F0E  88 C3       mov bl,al
+0F10  88 D6       mov dh,dl
+0F12  3A C2       cmp al,dl
+0F14  74 03       je 0f19h
+0F16  80 E4 FE    and ah,0feh
+0F19  F6 D2       not dl
+0F1B  20 D0       and al,dl
+0F1D  3C 00       cmp al,0h
+0F1F  74 03       je 0f24h
+0F21  80 E4 FD    and ah,0fdh
+0F24  8A C3       mov al,bl
+0F26  F6 D0       not al
+0F28  20 F0       and al,dh
+0F2A  3C 00       cmp al,0h
+0F2C  74 03       je 0f31h
+0F2E  80 E4 FB    and ah,0fbh
+0F31  46          inc si
+0F32  47          inc di
+0F33  E2 D5       loop 0f0ah
+0F35  F6 C4 01    test ah,1h
+0F38  74 03       je 0f3dh
+0F3A  80 E4 F9    and ah,0f9h
+0F3D  88 E0       mov al,ah
+0F3F  B4 00       mov ah,0h
+0F41  5F          pop di
+0F42  5E          pop si
+0F43  5A          pop dx
+0F44  59          pop cx
+0F45  5B          pop bx
+0F46  89 EC       mov sp,bp
+0F48  5D          pop bp
+0F49  C3          ret
+0F4A  55          push bp
+0F4B  8B EC       mov bp,sp
+0F4D  53          push bx
+0F4E  51          push cx
+0F4F  56          push si
+0F50  8B 4E 04    mov cx,word ptr [bp+4h]
+0F53  8B 76 06    mov si,word ptr [bp+6h]
+0F56  8B 5E 08    mov bx,word ptr [bp+8h]
+0F59  E3 08       jcxz 0f63h
+0F5B  8A 04       mov al,byte ptr [si]
+0F5D  88 07       mov byte ptr [bx],al
+0F5F  46          inc si
+0F60  43          inc bx
+0F61  E2 F8       loop 0f5bh
+0F63  5E          pop si
+0F64  59          pop cx
+0F65  5B          pop bx
+0F66  89 EC       mov sp,bp
+0F68  5D          pop bp
+0F69  C3          ret
+0F6A  55          push bp
+0F6B  8B EC       mov bp,sp
+0F6D  53          push bx
+0F6E  51          push cx
+0F6F  52          push dx
+0F70  56          push si
+0F71  57          push di
+0F72  8B 7E 04    mov di,word ptr [bp+4h]
+0F75  B8 FF FF    mov ax,0ffffh
+0F78  89 05       mov word ptr [di],ax
+0F7A  31 C0       xor ax,ax
+0F7C  89 45 02    mov word ptr [di+2h],ax
+0F7F  8B 76 06    mov si,word ptr [bp+6h]
+0F82  8A 04       mov al,byte ptr [si]
+0F84  46          inc si
+0F85  3C 7F       cmp al,7fh
+0F87  76 02       jbe 0f8bh
+0F89  B0 7F       mov al,7fh
+0F8B  88 C1       mov cl,al
+0F8D  30 ED       xor ch,ch
+0F8F  83 C7 04    add di,4h
+0F92  E3 08       jcxz 0f9ch
+0F94  8A 04       mov al,byte ptr [si]
+0F96  88 05       mov byte ptr [di],al
+0F98  46          inc si
+0F99  47          inc di
+0F9A  E2 F8       loop 0f94h
+0F9C  C6 05 00    mov byte ptr [di],0h
+0F9F  5F          pop di
+0FA0  5E          pop si
+0FA1  5A          pop dx
+0FA2  59          pop cx
+0FA3  5B          pop bx
+0FA4  89 EC       mov sp,bp
+0FA6  5D          pop bp
+0FA7  C3          ret
+0FA8  55          push bp
+0FA9  8B EC       mov bp,sp
+0FAB  53          push bx
+0FAC  51          push cx
+0FAD  52          push dx
+0FAE  57          push di
+0FAF  8B 7E 04    mov di,word ptr [bp+4h]
+0FB2  8D 55 04    lea dx,[di+4h]
+0FB5  B8 00 3D    mov ax,3d00h
+0FB8  CD 21       int 21h
+0FBA  72 0F       jb 0fcbh
+0FBC  89 05       mov word ptr [di],ax
+0FBE  B8 01 00    mov ax,1h
+0FC1  89 45 02    mov word ptr [di+2h],ax
+0FC4  31 C0       xor ax,ax
+0FC6  A3 50 14    mov word ptr [1450h],ax
+0FC9  EB 10       jmp 0fdbh
+0FCB  89 C3       mov bx,ax
+0FCD  B8 FF FF    mov ax,0ffffh
+0FD0  89 05       mov word ptr [di],ax
+0FD2  31 C0       xor ax,ax
+0FD4  89 45 02    mov word ptr [di+2h],ax
+0FD7  89 1E 50 14 mov word ptr [1450h],bx
+0FDB  5F          pop di
+0FDC  5A          pop dx
+0FDD  59          pop cx
+0FDE  5B          pop bx
+0FDF  89 EC       mov sp,bp
+0FE1  5D          pop bp
+0FE2  C3          ret
+0FE3  55          push bp
+0FE4  8B EC       mov bp,sp
+0FE6  53          push bx
+0FE7  51          push cx
+0FE8  52          push dx
+0FE9  57          push di
+0FEA  8B 7E 04    mov di,word ptr [bp+4h]
+0FED  8D 55 04    lea dx,[di+4h]
+0FF0  31 C9       xor cx,cx
+0FF2  B8 00 3C    mov ax,3c00h
+0FF5  CD 21       int 21h
+0FF7  72 0F       jb 1008h
+0FF9  89 05       mov word ptr [di],ax
+0FFB  B8 02 00    mov ax,2h
+0FFE  89 45 02    mov word ptr [di+2h],ax
+1001  31 C0       xor ax,ax
+1003  A3 50 14    mov word ptr [1450h],ax
+1006  EB 10       jmp 1018h
+1008  89 C3       mov bx,ax
+100A  B8 FF FF    mov ax,0ffffh
+100D  89 05       mov word ptr [di],ax
+100F  31 C0       xor ax,ax
+1011  89 45 02    mov word ptr [di+2h],ax
+1014  89 1E 50 14 mov word ptr [1450h],bx
+1018  5F          pop di
+1019  5A          pop dx
+101A  59          pop cx
+101B  5B          pop bx
+101C  89 EC       mov sp,bp
+101E  5D          pop bp
+101F  C3          ret
+1020  55          push bp
+1021  8B EC       mov bp,sp
+1023  53          push bx
+1024  52          push dx
+1025  57          push di
+1026  8B 7E 04    mov di,word ptr [bp+4h]
+1029  8B 05       mov ax,word ptr [di]
+102B  3D FF FF    cmp ax,0ffffh
+102E  74 16       je 1046h
+1030  89 C3       mov bx,ax
+1032  B4 3E       mov ah,3eh
+1034  CD 21       int 21h
+1036  89 C3       mov bx,ax
+1038  B8 FF FF    mov ax,0ffffh
+103B  89 05       mov word ptr [di],ax
 103D  31 C0       xor ax,ax
 103D  31 C0       xor ax,ax
-103F  89 07       mov word ptr [bx],ax
-1041  EB 0A       jmp 104dh
-1043  8B C7       mov ax,di
-1045  2B C6       sub ax,si
-1047  40          inc ax
-1048  8B 5E 08    mov bx,word ptr [bp+8h]
-104B  89 07       mov word ptr [bx],ax
-104D  5F          pop di
-104E  5E          pop si
-104F  5A          pop dx
-1050  59          pop cx
-1051  5B          pop bx
-1052  89 EC       mov sp,bp
-1054  5D          pop bp
-1055  C3          ret
+103F  89 45 02    mov word ptr [di+2h],ax
+1042  89 1E 50 14 mov word ptr [1450h],bx
+1046  5F          pop di
+1047  5A          pop dx
+1048  5B          pop bx
+1049  89 EC       mov sp,bp
+104B  5D          pop bp
+104C  C3          ret
+104D  8B 06 50 14 mov ax,word ptr [1450h]
+1051  C7 06 50 14 00 00 mov word ptr [1450h],0h
+1057  C3          ret
+1058  A3 50 14    mov word ptr [1450h],ax
+105B  C3          ret
+105C  55          push bp
+105D  8B EC       mov bp,sp
+105F  53          push bx
+1060  51          push cx
+1061  52          push dx
+1062  8B 1E 52 14 mov bx,word ptr [1452h]
+1066  8B 56 04    mov dx,word ptr [bp+4h]
+1069  89 1A       mov word ptr [bp+si],bx
+106B  8B 4E 06    mov cx,word ptr [bp+6h]
+106E  89 D8       mov ax,bx
+1070  03 C1       add ax,cx
+1072  A3 52 14    mov word ptr [1452h],ax
+1075  5A          pop dx
+1076  59          pop cx
+1077  5B          pop bx
+1078  89 EC       mov sp,bp
+107A  5D          pop bp
+107B  C3          ret
+107C  55          push bp
+107D  8B EC       mov bp,sp
+107F  53          push bx
+1080  51          push cx
+1081  52          push dx
+1082  56          push si
+1083  57          push di
+1084  A0 54 14    mov al,byte ptr [1454h]
+1087  3C 00       cmp al,0h
+1089  75 42       jne 10cdh
+108B  8B 7E 04    mov di,word ptr [bp+4h]
+108E  8B 05       mov ax,word ptr [di]
+1090  3D FF FF    cmp ax,0ffffh
+1093  74 38       je 10cdh
+1095  89 C3       mov bx,ax
+1097  31 C9       xor cx,cx
+1099  31 D2       xor dx,dx
+109B  B8 01 42    mov ax,4201h
+109E  CD 21       int 21h
+10A0  8B F0       mov si,ax
+10A2  89 D7       mov di,dx
+10A4  31 C9       xor cx,cx
+10A6  31 D2       xor dx,dx
+10A8  B8 02 42    mov ax,4202h
+10AB  CD 21       int 21h
+10AD  39 FA       cmp dx,di
+10AF  72 08       jb 10b9h
+10B1  77 0B       jnbe 10beh
+10B3  39 F0       cmp ax,si
+10B5  72 02       jb 10b9h
+10B7  77 05       jnbe 10beh
+10B9  B8 01 00    mov ax,1h
+10BC  EB 02       jmp 10c0h
+10BE  31 C0       xor ax,ax
+10C0  50          push ax
+10C1  89 F9       mov cx,di
+10C3  89 F2       mov dx,si
+10C5  B8 00 42    mov ax,4200h
+10C8  CD 21       int 21h
+10CA  58          pop ax
+10CB  EB 03       jmp 10d0h
+10CD  B8 01 00    mov ax,1h
+10D0  5F          pop di
+10D1  5E          pop si
+10D2  5A          pop dx
+10D3  59          pop cx
+10D4  5B          pop bx
+10D5  89 EC       mov sp,bp
+10D7  5D          pop bp
+10D8  C3          ret
+10D9  55          push bp
+10DA  8B EC       mov bp,sp
+10DC  53          push bx
+10DD  51          push cx
+10DE  52          push dx
+10DF  56          push si
+10E0  57          push di
+10E1  8B 7E 06    mov di,word ptr [bp+6h]
+10E4  C6 05 00    mov byte ptr [di],0h
+10E7  47          inc di
+10E8  31 C9       xor cx,cx
+10EA  8B 76 04    mov si,word ptr [bp+4h]
+10ED  8B 04       mov ax,word ptr [si]
+10EF  89 C3       mov bx,ax
+10F1  BA 55 14    mov dx,1455h
+10F4  B9 01 00    mov cx,1h
+10F7  B4 3F       mov ah,3fh
+10F9  CD 21       int 21h
+10FB  83 F8 00    cmp ax,0h
+10FE  74 1C       je 111ch
+1100  A0 55 14    mov al,byte ptr [1455h]
+1103  3C 1A       cmp al,1ah
+1105  74 1C       je 1123h
+1107  3C 0D       cmp al,0dh
+1109  74 E2       je 10edh
+110B  3C 0A       cmp al,0ah
+110D  74 19       je 1128h
+110F  8B 46 08    mov ax,word ptr [bp+8h]
+1112  39 C8       cmp ax,cx
+1114  76 D7       jbe 10edh
+1116  88 05       mov byte ptr [di],al
+1118  47          inc di
+1119  41          inc cx
+111A  EB D1       jmp 10edh
+111C  C6 06 54 14 01 mov byte ptr [1454h],1h
+1121  EB 05       jmp 1128h
+1123  C6 06 54 14 01 mov byte ptr [1454h],1h
+1128  8B 5E 06    mov bx,word ptr [bp+6h]
+112B  88 0F       mov byte ptr [bx],cl
+112D  31 C0       xor ax,ax
+112F  A3 50 14    mov word ptr [1450h],ax
+1132  5F          pop di
+1133  5E          pop si
+1134  5A          pop dx
+1135  59          pop cx
+1136  5B          pop bx
+1137  89 EC       mov sp,bp
+1139  5D          pop bp
+113A  C3          ret
+113B  55          push bp
+113C  8B EC       mov bp,sp
+113E  53          push bx
+113F  51          push cx
+1140  52          push dx
+1141  56          push si
+1142  57          push di
+1143  8B 7E 04    mov di,word ptr [bp+4h]
+1146  C6 05 00    mov byte ptr [di],0h
+1149  47          inc di
+114A  8B 46 06    mov ax,word ptr [bp+6h]
+114D  C6 06 55 14 00 mov byte ptr [1455h],0h
+1152  83 F8 00    cmp ax,0h
+1155  7D 07       jnl 115eh
+1157  C6 06 55 14 01 mov byte ptr [1455h],1h
+115C  F7 D8       neg ax
+115E  B9 0A 00    mov cx,0ah
+1161  BB 95 13    mov bx,1395h
+1164  89 DE       mov si,bx
+1166  31 D2       xor dx,dx
+1168  F7 F1       div ax,cx
+116A  80 C2 30    add dl,30h
+116D  4E          dec si
+116E  88 14       mov byte ptr [si],dl
+1170  83 F8 00    cmp ax,0h
+1173  75 F1       jne 1166h
+1175  A0 55 14    mov al,byte ptr [1455h]
+1178  3C 00       cmp al,0h
+117A  74 04       je 1180h
+117C  C6 05 2D    mov byte ptr [di],2dh
+117F  47          inc di
+1180  89 D9       mov cx,bx
+1182  29 F1       sub cx,si
+1184  A0 55 14    mov al,byte ptr [1455h]
+1187  3C 00       cmp al,0h
+1189  74 01       je 118ch
+118B  41          inc cx
+118C  8A D1       mov dl,cl
+118E  8A 04       mov al,byte ptr [si]
+1190  88 05       mov byte ptr [di],al
+1192  46          inc si
+1193  47          inc di
+1194  E2 F8       loop 118eh
+1196  8B 5E 04    mov bx,word ptr [bp+4h]
+1199  88 17       mov byte ptr [bx],dl
+119B  5F          pop di
+119C  5E          pop si
+119D  5A          pop dx
+119E  59          pop cx
+119F  5B          pop bx
+11A0  89 EC       mov sp,bp
+11A2  5D          pop bp
+11A3  C3          ret
+11A4  55          push bp
+11A5  8B EC       mov bp,sp
+11A7  53          push bx
+11A8  51          push cx
+11A9  52          push dx
+11AA  56          push si
+11AB  57          push di
+11AC  8B 7E 04    mov di,word ptr [bp+4h]
+11AF  8A 05       mov al,byte ptr [di]
+11B1  88 C1       mov cl,al
+11B3  30 ED       xor ch,ch
+11B5  47          inc di
+11B6  89 FE       mov si,di
+11B8  31 DB       xor bx,bx
+11BA  C6 06 56 14 00 mov byte ptr [1456h],0h
+11BF  E3 35       jcxz 11f6h
+11C1  8A 05       mov al,byte ptr [di]
+11C3  3C 2D       cmp al,2dh
+11C5  74 02       je 11c9h
+11C7  EB 09       jmp 11d2h
+11C9  C6 06 56 14 01 mov byte ptr [1456h],1h
+11CE  47          inc di
+11CF  49          dec cx
+11D0  E3 46       jcxz 1218h
+11D2  8A 05       mov al,byte ptr [di]
+11D4  3C 30       cmp al,30h
+11D6  72 40       jb 1218h
+11D8  3C 39       cmp al,39h
+11DA  77 3C       jnbe 1218h
+11DC  2C 30       sub al,30h
+11DE  30 E4       xor ah,ah
+11E0  A3 57 14    mov word ptr [1457h],ax
+11E3  89 D8       mov ax,bx
+11E5  BB 0A 00    mov bx,0ah
+11E8  F7 E3       mul bx
+11EA  03 06 57 14 add ax,word ptr [1457h]
+11EE  89 C3       mov bx,ax
+11F0  47          inc di
+11F1  49          dec cx
+11F2  E3 0B       jcxz 11ffh
+11F4  EB DC       jmp 11d2h
+11F6  8B 5E 08    mov bx,word ptr [bp+8h]
+11F9  31 C0       xor ax,ax
+11FB  89 07       mov word ptr [bx],ax
+11FD  EB 23       jmp 1222h
+11FF  A0 56 14    mov al,byte ptr [1456h]
+1202  3C 00       cmp al,0h
+1204  74 02       je 1208h
+1206  F7 DB       neg bx
+1208  89 D8       mov ax,bx
+120A  8B 5E 06    mov bx,word ptr [bp+6h]
+120D  89 07       mov word ptr [bx],ax
+120F  8B 5E 08    mov bx,word ptr [bp+8h]
+1212  31 C0       xor ax,ax
+1214  89 07       mov word ptr [bx],ax
+1216  EB 0A       jmp 1222h
+1218  8B C7       mov ax,di
+121A  2B C6       sub ax,si
+121C  40          inc ax
+121D  8B 5E 08    mov bx,word ptr [bp+8h]
+1220  89 07       mov word ptr [bx],ax
+1222  5F          pop di
+1223  5E          pop si
+1224  5A          pop dx
+1225  59          pop cx
+1226  5B          pop bx
+1227  89 EC       mov sp,bp
+1229  5D          pop bp
+122A  C3          ret
+122B  55          push bp
+122C  8B EC       mov bp,sp
+122E  53          push bx
+122F  51          push cx
+1230  52          push dx
+1231  56          push si
+1232  57          push di
+1233  8B 76 04    mov si,word ptr [bp+4h]
+1236  8A 04       mov al,byte ptr [si]
+1238  30 E4       xor ah,ah
+123A  89 C1       mov cx,ax
+123C  46          inc si
+123D  BF 59 14    mov di,1459h
+1240  E3 08       jcxz 124ah
+1242  8A 04       mov al,byte ptr [si]
+1244  88 05       mov byte ptr [di],al
+1246  46          inc si
+1247  47          inc di
+1248  E2 F8       loop 1242h
+124A  31 C0       xor ax,ax
+124C  88 05       mov byte ptr [di],al
+124E  BB 59 14    mov bx,1459h
+1251  8B 7E 06    mov di,word ptr [bp+6h]
+1254  89 1E 4E 14 mov word ptr [144eh],bx
+1258  E8 C2 FA    call 0d1dh
+125B  72 1F       jb 127ch
+125D  89 D8       mov ax,bx
+125F  8B 16 4E 14 mov dx,word ptr [144eh]
+1263  2B C2       sub ax,dx
+1265  8B 76 04    mov si,word ptr [bp+4h]
+1268  8A 0C       mov cl,byte ptr [si]
+126A  30 ED       xor ch,ch
+126C  39 C8       cmp ax,cx
+126E  74 03       je 1273h
+1270  40          inc ax
+1271  EB 02       jmp 1275h
+1273  31 C0       xor ax,ax
+1275  8B 5E 08    mov bx,word ptr [bp+8h]
+1278  89 07       mov word ptr [bx],ax
+127A  EB 08       jmp 1284h
+127C  B8 01 00    mov ax,1h
+127F  8B 5E 08    mov bx,word ptr [bp+8h]
+1282  89 07       mov word ptr [bx],ax
+1284  5F          pop di
+1285  5E          pop si
+1286  5A          pop dx
+1287  59          pop cx
+1288  5B          pop bx
+1289  89 EC       mov sp,bp
+128B  5D          pop bp
+128C  C3          ret