博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
IDA IDC Tutorials: Additional Auto-Commenting
阅读量:5281 次
发布时间:2019-06-14

本文共 2586 字,大约阅读时间需要 8 分钟。

This program creates a segment at paragraph 0x40 and comments the BIOS data area. You should load and execute this file to see the names of BIOS data area variables.

//-------------------------------------------------------------------------static CW(off,name,cmt) {  auto x;  x = [ 0x40, off ];  MakeWord(x);  MakeName(x,name);  MakeRptCmt(x,cmt);}//-------------------------------------------------------------------------static CD(off,name,cmt) {  auto x;  x = [ 0x40, off ];  MakeDword(x);  MakeName(x,name);  MakeRptCmt(x,cmt);}//-------------------------------------------------------------------------static CB(off,name,cmt) {  auto x;  x = [ 0x40, off ];  MakeByte(x);  MakeName(x,name);  MakeRptCmt(x,cmt);}//-------------------------------------------------------------------------static CmtBdata() { CW(0x000,"com_port_1","Base I/O address of 1st serial I/O port"); CW(0x002,"com_port_2","Base I/O address of 2nd serial I/O port"); CW(0x004,"com_port_3","Base I/O address of 3rd serial I/O port"); CW(0x006,"com_port_4","Base I/O address of 4th serial I/O port"); CW(0x008,"prn_port_1","Base I/O address of 1st parallel I/O port"); CW(0x00A,"prn_port_2","Base I/O address of 2nd parallel I/O port"); CW(0x00C,"prn_port_3","Base I/O address of 3rd parallel I/O port"); CW(0x00E,"prn_port_4","Base I/O address of 4th parallel I/O port"); MakeArray([0x40,0x01E ], 16 ); CB(0x03E,"dsk_recal_stat",     "Recalibrate floppy drive bits\n"                "   3       2       1       0\n"                "drive-3 drive-2 drive-1 drive-0\n"                "\n"                "bit 7 = interrupt flag");CW(0x0CE,"days_since1_80",     "Days since 1-Jan-1980 counter"); MakeArray(0x4AC,0xCE-0xAC);}//-------------------------------------------------------------------------static main() {  if ( !SegCreate(0x400,0x4D0,0x40,0,0,2) ) {    Warning("Can't create BIOS data segment.");    return;  }  SegRename(0x400,"bdata");  SegClass(0x400,"BIOSDATA");  CmtBdata();}
#include 
//-------------------------------------------------------------------------static CW(off,name,cmt) { auto x; x = 0x400 + off; MakeWord(x); MakeName(x,name); MakeRptCmt(x,cmt);}//-------------------------------------------------------------------------static CD(off,name,cmt) { auto x; x = 0x400 + off; MakeDword(x); MakeName(x,name); MakeRptCmt(x,cmt);}//-------------------------------------------------------------------------static CB(off,name,cmt) { auto x; x = 0x400 + off; MakeByte(x); MakeName(x,name); MakeRptCmt(x,cmt);}

 

转载于:https://www.cnblogs.com/shangdawei/p/3316079.html

你可能感兴趣的文章
基本数据类型(int, bool, str)
查看>>
070102_赌博设计:概率的基本概念,古典概型
查看>>
IT人生的价值和意义 感觉真的有了
查看>>
Linux命令之df
查看>>
JS DOM对象
查看>>
python正则表达式
查看>>
OGR – Merging Multiple SHP files
查看>>
创业公司该不该被收购?(转)
查看>>
sqlserver 行转列、列转行[转]
查看>>
【IScroll深入学习】解决IScroll疑难杂症
查看>>
python 数据类型
查看>>
108-PHP类成员protected和private成员属性不能被查看数值
查看>>
ajax post data 获取不到数据,注意contentType
查看>>
css控制height充满浏览器视口
查看>>
Linux 系统目录结构
查看>>
查看CPU数量和核心数
查看>>
Android异步加载网络图片
查看>>
python学习之 - XML
查看>>
css问题小计
查看>>
Laravel学习笔记(三)数据库 数据库迁移
查看>>