Kerr-Mudd, John
2022-12-30 21:36:12 UTC
On Fri, 30 Dec 2022 10:24:29 +0000
parameters.
I think that's as small as I can manage.
-> 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 86-5A 01 95 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 -
-> 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
1637:011A 88 86 5A 01 mov [bp+015A],al
1637:011E 95 xchg ax,bp
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
On Fri, 23 Dec 2022 15:54:28 +0000
[[unix]]
[100 byte version]
[][[unix]]
$ more bin/rot13
#!/bin/sh
tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
tr.com: uses DOS int 21 for fileIO#!/bin/sh
tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
tr 'A-Za-z' 'N-ZA-Mn-za-m' {<con}
Onebarff Znetnerg Gungpure!
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 ofparameters.
I think that's as small as I can manage.
-> 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 86-5A 01 95 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 -
-> 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
1637:011A 88 86 5A 01 mov [bp+015A],al
1637:011E 95 xchg ax,bp
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
--
Bah, and indeed Humbug.
Bah, and indeed Humbug.