File:  [WindowsNT SDKs] / ntddk / src / vdd / dosioctl / dosapp / xio.inc
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 18:31:12 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: ntddk-nov-1993, HEAD
Microsoft Windows NT Build 511 (DDK SDK) 11-01-1993

;----------------------------- E Q U A T E S -----------------------------

cr      equ     0dh
lf      equ     0ah


;----------------------------- M A C R O S ------------------------------
Writel  MACRO  addr
        push   ax
        push   bx
        push   cx
        push   dx

        mov    dx,offset &addr         ;Print
        mov    cx,&addr&l
        mov    bx,1                    ;stdout
        mov    ah,40h                  ;write
        int    21h

        pop    dx
        pop    cx
        pop    bx
        pop    ax
        ENDM

hxtrans MACRO  source, dest, length
        mov    cx, length
        mov    si, offset source
        mov    di, offset dest
        call   hextrans
        ENDM

cvt_nibble MACRO
        and     ax, 0fh
        add     ax, '0'         ; convert to ASCII
        cmp     ax, '9'         ; is it 0-9?
        jbe     @f              ; yes, jump
        add     ax, 'A'-'9'-1   ; make it 'A-F'
@@:
        ENDM

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.