|
|
1.1 ! root 1: /************************************************************************/ ! 2: /* Copyright (c) 1988, 1989 ARCHIVE Corporation */ ! 3: /* This program is an unpublished work fully protected by the */ ! 4: /* United States Copyright laws and is considered a trade secret */ ! 5: /* belonging to Archive Corporation. */ ! 6: /************************************************************************/ ! 7: /* file: xla.orig.s asm code for xl.c */ ! 8: /* */ ! 9: /* 13JUL88 14:00 */ ! 10: /* Unix port 05/14/1989 */ ! 11: /************************************************************************/ ! 12: ! 13: /************************************************************************/ ! 14: /* 386 version */ ! 15: /************************************************************************/ ! 16: ! 17: /************************************************************************/ ! 18: /* request buffer structure */ ! 19: /* must match struc rb{} in xl.c */ ! 20: /************************************************************************/ ! 21: .unixorder ! 22: rb: /* request buffer structure */ ! 23: rbnxt: .long 0 /* ptr to next packet */ ! 24: rbfun: .byte 0 /* function */ ! 25: rbsts: .byte 0 /* status */ ! 26: rbsgn: .value 0 /* segment # */ ! 27: rbadr: .long 0 /* addr of buffer */ ! 28: rbmap: .long 0 /* bad sector map */ ! 29: rbhed: .byte 0 /* fdc head */ ! 30: rbcyl: .byte 0 /* fdc cylinder */ ! 31: rbsct: .byte 0 /* base fdc sector */ ! 32: rbtrk: .byte 0 /* tape track */ ! 33: rbtps: .byte 0 /* segment */ ! 34: rbidc: .byte 0 /* read id cylinder */ ! 35: rbids: .byte 0 /* sct */ ! 36: rbnbk: .byte 0 /* # blocks */ ! 37: rberc: .byte 0 /* error count */ ! 38: rbers: .byte 0,0,0 /* error sectors */ ! 39: rbtbl: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ! 40: /* parsed segment params*/ ! 41: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ! 42: /rb ends ! 43: /********************************************************/ ! 44: / data section */ ! 45: /********************************************************/ ! 46: .data ! 47: / tables must be on page boundary ! 48: / which is why they are in _data ! 49: .globl xl_log2 ! 50: .globl xl_alg2 ! 51: .globl xl_mx02 ! 52: .globl xl_mxc0 ! 53: .globl xl_mxc3 ! 54: xl_log2: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /ecc tables ! 55: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /2 ! 56: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /3 ! 57: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /4 ! 58: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /5 ! 59: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /6 ! 60: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /7 ! 61: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /8 ! 62: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /9 ! 63: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /10 ! 64: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /11 ! 65: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /12 ! 66: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /13 ! 67: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /14 ! 68: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /15 ! 69: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /16 ! 70: xl_alg2: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /ecc tables ! 71: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /2 ! 72: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /3 ! 73: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /4 ! 74: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /5 ! 75: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /6 ! 76: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /7 ! 77: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /8 ! 78: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /9 ! 79: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /10 ! 80: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /11 ! 81: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /12 ! 82: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /13 ! 83: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /14 ! 84: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /15 ! 85: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /16 ! 86: xl_mx02: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /ecc tables ! 87: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /2 ! 88: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /3 ! 89: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /4 ! 90: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /5 ! 91: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /6 ! 92: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /7 ! 93: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /8 ! 94: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /9 ! 95: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /10 ! 96: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /11 ! 97: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /12 ! 98: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /13 ! 99: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /14 ! 100: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /15 ! 101: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /16 ! 102: xl_mxc0: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /ecc tables ! 103: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /2 ! 104: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /3 ! 105: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /4 ! 106: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /5 ! 107: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /6 ! 108: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /7 ! 109: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /8 ! 110: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /9 ! 111: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /10 ! 112: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /11 ! 113: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /12 ! 114: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /13 ! 115: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /14 ! 116: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /15 ! 117: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /16 ! 118: xl_mxc3: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /ecc tables ! 119: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /2 ! 120: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /3 ! 121: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /4 ! 122: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /5 ! 123: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /6 ! 124: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /7 ! 125: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /8 ! 126: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /9 ! 127: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /10 ! 128: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /11 ! 129: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /12 ! 130: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /13 ! 131: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /14 ! 132: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /15 ! 133: .byte 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /16 ! 134: encj: .long 0 ! 135: chkj: .long 0 ! 136: ! 137: .globl xl_encs ! 138: .globl xl_chks ! 139: xl_encs: .byte 0 ! 140: xl_chks: .byte 0 ! 141: ! 142: .globl xl_tbl ! 143: .globl xl_bst ! 144: .globl xl_sct ! 145: .globl xl_cnt ! 146: .globl xl_ofs ! 147: xl_tbl: .long 0 /* ptr to rb.tbl */ ! 148: xl_bst: .byte 0 /* base sector for segment */ ! 149: xl_sct: .byte 0 /* sector # for next chunk */ ! 150: xl_cnt: .long 0 /* # bytes to xfer next chunk */ ! 151: xl_ofs: .long 0 /* offset for next chunk */ ! 152: prb: .long 0 /* pointer to rb */ ! 153: xl_nbk: .byte 0 /* # blocks / segment */ ! 154: /* rb.tbl format: */ ! 155: /* bits 15-10 = dma count */ ! 156: /* bits 9-5 = dma offset >> 5 */ ! 157: /* bits 4-0 = sector */ ! 158: ! 159: .bss ! 160: /********************************************************/ ! 161: / code section */ ! 162: /********************************************************/ ! 163: .text ! 164: .align 4 ! 165: /********************************************************/ ! 166: / xl_move (src, dest, cnt) */ ! 167: /********************************************************/ ! 168: .globl xl_move ! 169: xl_move: ! 170: push %ebp /* set up ! 171: mov %esp,%ebp ! 172: push %es ! 173: push %edi ! 174: push %esi ! 175: push %ds ! 176: pop %es ! 177: mov 8(%ebp),%esi ! 178: mov 12(%ebp),%edi ! 179: mov 16(%ebp),%ecx ! 180: cld ! 181: jcxz xl_mov0 /* br if no data ! 182: shr $2,%ecx /* move longs ! 183: repz ! 184: movsl ! 185: mov 16(%ebp),%ecx /* move bytes (if any) ! 186: and $3,%ecx ! 187: rep ! 188: movsb ! 189: xl_mov0: ! 190: pop %esi /* exit ! 191: pop %edi ! 192: pop %es ! 193: pop %ebp ! 194: ret ! 195: ! 196: /********************************************************/ ! 197: / xl_tbi initialize table */ ! 198: /********************************************************/ ! 199: .globl xl_tbi ! 200: xl_tbi: ! 201: push %ebx ! 202: push %esi ! 203: / ! 204: movl $enc2,%eax /initialize xl_encs ! 205: subl $enc1,%eax ! 206: movb %al,xl_encs ! 207: movl $chk2,%eax /initialize xl_chks ! 208: subl $chk1,%eax ! 209: movb %al,xl_chks ! 210: / ! 211: mov $xl_alg2,%ebx /init alog2 table ! 212: movb $01,%al ! 213: tbli0: ! 214: movb %al,(%ebx) ! 215: inc %ebx ! 216: addb %al,%al ! 217: jnc tbli1 ! 218: xorb $0x87,%al ! 219: tbli1: ! 220: cmpb $01,%al ! 221: jne tbli0 ! 222: movb %al,(%ebx) ! 223: / ! 224: mov $xl_alg2,%esi ! 225: movb $0x0ff,xl_log2 ! 226: xor %eax,%eax ! 227: xor %ebx,%ebx ! 228: tbli2: ! 229: movb (%esi),%bl ! 230: movb %al,xl_log2(%ebx) ! 231: inc %esi ! 232: inc %eax ! 233: cmpb $255,%al ! 234: jne tbli2 ! 235: / ! 236: movl $xl_mx02,%esi /init mpy by 02 table ! 237: mov $0x00200,%ecx ! 238: tbli3: ! 239: call _mpy ! 240: movb %al,(%esi) ! 241: inc %esi ! 242: incb %cl ! 243: jne tbli3 ! 244: / ! 245: mov $xl_mxc0,%esi /init mpy by c0 table ! 246: mov $0x0c000,%ecx ! 247: tbli4: call _mpy ! 248: movb %al,(%esi) ! 249: inc %esi ! 250: incb %cl ! 251: jne tbli4 ! 252: / ! 253: movl $xl_mxc3,%esi /init mpy by c3 table ! 254: mov $0x0c300,%ecx ! 255: tbli5: ! 256: call _mpy ! 257: movb %al,(%esi) ! 258: inc %esi ! 259: incb %cl ! 260: jne tbli5 ! 261: pop %esi ! 262: pop %ebx ! 263: ret ! 264: ! 265: /encm macro a,c,d,o ! 266: / xor o*1024(%edi),%e&a&x ;eax = new r0 bytes ! 267: / xor %e&c&x,%e&d&x ;set up edx for later ! 268: / movb %&a&l,%bl ;multiply 4 bytes by c0 ! 269: / xorb (%ebp,%ebx),%&c&l ; and xor to ecx ! 270: / movb %&a&h,%bl ; ecx will be new r2 ! 271: / xorb (%ebp,%ebx),%&c&h ! 272: / rol $16,%e&a&x ! 273: / rol $16,%e&c&x ! 274: / movb %&a&l,%bl ! 275: / xorb (%ebp,%ebx),%&c&l ! 276: / movb %&a&h,%bl ! 277: / xorb (%ebp,%ebx),%&c&h ! 278: / rol $16,%e&a&x ! 279: / rol $16,%e&c&x ! 280: / xor %e&c&x,%e&d&x ;edx = new r1 ! 281: / endm ! 282: ! 283: /********************************************************/ ! 284: / xl_enc(bfr, nblks) 3/32 1024 byte blocks */ ! 285: /********************************************************/ ! 286: / ! 287: .globl xl_enc ! 288: xl_enc: ! 289: enter $0, $4 / loop count is a local variable ! 290: push %ebx ! 291: push %edi ! 292: push %esi ! 293: mov 8(%ebp),%edi /edi = bfr ! 294: mov 12(%ebp),%ebx /ebx = nblks ! 295: mov %ebx,%eax /adjust edi ! 296: dec %eax ! 297: shl $10,%eax ! 298: add %eax,%edi ! 299: mov $32,%eax /set encj according to # blocks ! 300: subb %bl,%al ! 301: mulb xl_encs ! 302: add $enc1,%eax ! 303: mov %eax,encj ! 304: mov $256,-4(%ebp) /set up for encode loop ! 305: enc0: ! 306: mov $xl_mxc0,%esi ! 307: xor %ebx,%ebx /edx ends up = r2 ! 308: xor %edx,%edx /edx ends up = r2 ! 309: xor %ecx,%ecx /ecx ends up = r1 ! 310: xor %eax,%eax /eax ends up = r0 ! 311: jmp *encj ! 312: / .even ! 313: .align 2 ! 314: / ! 315: / encode data ! 316: / ! 317: enc1: ! 318: /encm c,a,d,-31 ! 319: xor -31744(%edi),%ecx /eax = new r0 bytes ! 320: xor %eax,%edx /set up edx for later ! 321: movb %cl,%bl /multiply 4 bytes by c0 ! 322: xorb (%ebx,%esi),%al / and xor to ecx ! 323: movb %ch,%bl / ecx will be new r2 ! 324: xorb (%ebx,%esi),%ah ! 325: rol $16,%ecx ! 326: rol $16,%eax ! 327: movb %cl,%bl ! 328: xorb (%ebx,%esi),%al ! 329: movb %ch,%bl ! 330: xorb (%ebx,%esi),%ah ! 331: rol $16,%ecx ! 332: rol $16,%eax ! 333: xor %eax,%edx /edx = new r1 ! 334: enc2: ! 335: /encm a,d,c,-30 ! 336: xor -30720(%edi),%eax /eax = new r0 bytes ! 337: xor %edx,%ecx /set up edx for later ! 338: movb %al,%bl /multiply 4 bytes by c0 ! 339: xorb (%ebx,%esi),%dl / and xor to ecx ! 340: movb %ah,%bl / ecx will be new r2 ! 341: xorb (%ebx,%esi),%dh ! 342: rol $16,%eax ! 343: rol $16,%edx ! 344: movb %al,%bl ! 345: xorb (%ebx,%esi),%dl ! 346: movb %ah,%bl ! 347: xorb (%ebx,%esi),%dh ! 348: rol $16,%eax ! 349: rol $16,%edx ! 350: xor %edx,%ecx /edx = new r1 ! 351: /encm d,c,a,-29 ! 352: xor -29696(%edi),%edx /eax = new r0 bytes ! 353: xor %ecx,%eax /set up edx for later ! 354: movb %dl,%bl /multiply 4 bytes by c0 ! 355: xorb (%ebx,%esi),%cl / and xor to ecx ! 356: movb %dh,%bl / ecx will be new r2 ! 357: xorb (%ebx,%esi),%ch ! 358: rol $16,%edx ! 359: rol $16,%ecx ! 360: movb %dl,%bl ! 361: xorb (%ebx,%esi),%cl ! 362: movb %dh,%bl ! 363: xorb (%ebx,%esi),%ch ! 364: rol $16,%edx ! 365: rol $16,%ecx ! 366: xor %ecx,%eax /edx = new r1 ! 367: /encm c,a,d,-28 ! 368: xor -28672(%edi),%ecx /eax = new r0 bytes ! 369: xor %eax,%edx /set up edx for later ! 370: movb %cl,%bl /multiply 4 bytes by c0 ! 371: xorb (%ebx,%esi),%al / and xor to ecx ! 372: movb %ch,%bl / ecx will be new r2 ! 373: xorb (%ebx,%esi),%ah ! 374: rol $16,%ecx ! 375: rol $16,%eax ! 376: movb %cl,%bl ! 377: xorb (%ebx,%esi),%al ! 378: movb %ch,%bl ! 379: xorb (%ebx,%esi),%ah ! 380: rol $16,%ecx ! 381: rol $16,%eax ! 382: xor %eax,%edx /edx = new r1 ! 383: /encm a,d,c,-27 ! 384: xor -27648(%edi),%eax /eax = new r0 bytes ! 385: xor %edx,%ecx /set up edx for later ! 386: movb %al,%bl /multiply 4 bytes by c0 ! 387: xorb (%ebx,%esi),%dl / and xor to ecx ! 388: movb %ah,%bl / ecx will be new r2 ! 389: xorb (%ebx,%esi),%dh ! 390: rol $16,%eax ! 391: rol $16,%edx ! 392: movb %al,%bl ! 393: xorb (%ebx,%esi),%dl ! 394: movb %ah,%bl ! 395: xorb (%ebx,%esi),%dh ! 396: rol $16,%eax ! 397: rol $16,%edx ! 398: xor %edx,%ecx /edx = new r1 ! 399: /encm d,c,a,-26 ! 400: xor -26624(%edi),%edx /eax = new r0 bytes ! 401: xor %ecx,%eax /set up edx for later ! 402: movb %dl,%bl /multiply 4 bytes by c0 ! 403: xorb (%ebx,%esi),%cl / and xor to ecx ! 404: movb %dh,%bl / ecx will be new r2 ! 405: xorb (%ebx,%esi),%ch ! 406: rol $16,%edx ! 407: rol $16,%ecx ! 408: movb %dl,%bl ! 409: xorb (%ebx,%esi),%cl ! 410: movb %dh,%bl ! 411: xorb (%ebx,%esi),%ch ! 412: rol $16,%edx ! 413: rol $16,%ecx ! 414: xor %ecx,%eax /edx = new r1 ! 415: /encm c,a,d,-25 ! 416: xor -25600(%edi),%ecx /eax = new r0 bytes ! 417: xor %eax,%edx /set up edx for later ! 418: movb %cl,%bl /multiply 4 bytes by c0 ! 419: xorb (%ebx,%esi),%al / and xor to ecx ! 420: movb %ch,%bl / ecx will be new r2 ! 421: xorb (%ebx,%esi),%ah ! 422: rol $16,%ecx ! 423: rol $16,%eax ! 424: movb %cl,%bl ! 425: xorb (%ebx,%esi),%al ! 426: movb %ch,%bl ! 427: xorb (%ebx,%esi),%ah ! 428: rol $16,%ecx ! 429: rol $16,%eax ! 430: xor %eax,%edx /edx = new r1 ! 431: /encm a,d,c,-24 ! 432: xor -24576(%edi),%eax /eax = new r0 bytes ! 433: xor %edx,%ecx /set up edx for later ! 434: movb %al,%bl /multiply 4 bytes by c0 ! 435: xorb (%ebx,%esi),%dl / and xor to ecx ! 436: movb %ah,%bl / ecx will be new r2 ! 437: xorb (%ebx,%esi),%dh ! 438: rol $16,%eax ! 439: rol $16,%edx ! 440: movb %al,%bl ! 441: xorb (%ebx,%esi),%dl ! 442: movb %ah,%bl ! 443: xorb (%ebx,%esi),%dh ! 444: rol $16,%eax ! 445: rol $16,%edx ! 446: xor %edx,%ecx /edx = new r1 ! 447: /encm d,c,a,-23 ! 448: xor -23552(%edi),%edx /eax = new r0 bytes ! 449: xor %ecx,%eax /set up edx for later ! 450: movb %dl,%bl /multiply 4 bytes by c0 ! 451: xorb (%ebx,%esi),%cl / and xor to ecx ! 452: movb %dh,%bl / ecx will be new r2 ! 453: xorb (%ebx,%esi),%ch ! 454: rol $16,%edx ! 455: rol $16,%ecx ! 456: movb %dl,%bl ! 457: xorb (%ebx,%esi),%cl ! 458: movb %dh,%bl ! 459: xorb (%ebx,%esi),%ch ! 460: rol $16,%edx ! 461: rol $16,%ecx ! 462: xor %ecx,%eax /edx = new r1 ! 463: /encm c,a,d,-22 ! 464: xor -22528(%edi),%ecx /eax = new r0 bytes ! 465: xor %eax,%edx /set up edx for later ! 466: movb %cl,%bl /multiply 4 bytes by c0 ! 467: xorb (%ebx,%esi),%al / and xor to ecx ! 468: movb %ch,%bl / ecx will be new r2 ! 469: xorb (%ebx,%esi),%ah ! 470: rol $16,%ecx ! 471: rol $16,%eax ! 472: movb %cl,%bl ! 473: xorb (%ebx,%esi),%al ! 474: movb %ch,%bl ! 475: xorb (%ebx,%esi),%ah ! 476: rol $16,%ecx ! 477: rol $16,%eax ! 478: xor %eax,%edx /edx = new r1 ! 479: /encm a,d,c,-21 ! 480: xor -21504(%edi),%eax /eax = new r0 bytes ! 481: xor %edx,%ecx /set up edx for later ! 482: movb %al,%bl /multiply 4 bytes by c0 ! 483: xorb (%ebx,%esi),%dl / and xor to ecx ! 484: movb %ah,%bl / ecx will be new r2 ! 485: xorb (%ebx,%esi),%dh ! 486: rol $16,%eax ! 487: rol $16,%edx ! 488: movb %al,%bl ! 489: xorb (%ebx,%esi),%dl ! 490: movb %ah,%bl ! 491: xorb (%ebx,%esi),%dh ! 492: rol $16,%eax ! 493: rol $16,%edx ! 494: xor %edx,%ecx /edx = new r1 ! 495: /encm d,c,a,-20 ! 496: xor -20480(%edi),%edx /eax = new r0 bytes ! 497: xor %ecx,%eax /set up edx for later ! 498: movb %dl,%bl /multiply 4 bytes by c0 ! 499: xorb (%ebx,%esi),%cl / and xor to ecx ! 500: movb %dh,%bl / ecx will be new r2 ! 501: xorb (%ebx,%esi),%ch ! 502: rol $16,%edx ! 503: rol $16,%ecx ! 504: movb %dl,%bl ! 505: xorb (%ebx,%esi),%cl ! 506: movb %dh,%bl ! 507: xorb (%ebx,%esi),%ch ! 508: rol $16,%edx ! 509: rol $16,%ecx ! 510: xor %ecx,%eax /edx = new r1 ! 511: /encm c,a,d,-19 ! 512: xor -19456(%edi),%ecx /eax = new r0 bytes ! 513: xor %eax,%edx /set up edx for later ! 514: movb %cl,%bl /multiply 4 bytes by c0 ! 515: xorb (%ebx,%esi),%al / and xor to ecx ! 516: movb %ch,%bl / ecx will be new r2 ! 517: xorb (%ebx,%esi),%ah ! 518: rol $16,%ecx ! 519: rol $16,%eax ! 520: movb %cl,%bl ! 521: xorb (%ebx,%esi),%al ! 522: movb %ch,%bl ! 523: xorb (%ebx,%esi),%ah ! 524: rol $16,%ecx ! 525: rol $16,%eax ! 526: xor %eax,%edx /edx = new r1 ! 527: /encm a,d,c,-18 ! 528: xor -18432(%edi),%eax /eax = new r0 bytes ! 529: xor %edx,%ecx /set up edx for later ! 530: movb %al,%bl /multiply 4 bytes by c0 ! 531: xorb (%ebx,%esi),%dl / and xor to ecx ! 532: movb %ah,%bl / ecx will be new r2 ! 533: xorb (%ebx,%esi),%dh ! 534: rol $16,%eax ! 535: rol $16,%edx ! 536: movb %al,%bl ! 537: xorb (%ebx,%esi),%dl ! 538: movb %ah,%bl ! 539: xorb (%ebx,%esi),%dh ! 540: rol $16,%eax ! 541: rol $16,%edx ! 542: xor %edx,%ecx /edx = new r1 ! 543: /encm d,c,a,-17 ! 544: xor -17408(%edi),%edx /eax = new r0 bytes ! 545: xor %ecx,%eax /set up edx for later ! 546: movb %dl,%bl /multiply 4 bytes by c0 ! 547: xorb (%ebx,%esi),%cl / and xor to ecx ! 548: movb %dh,%bl / ecx will be new r2 ! 549: xorb (%ebx,%esi),%ch ! 550: rol $16,%edx ! 551: rol $16,%ecx ! 552: movb %dl,%bl ! 553: xorb (%ebx,%esi),%cl ! 554: movb %dh,%bl ! 555: xorb (%ebx,%esi),%ch ! 556: rol $16,%edx ! 557: rol $16,%ecx ! 558: xor %ecx,%eax /edx = new r1 ! 559: /encm c,a,d,-16 ! 560: xor -16384(%edi),%ecx /eax = new r0 bytes ! 561: xor %eax,%edx /set up edx for later ! 562: movb %cl,%bl /multiply 4 bytes by c0 ! 563: xorb (%ebx,%esi),%al / and xor to ecx ! 564: movb %ch,%bl / ecx will be new r2 ! 565: xorb (%ebx,%esi),%ah ! 566: rol $16,%ecx ! 567: rol $16,%eax ! 568: movb %cl,%bl ! 569: xorb (%ebx,%esi),%al ! 570: movb %ch,%bl ! 571: xorb (%ebx,%esi),%ah ! 572: rol $16,%ecx ! 573: rol $16,%eax ! 574: xor %eax,%edx /edx = new r1 ! 575: /encm a,d,c,-15 ! 576: xor -15360(%edi),%eax /eax = new r0 bytes ! 577: xor %edx,%ecx /set up edx for later ! 578: movb %al,%bl /multiply 4 bytes by c0 ! 579: xorb (%ebx,%esi),%dl / and xor to ecx ! 580: movb %ah,%bl / ecx will be new r2 ! 581: xorb (%ebx,%esi),%dh ! 582: rol $16,%eax ! 583: rol $16,%edx ! 584: movb %al,%bl ! 585: xorb (%ebx,%esi),%dl ! 586: movb %ah,%bl ! 587: xorb (%ebx,%esi),%dh ! 588: rol $16,%eax ! 589: rol $16,%edx ! 590: xor %edx,%ecx /edx = new r1 ! 591: /encm d,c,a,-14 ! 592: xor -14336(%edi),%edx /eax = new r0 bytes ! 593: xor %ecx,%eax /set up edx for later ! 594: movb %dl,%bl /multiply 4 bytes by c0 ! 595: xorb (%ebx,%esi),%cl / and xor to ecx ! 596: movb %dh,%bl / ecx will be new r2 ! 597: xorb (%ebx,%esi),%ch ! 598: rol $16,%edx ! 599: rol $16,%ecx ! 600: movb %dl,%bl ! 601: xorb (%ebx,%esi),%cl ! 602: movb %dh,%bl ! 603: xorb (%ebx,%esi),%ch ! 604: rol $16,%edx ! 605: rol $16,%ecx ! 606: xor %ecx,%eax /edx = new r1 ! 607: /encm c,a,d,-13 ! 608: xor -13312(%edi),%ecx /eax = new r0 bytes ! 609: xor %eax,%edx /set up edx for later ! 610: movb %cl,%bl /multiply 4 bytes by c0 ! 611: xorb (%ebx,%esi),%al / and xor to ecx ! 612: movb %ch,%bl / ecx will be new r2 ! 613: xorb (%ebx,%esi),%ah ! 614: rol $16,%ecx ! 615: rol $16,%eax ! 616: movb %cl,%bl ! 617: xorb (%ebx,%esi),%al ! 618: movb %ch,%bl ! 619: xorb (%ebx,%esi),%ah ! 620: rol $16,%ecx ! 621: rol $16,%eax ! 622: xor %eax,%edx /edx = new r1 ! 623: /encm a,d,c,-12 ! 624: xor -12288(%edi),%eax /eax = new r0 bytes ! 625: xor %edx,%ecx /set up edx for later ! 626: movb %al,%bl /multiply 4 bytes by c0 ! 627: xorb (%ebx,%esi),%dl / and xor to ecx ! 628: movb %ah,%bl / ecx will be new r2 ! 629: xorb (%ebx,%esi),%dh ! 630: rol $16,%eax ! 631: rol $16,%edx ! 632: movb %al,%bl ! 633: xorb (%ebx,%esi),%dl ! 634: movb %ah,%bl ! 635: xorb (%ebx,%esi),%dh ! 636: rol $16,%eax ! 637: rol $16,%edx ! 638: xor %edx,%ecx /edx = new r1 ! 639: /encm d,c,a,-11 ! 640: xor -11264(%edi),%edx /eax = new r0 bytes ! 641: xor %ecx,%eax /set up edx for later ! 642: movb %dl,%bl /multiply 4 bytes by c0 ! 643: xorb (%ebx,%esi),%cl / and xor to ecx ! 644: movb %dh,%bl / ecx will be new r2 ! 645: xorb (%ebx,%esi),%ch ! 646: rol $16,%edx ! 647: rol $16,%ecx ! 648: movb %dl,%bl ! 649: xorb (%ebx,%esi),%cl ! 650: movb %dh,%bl ! 651: xorb (%ebx,%esi),%ch ! 652: rol $16,%edx ! 653: rol $16,%ecx ! 654: xor %ecx,%eax /edx = new r1 ! 655: /encm c,a,d,-10 ! 656: xor -10240(%edi),%ecx /eax = new r0 bytes ! 657: xor %eax,%edx /set up edx for later ! 658: movb %cl,%bl /multiply 4 bytes by c0 ! 659: xorb (%ebx,%esi),%al / and xor to ecx ! 660: movb %ch,%bl / ecx will be new r2 ! 661: xorb (%ebx,%esi),%ah ! 662: rol $16,%ecx ! 663: rol $16,%eax ! 664: movb %cl,%bl ! 665: xorb (%ebx,%esi),%al ! 666: movb %ch,%bl ! 667: xorb (%ebx,%esi),%ah ! 668: rol $16,%ecx ! 669: rol $16,%eax ! 670: xor %eax,%edx /edx = new r1 ! 671: /encm a,d,c,-9 ! 672: xor -9216(%edi),%eax /eax = new r0 bytes ! 673: xor %edx,%ecx /set up edx for later ! 674: movb %al,%bl /multiply 4 bytes by c0 ! 675: xorb (%ebx,%esi),%dl / and xor to ecx ! 676: movb %ah,%bl / ecx will be new r2 ! 677: xorb (%ebx,%esi),%dh ! 678: rol $16,%eax ! 679: rol $16,%edx ! 680: movb %al,%bl ! 681: xorb (%ebx,%esi),%dl ! 682: movb %ah,%bl ! 683: xorb (%ebx,%esi),%dh ! 684: rol $16,%eax ! 685: rol $16,%edx ! 686: xor %edx,%ecx /edx = new r1 ! 687: /encm d,c,a,-8 ! 688: xor -8192(%edi),%edx /eax = new r0 bytes ! 689: xor %ecx,%eax /set up edx for later ! 690: movb %dl,%bl /multiply 4 bytes by c0 ! 691: xorb (%ebx,%esi),%cl / and xor to ecx ! 692: movb %dh,%bl / ecx will be new r2 ! 693: xorb (%ebx,%esi),%ch ! 694: rol $16,%edx ! 695: rol $16,%ecx ! 696: movb %dl,%bl ! 697: xorb (%ebx,%esi),%cl ! 698: movb %dh,%bl ! 699: xorb (%ebx,%esi),%ch ! 700: rol $16,%edx ! 701: rol $16,%ecx ! 702: xor %ecx,%eax /edx = new r1 ! 703: /encm c,a,d,-7 ! 704: xor -7168(%edi),%ecx /eax = new r0 bytes ! 705: xor %eax,%edx /set up edx for later ! 706: movb %cl,%bl /multiply 4 bytes by c0 ! 707: xorb (%ebx,%esi),%al / and xor to ecx ! 708: movb %ch,%bl / ecx will be new r2 ! 709: xorb (%ebx,%esi),%ah ! 710: rol $16,%ecx ! 711: rol $16,%eax ! 712: movb %cl,%bl ! 713: xorb (%ebx,%esi),%al ! 714: movb %ch,%bl ! 715: xorb (%ebx,%esi),%ah ! 716: rol $16,%ecx ! 717: rol $16,%eax ! 718: xor %eax,%edx /edx = new r1 ! 719: /encm a,d,c,-6 ! 720: xor -6144(%edi),%eax /eax = new r0 bytes ! 721: xor %edx,%ecx /set up edx for later ! 722: movb %al,%bl /multiply 4 bytes by c0 ! 723: xorb (%ebx,%esi),%dl / and xor to ecx ! 724: movb %ah,%bl / ecx will be new r2 ! 725: xorb (%ebx,%esi),%dh ! 726: rol $16,%eax ! 727: rol $16,%edx ! 728: movb %al,%bl ! 729: xorb (%ebx,%esi),%dl ! 730: movb %ah,%bl ! 731: xorb (%ebx,%esi),%dh ! 732: rol $16,%eax ! 733: rol $16,%edx ! 734: xor %edx,%ecx /edx = new r1 ! 735: /encm d,c,a,-5 ! 736: xor -5120(%edi),%edx /eax = new r0 bytes ! 737: xor %ecx,%eax /set up edx for later ! 738: movb %dl,%bl /multiply 4 bytes by c0 ! 739: xorb (%ebx,%esi),%cl / and xor to ecx ! 740: movb %dh,%bl / ecx will be new r2 ! 741: xorb (%ebx,%esi),%ch ! 742: rol $16,%edx ! 743: rol $16,%ecx ! 744: movb %dl,%bl ! 745: xorb (%ebx,%esi),%cl ! 746: movb %dh,%bl ! 747: xorb (%ebx,%esi),%ch ! 748: rol $16,%edx ! 749: rol $16,%ecx ! 750: xor %ecx,%eax /edx = new r1 ! 751: /encm c,a,d,-4 ! 752: xor -4096(%edi),%ecx /eax = new r0 bytes ! 753: xor %eax,%edx /set up edx for later ! 754: movb %cl,%bl /multiply 4 bytes by c0 ! 755: xorb (%ebx,%esi),%al / and xor to ecx ! 756: movb %ch,%bl / ecx will be new r2 ! 757: xorb (%ebx,%esi),%ah ! 758: rol $16,%ecx ! 759: rol $16,%eax ! 760: movb %cl,%bl ! 761: xorb (%ebx,%esi),%al ! 762: movb %ch,%bl ! 763: xorb (%ebx,%esi),%ah ! 764: rol $16,%ecx ! 765: rol $16,%eax ! 766: xor %eax,%edx /edx = new r1 ! 767: /encm a,d,c,-3 ! 768: xor -3072(%edi),%eax /eax = new r0 bytes ! 769: xor %edx,%ecx /set up edx for later ! 770: movb %al,%bl /multiply 4 bytes by c0 ! 771: xorb (%ebx,%esi),%dl / and xor to ecx ! 772: movb %ah,%bl / ecx will be new r2 ! 773: xorb (%ebx,%esi),%dh ! 774: rol $16,%eax ! 775: rol $16,%edx ! 776: movb %al,%bl ! 777: xorb (%ebx,%esi),%dl ! 778: movb %ah,%bl ! 779: xorb (%ebx,%esi),%dh ! 780: rol $16,%eax ! 781: rol $16,%edx ! 782: xor %edx,%ecx /edx = new r1 ! 783: mov %edx,-2048(%edi) /store remainder bytes ! 784: mov %ecx,-1024(%edi) ! 785: mov %eax,(%edi) ! 786: add $4,%edi ! 787: decw -4(%ebp) /loop till done ! 788: jnz enc0 ! 789: pop %esi /exit ! 790: pop %edi ! 791: pop %ebx ! 792: leave ! 793: ret ! 794: ! 795: /********************************************************/ ! 796: / xl_chk(bfr, nblks) 3/32 1024 byte blocks */ ! 797: / out: eax = 0 if ok */ ! 798: /********************************************************/ ! 799: .globl xl_chk ! 800: xl_chk: ! 801: enter $0, $4 / loop count is a local variable ! 802: push %ebx ! 803: push %edi ! 804: push %esi ! 805: mov 8(%ebp),%edi /edi = adr ! 806: mov 12(%ebp),%ebx /ebx = # blocks ! 807: mov %ebx,%eax /adjust edi ! 808: dec %eax ! 809: shl $10,%eax ! 810: add %eax,%edi ! 811: mov $32,%eax /set chkj according to # blocks ! 812: subb %bl,%al ! 813: mulb xl_chks ! 814: add $chk1,%eax ! 815: mov %eax,chkj ! 816: mov $256,-4(%ebp) /set up for check loop ! 817: chk0: ! 818: mov $xl_mxc0,%esi ! 819: xor %ebx,%ebx ! 820: xor %edx,%edx /edx ends up = r2 ! 821: xor %ecx,%ecx /ecx ends up = r1 ! 822: xor %eax,%eax /eax ends up = r0 ! 823: jmp *chkj ! 824: / .even ! 825: .align 2 ! 826: / ! 827: / encode data ! 828: / ! 829: chk1: ! 830: /encm c,a,d,-31 ! 831: xor -31744(%edi),%ecx /eax = new r0 bytes ! 832: xor %eax,%edx /set up edx for later ! 833: movb %cl,%bl /multiply 4 bytes by c0 ! 834: xorb (%ebx,%esi),%al / and xor to ecx ! 835: movb %ch,%bl / ecx will be new r2 ! 836: xorb (%ebx,%esi),%ah ! 837: rol $16,%ecx ! 838: rol $16,%eax ! 839: movb %cl,%bl ! 840: xorb (%ebx,%esi),%al ! 841: movb %ch,%bl ! 842: xorb (%ebx,%esi),%ah ! 843: rol $16,%ecx ! 844: rol $16,%eax ! 845: xor %eax,%edx /edx = new r1 ! 846: chk2: ! 847: /encm a,d,c,-30 ! 848: xor -30720(%edi),%eax /eax = new r0 bytes ! 849: xor %edx,%ecx /set up edx for later ! 850: movb %al,%bl /multiply 4 bytes by c0 ! 851: xorb (%ebx,%esi),%dl / and xor to ecx ! 852: movb %ah,%bl / ecx will be new r2 ! 853: xorb (%ebx,%esi),%dh ! 854: rol $16,%eax ! 855: rol $16,%edx ! 856: movb %al,%bl ! 857: xorb (%ebx,%esi),%dl ! 858: movb %ah,%bl ! 859: xorb (%ebx,%esi),%dh ! 860: rol $16,%eax ! 861: rol $16,%edx ! 862: xor %edx,%ecx /edx = new r1 ! 863: /encm d,c,a,-29 ! 864: xor -29696(%edi),%edx /eax = new r0 bytes ! 865: xor %ecx,%eax /set up edx for later ! 866: movb %dl,%bl /multiply 4 bytes by c0 ! 867: xorb (%ebx,%esi),%cl / and xor to ecx ! 868: movb %dh,%bl / ecx will be new r2 ! 869: xorb (%ebx,%esi),%ch ! 870: rol $16,%edx ! 871: rol $16,%ecx ! 872: movb %dl,%bl ! 873: xorb (%ebx,%esi),%cl ! 874: movb %dh,%bl ! 875: xorb (%ebx,%esi),%ch ! 876: rol $16,%edx ! 877: rol $16,%ecx ! 878: xor %ecx,%eax /edx = new r1 ! 879: /encm c,a,d,-28 ! 880: xor -28672(%edi),%ecx /eax = new r0 bytes ! 881: xor %eax,%edx /set up edx for later ! 882: movb %cl,%bl /multiply 4 bytes by c0 ! 883: xorb (%ebx,%esi),%al / and xor to ecx ! 884: movb %ch,%bl / ecx will be new r2 ! 885: xorb (%ebx,%esi),%ah ! 886: rol $16,%ecx ! 887: rol $16,%eax ! 888: movb %cl,%bl ! 889: xorb (%ebx,%esi),%al ! 890: movb %ch,%bl ! 891: xorb (%ebx,%esi),%ah ! 892: rol $16,%ecx ! 893: rol $16,%eax ! 894: xor %eax,%edx /edx = new r1 ! 895: /encm a,d,c,-27 ! 896: xor -27648(%edi),%eax /eax = new r0 bytes ! 897: xor %edx,%ecx /set up edx for later ! 898: movb %al,%bl /multiply 4 bytes by c0 ! 899: xorb (%ebx,%esi),%dl / and xor to ecx ! 900: movb %ah,%bl / ecx will be new r2 ! 901: xorb (%ebx,%esi),%dh ! 902: rol $16,%eax ! 903: rol $16,%edx ! 904: movb %al,%bl ! 905: xorb (%ebx,%esi),%dl ! 906: movb %ah,%bl ! 907: xorb (%ebx,%esi),%dh ! 908: rol $16,%eax ! 909: rol $16,%edx ! 910: xor %edx,%ecx /edx = new r1 ! 911: /encm d,c,a,-26 ! 912: xor -26624(%edi),%edx /eax = new r0 bytes ! 913: xor %ecx,%eax /set up edx for later ! 914: movb %dl,%bl /multiply 4 bytes by c0 ! 915: xorb (%ebx,%esi),%cl / and xor to ecx ! 916: movb %dh,%bl / ecx will be new r2 ! 917: xorb (%ebx,%esi),%ch ! 918: rol $16,%edx ! 919: rol $16,%ecx ! 920: movb %dl,%bl ! 921: xorb (%ebx,%esi),%cl ! 922: movb %dh,%bl ! 923: xorb (%ebx,%esi),%ch ! 924: rol $16,%edx ! 925: rol $16,%ecx ! 926: xor %ecx,%eax /edx = new r1 ! 927: /encm c,a,d,-25 ! 928: xor -25600(%edi),%ecx /eax = new r0 bytes ! 929: xor %eax,%edx /set up edx for later ! 930: movb %cl,%bl /multiply 4 bytes by c0 ! 931: xorb (%ebx,%esi),%al / and xor to ecx ! 932: movb %ch,%bl / ecx will be new r2 ! 933: xorb (%ebx,%esi),%ah ! 934: rol $16,%ecx ! 935: rol $16,%eax ! 936: movb %cl,%bl ! 937: xorb (%ebx,%esi),%al ! 938: movb %ch,%bl ! 939: xorb (%ebx,%esi),%ah ! 940: rol $16,%ecx ! 941: rol $16,%eax ! 942: xor %eax,%edx /edx = new r1 ! 943: /encm a,d,c,-24 ! 944: xor -24576(%edi),%eax /eax = new r0 bytes ! 945: xor %edx,%ecx /set up edx for later ! 946: movb %al,%bl /multiply 4 bytes by c0 ! 947: xorb (%ebx,%esi),%dl / and xor to ecx ! 948: movb %ah,%bl / ecx will be new r2 ! 949: xorb (%ebx,%esi),%dh ! 950: rol $16,%eax ! 951: rol $16,%edx ! 952: movb %al,%bl ! 953: xorb (%ebx,%esi),%dl ! 954: movb %ah,%bl ! 955: xorb (%ebx,%esi),%dh ! 956: rol $16,%eax ! 957: rol $16,%edx ! 958: xor %edx,%ecx /edx = new r1 ! 959: /encm d,c,a,-23 ! 960: xor -23552(%edi),%edx /eax = new r0 bytes ! 961: xor %ecx,%eax /set up edx for later ! 962: movb %dl,%bl /multiply 4 bytes by c0 ! 963: xorb (%ebx,%esi),%cl / and xor to ecx ! 964: movb %dh,%bl / ecx will be new r2 ! 965: xorb (%ebx,%esi),%ch ! 966: rol $16,%edx ! 967: rol $16,%ecx ! 968: movb %dl,%bl ! 969: xorb (%ebx,%esi),%cl ! 970: movb %dh,%bl ! 971: xorb (%ebx,%esi),%ch ! 972: rol $16,%edx ! 973: rol $16,%ecx ! 974: xor %ecx,%eax /edx = new r1 ! 975: /encm c,a,d,-22 ! 976: xor -22528(%edi),%ecx /eax = new r0 bytes ! 977: xor %eax,%edx /set up edx for later ! 978: movb %cl,%bl /multiply 4 bytes by c0 ! 979: xorb (%ebx,%esi),%al / and xor to ecx ! 980: movb %ch,%bl / ecx will be new r2 ! 981: xorb (%ebx,%esi),%ah ! 982: rol $16,%ecx ! 983: rol $16,%eax ! 984: movb %cl,%bl ! 985: xorb (%ebx,%esi),%al ! 986: movb %ch,%bl ! 987: xorb (%ebx,%esi),%ah ! 988: rol $16,%ecx ! 989: rol $16,%eax ! 990: xor %eax,%edx /edx = new r1 ! 991: /encm a,d,c,-21 ! 992: xor -21504(%edi),%eax /eax = new r0 bytes ! 993: xor %edx,%ecx /set up edx for later ! 994: movb %al,%bl /multiply 4 bytes by c0 ! 995: xorb (%ebx,%esi),%dl / and xor to ecx ! 996: movb %ah,%bl / ecx will be new r2 ! 997: xorb (%ebx,%esi),%dh ! 998: rol $16,%eax ! 999: rol $16,%edx ! 1000: movb %al,%bl ! 1001: xorb (%ebx,%esi),%dl ! 1002: movb %ah,%bl ! 1003: xorb (%ebx,%esi),%dh ! 1004: rol $16,%eax ! 1005: rol $16,%edx ! 1006: xor %edx,%ecx /edx = new r1 ! 1007: /encm d,c,a,-20 ! 1008: xor -20480(%edi),%edx /eax = new r0 bytes ! 1009: xor %ecx,%eax /set up edx for later ! 1010: movb %dl,%bl /multiply 4 bytes by c0 ! 1011: xorb (%ebx,%esi),%cl / and xor to ecx ! 1012: movb %dh,%bl / ecx will be new r2 ! 1013: xorb (%ebx,%esi),%ch ! 1014: rol $16,%edx ! 1015: rol $16,%ecx ! 1016: movb %dl,%bl ! 1017: xorb (%ebx,%esi),%cl ! 1018: movb %dh,%bl ! 1019: xorb (%ebx,%esi),%ch ! 1020: rol $16,%edx ! 1021: rol $16,%ecx ! 1022: xor %ecx,%eax /edx = new r1 ! 1023: /encm c,a,d,-19 ! 1024: xor -19456(%edi),%ecx /eax = new r0 bytes ! 1025: xor %eax,%edx /set up edx for later ! 1026: movb %cl,%bl /multiply 4 bytes by c0 ! 1027: xorb (%ebx,%esi),%al / and xor to ecx ! 1028: movb %ch,%bl / ecx will be new r2 ! 1029: xorb (%ebx,%esi),%ah ! 1030: rol $16,%ecx ! 1031: rol $16,%eax ! 1032: movb %cl,%bl ! 1033: xorb (%ebx,%esi),%al ! 1034: movb %ch,%bl ! 1035: xorb (%ebx,%esi),%ah ! 1036: rol $16,%ecx ! 1037: rol $16,%eax ! 1038: xor %eax,%edx /edx = new r1 ! 1039: /encm a,d,c,-18 ! 1040: xor -18432(%edi),%eax /eax = new r0 bytes ! 1041: xor %edx,%ecx /set up edx for later ! 1042: movb %al,%bl /multiply 4 bytes by c0 ! 1043: xorb (%ebx,%esi),%dl / and xor to ecx ! 1044: movb %ah,%bl / ecx will be new r2 ! 1045: xorb (%ebx,%esi),%dh ! 1046: rol $16,%eax ! 1047: rol $16,%edx ! 1048: movb %al,%bl ! 1049: xorb (%ebx,%esi),%dl ! 1050: movb %ah,%bl ! 1051: xorb (%ebx,%esi),%dh ! 1052: rol $16,%eax ! 1053: rol $16,%edx ! 1054: xor %edx,%ecx /edx = new r1 ! 1055: /encm d,c,a,-17 ! 1056: xor -17408(%edi),%edx /eax = new r0 bytes ! 1057: xor %ecx,%eax /set up edx for later ! 1058: movb %dl,%bl /multiply 4 bytes by c0 ! 1059: xorb (%ebx,%esi),%cl / and xor to ecx ! 1060: movb %dh,%bl / ecx will be new r2 ! 1061: xorb (%ebx,%esi),%ch ! 1062: rol $16,%edx ! 1063: rol $16,%ecx ! 1064: movb %dl,%bl ! 1065: xorb (%ebx,%esi),%cl ! 1066: movb %dh,%bl ! 1067: xorb (%ebx,%esi),%ch ! 1068: rol $16,%edx ! 1069: rol $16,%ecx ! 1070: xor %ecx,%eax /edx = new r1 ! 1071: /encm c,a,d,-16 ! 1072: xor -16384(%edi),%ecx /eax = new r0 bytes ! 1073: xor %eax,%edx /set up edx for later ! 1074: movb %cl,%bl /multiply 4 bytes by c0 ! 1075: xorb (%ebx,%esi),%al / and xor to ecx ! 1076: movb %ch,%bl / ecx will be new r2 ! 1077: xorb (%ebx,%esi),%ah ! 1078: rol $16,%ecx ! 1079: rol $16,%eax ! 1080: movb %cl,%bl ! 1081: xorb (%ebx,%esi),%al ! 1082: movb %ch,%bl ! 1083: xorb (%ebx,%esi),%ah ! 1084: rol $16,%ecx ! 1085: rol $16,%eax ! 1086: xor %eax,%edx /edx = new r1 ! 1087: /encm a,d,c,-15 ! 1088: xor -15360(%edi),%eax /eax = new r0 bytes ! 1089: xor %edx,%ecx /set up edx for later ! 1090: movb %al,%bl /multiply 4 bytes by c0 ! 1091: xorb (%ebx,%esi),%dl / and xor to ecx ! 1092: movb %ah,%bl / ecx will be new r2 ! 1093: xorb (%ebx,%esi),%dh ! 1094: rol $16,%eax ! 1095: rol $16,%edx ! 1096: movb %al,%bl ! 1097: xorb (%ebx,%esi),%dl ! 1098: movb %ah,%bl ! 1099: xorb (%ebx,%esi),%dh ! 1100: rol $16,%eax ! 1101: rol $16,%edx ! 1102: xor %edx,%ecx /edx = new r1 ! 1103: /encm d,c,a,-14 ! 1104: xor -14336(%edi),%edx /eax = new r0 bytes ! 1105: xor %ecx,%eax /set up edx for later ! 1106: movb %dl,%bl /multiply 4 bytes by c0 ! 1107: xorb (%ebx,%esi),%cl / and xor to ecx ! 1108: movb %dh,%bl / ecx will be new r2 ! 1109: xorb (%ebx,%esi),%ch ! 1110: rol $16,%edx ! 1111: rol $16,%ecx ! 1112: movb %dl,%bl ! 1113: xorb (%ebx,%esi),%cl ! 1114: movb %dh,%bl ! 1115: xorb (%ebx,%esi),%ch ! 1116: rol $16,%edx ! 1117: rol $16,%ecx ! 1118: xor %ecx,%eax /edx = new r1 ! 1119: /encm c,a,d,-13 ! 1120: xor -13312(%edi),%ecx /eax = new r0 bytes ! 1121: xor %eax,%edx /set up edx for later ! 1122: movb %cl,%bl /multiply 4 bytes by c0 ! 1123: xorb (%ebx,%esi),%al / and xor to ecx ! 1124: movb %ch,%bl / ecx will be new r2 ! 1125: xorb (%ebx,%esi),%ah ! 1126: rol $16,%ecx ! 1127: rol $16,%eax ! 1128: movb %cl,%bl ! 1129: xorb (%ebx,%esi),%al ! 1130: movb %ch,%bl ! 1131: xorb (%ebx,%esi),%ah ! 1132: rol $16,%ecx ! 1133: rol $16,%eax ! 1134: xor %eax,%edx /edx = new r1 ! 1135: /encm a,d,c,-12 ! 1136: xor -12288(%edi),%eax /eax = new r0 bytes ! 1137: xor %edx,%ecx /set up edx for later ! 1138: movb %al,%bl /multiply 4 bytes by c0 ! 1139: xorb (%ebx,%esi),%dl / and xor to ecx ! 1140: movb %ah,%bl / ecx will be new r2 ! 1141: xorb (%ebx,%esi),%dh ! 1142: rol $16,%eax ! 1143: rol $16,%edx ! 1144: movb %al,%bl ! 1145: xorb (%ebx,%esi),%dl ! 1146: movb %ah,%bl ! 1147: xorb (%ebx,%esi),%dh ! 1148: rol $16,%eax ! 1149: rol $16,%edx ! 1150: xor %edx,%ecx /edx = new r1 ! 1151: /encm d,c,a,-11 ! 1152: xor -11264(%edi),%edx /eax = new r0 bytes ! 1153: xor %ecx,%eax /set up edx for later ! 1154: movb %dl,%bl /multiply 4 bytes by c0 ! 1155: xorb (%ebx,%esi),%cl / and xor to ecx ! 1156: movb %dh,%bl / ecx will be new r2 ! 1157: xorb (%ebx,%esi),%ch ! 1158: rol $16,%edx ! 1159: rol $16,%ecx ! 1160: movb %dl,%bl ! 1161: xorb (%ebx,%esi),%cl ! 1162: movb %dh,%bl ! 1163: xorb (%ebx,%esi),%ch ! 1164: rol $16,%edx ! 1165: rol $16,%ecx ! 1166: xor %ecx,%eax /edx = new r1 ! 1167: /encm c,a,d,-10 ! 1168: xor -10240(%edi),%ecx /eax = new r0 bytes ! 1169: xor %eax,%edx /set up edx for later ! 1170: movb %cl,%bl /multiply 4 bytes by c0 ! 1171: xorb (%ebx,%esi),%al / and xor to ecx ! 1172: movb %ch,%bl / ecx will be new r2 ! 1173: xorb (%ebx,%esi),%ah ! 1174: rol $16,%ecx ! 1175: rol $16,%eax ! 1176: movb %cl,%bl ! 1177: xorb (%ebx,%esi),%al ! 1178: movb %ch,%bl ! 1179: xorb (%ebx,%esi),%ah ! 1180: rol $16,%ecx ! 1181: rol $16,%eax ! 1182: xor %eax,%edx /edx = new r1 ! 1183: /encm a,d,c,-9 ! 1184: xor -9216(%edi),%eax /eax = new r0 bytes ! 1185: xor %edx,%ecx /set up edx for later ! 1186: movb %al,%bl /multiply 4 bytes by c0 ! 1187: xorb (%ebx,%esi),%dl / and xor to ecx ! 1188: movb %ah,%bl / ecx will be new r2 ! 1189: xorb (%ebx,%esi),%dh ! 1190: rol $16,%eax ! 1191: rol $16,%edx ! 1192: movb %al,%bl ! 1193: xorb (%ebx,%esi),%dl ! 1194: movb %ah,%bl ! 1195: xorb (%ebx,%esi),%dh ! 1196: rol $16,%eax ! 1197: rol $16,%edx ! 1198: xor %edx,%ecx /edx = new r1 ! 1199: /encm d,c,a,-8 ! 1200: xor -8192(%edi),%edx /eax = new r0 bytes ! 1201: xor %ecx,%eax /set up edx for later ! 1202: movb %dl,%bl /multiply 4 bytes by c0 ! 1203: xorb (%ebx,%esi),%cl / and xor to ecx ! 1204: movb %dh,%bl / ecx will be new r2 ! 1205: xorb (%ebx,%esi),%ch ! 1206: rol $16,%edx ! 1207: rol $16,%ecx ! 1208: movb %dl,%bl ! 1209: xorb (%ebx,%esi),%cl ! 1210: movb %dh,%bl ! 1211: xorb (%ebx,%esi),%ch ! 1212: rol $16,%edx ! 1213: rol $16,%ecx ! 1214: xor %ecx,%eax /edx = new r1 ! 1215: /encm c,a,d,-7 ! 1216: xor -7168(%edi),%ecx /eax = new r0 bytes ! 1217: xor %eax,%edx /set up edx for later ! 1218: movb %cl,%bl /multiply 4 bytes by c0 ! 1219: xorb (%ebx,%esi),%al / and xor to ecx ! 1220: movb %ch,%bl / ecx will be new r2 ! 1221: xorb (%ebx,%esi),%ah ! 1222: rol $16,%ecx ! 1223: rol $16,%eax ! 1224: movb %cl,%bl ! 1225: xorb (%ebx,%esi),%al ! 1226: movb %ch,%bl ! 1227: xorb (%ebx,%esi),%ah ! 1228: rol $16,%ecx ! 1229: rol $16,%eax ! 1230: xor %eax,%edx /edx = new r1 ! 1231: /encm a,d,c,-6 ! 1232: xor -6144(%edi),%eax /eax = new r0 bytes ! 1233: xor %edx,%ecx /set up edx for later ! 1234: movb %al,%bl /multiply 4 bytes by c0 ! 1235: xorb (%ebx,%esi),%dl / and xor to ecx ! 1236: movb %ah,%bl / ecx will be new r2 ! 1237: xorb (%ebx,%esi),%dh ! 1238: rol $16,%eax ! 1239: rol $16,%edx ! 1240: movb %al,%bl ! 1241: xorb (%ebx,%esi),%dl ! 1242: movb %ah,%bl ! 1243: xorb (%ebx,%esi),%dh ! 1244: rol $16,%eax ! 1245: rol $16,%edx ! 1246: xor %edx,%ecx /edx = new r1 ! 1247: /encm d,c,a,-5 ! 1248: xor -5120(%edi),%edx /eax = new r0 bytes ! 1249: xor %ecx,%eax /set up edx for later ! 1250: movb %dl,%bl /multiply 4 bytes by c0 ! 1251: xorb (%ebx,%esi),%cl / and xor to ecx ! 1252: movb %dh,%bl / ecx will be new r2 ! 1253: xorb (%ebx,%esi),%ch ! 1254: rol $16,%edx ! 1255: rol $16,%ecx ! 1256: movb %dl,%bl ! 1257: xorb (%ebx,%esi),%cl ! 1258: movb %dh,%bl ! 1259: xorb (%ebx,%esi),%ch ! 1260: rol $16,%edx ! 1261: rol $16,%ecx ! 1262: xor %ecx,%eax /edx = new r1 ! 1263: /encm c,a,d,-4 ! 1264: xor -4096(%edi),%ecx /eax = new r0 bytes ! 1265: xor %eax,%edx /set up edx for later ! 1266: movb %cl,%bl /multiply 4 bytes by c0 ! 1267: xorb (%ebx,%esi),%al / and xor to ecx ! 1268: movb %ch,%bl / ecx will be new r2 ! 1269: xorb (%ebx,%esi),%ah ! 1270: rol $16,%ecx ! 1271: rol $16,%eax ! 1272: movb %cl,%bl ! 1273: xorb (%ebx,%esi),%al ! 1274: movb %ch,%bl ! 1275: xorb (%ebx,%esi),%ah ! 1276: rol $16,%ecx ! 1277: rol $16,%eax ! 1278: xor %eax,%edx /edx = new r1 ! 1279: /encm a,d,c,-3 ! 1280: xor -3072(%edi),%eax /eax = new r0 bytes ! 1281: xor %edx,%ecx /set up edx for later ! 1282: movb %al,%bl /multiply 4 bytes by c0 ! 1283: xorb (%ebx,%esi),%dl / and xor to ecx ! 1284: movb %ah,%bl / ecx will be new r2 ! 1285: xorb (%ebx,%esi),%dh ! 1286: rol $16,%eax ! 1287: rol $16,%edx ! 1288: movb %al,%bl ! 1289: xorb (%ebx,%esi),%dl ! 1290: movb %ah,%bl ! 1291: xorb (%ebx,%esi),%dh ! 1292: rol $16,%eax ! 1293: rol $16,%edx ! 1294: xor %edx,%ecx /edx = new r1 ! 1295: xor -2048(%edi),%edx /check encoded data ! 1296: xor -1024(%edi),%ecx ! 1297: xor (%edi),%eax ! 1298: add $4,%edi /adv 4 columns ! 1299: or %ecx,%eax /br if error ! 1300: or %edx,%eax ! 1301: jnz chk3 ! 1302: decw -4(%ebp) /loop till done ! 1303: jnz chk0 ! 1304: chk3: ! 1305: pop %esi /exit ! 1306: pop %edi ! 1307: pop %ebx ! 1308: leave ! 1309: ret ! 1310: /********************************************************/ ! 1311: / mpy eax = ch*cl */ ! 1312: /********************************************************/ ! 1313: _mpy: ! 1314: movb $0,%al ! 1315: orb %cl,%cl /return if 0 ! 1316: je mpy0 ! 1317: orb %ch,%ch ! 1318: je mpy0 ! 1319: / ! 1320: / al=log[ch]+log[cl] ! 1321: / ! 1322: xor %ebx,%ebx ! 1323: movb %ch,%bl ! 1324: movb xl_log2(%ebx),%al ! 1325: ! 1326: movb %cl,%bl ! 1327: / ! 1328: / al = sum modulo 255 ! 1329: / ! 1330: addb xl_log2(%ebx),%al ! 1331: adcb $1,%al ! 1332: adcb $255,%al ! 1333: ! 1334: mov $xl_alg2,%ebx ! 1335: xlat ! 1336: mpy0: ! 1337: ret ! 1338:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.