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
1 answer
374 views

Writing a method using MIPS code

I am trying to understand how convert C code to MIPS code and I have having trouble understanding why the stack pointer( $sp ) needs to be manipulated before and after the procedural code.Isn't the ...
KillaKem's user avatar
  • 1,750
0 votes
1 answer
45 views

Is it possible to force an input port during debugging in MPLAB IDE v8?

I am using MPLAB IDE v8 (not IDE X) to write some PIC programs (PIC18F4321) in assembly. I am using the debugging tool MPLAB SIM to debug the programs, however I am not able to force port bits from ...
bardulia's user avatar
  • 407
0 votes
1 answer
234 views

Programming an old school microcontroller (MSM80C49 from OKI semiconductor)

I've read the whole datasheet, there's no typical guidance on programming procedure/setup/circuitry. It just mentions a few steps on how to order pre-programmed chips. (I guess) on page 18. On a ...
Elementronics's user avatar
0 votes
1 answer
1k 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: ...
E. Ginzburg's user avatar
0 votes
1 answer
354 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 ...
E. Ginzburg's user avatar
0 votes
1 answer
3k 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 ...
sahand_77.s's user avatar
0 votes
1 answer
4k 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, ...
kristyahh wu's user avatar
0 votes
3 answers
779 views

Why do we need to declare ports as input/output?

I am writing code in assembly language (AT89s51). When I see a standard program, the ports are typically defined as inputs or outputs. But, without defining them it seems to work fine. How is this ...
pankaj prasad's user avatar
0 votes
2 answers
2k views

Restoring deleted designators on Altium PCB

Is there a way to restore component designators on the PCB without having to delete and re-add the component in the schematic? I deleted quite a few designators while I was laying out the design and ...
izelkay's user avatar
0 votes
1 answer
333 views

instruction in 8051 assembly

I have problems understanding what does this instruction do MOV number,#(4+3)SHL(4)SHR(4) googling gave me this "operand1 SHL operand2" which is different than the instruction i wrote above . Can ...
layla's user avatar
  • 27
0 votes
1 answer
2k views

How to simulate a PIC microcontroller using Proteus

I wrote a simple assembly program and the uploaded it to the PIC16F1939 in the laboratory, and everything worked just as as expected (the LEDs blinked as they were supposed to). However, I tried ...
Emir Šemšić's user avatar
0 votes
1 answer
132 views

How to store modify and resend 4 bytes of data from an assembly coded dspic to that in a c compiler based pic18f

I'm using Xc8 compiler and pic18f.Im communicating with a dspic30f ;coded in assembly and receiving a 4 byte variable via i2c. Task: I have to receive the 4 byte packet store,modify it and send back ...
Rookie91's user avatar
  • 2,118
0 votes
1 answer
137 views

Where can I find some basic information about ICT? [closed]

I'm trying to find some information about the basics of ICT (In Circuit Testing) but having trouble finding anything useful. From the few things I managed to find, I gather that an ICT tester is a ...
sgdsgyhetwaraw's user avatar
0 votes
2 answers
60 views

Most efficient way to switch order in which data is read in assembly

I have an assembly assignment that requires me to be able to store a number and via a lookup table output the number on a 7 seg display in both forward and reverse order depending on the state of an ...
BenG's user avatar
  • 594
0 votes
1 answer
344 views

How do ALU flags communicate with the rest of the computer?

How are ALU flags connected to various parts of a computer? I've just finished building an 8 bit computer in Logisim that can add subtract and compare... and am wondering how I can make it multiply (...
user86034's user avatar
0 votes
2 answers
3k views

8080 assembly comparing which of the numbers is greater etc

In my 8080 assembly project I need to check if user entered digits and if so do some stuff on it, otherwise display some error and close app. Normally i would do it like that ...
Rotek's user avatar
  • 3
0 votes
1 answer
1k views

5-stage pipelined implementation (RISC) of a microprocessor

I'm trying to solve two questions about a RISC 5-staged pipeline that is not exactly like MIPS found here (everything is included in this post). Consider the non-pipelined implementation of a simple ...
Carlo's user avatar
  • 129
0 votes
1 answer
890 views

ISA efficiency code compaction and memory traffic

I'm having issues understanding this problem and am new to ISA's. Here's a problem with 3 questions and my biggest question is, what is supposed to happen? Specifically, the HLL Code at the bottom. ...
Carlo's user avatar
  • 129
0 votes
3 answers
4k views

Cortex M3 delay 1us

Im trying to achieve 1us delay to be able to drive 1-wire bus. My proc is working on 10Mhz PCLK so I tried to use timer function with overflow on 10th cycle. For some reason it gives me resolution of ...
Gossamer's user avatar
  • 663
0 votes
1 answer
157 views

Beginner resources device design/assembly [closed]

During the summer I would love to get into electrical engineering. As background, I'm a computer scientist and as such, I have a fairly decent grasp of basic circuit design and electricity, which ...
FHannes's user avatar
  • 129
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 ...
steve's user avatar
  • 27
0 votes
3 answers
544 views

4-bit mode of LCD-1602 using 8052 µc

I try writing "NO" in the LCD using 4-bit mode. So, I programmed the AT89S52 to send the upper nibble first to the last 4 data inputs of the LCD. I used AND operation to eliminate the lower ...
Kiroloes Amir's user avatar
0 votes
2 answers
284 views

AVR "OUT" function. addressing port without constant

I am currently writing some assembly code that needs to address different I/O ports at certain times in my code. For example, at one point I may want to address PORTD4, and at another point I may want ...
dhout23's user avatar
  • 15
0 votes
1 answer
579 views

Going below the bottom of the stack in ATmega328P

I'm working with an AVR based project and just have one curiosity. The ATmega328P has total 2kB of SRAM. The lowest address of the stack can be 0x8FF. Now suppose the stack pointer is at 0x8FF. What ...
user137273's user avatar
0 votes
1 answer
254 views

8051 initializing data in external memory

I am trying to understand the use of external memory with an 8051. When you are using external memory with something like C8051F962 where you have to configure the ports to access the memory, how do ...
jchristiansen's user avatar
0 votes
1 answer
182 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 ...
Thanh Nhon's user avatar
0 votes
1 answer
564 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). ...
slhulk's user avatar
  • 143
0 votes
1 answer
119 views

Using pointer of a function's returned value

I would like to know if there are possibilities to change the following code: ...
thexeno's user avatar
  • 1,305
0 votes
1 answer
699 views

.dw directive in AVR assembler

the piece of code below is mentioned in 8-bit AVR's instruction set as an example to explain the LPM instruction. ...
Amjal's user avatar
  • 21
0 votes
3 answers
1k views

IT TTT block in assembly language

Why do we have four instructions in IT block for Cortex M4 processor? Is it related to the fact that we have three pipelines for ARM assembly instructions?
user185172's user avatar
0 votes
1 answer
203 views

Converting negative numbers to hexadecimal number system

I was programming in 8051 and I faced this problem I had to convert the number -10000 to hexadecimal ( 2 bytes) the answer is 0D8h = #HIGH(-10000) 0F0h =LOW (-10000) but how the answer was found /...
layla's user avatar
  • 27
0 votes
1 answer
789 views

Why does out command works wrong? (Proteus 8086)

I am trying to create an output unit for 8086 microprocessor which is connected to MP's 00ABh(10101011) address. I used 74LS373 for that. This is how I made connections: When I run the code below, ...
Erkan's user avatar
  • 1
0 votes
1 answer
109 views

assembly timer code [ C8051F340 ] explanation [closed]

Hi my problem is that I cant understand this code when I test it on my microcontroller Si Lab [ C8051F340 ]and let it run step by step My problem is basically is when I test the program on my ...
layla's user avatar
  • 27
0 votes
1 answer
311 views

How exactly do clock speeds of computers relate to operation speeds?

I was wondering about this the other day when I was explaining binary and hexadecimal to a friend of mine and this came up. The question goes something like this: How exactly do instruction ...
user108391's user avatar
0 votes
2 answers
483 views

Fill ROM with jump instructions

As I have heard it is a common practice to fill the unused flash memory of a microcontroller with an jump instruction to the reset function. This aids in resetting the MCU in case of the PC is corrupt,...
Fotis Panagiotopoulos's user avatar
0 votes
1 answer
104 views

Packaging a small electronics project

(first question on this board - n00b alert) I'm on a second iteration of a small autonomous project which logs changes in magnetism. It consists of just: Espruino board Lipo battery HMC5883L ...
Cups's user avatar
  • 105
0 votes
1 answer
637 views

WS2811 RGB LED Strip Timing Issue

I recently purchased addressable RGB LED strips based on the WS2811 chip. These strips have a single data + clock line that uses NRZ style encoding to distinguish between a 1 and 0. The datasheet for ...
Ankit's user avatar
  • 1,751
0 votes
1 answer
2k views

PIC18 inline asm problem: error (195) expression syntax

I'm building a bootloader firmware, and now I want a simple app (LED blinks) to test calling bootloader from application itself. I'm currently doing: ...
Rorschach's user avatar
  • 113
0 votes
2 answers
108 views

Shift value to some point in binary number

I wonder if it is possible to do the following. For instance, I have a number 00001110. I am shifting it left. -> 00011100.... But the question is if it possible to start setting value in carry flag ...
solderingiron's user avatar
0 votes
1 answer
1k views

XMega bootloader - How to make use of the functions in assembly source file

Its been two days I'm trying to write a Bootloader for ATXMega32E5. The Atmel studio doesn't have boot.h header file supporting XMega. As a result of searching and ...
gzix's user avatar
  • 403
0 votes
1 answer
19k views

How to calculate cache size?

A cache with a line size of L 32-bit words, S number of sets, W ways, and addresses are made up of A bits. Assume that the cache is word addressed, i.e., the low two bits of the address are always ...
John's user avatar
  • 15
0 votes
1 answer
543 views

pic18f instruction reference for XC8 Assembler

I found lots of tutorials online on PIC18 assembly programming, but i did not found any official document from microchip on PIC18 architecture and assembly programming. Can anybody share the link ?
GOKU's user avatar
  • 322
0 votes
1 answer
901 views

How to understand initialization and stack checking of ARM assembly language [closed]

I am trying to understand How bad a 'void main(void)' is from the following link: tech notes. But I have difficulties in understanding two assembly languages examples, the first one is shown below: <...
oilpig's user avatar
  • 863
0 votes
1 answer
279 views

Seeing how Instructions get Translated (Computer Architecture) [closed]

Little bit of a confusing question, also an x-post (Since it may be more suited here than SO). But anyways Im really looking for learning some low level programming. Thing is, Dev boards like Arduino/...
user avatar
0 votes
2 answers
706 views

AVR Assembly - Operations with two 8-bit registers in 16-bit

...
Aaron7's user avatar
  • 101
0 votes
1 answer
339 views

Help understanding ARM Cortex-M4 SBC instruction

Page 88 of the ARM Cortex-M4 Generic User Guide says "The SBC instruction subtracts the value of Operand2 from the value in Rn. If the carry flag is CLEAR, the result is reduced by one." Why ...
user avatar
0 votes
1 answer
1k views

PIC10F200 - blinking LED (pic-as) - Assembly

The code below worked for my 10F206, but now I use a 10F200 and for some reason the led does not blink anymore. (compiler: pic-as 2.30, IDE: MPLAB X IDE 5.40) It compiles but the led stays off. ...
theerrormagnet's user avatar
0 votes
1 answer
1k views

imm8 in ARM data-processing instruction

In ARM, Data-processing instructions have an unusual immediate representation involving an 8-bit unsigned immediate, imm8, and a 4-bit rotation, rot. imm8 is rotated right by 2 × rot to create a 32-...
Tan Nguyen's user avatar
0 votes
1 answer
443 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 ...
snyderitis's user avatar
0 votes
1 answer
40 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 ...
efox29's user avatar
  • 12k

1
6
7
8 9 10