📄 hton86.s
字号:
! htonX(), ntohX() - Host to network byte order conversion! Author: Kees J. Bot! 7 Jan 1997!! This is a little endian 8086, so we swap bytes to/from the big endian network! order. The normal <net/hton.h> macros are not used, they give lousy code..text.define _htons, _ntohs_htons:_ntohs: mov bx, sp movb ah, 2(bx) ! Load bytes into ax in reverse order movb al, 3(bx) ret.define _htonl, _ntohl_htonl:_ntohl: mov bx, sp movb dh, 2(bx) ! Load bytes into dx:ax in reverse order movb dl, 3(bx) movb ah, 4(bx) movb al, 5(bx) ret
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -