assembly

how to show the index of element found in tasm program

空扰寡人 提交于 2020-12-13 20:58:28
问题 how can i display index number of the element which i have found? i have found out the maximum element from the array and now I want to print the index of the element which I have found how to proceed? i want to find the element of the largest number which i found in the array according to the below logic ? Data Segment msg db 0dh,0ah,"Please enter the length of the array: $" msg1 db 0dh,0ah,"Enter a number: $" newl db 0dh,0ah," $" res db 0dh,0ah,"The maximum is: $" len db ? max db ? Data

Do general purpose registers are generally memory mapped?

白昼怎懂夜的黑 提交于 2020-12-13 18:42:39
问题 I am very confused with Memory Map and Memory mapped I/O. Do general purpose registers for example in ARM Architecture r0, r1, and etc are generally memory mapped? Please help. 回答1: No, those registers are inside the actual CPU (or CPU core for multi-core CPUs). You can not access them through memory. A memory-mapped register is something which you access through an address or a pointer (in languages that has pointers). I/O devices often have memory-mapped registers, where you write to or

Do general purpose registers are generally memory mapped?

谁说胖子不能爱 提交于 2020-12-13 18:42:16
问题 I am very confused with Memory Map and Memory mapped I/O. Do general purpose registers for example in ARM Architecture r0, r1, and etc are generally memory mapped? Please help. 回答1: No, those registers are inside the actual CPU (or CPU core for multi-core CPUs). You can not access them through memory. A memory-mapped register is something which you access through an address or a pointer (in languages that has pointers). I/O devices often have memory-mapped registers, where you write to or

Do general purpose registers are generally memory mapped?

让人想犯罪 __ 提交于 2020-12-13 18:41:28
问题 I am very confused with Memory Map and Memory mapped I/O. Do general purpose registers for example in ARM Architecture r0, r1, and etc are generally memory mapped? Please help. 回答1: No, those registers are inside the actual CPU (or CPU core for multi-core CPUs). You can not access them through memory. A memory-mapped register is something which you access through an address or a pointer (in languages that has pointers). I/O devices often have memory-mapped registers, where you write to or

Assembler output does not run on my Linux machine

我们两清 提交于 2020-12-13 04:54:00
问题 I followed up this page and compiled the following code ; assembly program that calls a C function on 64-bit Linux ; ; int main(void) { ; printf(fmt, 1, msg1); ; printf(fmt, 2, msg2); ; return 0; ; ; Assemble in 64-bit: nasm -f elf64 -o hp64.o -l hp64.lst hello-printf-64.asm ; ; Link: ld hp64.o -o hp64 -lc --dynamic-linker /lib/ld-2.7.so ; or maybe ld hp64.o -o hp64 -lc --dynamic-linker /lib/ld-linux-x86-64.so.2 ; (the "-lc" option is needed to resolve "printf") ;-----------------------------

Assembler output does not run on my Linux machine

霸气de小男生 提交于 2020-12-13 04:50:05
问题 I followed up this page and compiled the following code ; assembly program that calls a C function on 64-bit Linux ; ; int main(void) { ; printf(fmt, 1, msg1); ; printf(fmt, 2, msg2); ; return 0; ; ; Assemble in 64-bit: nasm -f elf64 -o hp64.o -l hp64.lst hello-printf-64.asm ; ; Link: ld hp64.o -o hp64 -lc --dynamic-linker /lib/ld-2.7.so ; or maybe ld hp64.o -o hp64 -lc --dynamic-linker /lib/ld-linux-x86-64.so.2 ; (the "-lc" option is needed to resolve "printf") ;-----------------------------

What is the most efficient way to support CMGT with 64bit signed comparisons on ARMv7a with Neon?

对着背影说爱祢 提交于 2020-12-12 05:39:34
问题 This question was originally posed for SSE2 here. Since every single algorithm overlapped with ARMv7a+NEON's support for the same operations, the question was updated to include the ARMv7+NEON versions. At the request of a commenter, this question is asked here to show that it is indeed a separate topic and to provide alternative solutions that might be more practical for ARMv7+NEON. The net purpose of these questions is to find ideal implementations for consideration into WebAssembly SIMD.

Embedded System: Memory Layout when using Assembly Language

若如初见. 提交于 2020-12-12 05:38:59
问题 From my understanding, an embedded system runs machine code. There are multiple ways to generate this code. One is to write a programm in a higher level language like C and use a compiler to get such code. An other way is writing instructions in the assambly language for that embedded system and using an assembler to translate that to machine code. Now we got machine code which is loaded to the system and executed. The programm code is stored in non-volatile memory. Now, if the programm code

Embedded System: Memory Layout when using Assembly Language

倾然丶 夕夏残阳落幕 提交于 2020-12-12 05:38:04
问题 From my understanding, an embedded system runs machine code. There are multiple ways to generate this code. One is to write a programm in a higher level language like C and use a compiler to get such code. An other way is writing instructions in the assambly language for that embedded system and using an assembler to translate that to machine code. Now we got machine code which is loaded to the system and executed. The programm code is stored in non-volatile memory. Now, if the programm code

Calculating LCM in assembly x86

。_饼干妹妹 提交于 2020-12-12 05:35:11
问题 I have the following assembly code .global _start .section .text _start: movq a, %rax movq b, %rbx imul %rbx, %rax cmp %rbx, %rax je gcd_calculated ja l1 sub %rax, %rbx jmp _start l1: sub %rbx, %rax jmp _start gcd_calculated: div %rax movq %rax, (c) a,b are quads that I need to calculate their lcm and I need to assign the result to c I get wrong results with the above code and I can't spot why. generally, i'm relaying on the the lcm = (a*b)/gcd so I store a*b in %rax and then calculate the