Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: ldi instruction failing

2007-10-02 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, enkitec@... wrote:
>But I don't think there's any mechanism to directly
>deal with a 32 bit value in the assembler.

Using the gnu assembler for 8-bit AVRs, 32-bit values are manipulated 
using hhi8 and hlo8 along with the better known hi8 and lo8 
operators.  For example,

ldi r16, lo8(256040)  ; = 0x28
ldi r17, hi8(256040)  ; = 0xE8
ldi r18, hlo8(256040) ; = 0x03
ldi r19, hhi8(256040) ; = 0x00

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.