Questions tagged [assembly]

This is a programming language that is at a low level that corresponds with the instruction set of the machine being programmed.

Filter by
Sorted by
Tagged with
0
votes
0answers
96 views
+50

inline assembly ARM GNU GCC

im playing with SVCall function in ARMv6 using GNU gcc compiler see below code with 2 defined SVCall functions ment to be compiled the same way: ...
0
votes
5answers
128 views

PIC processors - assembly vs. C?

I have heard that earlier PICs that are quite tiny are to be programmed using assembly and not C. Later PICs had hardware instructions to make them easy to be programmed via C language. However, I am ...
0
votes
10answers
241 views

Most bare-bones way to use a CPU? (How to learn)

I know a bit of programming but am brand new to lower-level stuff so please forgive the naivety of this question. What would be the most direct way of executing a series of commands on a CPU to do a ...
-3
votes
1answer
37 views

Converting 3-bit binary to Octal using RB0 ext. INT

I am tasked with converting 3 bit binary number to Octal whenever the rising edge of the RB0 interrupt occurs, that I can do easily, the problem is that it is required to be displayed on a 7-Seg. ...
0
votes
1answer
42 views

__enable_irq() Intrinsic Infinite Loop

I'm implementing a system based on the STM32L0 line of microcontrollers that uses an external interrupt to trigger an SPI read from an external sensor (a DW1000 UWB module). I am not running any sort ...
1
vote
0answers
59 views

Cortex M0 - ADR “cannot represent THUMB_ADD relocation in this object file format”

When attempting to use the ADR instruction in an assembly program, the assembler chokes with the error "cannot represent THUMB_ADD relocation in this object file format" I'm referring to the ...
1
vote
2answers
61 views

Cortex M0 - Defining an interrupt routine in assembly

For a project I have some code that needs to be written in assembly due to precise timing requirements. I'd ideally like to implement my code in a timer interrupt routine. Right now, in C++ I can ...
0
votes
2answers
111 views

How can we multiply two 2-digit BCD numbers?

I am designing a PIC18F4520 microcontroller based system. By using this system I want to multiply two numbers. Each number is a 2-digit BCD number. Such as 73*27 and I want to see results as 2715 at a ...
1
vote
4answers
371 views

How to code in assembly language for floating point exponentiation?

I have problem calculating raise a to the power of b (a^b) where b is a floating point number. In my case, b=-1.45. So the ...
0
votes
0answers
36 views

How to implement an equation in assembly language using PIC18F and display its result on LCD?

I had a project that requires to measure illuminance(lux) using LDR and display the result on LCD. Thanks to some references from Google, I had managed to build a equation that shows relation between ...
0
votes
1answer
65 views

Failed to display on LCD when interfacing with PIC18F4520 using ASM language

The LCD constantly shows nothing even though I built program sucessfully and found no error. I tried for many times in the past days but it doesn't work. I tried appling this code on PIC16F877 by ...
0
votes
3answers
74 views

Physical size of the registers for x86

We have an 8-bit register called CL on x86 CPU architecture. Does it mean that physically it contain 32 bits, but we have access only to lower 8 bits? Or does ...
0
votes
1answer
100 views

Why any modern CPU masks 5 lower bits in a CL register for shifting operations

I'm digging into left and right shift operations in ASM. From IA-32 Intel Architecture Software Developer’s Manual 3 All IA-32 processors (starting with the Intel 286 processor) do mask the ...
0
votes
1answer
58 views

Flash assembly to microcontroller

I would like to program a microcontroller board directly in Assembly (any instruction set) in the most direct way. I don't want to use any IDE or bootloader code to handle the flashing. My aim is to ...
0
votes
0answers
19 views

MIPS pipeline stalling

Can someone tell me if I am correct or incorrect? I am new to this as you can see and have done my best with what I have been given.
0
votes
1answer
22 views

TI webbench PCB

Looking at TI's TPS56339 and looking at what TI outputs for Altium opens up some questions for me. In the following image, the highlighted component is the TPS56339. Has the assembly process ...
1
vote
1answer
68 views

8051 to I2C backpack/4 bit LCD Byte Construct Probelms

Been feverishly writing bit bang code in assembly for this I2C backpack/4 bit LCD and dont quite understand the binary constructs I need to display text. Im trying to learn this the real way, not the ...
0
votes
0answers
38 views

Programming a PIC16F84A Microcontoller in assembly with MPLAB increment problem

I'm programming a PIC16F84A microcontroller to automatically increment a number with a 1 second delay, and get it displayed on a 7 Segment Display. The 7 segment display is already set so there's no ...
1
vote
1answer
64 views

How x86-64 Intel CPU understands how many bytes load into a register

I have the following byte code one the left and and its byte representation on the right: ...
1
vote
1answer
217 views
0
votes
1answer
42 views

Control systems composed of several different parts just as program blocks

We're having a course on System Software this semester and we're covering the chapter on Assemblers presently. Our professor gave us some questions to think about. One of them is this: Control ...
2
votes
2answers
34 views

AVR gcrt1.S behavior

So basically i have decompiled unoptimized simple program and saw that it runs through gcrt1.S, and i dived in to assembly language and tried to understand what exactly it does. here is my code and my ...
1
vote
1answer
84 views

PIC programming in Assembly

I went through an assembly program of the PIC16F88 downloaded from microchip and saw something that I have ever seen before ...
0
votes
1answer
108 views

How to “translate” to C the assembly command mov [closed]

I'm not sure how to understand the assembly command mov. e.g. in the following section: ...
0
votes
1answer
57 views

What commands in assembly cast value from hexa to decimal when they are called?

how can I know if a command is treating an immediate as a decimal or as a hexadecimal? For e.g div casts the values into decimal before it makes the arithmetic division: ...
0
votes
1answer
50 views

How does a number is saved in a register

I've tried looking online, but I still haven't quite figured it out - does a number, for example 0x100 saved in a register by some convention like little/big endian like thigs are saved in memory or ...
2
votes
2answers
277 views

How to use structures in 8086 (MASM)

Sample program to add two numbers using structures - ...
3
votes
1answer
180 views

8085; Why RET doesn't require a 6 T-states Fetch cycle?

The CALL instruction, requires 5 machine cycles, namely, OPCODE-FETCH, MEMORY READ, MEMORY READ, MEMORY WRITE, MEMORY WRITE. The ...
0
votes
0answers
47 views

8086 doesn't write to external memory [duplicate]

we are working on a circuit containing a 8086 and 8x(2KB) external memories (6116). the problem is that all control signals are asserted correctly, the address and data is provided but they are not ...
0
votes
1answer
481 views

Connect 8086 cpu to memory chips and io devices in proteus

I have a project based on simulating operation of 8086 processor with memory and I/O devices using Proteus simulator. Memory is eight 2K 6116 chips and I/O contains 2 seven-segment displays and a ...
1
vote
2answers
672 views

How do I perform division of two numbers in PIC16F877A in assembly language?

I'm currently using MPLab x IDE for PIC16F877A I want to divide two numbers and find out the quotient ( Let the two numbers be 10 and 4) and store in some register. I was thinking of a loop which ...
1
vote
2answers
447 views

What does _SFR_IO8(0x04) do? AVR

I'm trying to write a program in assembly to toggle the on-board LED of the Arduino MEGA2560. To do so I just have to indicate the direction of the pin (13 in this case which is PB7) as output and ...
0
votes
1answer
144 views

PIC Microcontroller ADC not functioning

I coded an assembly script to take the input values from two LDRs in parallel. Then my microcontroller was supposed to convert this analogue input into an 8-bit digital value (omitting the 2 LSBs). ...
4
votes
2answers
139 views

Back branches in code

While reading this file on software hazards this slide says: "No Back Branch in the Code" I wonder what does it mean? Normally when we write code in C-language then we don't actually do branching ...
1
vote
2answers
68 views

Load, then add in assembly

Im trying to load 2 values in assembly under the tm4c1294ntpcd (Cortex M4) then add it with the next code ...
-1
votes
3answers
134 views

Startup code in pure Assembly program [closed]

I came across some articles and books that saying when, I write in high-level language like C, startup code is used to prepare for my main code but when I write my program in pure Assembly there is no ...
0
votes
1answer
103 views

Using pointer of a function's returned value

I would like to know if there are possibilities to change the following code: ...
2
votes
1answer
603 views

beq assembly MIPS

I'm so confused about beq function in assembly MIPS. Lets assume I have beq $t1 $t2 60 , so it would be mapped as I type function. so we could say for example ...
3
votes
2answers
82 views

Problem in Clock Gating Control with ARM Tiva C

When I access a peripheral register (such as a GPIO port) just after enabling the clock gating of the peripheral, a hard fault happens. For example: This code doesn't work (generates a hard fault): <...
1
vote
2answers
90 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 ...
1
vote
3answers
477 views

How to look at the emitted assembly code of MPLAB X IDE

I'm using MPLAB X IDE V5.05 to generate the code to program a PIC32MX470F512L. It happens that i'm having some problems in the code and i would want to take a look ...
1
vote
1answer
82 views

Assembly language, accessing bytes of memory

I have some memory address 0x00000100 that I want to read from. The lower 4 bits read from this address indicates the states of 4 buttons - So bit 0 shows the state of button 0, bit 1 shows the state ...
0
votes
1answer
359 views

Logisim input and terminal issue

I had this final gate that I made. but when I run it in terminal. it says my output is E instead of 0/1. I wanna know why my output is E instead of 0/1. The circuit should have four inputs: A, B, C, ...
0
votes
1answer
41 views

Is Pull-up present by default?

I'm using the MC9S12DP512, Motorola's microcontroller. I was executing a service and ,at the end, I put low logic level at the pins PS4, PS5 and PS6, then after that, I configured these pins as inputs....
3
votes
1answer
136 views

As a computer science engineering graduate, do I need to learn Assembly language in today's day and age? [closed]

Given that there are simple and easy to learn/use MCU devices such as those offered by Arduino, Particle, TI (MSP430 series), Microchip (PIC16 series) does it make sense to teach ALP to computer ...
0
votes
1answer
147 views

Assembler program showing ACK even with the wrong slave address, I2C code problem!

I have this project communicating MPR121 capacitive touch sensing keyboard with 8051 microcontroller, with some references I've implemented some I2C code for serial communication between master and ...
1
vote
1answer
49 views

How to check the flow of assembler instructions execution?

I'm creating a project that uses I2C serial communication in assembler and I'm having some issues transmitting data and receiving back so I thought I should somehow debug the whole program, besides ...
1
vote
2answers
325 views

How to check whether a byte of 8 bits contains 1, assembler 8051?

I need to know how to check whether a byte contains a 1 for touch status in a MPR121 project, so if: 00000010 then pin 2 is touched 00000100 then pin 3 is touched How can I detect it? A ...
0
votes
1answer
67 views

[Updated]How to select the values to move in assembler?

I'm trying to make the led blinks on the tm4c1294ncpdt, so the basic idea its to make 2 routines , one to select the GPIO port (in this case the F) and other to keep up on and off. the setup routine ...
19
votes
4answers
4k views

What stops an assembly program from crashing the operating system? [closed]

First of all, I am a beginner, so if this question sounds silly, please point out the incorrect assumptions. From what I understand, the job of an operating system is to manage hardware and the ...

1
2 3 4 5
8