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,541 of 4,675    |
|    wolfgang kern to John    |
|    Re: TR util for DOS    |
|    02 Jan 23 11:53:55    |
      XPost: comp.os.msdos.programmer, alt.lang.asm       From: nowhere@nospicedham.nevernet.at              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              --- 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