|
|
1.1 ! root 1: title indos.asm ! 2: ! 3: ;****************************************************************/ ! 4: ;* */ ! 5: ;* Windows Cardfile */ ! 6: ;* (c) Copyright Microsoft Corp. 1985 - All Rights Reserved */ ! 7: ;* */ ! 8: ;****************************************************************/ ! 9: ! 10: .xlist ! 11: include cmacros.inc ! 12: ! 13: .list ! 14: ! 15: createSeg _FILE,nrfile,byte,public,CODE ! 16: ! 17: sBegin DATA ! 18: globalD resZero,0 ! 19: sEnd DATA ! 20: ! 21: sBegin NRFILE ! 22: ! 23: assumes CS,NRFILE ! 24: assumes DS,DATA ! 25: ! 26: ! 27: ; ! 28: ; MyStrlen ! 29: ; ! 30: ! 31: cProc Mylstrlen,<PUBLIC,FAR>,<di> ! 32: parmD lpStr ! 33: cBegin ! 34: les di,lpStr ! 35: cld ! 36: xor ax,ax ; get zero in ax ! 37: mov cx,-1 ; at most 64 k to move ! 38: repnz scasb ; look for end ! 39: mov ax,cx ! 40: neg ax ! 41: dec ax ! 42: dec ax ! 43: cEnd ! 44: ! 45: ; ! 46: ;MyStrcpy: ! 47: ; ! 48: cProc Mylstrcpy,<PUBLIC,FAR>,<si,di,ds> ! 49: parmD lpDst ! 50: parmD lpSrc ! 51: cBegin ! 52: lds si,lpSrc ! 53: les di,lpDst ! 54: cld ! 55: Mycp1: lodsb ! 56: stosb ! 57: or al,al ! 58: jnz Mycp1 ! 59: mov ax,di ; point at last byte copied ! 60: dec ax ! 61: mov dx,es ; and segment ! 62: cEnd ! 63: ! 64: ! 65: ; ! 66: ;MyStrcat: ! 67: ; ! 68: cProc Mylstrcat,<PUBLIC,FAR>,<si,di,ds> ! 69: parmD lpDst ! 70: parmD lpSrc ! 71: cBegin ! 72: lds si,lpSrc ! 73: les di,lpDst ! 74: cld ! 75: xor ax,ax ; get zero in ax ! 76: mov cx,-1 ; at most 64 k to look ! 77: repnz scasb ; look for end ! 78: dec di ; Point at null byte ! 79: Myct1: lodsb ! 80: stosb ! 81: or al,al ! 82: jnz Myct1 ! 83: mov ax,di ; point at last byte copied ! 84: dec ax ! 85: mov dx,es ; and segment ! 86: cEnd ! 87: ! 88: ! 89: ; ! 90: ;MyStrcmp: ! 91: ; ! 92: cProc Mylstrcmp,<PUBLIC,FAR>,<si,di,ds> ! 93: parmD lps1 ! 94: parmD lps2 ! 95: cBegin ! 96: lds si,lps1 ! 97: les di,lps2 ! 98: cld ! 99: xor ax,ax ; clear out ah ! 100: Mycmploop: ! 101: lodsb ! 102: mov bl,es:[di] ! 103: inc di ! 104: cmp bl,al ! 105: jnz MyNeq ! 106: or al,al ! 107: jnz Mycmploop ! 108: xor ax,ax ; equal ! 109: jmp short MSEnd ! 110: MyNeq: ! 111: mov ax,1 ; not equal ! 112: MSEnd: ! 113: cEnd ! 114: ! 115: sEnd NRFILE ! 116: ! 117: end ! 118:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.