flat assembler
Message board for the users of flat assembler.
Index
> Main > Testing Bits |
Author |
|
typedef 16 Jun 2011, 07:02
or it ?
idk, wait for the os gurus who know about fat12 |
|||
16 Jun 2011, 07:02 |
|
JohnFound 16 Jun 2011, 07:37
It is strange you write your own OS, but miss so basic knowledge as testing bits...
Anyway, read "bt" instruction and "test" instruction reference. |
|||
16 Jun 2011, 07:37 |
|
me239 16 Jun 2011, 07:52
JohnFound wrote: It is strange you write your own OS, but miss so basic knowledge as testing bits... P.S it's 4am where I live and am very tired so I'm probably not thinking too well. |
|||
16 Jun 2011, 07:52 |
|
LocoDelAssembly 16 Jun 2011, 17:17
Code: BIT_TO_TEST = 2 ; Change at will test byte[mem], 1 shl BIT_TO_TEST jnz .itIsSet ; If you want to create a BOOL in AL mov al, [mem] shr al, BIT_TO_TEST and al, 1 ; Now AL is either zero or one ;Alternate method (386+): test byte[mem], 1 shl BIT_TO_TEST setnz al |
|||
16 Jun 2011, 17:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.