我对 IDA 有一些经验,现在我正尝试以同样的方式使用 Radare2/Cutter。我反汇编了一个 DOS MZ 文件。我有以下几点:
;-- section.seg_000:
12: entry0 ();
0000:0000 push ds ; [00] -rwx section size 10784 named
seg_000
0000:0001 xor ax, ax
;-- di:
0000:0003 push ax
0000:0004 mov ah, 0x30 ; '0'
0000:0006 int 0x21
0000:0008 mov byte cs:[0x11], al
665: fcn.0000000c ();
0000:000c cmp al, 2
0000:000e jae 0x12
0000:0010 retf
0000:0011 .byte 0x00 ; RELOC 16
0000:0012 mov ax, 0x2a2 ; RELOC 16
我想将地址标记0x11为DOSVersion并通过这个名称而不是偏移量来引用它。在 IDA(Turbo Assembler 语法)中,我可以让它看起来像这样:
proc Main far
push ds
xor ax, ax
push ax
mov ah, DOS_FN_VERSION
int DOS_INT
mov [cs:DOSVersion], al
cmp al, DOS_VERSION_2_0
jnb short ProperDosVer
retf
DOSVersion db 0
ProperDosVer:
mov ax, DSEG
如何使用 Radare2/Cutter 获得相同的结果?
