![[Toc]](../../toc.gif)
![[Index]](/idx.gif)
Memory I/O Commands
Memory I/O commands have only simple, single-port access format. Block
I/O or indexing is not facilitated. Supported widths are Byte, Word, or
Dword. Both destination and source represent either physical addresses or
a register. The syntax is as follows:
READB( destination, source ); //read from source address, store
//in destination variable
READW(destination, source );
READDW( destination, source);
<destination> ::= <register>
<source> ::= <constant> | <mmio variable>
WRITEB( destination, source ); //read from source variable, store
//in destination address
WRITEW( destination, source );
WRITEDW( destination, source );
<destination> ::= <mmio variable> | <constant>
<source> ::= <constant>|<register>
For example:
writedw(interrupt_en, r1); //interrupt_en already declared.
writeb(0xa0000080,0x88); //write 0x88 into phys. add 0xa00000080
readw(r1, 0xa0000080); //read a word from 0xa0000080 into r1.
Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs