Assembly language (asm) programming questions. Also specify the processor or instruction set your question is related to as well as what assembler you are using. **NOTE**: For .NET assemblies, use the tag [.net-assembly] instead.

learn more… | top users | synonyms (3)

0
votes
0answers
5 views

Assembly call to ExitProcess returns error code

I'm calling exit process but it fails eax set to 2 and error code ERROR_INVALID_ID_PARAMETER is this related to stack alignment ? What's causing this error ? push 0 call [ebp + 8]; exit process ...
4
votes
0answers
26 views

what is has_zero and find_zero in word_at_a_time.h used for

In linux kernel, inlucde/linux/word_at_a_time.h, there are two functions: static inline long find_zero(unsigned long mask) { long byte = 0; #ifdef CONFIG_64BIT if (mask >> 32) ...
0
votes
1answer
20 views

Create an array in asm java compiler

Iam trying to create an array of integers using bytecode instructions http://en.wikipedia.org/wiki/Java_bytecode_instruction_listings Any ideas how to do it? Thanks in advanced
0
votes
0answers
11 views

PIC 10F322 reading from db table

I built an assembly program using mpasm for the pic 10f322, and I want the program to read off all characters in my TABLE: by placing these values back into my WREG. When my code executes, it is ...
0
votes
1answer
38 views

Understanding Assembly Code

Could anyone provide some insight into the following assembly code: oc_60: ; CODE XREF: seg000:0052j mov cx, 3FFFh mov si, 800h xor di, di loc_68: ; CODE XREF: seg000:0071j lodsw and si, 0FFBFh xor ...
0
votes
0answers
19 views

fasm assembly 64 bit programming in winasm studio showing empty screen when trying to assemble a program

I have been programming in winasm studio using fasm for about 2 months. I am now using a 64 bit computer so I wanted to convert some of my programs to 64 bit. I started with a timer example here is ...
-4
votes
1answer
64 views

What would be your output for this assembly code [closed]

I am learning Assembly on x86 and trying to understand a programe which will add two number. This code and done some modification on top of it to understand it better. section .data message1 db ...
1
vote
1answer
22 views

Reading a two digit number in assembly and storing it in a variable

I need to a program in assembly to read a two digit number from the user, store it in a variable and later print it. I have tried a lot, but could not get through. Here is my coding. .model small ...
1
vote
0answers
37 views

Do the MMX registers always exist in modern processors?

When I look at diagrams and overviews of recent processors[1], I never see mention of the MMX registers MM0 - MM7. But from the specs, it seems like they still exist. Can one depend on them being ...
0
votes
2answers
66 views

add inline asm into C macro

I'm using mingw 4.7.2. Could someone please tell me what's wrong in this MACRO All I want to do is a simple asm macro which add two int and puts the result into result variable #define ...
0
votes
1answer
33 views

Details of Syscall.RawSyscall() & Syscall.Syscall() in Go?

I'm reading source code in package syscall now, and met some problems: Since I'm totally a noob of syscall and assembly, so don't hesitate to share anything you know about it :) First about func ...
0
votes
0answers
14 views

exception after `call far TSS descriptor:offset`

I have a big problem that's got me stuck for a month! I'm writing assembly code to do a task switch by call far [es:esi + TCB.addr_tss] in bochs, like picture 1. Now I step into the new task, so I ...
0
votes
1answer
41 views

How to pass value from rax to xmm register

I want to pass value from %rax or memory to %xmm0 and this value shoud be of double, so i can later multiply %xmm0 by sth. Currently im using this: movq $1, -72(%rbp) movq -72(%rbp), %rax ...
0
votes
0answers
35 views

How to identify a loop on the instruction level?

Can a direct branch instruction with a lower target address than the address of the branch instruction itself be considered as the beginning of a loop? Is this condition sufficient, or are there are ...
-1
votes
0answers
48 views

Anyone can explain the linux source code get_free_page()? [closed]

unsigned long get_free_page(void) { register unsigned long __res asm("ax"); __asm__("std ; repne ; scasb\n\t" "jne 1f\n\t" "movb $1,1(%%edi)\n\t" "sall $12,%%ecx\n\t" "addl ...

1 2 3 4 5 601
15 30 50 per page