newbie:displaying raw binary data 
Author Message
 newbie:displaying raw binary data

  I have written a program to get input from the parallel port at LPT1
and it works.  Now I have a value like 0011001111011111 in AX.  I know
there are dos interrupts(like 9) that can display characters and
strings, but  I am looking for a way to display the binary value in AX
exactly as 00110... on the screen.  I have downloaded the UCRlib and
other assembler help files but nothing seems to have the answer.  Any
help would be much appreciated.


Thu, 22 Aug 2002 03:00:00 GMT  
 newbie:displaying raw binary data

Quote:

>   I have written a program to get input from the parallel port at LPT1
> and it works.  Now I have a value like 0011001111011111 in AX.  I know
> there are dos interrupts(like 9) that can display characters and
> strings, but  I am looking for a way to display the binary value in AX
> exactly as 00110... on the screen.  I have downloaded the UCRlib and
> other assembler help files but nothing seems to have the answer.  Any
> help would be much appreciated.

Lookup int 21h, ah=2

        mov     bx, ax          ; get binary value into bx
        mov     ah, 2           ; ah=2, Display char
        mov     cx, 16          ; 16 bits
        .while(cx)
          rol   bx, 1          
          mov   dl, bl
          and   dl, 1
          add   dl, '0'
          int   21h
          dec   cx
        .endw



Thu, 22 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. To display RAW data

2. Using DEC Fortran to read raw binary data?

3. Tkinter: passing raw binary data back and forth

4. raw binary data and httplib

5. How can i display binary data on the front panel

6. Newbie: displaying binary numbers

7. Reading/Displaying Binary data

8. Extract data from radius's raw data

9. PyObject *data - access to raw data?

10. Scheme newbie: how do you handle binary data?

11. read and write binary data (newbie)

12. Newbie - converting binary data to ASCII text ?

 

 
Powered by phpBB® Forum Software