How is this "array" defined?
my_text_array db "10101001"
my_byte_array db 1, 3, 5, 7
my_dword_array dd 1, 3, 5, 7
If it's a "text" array, each '1' or '0' will be a byte, and all you have to do is change 'em to '*' and '#'... You're probably not that lucky.
Otherwise, it's essentially the same task as displaying the number(s) in binary, except you'll be using '*' and '#' instead of '0' and '1' - '0' and '1' (the ascii codes) are contiguous, and '*' and '#' are not. In either case, you'll need to isolate the bits (I guess that's what you're asking, re-reading the question)...
If we shift a value left or right, the bit that's shifted out winds up in the carry flag. For '0' and '1', we can start with '0' and "adc al, 0" to increment it to a '1' if the carry was set. That won't work for you, you'll have to "jc" or "jnc"...
mov esi, my_byte_array
do_bytes:
; get a byte
mov al, [esi]
inc esi
; (or "lodsb" will do both}
mov ecx, 8 ; 8 (16, 32?) bits to do
do_bits:
; process 8 bits
shl al, 1 ; high bit into carry
jc not_zero
; print a '*'
jmp next_bit
not_zero:
; print a '#'
next_bit:
loop do_bits
; are we at end of array? if not...
jmp do_bytes
; else "ret" or exit cleanly
Something along those lines? (untested!) Why don't you show us what you've got so far? That may clear up the "What OS?" question, too...
Best,
Frank