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



Rockbox mail archive

Subject: Rockbox LCD Code (sh-elf-gcc assembler): HELP!
From: Stevie-O (stevie_at_qrpff.net)
Date: 2003-05-28


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, @(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



Page was last modified "Jan 10 2012" The Rockbox Crew
aaa