A: |
No. C is enough low-level language that nearly everything which can be done in
ASM can be done in pure C too (of course, pure ASM code is usually faster).
In your concrete example, using of typecasting is quite enough:
address = (char*)0x001fca;
This is really a classic usage of the typecast operator. It is extremely powerful
in C language, so it may be used to convert nearly everything to anything.
This sometimes may be really terrible. For example, in TIGCCLIB implementation, I used very
strange typecasting to convert an array to a function. And, nearly all TIGCCLIB functions
are implemented using a typecast operator which constructs an indirect function call.
For example, when you use something innocent like
DrawStr (0, 0, "Hello", A_NORMAL);
the preprocessor expands it into a really terrible typecast.
See _rom_call for more info.
|