Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

Recent questions tagged assembly

0 votes
913 views
1 answer
    I am currently trying to write a code that takes in a string and outputs that same string with no spaces. Everything in my code currently works, but ... syscall end: #end program li $v0, 10 syscall #end See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
543 views
1 answer
    I wanted to test if bitwise operations really are faster to execute than arithmetic operation. I thought they were. I wrote a small C program to ... takes longer on average than the arithmetic operator. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
718 views
1 answer
    This is the code I have been using to implement extended multiplication of two 32-bit numbers. Is there a way to implement the similar logic by making a ... 1 dec cl jnz checkbit mov ax, 0x4c00 int 0x21 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
865 views
1 answer
    I am writing NASM assembly code, and have to do some indexed addressing. I have the index stored in $al, but x86 won't let you use $al as an ... ecx] ; value_at(first_table_addr + char) -> bx pop ecx See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
634 views
1 answer
    Can anyone explain for me why the sign of the remainder is different in these cases? Is this an emulator bug or do real CPUs do this, too? 8 / -3 : quotient( ... / 3 : quotient(AL) = -2 remainder(AH) = -2 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
713 views
1 answer
    Is it possible to use the 8-bit registers (al, ah, bl, bh, r8b) in indexed addressing modes in x86-64? For example: mov ecx, [rsi + ... pointed towards basically the same answer as above: probably not. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
791 views
1 answer
    By looking at intel volume of instructions, I found this: 1) 88 /r MOV r/m8,r8 2) 8A /r MOV r8,r/m8 When I write a line like this in NASM, ... option two? if so, on what basis did NASM chosed the first? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
481 views
1 answer
    I want to ping threads to all cores in two CPU socket, and write communications between the threads without write back to DRAM. Write ... forums/intel-moderncode-for-parallel-architectures/topic/700477 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
886 views
1 answer
    I have two small files that I want to compile in CMake for debugging it with CLion and GDB main.c int my_strlen(char *); int main() { printf("Test: ... in a C project and compile with a CMakeList.txt ? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    LUI (load upper immediate) is used to build 32-bit constants and uses the U-type format. LUI places the U-immediate value in the top 20 ... good implementation to move a 32bits immediate to register? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.0k views
1 answer
    Please look at the following program, the error is invalid effective address calculation and i have mentioned that line please tell me why its invalid effective ... jmp loop end: mov ax,0x4c00 int 0x21 See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
821 views
1 answer
    The Intel manual says that: the syscall instruction is invalid for compatibility mode (32-bit) popa is invalid for 64-bit mode So is there a reason why NASM ... 09 on Ubuntu 14.04 (should be OS agnostic). See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
709 views
1 answer
    From this question, What registers are preserved through a linux x86-64 function call, it says that the following registers are saved across function calls: ... much in explaining what I may be missing. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
854 views
1 answer
    I'm trying to get a simple Hello world program in NASM to run. I want to print to the console without using C-Libraries, interfacing directly with ... What am I doing wrong? EDIT: Fixed calling convention See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
817 views
1 answer
    Is there no ability to have a 64 bit stack for ARMv8? I understand there is no push and pop instructions on AArch64 so is stack management left ... how function calls will work when operating in AArch64. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
836 views
1 answer
    I just started messing around with assembly language and I tried to print the number 9 on console. Here is what I wrote: global _main section .data ... interrupt. So, what interrupt code should I use? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
632 views
1 answer
    It it safe to assume that x64 builds can use TZCNT without checking its support through cpu flags? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
824 views
1 answer
    I'm new to Assembly and I know this is a fair easy question. I supposed to do unsigned integer addition for $a0 and $a2 and store the result in ... this is gonna to work. Any help would be appreciated. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
561 views
1 answer
    In the third chapter of Computer System: A Programmer's Prespective, an example program is given when talking about shift operations: long shift_left4_rightn( ... , %ecx" when dealing with long integer. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
960 views
1 answer
    I have code example for multiplying two 16 bit numbers on 8086 and trying to update it for two 32 bit numbers multiplying. start: MOV AX,0002h ; ... to use any register arbitrarily? Thanks in advance. See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
801 views
1 answer
    I'm supposed to answer this question. After some research it says that add and sub have the same opcode and differ only in the functional field. Is this ... 2009 subi is implemented as addi rB, rA, -IMMED See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I was trying to divide (Unsigned) 8A32F4D5 by C9A5 using emu8086 tool. I expected the quotient to be AF73H and the remainder be 94B6H. After writing the ... 21H MAIN ENDP END MAIN The output in EMU8086: See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
1.1k views
1 answer
    I am new to nasm and I really want to learn how to store a number with user input. I can't get rid of getting segmentation fault when using ... push number push format call scanf ret Thanks in advance! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
610 views
1 answer
    Want to define same local label in multiple functions: .text .globl main func: push %rbp mov %rsp, %rbp .a: leave ret main: push %rbp mov %rsp, ... labels in multiple functions. Do you have any clues? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
811 views
1 answer
    I'm digging into left and right shift operations in x86 ASM, like shl eax, cl From IA-32 Intel Architecture Software Developer's Manual 3 All IA-32 ... 1 cycle? Any detailed explanation would help a lot! See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
520 views
1 answer
    I'm writing a DOS clone for a school project and I'm trying to read some sectors from a floppy drive (mainly the root directory of a FAT12 file system, ... that would be useful that I've not posted here? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
483 views
1 answer
    I have some questions about the memory layout of a program in Linux. I know from various sources (I'm reading "Programming from the Ground Up") ... why I get the segmentation fault earlier at 0x804a000? See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
0 votes
566 views
1 answer
    I learned to switch to protected mode with a simple DOS based bootloader. This loader loads kernel.bin into a buffer and copies the buffer to 100000h (kernel ... ] sti mov ax,4c00h ;Exit process int 21h See Question&Answers more detail:os...
asked Oct 24, 2021 in Technique[技术] by 深蓝 (71.8m points)
Ask a question:
Welcome to Jonic Developer Community for programmer and developer-Open, Learning and Share
...