Wow, look at this big empty room ECHO ....(echo) ---------------------------------- "Aw, being a clown sux. You get kicked by kids, hit by dogs, and admired by the elderly. Who am I clowning? I have no business being a clown! Iím leaving the clowning business to all the other clowns in the clowning business."
Posted on 2001-03-22 18:31:00 by Ernie
What is the non-branching methode to find the maximum or minimum of two values? :) bitRAKE <----How do you like my fish? You know it was bigger in person :P This message was edited by bitRAKE, on 3/22/2001 8:09:06 PM
Posted on 2001-03-22 19:07:00 by bitRAKE
;To Ernie formate selected text from editor ;to echo batch format for future replacing selected text with new one ;I have ~ 150 string formating func in my asmshell

;edx== outbyte (address of first byte after the end of selected text
;esi== start of selection
;echobeg db '@echo off ',13,10
EchoProc proc
	or esi,esi
	je  outproc
	push esi
	mov ecx,3
	mov esi,offset echobeg
	mov edi,offset RepStr
	rep movsd
	mov al,10
	pop esi
	mov ebx,offset RepStr+12
	mov ecx,edx
	mov edi,esi
	sub ecx,esi
repne	scasb
	jne lastline
	sub edi,esi
	mov dword ptr ,'OHCE'
	.IF byte ptr  == 13
	mov dword ptr , 0A0D202Eh
	lea edi,
	add esi,2
	jmp emptystr2
	mov byte ptr ,' '
	mov ecx,edi
	lea edi,
rep	movsb
	mov ebx,edi
	cmp esi,edx
	jl fill
	jmp write

	mov dword ptr ,'OHCE'
	mov byte ptr ,' '
	sub edx,esi
	lea edi,
	mov ecx,edx
rep	movsb
write:	mov byte ptr ,0
outproc: ret
EchoProc endp
(Edited by request to include the CODE tags) This message was edited by Ernie, on 3/23/2001 12:38:24 AM
Posted on 2001-03-22 19:31:00 by The Svin
to bitRAKE if value are different:

val1 dd ?
val2 dd ?
maxval dd ?
minval dd ?
	mov eax,val1
	xor edx,edx
	mov ecx,val2
	cmp eax,ecx
	adc edx,0
	mov offset maxval,eax
	xor edx,1
	mov offset maxval,ecx
(added CODE tags) This message was edited by Ernie, on 3/23/2001 12:39:30 AM
Posted on 2001-03-22 20:30:00 by The Svin
very, very nice Svin :) There was another method posted to the newsgroups, but a can't remember was it was exactly. It used a unique binary trick. bitRAKE
Posted on 2001-03-22 20:54:00 by bitRAKE
Posted on 2001-03-30 19:34:00 by The Svin
That is it! Thank you very much! :):D:cool:
Posted on 2001-03-30 20:18:00 by bitRAKE