Quantcast
Channel: Question and Answer » assembly
Browsing index pages (23 articles)

Finding register parameters for system calls

By consulting various scattered tutorials and books, I’ve been able to learn that the 64-bit Linux “exit” system call is 60, and the status value is moved to edi. Similarly, “write” has call number 1,...

View Article


Memory addresses and Assembly

I recently started reading about programming in Assembly. To my knowledge, in Assembly, a programmer, when storing and retrieving their variables, has to specify the address their variables are stored...

View Article


using an AduC841 microcontroller. memory read shows pointer not object...

I am using an AduC841 microcontroller programed using assembly language(8051). when using MOVX commands to read/write from internal XRAM to DAC,my oscilloscope shows the value of the DTPR rather than...

View Article

Unit Testing: Assembler code and different architectures

I am currently unit testing some C code and I am faced with a problem: Within the code there are called functions that contain inline assembler code for the SPARC 8 architecture. Since I am doing the...

View Article

ATMEGA32 LED BLINKER Assembly code problem

I tried the following code for a simple led blinking problem on ATMega32. INCLUDE "M32DEF.INC" SBI DDRC,5 LDI R16,0xFF OUT PORTC,R16 AGAIN:LDI R19,255 LOOP1:LDI R18,255 LOOP2:LDI R20,5 LOOP3:NOP NOP...

View Article


ATmega328P assembler inline text and assembelr ALIGN

I have a program in assembler like this: lots of code ...... .ORG $7000 ;; (or somewhere) atext: .DB "this is a test string 1" .ALIGN EVEN Btext: .DB "this is a test string 2" QUESTION : Assuming the...

View Article

Difference in endianness between operating systems [closed]

There is an assembler that I am writing that is located within the file asm.c located in this repository. It uses the instruction set located in the specs file to produce an output binary. (The program...

View Article

MSP430 Delay Subroutine

I am writing a delay subroutine in assembly language for the MSP430. I want to know how to calculate the number that have to put in Register R10 in order to achieve a 20ms delay. Thanks Delay mov...

View Article


Calculator with MSP430 in Assembly Language

I am programming a calculator in assembly language with the MSP430g2553. I have a 4×4 membrane keypad and an 2×16 LCD. I already can display numbers in the LCD with the keypad. The issue is that the...

View Article


How to count cycles used by a routine?

I’d like to measure the number of cycles a routine uses on a 8051. I’m guessing that I could toggle a pin on and off and measure the period with a scope and multiply it by the number of cycles the 8051...

View Article

Initialize ARM registers to specific value via Inline assembly

I have a need to initialize the ARM registers of my ARM7TDMI development board to a specific values using inline assembly. For example currently I do something like the following : #pragma ARM void...

View Article

Assembly: push vs movl

I have some C code that I compiled with gcc: int main() { int x = 1; printf("%dn",x); return 0; } I’ve run it through gdb 7.9.1 and come up with this assembler code for main: 0x0000000100000f40...

View Article

“DB” data directive explaination [closed]

What exactly is initialization of code memory IN 8051? Does the db directive command DB “SAM” burn data into ROM location? WHAT DOES INITIALIZING WITH A BYTE VALUE MEAN ? I am all confused? I am...

View Article


Why was the AT&T assembly syntax designed this way?

The AT&T assembly syntax, often called the GAS syntax, keeps surprising me. For example, its parameter order: mov $100,%eax /* Destination after source */ This just seems so counter-intuitive!...

View Article

Image may be NSFW.
Clik here to view.

Possible shellcode mailed to me

When I opened my email this morning I found a rather odd message in my mail box. It didn’t seem like your every day spam email as it looked like a base64 encoded string and nothing else. Here is a...

View Article


Intel i7 3632qm assembler [closed]

I’d like to learn the basics of assembly. I searched in the internet, but i can’t understand which assembler should I use on my machine (Intel i7 3632qm), if I already have one installed or I have to...

View Article

Wrong frequency with Timer1 on Atmega328p in CTC Mode

I want to make a LED blink at a frequency of 0.5 Hz. So, I use an Atmega328p, clocked at 16 MHz, and the Timer1 in CTC mode, which triggers an interrupt every milisecond. Yet, my program, in Atmel...

View Article


Using djnz to make a loop in 8051 assembly language [closed]

To program 8051 using djnz loop I know that if we give r0 a number the loop will be executed accordingly. For example: Mov r0,#50 Back: instructions Djnz r0,back The loop will be executed 50 times. But...

View Article

PWM in 8051 with PCA counter

I read in documentation of AT89C51RC2, that I can make one of 5 ports to generate PWM signal if I set properly some registers. Some things I don’t understand. I don’t know what PCA counter is and how...

View Article

Assembly language that corresponds to machine instruction in MIPS

I am working on a problem that asks for the assembly language that would correspond to the following machine instruction in MIPS: OX3062FF80 Here is what I’ve done: step 1: convert to binary 0011 0000...

View Article
Browsing index pages (23 articles)


Latest Images