answersLogoWhite

0

BinarySearch proc ;params: array (of integers), length, target

push ebp

mov ebp, esp

mov ebx, [ebp + 8]

mov ecx, [ebp + 12]

xor edx, edx

dec ecx

jmp LoopCond

LoopStart:

mov eax, edx

add eax, ecx

shr eax, 1

push ecx

mov ecx, [ebp + 16]

cmp [eax * 4 + ebx], ecx

pop ecx

je Exit

jl UpperHalf

mov ecx, eax

dec ecx

jmp LoopCond

UpperHalf:

mov edx, eax

inc edx

LoopCond:

cmp ecx, edx

jge LoopStart

mov eax, -1

Exit:

pop ebp

ret

BinarySearch endp

User Avatar

Wiki User

16y ago

Still curious? Ask our experts.

Chat with our AI personalities

EzraEzra
Faith is not about having all the answers, but learning to ask the right questions.
Chat with Ezra
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin
More answers

Yes, assembler language program can do binary sorts.

User Avatar

Wiki User

15y ago
User Avatar

James

User Avatar

Wiki User

13y ago
User Avatar

danger

User Avatar

Wiki User

11y ago
User Avatar

Add your answer:

Earn +20 pts
Q: Assembly language program to convert 8 bit binary to ascii code?
Write your answer...
Submit
Still have questions?
magnify glass
imp