mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Added printPointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1b20ca21c6
commit
5b3a0140a7
@ -67,6 +67,12 @@ printDouble(double d)
|
||||
printf("%g", d);
|
||||
}
|
||||
|
||||
void
|
||||
printPointer(void* p)
|
||||
{
|
||||
printf("0x%x", p);
|
||||
}
|
||||
|
||||
#undef TEST_RUNTIME
|
||||
#ifdef TEST_RUNTIME
|
||||
int
|
||||
@ -76,15 +82,17 @@ main(int argc, char** argv)
|
||||
printString("argc = ");
|
||||
printLong(argc);
|
||||
printString(" = (as float) ");
|
||||
printFloat(argc);
|
||||
printFloat(argc * 1.0);
|
||||
printString(" = (as double) ");
|
||||
printDouble(argc);
|
||||
printDouble(argc * 1.0);
|
||||
for (i=0; i < argc; i++)
|
||||
{
|
||||
printString("\nargv[");
|
||||
printLong(i);
|
||||
printString("] = ");
|
||||
printString(argv[i]);
|
||||
printString("\t@ ");
|
||||
printPointer(argv[i]);
|
||||
}
|
||||
printString("\n");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user