Quantcast
Channel: Question and Answer » assembly
Browsing latest articles
Browse All 23 View Live

How to count cycles used by a routine?

I’d like to measure the number of cycles a routine uses on a 8051. I’m guessing that I could toggle a pin on and off and measure the period with a scope and multiply it by the number of cycles the 8051...

View Article



Calculator with MSP430 in Assembly Language

I am programming a calculator in assembly language with the MSP430g2553. I have a 4×4 membrane keypad and an 2×16 LCD. I already can display numbers in the LCD with the keypad. The issue is that the...

View Article

MSP430 Delay Subroutine

I am writing a delay subroutine in assembly language for the MSP430. I want to know how to calculate the number that have to put in Register R10 in order to achieve a 20ms delay. Thanks Delay mov...

View Article

Difference in endianness between operating systems [closed]

There is an assembler that I am writing that is located within the file asm.c located in this repository. It uses the instruction set located in the specs file to produce an output binary. (The program...

View Article

ATmega328P assembler inline text and assembelr ALIGN

I have a program in assembler like this: lots of code ...... .ORG $7000 ;; (or somewhere) atext: .DB "this is a test string 1" .ALIGN EVEN Btext: .DB "this is a test string 2" QUESTION : Assuming the...

View Article


ATMEGA32 LED BLINKER Assembly code problem

I tried the following code for a simple led blinking problem on ATMega32. INCLUDE "M32DEF.INC" SBI DDRC,5 LDI R16,0xFF OUT PORTC,R16 AGAIN:LDI R19,255 LOOP1:LDI R18,255 LOOP2:LDI R20,5 LOOP3:NOP NOP...

View Article

Unit Testing: Assembler code and different architectures

I am currently unit testing some C code and I am faced with a problem: Within the code there are called functions that contain inline assembler code for the SPARC 8 architecture. Since I am doing the...

View Article

using an AduC841 microcontroller. memory read shows pointer not object...

I am using an AduC841 microcontroller programed using assembly language(8051). when using MOVX commands to read/write from internal XRAM to DAC,my oscilloscope shows the value of the DTPR rather than...

View Article


Memory addresses and Assembly

I recently started reading about programming in Assembly. To my knowledge, in Assembly, a programmer, when storing and retrieving their variables, has to specify the address their variables are stored...

View Article


Finding register parameters for system calls

By consulting various scattered tutorials and books, I’ve been able to learn that the 64-bit Linux “exit” system call is 60, and the status value is moved to edi. Similarly, “write” has call number 1,...

View Article
Browsing latest articles
Browse All 23 View Live




Latest Images