Hello,
I would like to introduce some assembly code into a c99 codebase. I want to use the UMULL instruction from the ARM CPU to multiply 2 uint32_t and get the result immediately into a uint64_t.
Now a uint64_t needs 2 registers, so how do I specify the output and the constraints of the asm block?
...
I have a laptop with an intel i3 processor running windows 7 64-bit.
I am wondering, can I set up a VM running, say, windows XP 32-bit, and be able to code targeting the intel 32 architecture? will my code compile, run, debug, the same way it would on a native 32bit machine?
thanks!
...
I have a bootloader limited to 32K Bytes, when the DES is added (about 6384 Bytes), it exceeds the limit. So anybody know any DES implementation in ARM assembler as small as possible?
thanks!
...
I was wondering what are "semantic NOPs" in assembly?
...
I've seen this blog:
http://igoro.com/archive/gallery-of-processor-cache-effects/
The "weirdness" in part 7 is what caught my interest.
My first thought was "Thats just C# being weird".
Its not I wrote the following C++ code.
volatile int* p = (volatile int*)_aligned_malloc( sizeof( int ) * 8, 64 );
memset( (void*)p, 0, sizeof( int ...
When computer is powered on: How does it know from which instruction it needs to start executing?
First its the BIOS program that needs to be executed. So, what exactly happens there? I want to know the process till OS is loaded.
...
Possible Duplicate:
Whats the best beginner book for Assembly Language?
I want to learn assembly language. Can you tell me what books are good for beginners?
Also I see there are many different versions of assembly. Which one to learn and why?
...
I have written the code so far as:
.code
main
Clrscr
mov dh,10 ;row 10
mov dl,20 ;column 20
call Gotoxy ;locate cursor
PromptForIntegers
WriteString ;display string
ReadInt ;input integer
ArraySum
WriteString ;display string
WriteInt ;displ...
I am using VS2008 C++ (no libs). This is my code:
__asm
{
jmp start
msg:
db "http://www.stackoverflow.com"
dtfld:
db "00/00/0000"
tmfld:
db "00:00:00"
start:
I am getting the following errors:
Error 1 error C2400: inline assembler syntax error in 'opcode'; found 'bad token'
Error 2 e...
Looking for a tool I can use to do aspect-oriented programming at the assembly language level. For experimentation purposes, I would like the code weaver to operate native application level executable and dynamic link libraries.
I have already done object-oriented AOP. I know assembly language for x86 and so forth. I would like to be...
Hi by using the strings
promptl BYTE "Enter a signed integer: ",0
prompt2 BYTE "The sum of the integers is: ",0
will It prompt a user for two integers using assembly language and how do I add the two integers using Assembly language?
...
In my mips assembly code, I used the multi instruction to multiply 2 large numbers since the result could not fit in one register. This means that the number is saved in the hi and lo special registers. My problem is how do I print the result of the multiplication. I can access hi and lo and put them in other registers (i.e. $t0, $t1)...
The code:
/* ctsw.c : context switcher
*/
#include <kernel.h>
static void *kstack;
extern int set_evec(int, long);
/* contextswitch - saves kernel context, switches to proc */
enum proc_req contextswitch(struct proc_ctrl_blk *proc) {
enum proc_req call;
kprintf("switching to %d\n", getpid(proc));
asm volatile("pushf\n" ...
I am trying to write a function named roundD that rounds its first argument to an integer value according to the mode specified by its second argument.
I will be writing the function in assembly language, using gcc’s inline assembler. I do not want to use any predefined functions..
I think i need to set the Rounding Control field of t...
Hi,
I have question about inline assembler. It's possible to call another assembler subroutine from inline assembler within the same function? For example:
void FindValidPID(unsigned int &Pid)
{
__asm
{
sub esp, 20h
mov eax, Pid
add eax,eax
call sub123 ; another assm subroutine
mov Pid, ...
hi,
i was once supposed to make a short assembler code for dividing with numbers that are not power of 2. My solution was subtracting the divider in cycles and the number of cycles was the actual result. Is there anything faster? What's the usual way to sort this out?
...
Hello,
There are lots of PE file browsers. Here is a list of good ones if you are interested:
PE File format viewers:
PE Explorer http://www.pe-explorer.com/
PE VIew: http://www.magma.ca/~wjr/
PEBrowse Professional http://www.smidgeonsoft.prohosting.com/pebrowse-pro-file-viewer.html
PE Browse Professional Interactive ...
I would like to learn how to write device drivers because I think it would be fun. I use a Mac OS X Macbook, but I also have an Ubuntu machine (running on a Mac Min). I am pretty familiar with C and currently am reading this book. I have found some links online such as Mac Dev Center. I am doing this because it would be fun. I think ther...
int lcm_old(int a, int b) {
int n;
for(n=1;;n++)
if(n%a == 0 && n%b == 0)
return n;
}
int lcm(int a,int b) {
int n = 0;
__asm {
lstart:
inc n;
mov eax, n;
mov edx, 0;
idiv a;
mov eax, 0;
cmp eax, edx;
jne lstart;
mov eax, n;
mo...
I'm taking a course on Microprocessor Programming as part of my Electronic Engineering degree. Unfortunately, in the labs, we have to work in DOS using MASM.
Now, I don't really find DOS a hindrance, but I just don't have it on a computer at home (and none of the computers that I have have floppy drives), so I am unable to practice writ...