assembly tag

11 questions


2 answers
126 views
0
I want to get random values in wasm

I get an error when I compile into WebAssembly in Rust.//rustexternal rate rand;userland::Rng;US>fnmain(){ let secret_number = land::thread_rng().gen_range(1,101); secret_number;}//toml[package]name =...

2 years ago

1 answers
129 views
0
check the appearance of a pattern in a string with mips assembly

Below is a program to examine the appearance of a pattern in a string. End in line 18 represents the end of the program.• Inputs are given to array Pat (base address $s0) of type char and Str (base ad...

2 years ago

1 answers
103 views
0
I want the target family to control whether to grant the #[wasm_bindgen] attribute in Rust.

I would like to share the domain(entity) logic with the code cli and wasm in Rust.However, since we have to give #[wasm_bindgen] to the wasm function, we control which functions are generated by wheth...

2 years ago

1 answers
113 views
0
GCC does not optimize a*a*a*a*a*a to (a*a*a)*(a*a*a).

As far as I know, the compiler optimizes power(a,2) to a*apow(a,6) does not optimize, but calls the library function pow().The C++ Intel Compiler optimizes you to 6Why does the GCC C compiler optimize...


1 answers
108 views
0
Simple assembly question.

#include <stdio.h>int main() { int a = 20; int b = 10; int r = a / b; (#) printf(%d\n, r); return 0;}If you disable the # part here, it is shown below.int r = a / b; 0x8000660 mov -0xc(%rbp),%ea...

2 years ago

2 answers
83 views
0
To view the assembled results in gcc

I received a task to analyze the results of the compiled code, but I'm not used to gcc yet, so I don't know what options to give. How do I view the assembly code of C/C++ in gcc?

2 years ago

1 answers
117 views
0
How can I view the C mnemonic code in GCC?

The assembly that I made myself,Compared to the assembly that GCC converted in C,I want to compare how well it optimizes.Is there such a function in C like looking at machine language on Java and mnem...

2 years ago

1 answers
130 views
0
Even if you change the code, the previously executed value continues to appear.

INCLUDE Irvine32.inc.datastr1 BYTE Color output is easy!,0.codemain PROC mov eax, yellow + (blue * 16) call SetTextColor mov edx, OFFSET str1 call WriteString call Crlfexitmain ENDPEND mainColor outpu...

2 years ago

1 answers
72 views
0
Assigning a Character in the Assembly Language

You have assigned c,m,d,\x0 respectively.First line move by ptr [cmd], 63hI wonder why [cmd] doesn't come out as [ebp-n] in a part like below, what [cmd] means. And I want to know if each mov allocate...

2 years ago

1 answers
67 views
0
Curious about changes in esp while looking at assembly language with gdb

This is a simple code from Hackers School FTZ level 15.I tried gdb. The left square is the brake gun points to check esp.Minus 0x38 4604 minus 45cthe point of trouble… I can't see the code touching es...

2 years ago
- 1 - »

© 2024 OneMinuteCode. All rights reserved.