I would change address to a pointer and change the address to point to an unsigned char (I am guess you are writing 1 byte at a time) so the function declaration would look like this:
void di_in_ram(unsigned char command, unsigned char *address, unsigned char data)
then if you want to write '$' to 0x400 you can cast 0x400 to be a pointer in the call
di_in_ram(WRITE_DATA,(unsigned int *)0x400,'$');
In function di_in_ram you then set what is pointed to by address to data with:
*address = data;
This is follow by the flash writing process that you seem to be aware of.