thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
Here is a clue/key to what you can do.
I compiled this with the a86 compiler and watched the execution with (DOS) Debug.
Look what happens to the result in the output based on the setting of the first byte.
setBinary:
mov si, strInput
mov di, strOutput
doTest:
test byte ptr[si], 8
jz test4
mov byte ptr[di+0], '1'
test4:
test byte ptr[si], 4
jz test2
mov byte ptr[di+1], '1'
test2:
test byte ptr[si], 2
jz test1
mov byte ptr[di+2], '1'
test1:
test byte ptr[si], 1
jz quit
mov byte ptr[di+3], '1'
quit:
int 20h
strInput: db 'EF00$'
strOutput: db '0000$'
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402
thines01
Postaholic
2,424 posts since Oct 2009
Reputation Points: 445
Solved Threads: 402