Linux tputs

tputs(char *const str, int affcnt, int (*putfunc)(int))

设置终端输出显示参数

tputs(tmp, 1, putchar)

49c1: 48 8d 3d 44 17 00 00 lea 0x1744(%rip),%rdi # 610c <_IO_stdin_used@@Base+0x10c>

49c8: 31 f6 xor %esi,%esi

49ca: e8 a1 dc ff ff callq 2670 <tgetstr@plt> // tgetstr("md", NULL)

49cf: 48 89 c7 mov %rax,%rdi // tmp=tgetstr("md", NULL)

49d2: 48 85 c0 test %rax,%rax // tmp ?= NULL

49d5: 0f 84 6e fa ff ff je 4449 <__sprintf_chk@plt+0x1cd9>

49db: 48 8b 15 ee 45 00 00 mov 0x45ee(%rip),%rdx # 8fd0 <putchar@GLIBC_2.2.5>

49e2: be 01 00 00 00 mov $0x1,%esi
49e7: e8 24 da ff ff callq 2410 <tputs@plt> // tputs(tmp, 1, putchar)

49ec: e9 58 fa ff ff jmpq 4449 <__sprintf_chk@plt+0x1cd9>

putchar 原型:

int putchar(int char)

相关推荐
梁正雄1 天前
linux服务-Bonding网卡绑定工具
linux·运维·linux bonding·网卡绑定
云边有个稻草人1 天前
Windows 里用 Linux 不卡顿?WSL + cpolar让跨系统开发变简单
linux·运维·服务器·cpolar
打不了嗝 ᥬ᭄1 天前
【Linux】网络层协议
linux·网络·c++·网络协议·http
LXY_BUAA1 天前
将linux操作系统装入U盘20251107
linux·运维·服务器
kaoa0001 天前
Linux入门攻坚——53、drbd - Distribute Replicated Block Device,分布式复制块设备-2
linux·运维·服务器
落羽的落羽1 天前
【C++】现代C++的新特性constexpr,及其在C++14、C++17、C++20中的进化
linux·c++·人工智能·学习·机器学习·c++20·c++40周年
RisunJan1 天前
Linux命令-e2label命令(设置第二扩展文件系统的卷标)
linux·运维·服务器
Claire_ccat1 天前
2025山西省网络安全职业技能大赛PWN方向题解
linux·安全·网络安全·pwn·栈溢出
小苏兮1 天前
【把Linux“聊”明白】编译器gcc/g++与调试器gdb/cgdb:从编译原理到高效调试
java·linux·运维·学习·1024程序员节
LCG元1 天前
Linux 软件安装大全:apt/yum/dpkg/rpm/snap 到底用哪个?
linux