Your first example is easily changed:
By the way, I marked position 2854 (in the code; it's the slash).
A semicolon is used to join two distinct sentences that you want to be related. Since the second is in the parenthetical, it's obviously closely related to the first. So it's even better with a semicolon.
Consider the fact that parentheses are used for optional information. If you removed the parenthetical, does the sentence have the same meaning? If yes, you're using it correctly, and you should also consider removing it entirely. If "It's the slash" is essential information, the sentence should be:
By the way, I marked position 2854 (in the code). It's the slash.
Now, as for your second example: It's an incorrect use of parentheses, regardless of the use of two sentences. As noted above, a sentence without the parenthetical should have the same meaning. "I marked the semicolon" does not mean anything like "Please try not to eat the semicolon". In fact, the parenthetical qualifies something that comes before it. It's not connected to what comes after, so you cannot continue a sentence started inside the parenthetical. It would have to end inside. To summarize: This usage is 100% wrong and confusing.
Something like the following is also wrong:
That's something (a bear. A bear) with no fur.
The meaning is basically the same both with and without the parenthetical, but consider what happens when you try to split up the sentences.
That's something (a bear.
A bear) with no fur.
That's obviously nonsense. If they were truly separate, fully-formed ideas that should be separate sentences, then you should kill the parentheses and actually make them separate sentences:
That's something. A bear with no fur.
Again, a semicolon works best when you're truly conveying one idea.
That's something (a bear; a bear with no fur).
Of course, the example is silly, but it's grammatically correct!