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.

1
vote
1answer
28 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 ...
0
votes
1answer
57 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: ...
0
votes
2answers
93 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 ...
1
vote
1answer
72 views

How to create unique label on macro definition on AVR gnu assebler

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 ...
1
vote
0answers
123 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 ...
1
vote
1answer
165 views

AVR-GCC initialization code

Consider the following asm.S .global main main: rjmp main Compile and dump it with these commands: ...
-6
votes
1answer
153 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.
1
vote
1answer
546 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 ...
2
votes
1answer
3k 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 ?
0
votes
1answer
319 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 ...
2
votes
1answer
88 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 ...
2
votes
3answers
446 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 ...
0
votes
2answers
414 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 ...
3
votes
1answer
783 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 ...
-4
votes
2answers
550 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: ...
1
vote
2answers
206 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 ...
2
votes
1answer
91 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, ...
0
votes
1answer
75 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'...
1
vote
2answers
624 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: ...
7
votes
3answers
2k 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: ...
2
votes
2answers
847 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: ...
1
vote
3answers
1k 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 ...
0
votes
1answer
208 views

Understanding AVR assembler instruction

From here, I have the following example: ...
0
votes
3answers
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 -...
3
votes
0answers
467 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:\...
0
votes
2answers
847 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 ...
0
votes
1answer
764 views

PIC16F1503 CLKOUT doesn't work

I have this simple program: ...
2
votes
4answers
3k 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 ...
0
votes
1answer
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 ...
1
vote
2answers
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: ...