Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Rockbox mail archive

Subject: Rockbox LCD Code (sh-elf-gcc assembler): HELP!

Rockbox LCD Code (sh-elf-gcc assembler): HELP!

From: Stevie-O <stevie_at_qrpff.net>
Date: Tue, 27 May 2003 20:05:12 -0400

I'm trying to understand some assembler code that was apparently written by Alan
Korr. The only e-mail address I have for him is bounces. If anyone can reveal
the following secret tricks he used for lcd_write(), please do so!

---
The lcd_write() function uses some stuff I've never seen, and cannot find any 
documentation on.  A nice example is the very first thing that happens:
     asm("and.b %0, _at_(r0,gbr)"
          :
          : /* %0 */ "I"(~(LCD_CS|LCD_DS|LCD_SD|LCD_SC)),
            /* %1 */ "z"(LCDR));
The first thing I do not understand is is the fact the inclusion of a '%1', yet 
no '%1' is referenced, only '%0'.
The second thing is this "z", no documentation for which exists anywhere, it 
seems. I'm assuming that the 'I' is an immediate value, and that (in the other 
asm statements) that 'r' can be anywhere from r0 to r14 (since r15==stack ptr).
Can someone please enlighten me?
-- 
- Stevie-O
Real Programmers use COPY CON PROGRAM.EXE
Received on 2003-05-28

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy