It sounds very much like you have a 10-bit ADC and you need to process that data on an 8-bit microcontroller with C code. It also sounds (because you say "I have 2 variables, x and y") like you may be taking two different 10-bit ADC values from two different sensors (for example) and need to process some kind of ratio between those two values as a fraction you know, a priori, to be between 0 and 1.
But I've no real idea. I'm just guessing because you haven't provided EXACT details of what you are trying to do.
Please provide details about the input(s) you have and final output computation result you need (and it's meaning -- what is it, itself, for?) The expression, x ⁄ y⋅256, is nice enough. But it doesn't say anything about the range of x, y, or their relationship to each other. And these details, and more, are important to know. What are you reading in, what do those values represent, how do they relate to each other, and what are you trying to get as a final computed value?
Oh. And what microcontroller is this? And whose compiler?
EDIT:
This is so much better, John. It makes a lot of sense now, too. I'll use my imagination and imagine a button available to take a reading of the ambient light and that from then on the display shows the ratio from there, at 100% or less. (You don't say what it should do if for some reason the 'x' variable should be greater than 'y', but I'll let you worry about that detail.) The ⨯256 is then (I assume) just your attempt to come up with a number that is between 0 and 255, expressing 0% to ²⁵⁵⁄₂₅₆{≈ 99.6%} and get the maximum resolution you can?
And it makes sense now why you do NOT want to haul in a floating point library. It's big, it's slow... and it may be buggy, too. You just want a simple way to do a division without using floating point or, for reasons I'm not entirely sure about, the C18 support for larger integers (even 24-bit as described in Section 4.7 of the "MPLAB C18 C Compiler Libraries" manual.)
The simplistic approach would be to use a 16-bit integer division. You'd shift your 'x' value leftwards so that the 8 bit value sits in the most significant byte. (Just use << 8, I suppose.) Then you would perform a division of this result, by y, using the usual C compiler's choice for whatever it uses for 16-bit integer division. Since you know, a priori, that y > x, the result will fit into 8 bits because if y > x then x ⁄ y < 1 so it must be that (256⋅x) ⁄ y < 256.
But it isn't very good in terms of preserving your precision. Best answer would be to keep your 10-bit values (perhaps using averaging if the noise is Gaussian shaped and you have a couple of noise bits present, at least, to even improve upon that) and then "normalize" your x value so that the uppermost bit is ALWAYS a 1, do the same for your y value too, and then use a very simple division algorithm that you write to calculate exactly what you want from the two of them. In this way, you maximally preserve precision and you only compute the bits you actually need to have. It's very fast this way and at the same time retains the best possible precision and monotonicity of results.
I can probably help you (I mean freely, as in no cost.) I've written many integer and floating point division routines before. And I have programmed on the PIC18 before, as well. But you will perhaps have to write me directly. It's easier if we just interact and get this solved quickly. And I need to understand better why you aren't just using the existing 16-bit division code that is in the library already. (And ask some application questions about the ADC signal, it's S/N, the noise bits, and the like.)