htonl.asm
bitfixer_bitfixer/dg/z88dk/libsrc/z80_crt0s/crt0_long/htonl.asm
;
;       Small C+ TCP Implementation
;
;       htonl() Convert host to network format and back again!
;
;       djm 24/4/99


                PUBLIC    htonl

.htonl
        ex      de,hl   ;exchange order of bytes
        ld      a,l     ;swap within bytes
        ld      l,h
        ld      h,a
        ld      a,e
        ld      e,d
        ld      d,a
        ret

