Questions tagged [assembler]

An assembler is a program that translates programs from assembly language to machine language. An assembler creates object code by translating assembly instruction mnemonics into op-codes, and by resolving symbolic names for memory locations and other entities.

42 questions
7
votes
3 answers

NOP instruction after branch on ARMv7 Cortex M3

I'm interested, why for Cortex M3 microcontroller (stm32f103) compiler sometimes generates a NOP instruction after branch. And why it sometimes doesn't. For example: 0x08000496 2400 MOVS r4,#0x00 0x08000498 4625 MOV …
Amomum
  • 675
  • 7
  • 14
4
votes
0 answers

dsPIC: Link assembler project with XC16 in command line mode

I have an assembler project that compiles and links fine with MPLABX. Now I am trying to build it from the command line. Attempt to use the command line from MPLABX fails. When I am calling: C:\MiscStuffs>"C:\Program Files…
Kirill Kobelev
  • 316
  • 1
  • 16
4
votes
1 answer

AVR code disassembly - what is this code doing?

I have read and disassembled the code from an Atmel8 microcontroller from a faulty oscilloscope. This is the start routine: ROM:0013 ; public __RESET ROM:0013 __RESET: ROM:0013 …
DrD
  • 165
  • 4
4
votes
6 answers

What address does it save in EEPROM?

I watched Ben eater's video about a building computer based on 6502 microprocessor and I'm stuck at Part-3 ( Assembly language VS Machine code). He was programing a 32k AT28C256 EEPROM and he programmed it by assembly to blink a LED. Here is his…
Heroz
  • 431
  • 7
3
votes
1 answer

How to create unique label on macro definition on AVR GNU assembler?

On AVR GNU assembler I'm trying to create a label inside a macro definition. I would like to create a macro, which has a private lable, or unique label inside - just to be able to jump inside macro definition and use multiple instances of this…
Marcin Daw
  • 35
  • 4
3
votes
1 answer

What does the flag formula symbols mean in AVR assembler documentations

I was reading about something in the assembler documentations of the AVR microcontroller and I usually come across a line used to describe how would an instruction affect specific flag in the status register. let's take an example from ADD…
Muhammad Nour
  • 527
  • 6
  • 16
3
votes
1 answer

Atmel Studio assembler: how do I define a port pin?

Let's say I need to test a port pin like this: sbic PIND,2 This should work, but in C I would definitely made a #define INPUT ((PORTD&(1<<2))!=0). Is something similar possible in assembler? Something like .def INPUT = PIND,2 ; this is not…
Roman Matveev
  • 2,942
  • 7
  • 32
  • 75
2
votes
3 answers

AVR code - where is Z register pointing to?

I am disassembling AVR code from a bit of hardware. The processor is an Atmel-8. On restart, after setting the stack pointer, the program calls a subroutine that starts with: ldi r17, 0x72 ldi r18, 9 clr r30 clr r31 ldi r20,…
DrD
  • 165
  • 4
2
votes
1 answer

8051 Move Data To/From External Memor

As I was using this instruction movx a,@dptr . and I didnt udnerstand how a 16 bits number is being copied to the accumulator when the accumulator can only hold 8 bits ?
whyyoucare
  • 29
  • 2
  • 6
2
votes
4 answers

Documentation on `avr-as`

I'm starting learn AVR microcontrollers. But my OS is Linux. I have installed avr-binutils with avr-as. But I can't find documentation on it; especially, avr syntax (for example, for x86 standrd intel and as syntax differ).
user54579
2
votes
3 answers

If I am writing a processor in VHDL, how can I get an assembler to ease testing?

Provided that I have written a simple microprocessor design in VHDL where I have decided what instructions it has to do each task, I will then have to write test code in machine language which is tedious and error prone. A simple assembler would be…
quantum231
  • 11,218
  • 24
  • 99
  • 192
2
votes
1 answer

STM32L100 SysStick not divided by 8?

This is probably some stupid mistake, but I can't understand what's going on. I have a Discovery board with STM32L100RC. The HSI oscillator runs at 16 MHz and is selected as the system clock source, so everything should be running at 16 MHz. AHB…
MightyPork
  • 553
  • 3
  • 14
2
votes
2 answers

How can I bind a local variable to AVR's rXX register?

I need to have programmable pause with precision as high as possible. To accomplish this I have the following GCC code: void delay(unsigned char d){ volatile unsigned char i=d; while(i>0) i--; } Which is compiled to: 1cc: 89 81 ldd…
Roman Matveev
  • 2,942
  • 7
  • 32
  • 75
1
vote
2 answers

How to run assembly code on Verilog CPU design?

Looking over the following Verilog CPU description, I have a question about how you would actually go about executing an assembly program on it. I know that Verilog defines the behaviour of the hardware, not the actual implementation. My question…
Tom Finet
  • 123
  • 4
1
vote
2 answers

An Assembler for STM32 and compatible with Ubuntu

I'm new to STM32. I want to learn the architecture of STM32 using assembly language. but Keil microVision MDK-ARM is not Linux compatible. What is the alternative of Keil to write an assembly code for STM32.
1
2 3