flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
extra_12345
Heya!i was thinking of an algorithm to find the biggest number among set of numbers then return it but couldn't figure it out, any help will be appreciated.
|
|||
![]() |
|
Roman
big numbers its 128 bits or 256 bits ?
900 trillion ? |
|||
![]() |
|
Roman
89 is big. In ax register.
Code: BigDig dw 34,85,69,23,12,78,26,45,25,69,82,36 dw 25,17,35,86,26,54,89,20 start: mov ebx,BigDig mov cx,20 xor ax,ax .22: cmp ax,word [ebx] jae .33 mov ax,word [ebx] .33: add ebx,2 dec cx jnz .22 Last edited by Roman on 30 Jul 2020, 19:29; edited 2 times in total |
|||
![]() |
|
Roman
Or this:
Code: mov ebx,BigDig mov cx,20 xor ax,ax .22: cmp ax,word [ebx] cmovnae ax,word [ebx] add ebx,2 dec cx jnz .22 |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.