Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.msdos.programmer > #4214

Re: TR util for DOS

From wolfgang kern <nowhere@nospicedham.nevernet.at>
Newsgroups comp.os.msdos.programmer, comp.lang.asm.x86, alt.lang.asm
Subject Re: TR util for DOS
Date 2023-01-02 11:53 +0100
Organization Aioe.org NNTP Server
Message-ID <toud45$643$1@gioia.aioe.org> (permalink)
References <20221223155428.cffff42388521c7edcc7fc41@127.0.0.1> <20221230102429.07cf00658a86b4eae37b2c85@127.0.0.1> <20221230213612.5365d824afb3f42b710a0546@127.0.0.1> <20221231205235.58f626ebf44ce26ca6e79486@127.0.0.1>

Cross-posted to 3 groups.

Show all headers | View raw


On 31/12/2022 21:52, Kerr-Mudd, John wrote:

>>>> example text to unrot:
>>>>
>>>> Onebarff Znetnerg Gungpure!

>>> Now allows >1 space between the strings! (but no error checking)
>> Now 90 bytes, assumes that at start ax=0,bh=0 and that cx > lth of
>> parameters.
>> I think that's as small as I can manage.

> [duff code dump]
> I see no-one (including me,til now!) has tested it. it works under grdb
> because bp is 0 at start. Not in native DOS/XP cmd box though.

> Fix by using di instead of bp.
> ->          d 100 l5A
> 1637:0100 99 BF 5A 01-AA FE C0 75-FB B3 83 B0-20 89 DF F2  ..Z....u.... ...
> 1637:0110 AE F3 AE 89-FE 80 F2 01-74 04 88 85-5A 01 97 87  ........t...Z...
> 1637:0120 DE 80 3C 2D-75 08 40 3A-44 01 76 E9-46 46 AC 3C  ..<-u.@:D.v.FF.<
> 1637:0130 27 75 E2 BA-5A 02 31 DB-89 D6 89 F7-B9 A5 FD B4  'u..Z.1.........
> 1637:0140 3F CD 21 91-E3 13 BB 5A-01 51 AC D7-AA E2 FB 59  ?.!....Z.Q.....Y
> 1637:0150 BB 01-00 B4 40 CD-21 EB DD C3                    ....@.!...
> ->          q

>> Wolfgang, would you like it in asm? here it is -

:) Happy New Year!

I actually had no idea what this is supposed to do...
if it is something like ROT13 I dunno the required algo. but
code parts look suspicious as if compiled by good old BASIC.

>> ->          u 100 l5A
>> 1637:0100 99             cwd
>> 1637:0101 BF 5A 01       mov          di,015A
>> 1637:0104 AA             stosb
>> 1637:0105 FE C0          inc          al
>> 1637:0107 75 FB          jnz          0104
>> 1637:0109 B3 83          mov          bl,83
>> 1637:010B B0 20          mov          al,20
>> 1637:010D 89 DF          mov          di,bx
>> 1637:010F F2 AE          repnz scasb
>> 1637:0111 F3 AE          repz scasb
>> 1637:0113 89 FE          mov          si,di
>> 1637:0115 80 F2 01       xor          dl,01
>> 1637:0118 74 04          jz           011E
> change bp to di in the next 2 lines:
> ;> 1637:011A 88 86 5A 01    mov          [bp+015A],al
> ;> 1637:011E 95             xchg         ax,bp
> 
> 1637:011A 88 85 5A 01    mov          [di+015A],al
> 1637:011E 97             xchg         ax,di
> 
>> 1637:011F 87 DE          xchg         bx,si
>> 1637:0121 80 3C 2D       cmp          byte [si],2D
>> 1637:0124 75 08          jnz          012E
>> 1637:0126 40             inc          ax
>> 1637:0127 3A 44 01       cmp          al,[si+01]
>> 1637:012A 76 E9          jbe          0115
>> 1637:012C 46             inc          si
>> 1637:012D 46             inc          si
>> 1637:012E AC             lodsb
>> 1637:012F 3C 27          cmp          al,27
>> 1637:0131 75 E2          jnz          0115
>> 1637:0133 BA 5A 02       mov          dx,025A
>> 1637:0136 31 DB          xor          bx,bx
>> 1637:0138 89 D6          mov          si,dx
>> 1637:013A 89 F7          mov          di,si
>> 1637:013C B9 A5 FD       mov          cx,FDA5
>> 1637:013F B4 3F          mov          ah,3F
>> 1637:0141 CD 21          int          21
>> 1637:0143 91             xchg         ax,cx
>> 1637:0144 E3 13          jcxzw        0159
>> 1637:0146 BB 5A 01       mov          bx,015A
>> 1637:0149 51             push         cx
>> 1637:014A AC             lodsb
>> 1637:014B D7             xlat         [bx]
>> 1637:014C AA             stosb
>> 1637:014D E2 FB          loopw        014A
>> 1637:014F 59             pop          cx
>> 1637:0150 BB 01 00       mov          bx,0001
>> 1637:0153 B4 40          mov          ah,40
>> 1637:0155 CD 21          int          21
>> 1637:0157 EB DD          jmp          0136
>> 1637:0159 C3             ret
__
wolfgang

Back to comp.os.msdos.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

TR util was Fw: Re: Filesystem vs file system "Kerr-Mudd, John" <admin@127.0.0.1> - 2022-12-23 15:54 +0000
  Re: TR util for DOS "Kerr-Mudd, John" <admin@127.0.0.1> - 2022-12-30 10:24 +0000
    Re: TR util for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2022-12-30 21:36 +0000
      Re: TR util for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2022-12-31 20:52 +0000
        Re: TR util for DOS wolfgang kern <nowhere@nospicedham.nevernet.at> - 2023-01-02 11:53 +0100
          Re: TR util for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-01-02 13:51 +0000
            Re: TR util for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-01-07 16:34 +0000
              Rot13 for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-01-22 09:24 +0000
                Re: Rot13 for DOS Terje Mathisen <terje.mathisen@nospicedham.tmsw.no> - 2023-01-25 15:03 +0100
                Re: Rot13 for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-01-25 17:02 +0000
                Re: Rot13 for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-01-27 09:57 +0000
                Re: Rot13 for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-01-27 13:30 +0000
                Re: Rot13 for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-11-18 11:10 +0000
                Re: Rot13 for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-11-18 16:16 +0000
                Re: Rot13 for DOS "Kerr-Mudd, John" <admin@nospicedham.127.0.0.1> - 2023-11-18 22:19 +0000

csiph-web