home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.uni-stuttgart.de/pub/systems/acorn/
/
Acorn.tar
/
Acorn
/
riscos
/
problems
/
asm-c
/
c2asm-example.text
next >
Wrap
Text File
|
1991-04-25
|
567b
|
33 lines
c:
int NiceInt;
char BeautifulChar[20];
int main(void) {
.
.
DoSomething();
}
Assembler:
.PROC DoSomething
.IMPORT NiceInt
.IMPORT BeautifulChar
LDR R1,AdrsNiceInt
MOV R0,#0
STR R0,[R1] ; set NiceInt to 0
LDR R2,AdrsBeautiful
STRB R0,[R2] ; set BeautifulChar to ""
MOVS PC,R14
AdrsNiceInt .WORD NiceInt
AdrsBeautiful .WORD BeautilfulChar
.END