home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / hamradio / wattcp.zip / INTEL.ASM < prev    next >
Assembly Source File  |  1990-12-14  |  981b  |  47 lines

  1. PAGE    66,132
  2. ;
  3. ;
  4. ;
  5. ;
  6. ;
  7. ;
  8. ;
  9. ;
  10. ;  intel - convert intel <--> bigendian
  11. ;
  12. ;
  13. ;  (c) 1990 University of Waterloo,
  14. ;           Faculty of Engineering,
  15. ;           Engineering Microcomputer Network Development Office
  16. ;
  17. ;
  18. ;
  19.     include masmdefs.hsm
  20.     include    model.hsm
  21.  
  22. codedef intel
  23. datadef
  24.  
  25. cstart  intel
  26.  
  27. ;*************************************************************************
  28. ;  USAGE:  ULONG intel( ULONG val )
  29. ;          - convert to intel format
  30. ;*************************************************************************
  31. cpublic intel
  32.     mov    AX, +@AB + 2 [BP]
  33.     mov    DX, +@AB + 0 [BP]
  34.     xchg    AL, AH
  35.     xchg    DL, DH
  36. creturn intel
  37. ;*************************************************************************
  38. ;  USAGE:  UINT intel16( UINT val )
  39. ;          - convert to intel format
  40. ;*************************************************************************
  41. cpublic intel16
  42.     mov    AX, +@AB [BP]
  43.     xchg    AL, AH
  44. creturn intel16
  45. cend    intel
  46.         end
  47.