I have a simple DOS COM program which I want to analyse using Radare2:
USE16
ORG 100h
mov ax, cs
dec ax
mov ds, ax
mov dx, message+10h
mov ah, 9
int 21h
ret
message: db "Hello there!$"
(Use yasm
or echo "jMhIjti6HQG0Cc0hw0hlbGxvIHRoZXJlISQ=" | base64 -d > test.com
to compile it to a binary.)
When I load the binary using r2 -b16 test.com
radare shows that I'm at 0000:0000
.
How can I tell radare that the actual program address should be 0000:0100
?
Also how can I tell radare that the offset loaded into the dx
register points to message
? In other words, can I tell radare that dx
is an offset using a segment that starts at 0000:0100 - 0x10
?