home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.asm.x86      Ahh, the lost art of x86 assembly      4,675 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 4,636 of 4,675   
   Kerr-Mudd, John to John"   
   Re: Rot13 for DOS   
   18 Nov 23 16:16:14   
   
   XPost: comp.os.msdos.programmer, alt.lang.asm   
   From: admin@nospicedham.127.0.0.1   
      
   On Sat, 18 Nov 2023 11:10:20 +0000   
   "Kerr-Mudd, John"  wrote:   
      
   >   
   >   
   > And a version that allows the rot amount as a parameter in 64 bytes:   
   > example usage:   
   > rot 3   
   > ->u 100 l40   
      
   Bah,  I knew I shouldn't have posted so soon:   
      
      
   > 16AD:0100 BA E6 0D       mov          dx,0DE6   
   Instead of   
      
   > 16AD:0103 BE 82 00       mov          si,0082   
   > 16AD:0106 AD             lodsw   
   use:   
   16AD:0103 A1 82 00       mov          ax,[0082]   
      
   (and adjust everything else up 1)   
      
   > 16AD:0107 2D 30 30       sub          ax,3030   
   > 16AD:010A 72 04          jb           0110   
   > 16AD:010C 86 E0          xchg         ah,al   
   > 16AD:010E D5 0A          aad          0A   
   > 16AD:0110 3C 00          cmp          al,00   
   > 16AD:0112 72 02          jb           0116   
   > 16AD:0114 88 C6          mov          dh,al   
   >   
   > 16AD:0116 B4 3F          mov          ah,3F   
   > 16AD:0118 B5 C3          mov          ch,C3   
   > 16AD:011A CD 21          int          21   
   > 16AD:011C 91             xchg         ax,cx   
   > 16AD:011D E3 FA          jcxzw        0119   
   >   
   > 16AD:011F 89 D6          mov          si,dx   
   > 16AD:0121 51             push         cx   
   >   
   > 16AD:0122 AC             lodsb   
   > 16AD:0123 24 DF          and          al,DF   
   > 16AD:0125 2C 41          sub          al,41   
   > 16AD:0127 2C 1A          sub          al,1A   
   > 16AD:0129 18 E4          sbb          ah,ah   
   > 16AD:012B 00 F0          add          al,dh   
   > 16AD:012D D6             salc   
   > 16AD:012E 21 D0          and          ax,dx   
   > 16AD:0130 00 E0          add          al,ah   
   > 16AD:0132 00 44 FF       add          [si-01],al   
   > 16AD:0135 E2 EB          loopw        0122   
   >   
   > 16AD:0137 59             pop          cx   
   > 16AD:0138 43             inc          bx   
   > 16AD:0139 B4 40          mov          ah,40   
   > 16AD:013B CD 21          int          21   
   > 16AD:013D 4B             dec          bx   
   > 16AD:013E EB D6          jmp          0116   
   >   
   > ->          d 100 l40   
   > 16AD:0100 BA E6 0D BE-82 00 AD 2D-30 30 72 04-86 E0 D5 0A  .......-00r.....   
   > 16AD:0110 3C 00 72 02-88 C6 B4 3F-B5 C3 CD 21-91 E3 FA 89  <.r....?...!....   
   > 16AD:0120 D6 51 AC 24-DF 2C 41 2C-1A 18 E4 00-F0 D6 21 D0  .Q.$.,A,......!.   
   > 16AD:0130 00 E0 00 44-FF E2 EB 59-43 B4 40 CD-21 4B EB D6  ...D...YC.@.!K..   
   > ->          q   
   >   
   >   
   >   
   > --   
   > Bah, and indeed Humbug.   
   >   
      
      
   --   
   Bah, and indeed Humbug.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca