0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

vistaでstm32duino その20

Last updated at Posted at 2021-10-20

概要

vistaでstm32duinoやってみた。
アセンブラ、やってみた。

サンプルコード

int add(int i, int j) {
	int res = 0;
	asm ("ADD 	%[result], %[input_i], %[input_j]"
		: [result] "=r" (res)
		: [input_i] "r" (i), [input_j] "r" (j)
	);
	return res;
}
void setup() {
	Serial.begin(9600);
}
void loop() {
	Serial.println("hello stm32duino");
	delay(1000);
	Serial.println(add(3, 4));
	delay(1000);
}





結果

7
hello stm32duino
7
hello stm32duino
7
hello stm32duino
7
hello stm32duino
7
hello stm32duino
7
hello stm32duino
7
hello stm32duino
7



以上。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?