Quantcast
Browsing all 23 articles
Browse latest View live

Are unaligned LDRH/STRH supported on Cortex M3/M0?

Can all Cortex M0/M3 cores do this? LDRH r0, [0x8001] This would suggest yes but I don’t see anything specific about Cortex-M cores.

View Article


8051 – After API call at 0xFFF0, instruction pointer is not returning to my...

With microprocessor ATmEL 89C51RC2 , when I prepare registers and ACC for API call and I call CALL 0xFFF0 instructions below the call are never executed. The process never returns from 0xFFF0. Are...

View Article


How were assemblers created straight from binary? [duplicate]

This question already has an answer here: Were the first assemblers written in machine code? 11 answers

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

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


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

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

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


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


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

“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

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

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


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

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


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

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


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

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

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
Browsing all 23 articles
Browse latest View live