09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>XENIX</strong> Programming adb: Program Debugger<br />

Writing to a File<br />

You can write to a file by using the w and W commands. The commands have the form<br />

[ address ] ?w value<br />

where address is the address of the value you wish to change, and value is the new value.<br />

The w command writes two-byte values; W writes four-byte values. For example, the<br />

following commands change the word "This" to "The ".<br />

?I 'This'<br />

?W 'The '<br />

Note that W is used to change all four characters.<br />

Making Changes to Memory<br />

You can also make changes to memory whenever a program has been executed. If you<br />

have used an :r command with a breakpoint to start program execution, subsequent w<br />

commands cause adb to write to the program in memory rather than the file. This is<br />

useful if you wish to make changes to a program's data as it runs, for example, to<br />

temporarily change the value of program flags or constants.<br />

6-3 1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!