レジスタの表示

VisualDSP++のレジスタを表示するjavascriptプログラムです。WSHを使用しており、ActiveX越しにVisualDSP++の機能を利用します。
以下を仮定しています。

  • VisualDSP++が呼び出されている
  • Blackfinセッションが確立している

プログラムを.jsファイルに保存し、ダブルクリックすればスクリプトが実行され、visualDSP++のコンソール・ウィンドウに結果が表示されます。registersプロパティの"PC"を書き換えれば、PCレジスタ以外の好きなレジスタを表示できます。

	// Create a VisualDSP++ Application object 
	// if you run this program from VisualDSP++ console, comment out next line.
Idde = WScript.createObject ( "VisualDSP.ADSPApplication" );
Idde.printText( 0, "Product Version : VisualDSP++ " + Idde.ProductVersion  );


	// Get the active processor 
processor = Idde.ActiveSession.ActiveProcessor;
Idde.printText( 0, "Processor Name  : " + processor.Name );

	// Get the target register and print it
registers = processor.registerList;
Idde.printText( 0, "Register Name   : " + registers("PC").name );
Idde.printText( 0, "Register Value  : " + registers("PC").value.toString( "Hexadecimal" ));

実行結果:

	Product Version : VisualDSP++ 4.5.0.0
	Processor Name  : ADSP-BF533
	Register Name   : PC
	Register Value  : FFA0078A