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.

Filter by
Sorted by
Tagged with
1 vote
2 answers
76 views

An Assembler for STM32 and compatible with Ubuntu [closed]

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 ...
user avatar
0 votes
2 answers
287 views

ARM asssembler: rotation of bits in immediate value

Consider MVN r3,#0xFFFF807F Is this an invalid instruction from ARM? Since MVN is simply the complement, it equates to ...
user avatar
  • 335
0 votes
0 answers
64 views

Writing an assembler for Lattice GAL devices

I am writing a compiler for the Lattice GAL10V8 and GAL16V8 PLDs. (And, yes I know that these chips are now obsolete.) I have completed the compiler as far as parsing the logic equations and pin ...
user avatar
0 votes
1 answer
83 views

Making a port as input in 8051

As we all know in order to make a port input in 8051 we have to write FFH to that. That is, MOV P1, #0FFH after this execution does it mean all the pins of the ...
user avatar
  • 699
0 votes
0 answers
106 views

Offset of bnez in RISC-V program

I came across a question about assembly that I was confused on. We are given the following table for addresses and instructions: The question says: replace the labels of PC-relative targets with ...
user avatar
  • 9
0 votes
1 answer
2k views

RISC-V assembly lui?

In RISC-V assembly I wrote: addi s0,x0,0x20000 Is this legal such that the assembler will prove the command and make it work right or I'm forced to change it to: <...
user avatar
  • 11
0 votes
2 answers
1k views

PIC - How to program them in assembly?

For years I programmed PIC controllers in assembler, but let it drop. Now I want to get back to where I was, and - so help me - I can't find out where to start. Downloaded MPLAB-X-IDE and it says I ...
user avatar
1 vote
2 answers
160 views

ATmega2560 I2C (TWI) assembler configuration problems

I am using ATmega2560 for testing an I2C code. I wrote subrutines in assembler for init, start, write, read and stop the I2C setup. The goal is that master writes 11110000 to a slave with address ...
user avatar
0 votes
1 answer
327 views

Error (10536): VHDL Loop Statement error at InstructionMemory.vhd(31): loop must terminate within 10,000 iterations

Can someone help me solve this problem? Its my code below: ...
user avatar
0 votes
2 answers
763 views

How to correctly use a address in assembler?

Im trying to use several registers on the M4/tm4c1294 in a way to avoid write every time the same register number. The question is how to make the number of the register and if the reference is ...
user avatar
  • 510
1 vote
1 answer
534 views

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 ...
user avatar
1 vote
0 answers
214 views

PIC assembly: express integer constant as string at build time

One of my engineers came to me with a question that I can't answer. This is for a project using a PIC16F controller, all written in assembler. He is defining a constant that he wants his program to ...
user avatar
  • 22.6k
1 vote
1 answer
517 views

AVR-GCC initialization code

Consider the following asm.S .global main main: rjmp main Compile and dump it with these commands: ...
user avatar
-6 votes
1 answer
179 views

8085 Programming Basics

Bcz of CALL, SP will be decremented by 2. Then bcz of POP, SP will get incremented by 2. So, SP will be 27FFH. But, I am confused with HL register part. Please help me with the above problem.
user avatar
1 vote
1 answer
851 views

Assembler basic question : translation to machine code

How does a assembler (at very basic level) work in translation of Assembly language to machine code ? [What my understanding is that when a Programme is written it is written in text and then ...
user avatar
2 votes
1 answer
5k views

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 ?
user avatar
0 votes
1 answer
693 views

Assembler language basics parity flag

I am a beginner in assembler language I was reading some stuff online(belongs to a university) and I saw that the P bit in psw after executing this instruction mov a,#03h A=0000 0011B so P=0 first ...
user avatar
3 votes
1 answer
195 views

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 ...
user avatar
2 votes
3 answers
783 views

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 ...
user avatar
  • 9,561
1 vote
2 answers
827 views

Assembler i8080 proccessor. Dividing two 16bits numbers

I would like to ask you about division algorithm which I can implement in Assembler for i8080 processor. I know the easiest method is dividing by repeated subtraction but it is very slow. I found many ...
user avatar
  • 11
3 votes
1 answer
1k views

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 ...
user avatar
-4 votes
2 answers
649 views

How do I get a value of a RAM by given address? [closed]

I think I know how RAM works, but I have an exercise where I have to read at the address 0x????. Furthermore, I am only interested what value get returned after the reading command. For example: ...
user avatar
1 vote
2 answers
323 views

Why in some instruction the order of register is different between machine code and assemble code for MIPS?

For example in assemble code we have /add rd rs rt/ but in machine code we have /opcode rs rt rd/, where the destination register is at last position. Why MIPS arrange their code like this ? I know in ...
user avatar
  • 51
2 votes
1 answer
110 views

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, ...
user avatar
0 votes
1 answer
94 views

Timer0 loop not working on PIC12F508

I'm quite new in programming PICS, but have already done some projects. All of them were working fine. But now I'm stuck with a very simple one and I don't find out what's wrong. I'm pretty sure that'...
user avatar
  • 202
1 vote
2 answers
693 views

Unnecessary (?) loading PC register with following instruction's address in ARM

I'm trying to comprehend the assembler starting code for my ARM7TDMI processor. I Got most of it, but there's one thing that bothers me. I found this line: ...
user avatar
  • 215
7 votes
3 answers
3k views

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: ...
user avatar
  • 675
2 votes
2 answers
1k views

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: ...
user avatar
1 vote
3 answers
2k views

Assembler coding for ARM (Cortex-M0 and M3): is it possible/practical?

Unfortunately there are no questions on Stack regarding ARM and assembler at all. My concern -- is time critical devices. Let's take for an example one of my AVR-based device (program compiled with ...
user avatar
0 votes
1 answer
267 views

Understanding AVR assembler instruction

From here, I have the following example: ...
user avatar
0 votes
3 answers
2k views

PIC16F88 - compare ADC results with a constant value

I am trying to write my first program in assembler for PIC16F886. The program is supposed to do the following: Read ADC value on channel AN0 If the value is smaller than 128 - turn LED off Otherwise -...
user avatar
  • 781
3 votes
0 answers
554 views

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:\...
user avatar
0 votes
2 answers
914 views

How to find macro "usage position" in microchip MPLab

I'm having troubles when MPLab shows me error within a macros (with assembly language). It gives the line number of where macros is defined. That's not very helpful if the macros is working fine, but ...
user avatar
  • 207
0 votes
1 answer
790 views

PIC16F1503 CLKOUT doesn't work

I have this simple program: ...
user avatar
  • 296
2 votes
4 answers
4k views

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 ...
user avatar
0 votes
1 answer
2k views

How is a two-pass assembler designed? [closed]

What is the algorithm for the first pass and the second pass of an assembler? I have been looking for a description or tutorial but haven't found one. If there are tutorials that explain these ...
user avatar
  • 27
1 vote
2 answers
1k views

in dsPIC33 assembler, can I use all of the w registers?

Most of my dsPIC3 application is written in C, but one function is particularly speed sensitive, so I had to write that function in assembler. The function looks roughly like this: ...
user avatar
  • 26.1k