flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Roman 30 Jul 2020, 16:03
big numbers its 128 bits or 256 bits ?
900 trillion ? |
|||
![]() |
|
extra_12345 30 Jul 2020, 18:26
Roman wrote: big numbers its 128 bits or 256 bits ? Dwords,let's say I have 20 dword type numbers: 34 85 69 23 12 78 26 45 25 69 82 36 25 17 35 86 26 54 89 20 I want an algorithm that returns the biggest number amongst them,how can I accomplish this? |
|||
![]() |
|
Roman 30 Jul 2020, 19:07
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 30 Jul 2020, 19:26
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.